mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04: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>
15 lines
707 B
Markdown
15 lines
707 B
Markdown
# 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](/guides/layouts/) and [Module](/guides/modules/) 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.
|