Download OpenAPI specification:
This is a dynamically generated API specification for all endpoints existing on the current project.
Image typed files can be dynamically resized and transformed to fit any need.
| id required | string The id of the file. |
| key | string The key of the asset size configured in settings. |
| transforms | string A JSON array of image transformations |
| download | boolean Download the asset to your computer |
{- "error": {
- "code": 0,
- "message": "string"
}
}All data within the platform is private by default. The public role can be configured to expose data without authentication, or you can pass an access token to the API to access private data.
Retrieve a Temporary Access Token
| email required | string Email address of the user you're retrieving the access token for. |
| password required | string <password> Password of the user. |
| mode | string Default: "json" Enum: "json" "cookie" "session" Whether to retrieve the refresh token in the JSON response, or in a httpOnly cookie. |
| otp | string The user's one-time-password (if MFA is enabled). |
{- "email": "admin@example.com",
- "password": "password",
- "mode": "json",
- "otp": "string"
}{- "data": {
- "access_token": "eyJhbGciOiJI...",
- "expires": 900,
- "refresh_token": "yuOJkjdPXMd..."
}
}Refresh a Temporary Access Token.
| refresh_token | string JWT access token you want to refresh. This token can't be expired. |
| mode | string Default: "json" Enum: "json" "cookie" "session" Whether to submit and retrieve the refresh token in the JSON response, or in a httpOnly cookie. |
{- "refresh_token": "eyJ0eXAiOiJKV...",
- "mode": "json"
}{- "data": {
- "access_token": "eyJhbGciOiJI...",
- "expires": 900,
- "refresh_token": "Gy-caJMpmGTA..."
}
}Log Out
| refresh_token | string The refresh token to invalidate. If you have the refresh token in a cookie through /auth/login, you don't have to submit it here. |
| mode | string Enum: "json" "cookie" "session" Whether the refresh token is submitted in the JSON response, or in a httpOnly cookie. |
{- "refresh_token": "eyJ0eXAiOiJKV...",
- "mode": "json"
}Request that a password reset email be sent. This does not apply to users authenticated through external providers (OAuth, SAML, LDAP, etc.).
| email required | string Email address of the user you're requesting a reset for. |
{- "email": "admin@example.com"
}{- "error": {
- "code": 0,
- "message": "string"
}
}The request a password reset endpoint sends an email with a link to the admin app which in turn uses this endpoint to allow the user to reset their password.
| token required | string One-time use JWT token that is used to verify the user. |
| password required | string <password> New password for the user. |
{- "token": "eyJ0eXAiOiJKV1Qi...",
- "password": "password"
}{- "error": {
- "code": 0,
- "message": "string"
}
}Start OAuth flow using the specified provider
| provider required | string Key of the activated OAuth provider. |
| redirect | string Where to redirect on successful login. |
{- "public": true,
- "data": {
- "token": "string"
}
}Access to where Directus runs. Allows you to make sure your server has everything needed to run the platform, and check what kind of latency we're dealing with.
Perform a system status check and return the options.
| super_admin_token required | integer The first time you create a project, the provided token will be saved and required for subsequent project installs. It can also be found and configured in |
{- "data": { }
}Files can be saved in any given location. Directus has a powerful assets endpoint that can be used to generate thumbnails for images on the fly.
List the files.
| fields | Array of strings Control what fields are being returned in the object. |
| limit | integer A limit on the number of objects that are returned. |
| offset | integer How many items to skip when fetching data. |
| sort | Array of strings How to sort the returned items. |
| filter | object Example: filter={"<field>":{"<operator>":"<value>"}} Select items in collection by given conditions. |
| search | string Filter by items that contain the given search query in one of their fields. |
| meta | string What metadata to return in the response. |
{- "data": [
- {
- "filename_disk": "a88c3b72-ac58-5436-a4ec-b2858531333a.jpg",
- "folder": null
}
], - "meta": {
- "total_count": 0,
- "filter_count": 0
}
}Retrieve a single file by unique identifier.
| id required | string Example: 8cbb43fe-4cdf-4991-8352-c461779cec02 Unique identifier for the object. |
| fields | Array of strings Control what fields are being returned in the object. |
| meta | string What metadata to return in the response. |
{- "data": {
- "filename_disk": "a88c3b72-ac58-5436-a4ec-b2858531333a.jpg",
- "folder": null
}
}List the blog_posts items.
| fields | Array of strings Control what fields are being returned in the object. |
| limit | integer A limit on the number of objects that are returned. |
| meta | string What metadata to return in the response. |
| offset | integer How many items to skip when fetching data. |
| sort | Array of strings How to sort the returned items. |
| filter | object Example: filter={"<field>":{"<operator>":"<value>"}} Select items in collection by given conditions. |
| search | string Filter by items that contain the given search query in one of their fields. |
{- "data": [
- {
- "id": 0,
- "title": "string",
- "date": "2019-08-24",
- "body": "string",
- "description": "string",
- "path": "string",
- "image": "string",
- "badge": "string"
}
], - "meta": {
- "total_count": 0,
- "filter_count": 0
}
}Retrieve a single blog_posts item by unique identifier.
required | integer or string Index of the item. |
| fields | Array of strings Control what fields are being returned in the object. |
| meta | string What metadata to return in the response. |
| version | string Retrieve an item's state from a specific Content Version. The value corresponds to the "key" of the Content Version. |
{- "data": {
- "id": 0,
- "title": "string",
- "date": "2019-08-24",
- "body": "string",
- "description": "string",
- "path": "string",
- "image": "string",
- "badge": "string"
}
}List the blog_posts items.
| fields | Array of strings Control what fields are being returned in the object. |
| limit | integer A limit on the number of objects that are returned. |
| meta | string What metadata to return in the response. |
| offset | integer How many items to skip when fetching data. |
| sort | Array of strings How to sort the returned items. |
| filter | object Example: filter={"<field>":{"<operator>":"<value>"}} Select items in collection by given conditions. |
| search | string Filter by items that contain the given search query in one of their fields. |
{- "data": [
- {
- "id": 0,
- "title": "string",
- "date": "2019-08-24",
- "body": "string",
- "description": "string",
- "path": "string",
- "image": "string",
- "badge": "string"
}
], - "meta": {
- "total_count": 0,
- "filter_count": 0
}
}Retrieve a single blog_posts item by unique identifier.
required | integer or string Index of the item. |
| fields | Array of strings Control what fields are being returned in the object. |
| meta | string What metadata to return in the response. |
| version | string Retrieve an item's state from a specific Content Version. The value corresponds to the "key" of the Content Version. |
{- "data": {
- "id": 0,
- "title": "string",
- "date": "2019-08-24",
- "body": "string",
- "description": "string",
- "path": "string",
- "image": "string",
- "badge": "string"
}
}