Files
directus/docs/guides/accessing-data.md
Alex Tremblay 88bf146fbb docs: add API-using examples to module and layout guides (#5110)
* docs: add API-using examples to module and layout guides

* Update docs/guides/layouts.md

* Update docs/guides/layouts.md

* Update docs/guides/modules.md

* Update docs/guides/modules.md

Co-authored-by: Alex Tremblay <alex@tremblay.in>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-04-16 15:44:13 -04:00

707 B

Accessing Data

TK

Accessing API Data from your extensions

For examples on how to access collections and fields in the API from within your custom extensions, see the Layout and Module guides.

Storing Sensitive Extension Variables

If your extension requires storing sensitive data, such as an API Key, you can store that information in custom environment variables. This data can then be accessed globally by server-side extensions (eg: custom hooks or endpoints). If you need access to that private data on the client-side (eg: custom interfaces or displays), then you would expose that env variable via a custom endpoint with proper limitations.