Server
Provides detailed information about the project server, its schema, and its health. Learn more about Projects.
Get OpenAPI Specification
Retrieve the OpenAPI spec for the current project.
Permissions
This OAS spec is based on the read permissions of the currently authenticated user.
Request
Response
Object conforming to the OpenAPI Specification
Example
Get GraphQL SDL
Retrieve the GraphQL SDL for the current project.
Permissions
The SDL is based on the permissions of the currently authenticated user.
Request
Returns
GraphQL SDL file.
type about_us {
id: Int
introduction: String
our_process: String
sales_email: String
general_email: String
primary_color: String
secondary_color: String
logo: directus_files
mark: directus_files
}
type articles {
id: Int
status: String
# ...
}
# etc
type about_us {
id: Int
introduction: String
our_process: String
sales_email: String
general_email: String
primary_color: String
secondary_color: String
logo: directus_files
mark: directus_files
}
type articles {
id: Int
status: String
# ...
}
# etc
Example
Ping
Ping... pong! 🏓
Request
Returns
Pong.
Example
Info
Information about the current installation.
Permissions
The public information is returned for everybody. Admin users get additional information (see below).
Request
Response
project
object
Public information about the project. Used to render the Data Studio public pages.
See the settings object for more information on the individual properties of the project
object.
Logged in users also get the following information:
rateLimit
false | object
Whether or not the rate limiter is enabled.
rateLimit.points
number
If rate-limiter is enabled, amount of allowed points per duration
rateLimit.duration
number
If rate-limiter is enabled, duration in seconds in which points are counted
queryLimit.default
number
The default query limit used when not defined in the API request
queryLimit.max
number
The maximum query limit accepted on API requests
Example
Health
Get the current health status of the server.
The /server/health
endpoint shows you a general health status for the server and all connected (third party) services, such as Redis or S3.
The output is based on the "Health Check Response for HTTP APIs" draft spec: Health Check Response Format for HTTP APIs Draft Specification.
This endpoint can be used to ensure a healthy system when running in a horizontally scaled setup, like Kubernetes, Google Cloud Platform or AWS Elastic Beanstalk.
By default, the endpoint only returns a status
of ok
, warn
or error
. By authenticating as an admin, it will return more in-depth information about the current health status of the system.
{
"status": "ok"
}
{
"status": "ok"
}
{
"status": "ok",
"releaseId": "10.0.0",
"serviceId": "https://directus.example.com",
"checks": {
"pg:responseTime": [
{
"status": "ok",
"componentType": "datastore",
"observedUnit": "ms",
"observedValue": 0.489
}
],
"pg:connectionsAvailable": [
{
"status": "ok",
"componentType": "datastore",
"observedValue": 2
}
],
"pg:connectionsUsed": [
{
"status": "ok",
"componentType": "datastore",
"observedValue": 0
}
],
"storage:local:responseTime": [
{
"status": "ok",
"componentType": "objectstore",
"observedValue": 1.038,
"observedUnit": "ms"
}
],
"email:connection": [
{
"status": "ok",
"componentType": "email"
}
]
}
}
{
"status": "ok",
"releaseId": "10.0.0",
"serviceId": "https://directus.example.com",
"checks": {
"pg:responseTime": [
{
"status": "ok",
"componentType": "datastore",
"observedUnit": "ms",
"observedValue": 0.489
}
],
"pg:connectionsAvailable": [
{
"status": "ok",
"componentType": "datastore",
"observedValue": 2
}
],
"pg:connectionsUsed": [
{
"status": "ok",
"componentType": "datastore",
"observedValue": 0
}
],
"storage:local:responseTime": [
{
"status": "ok",
"componentType": "objectstore",
"observedValue": 1.038,
"observedUnit": "ms"
}
],
"email:connection": [
{
"status": "ok",
"componentType": "email"
}
]
}
}
Request
Returns
status
string
One of ok
, warn
, error
.
Authenticated admin users also get the following information:
releaseId
string
Directus version in use.
serviceId
string
Public URL of the current Directus instance.
checks
array
Array with the status of all individually connected services.