mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
* Simplified generics and imports for items page snippets * Simplified generics and imports for files page snippets * Fixing simplified generic snippets in items page * Simplified generics and imports for activity page snippets * Simplified generics and imports for collections page snippets * Simplified generics and imports for dashboards page snippets * Simplified generics and imports for extensions page snippets * Simplified generics and imports for fields page snippets * Simplified generics and imports for flows page snippets * Simplified generics and imports for folders page snippets * Simplified generics and imports for notifications page snippets * Simplified generics and imports for operations page snippets * Simplified generics and imports for panels page snippets * Simplified generics and imports for permissions page snippets * Simplified generics and imports for presets page snippets * Simplified generics and imports for relations page snippets * Simplified generics and imports for relations page snippets * Simplified generics and imports for revisions page snippets * Simplified generics and imports for roles page snippets * Consolidated imports for schema page snippets * Simplified generics and imports for server page snippets * Simplified generics and imports for settings page snippets * Fixed mixed up snippets and simplified generics and imports for shares page snippets * Simplified generics and imports for translation page snippets * Fixed mixed up snippets and simplified generics and imports for user page snippets * Simplified generics and imports fo uutilitie pages snippets * Simplified generics and imports for webhook pages snippets * Simplified generics and imports for authentication pages snippets * Consolidated imports for query pages sdk snippets * Format files * Update lockfile * Fix spelling * Format snippets * Aling `result` const * Small clean-ups - Align `SEARCH` snippets, move "Learn more..." next to other hint - ids -> IDs - Other alignments --------- Co-authored-by: Bevis Halsey-Perry <hi@be7.is> Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
90 lines
1.6 KiB
Markdown
90 lines
1.6 KiB
Markdown
---
|
|
description: REST and GraphQL API documentation on the Extensions collection in Directus.
|
|
readTime: 1 min read
|
|
pageClass: page-reference
|
|
---
|
|
|
|
# Extensions
|
|
|
|
> The extensions endpoints are used by the Admin App to retrieve what extensions to install.
|
|
> [Learn more about Extensions](/user-guide/overview/glossary#extensions).
|
|
|
|
## List Extensions
|
|
|
|
List the available extensions in the project. The types of extensions that you can list are `interfaces`, `displays`,
|
|
`layouts`, and `modules`.
|
|
|
|
### Request
|
|
|
|
<SnippetToggler :choices="['REST', 'GraphQL', 'SDK']" label="API">
|
|
<template #rest>
|
|
|
|
`GET /extensions/:type`
|
|
|
|
</template>
|
|
<template #graphql>
|
|
|
|
`POST /graphql/system`
|
|
|
|
```graphql
|
|
type Query {
|
|
extensions: extensions
|
|
}
|
|
```
|
|
|
|
</template>
|
|
<template #sdk>
|
|
|
|
```js
|
|
import { createDirectus, rest, readExtensions } from '@directus/sdk';
|
|
|
|
const client = createDirectus('directus_project_url').with(rest());
|
|
|
|
const result = await client.request(readExtensions(extension_type));
|
|
```
|
|
|
|
</template>
|
|
</SnippetToggler>
|
|
|
|
#### Query Parameters
|
|
|
|
This endpoint doesn't currently support any query parameters.
|
|
|
|
### Response
|
|
|
|
An array of interface extension keys.
|
|
|
|
### Example
|
|
|
|
<SnippetToggler :choices="['REST', 'GraphQL', 'SDK']" label="API">
|
|
<template #rest>
|
|
|
|
`GET /extensions/interfaces`
|
|
|
|
</template>
|
|
<template #graphql>
|
|
|
|
`POST /graphql/system`
|
|
|
|
```graphql
|
|
query {
|
|
extensions {
|
|
interfaces
|
|
}
|
|
}
|
|
```
|
|
|
|
</template>
|
|
<template #sdk>
|
|
|
|
```js
|
|
import { createDirectus, rest, readExtensions } from '@directus/sdk';
|
|
|
|
const client = createDirectus('https://directus.example.com').with(rest());
|
|
|
|
const result = await client.request(readExtensions('interfaces'));
|
|
```
|
|
|
|
</template>
|
|
</SnippetToggler>
|