Schema

Retrieve Schema Snapshot

Retrieve the current schema. This endpoint is only available to admin users.

get/schema/snapshot

Query parameters

export'csv' | 'csv_utf8' | 'json' | 'xml' | 'yaml'

Saves the API response to a file. Accepts one of "csv", "csv_utf8", "json", "xml", "yaml".

Response

Successful request

Example response

{
  "data": {
    "version": 1,
    "collections": [
      {
        "collection": "customers"
      }
    ],
    "fields": [
      {
        "collection": "about_us",
        "field": "id"
      }
    ],
    "relations": [
      {
        "id": 1,
        "many_collection": "directus_activity",
        "many_field": "user",
        "one_collection": "directus_users"
      }
    ]
  }
}

Changes