mirror of
https://github.com/directus/directus.git
synced 2026-02-03 18:05:29 -05:00
* 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>
707 B
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.