# API Reference
Directus offers both a RESTful (opens new window) and GraphQL (opens new window) API to manage the data in the database. The API has predictable resource-oriented URLs, relies on standard HTTP status codes, and uses JSON for input and output.
The input/output of the API differs greatly for individual installs, as most of the endpoints will return data that's based on your specific schema.
New to Directus?
See our Getting Started guide if this is your first time working with Directus.
# Projects
Directus supports multi-tenancy out of the box. In order to do this, most endpoints will be prefixed with a project key based on the configuration filename.
When installing Directus for the first time, you'll be asked to provide a project key for your project. This is the project key that Directus expects in endpoints that require the project attribute.
# Authentication
By default, all data in the system is off limits for unauthenticated users. To gain access to protected data, you must include an access token with every request.
You pass the token in either the Authorization header, or a query parameter:
Authorization: bearer t0k3n
?access_token=t0k3n
To learn more, checkout the authentication reference.
# Errors
Directus relies on standard HTTP status code to indicate the status of a request. Next to that, the API uses numeric codes to avoid the need for translated error messages based on locale. The error property is only present when an error has occurred.
# Endpoints
# Items
Items are individual pieces of data in your database. They can be anything, from articles, to IoT status checks.
# Files
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.
# Activity
All events that happen within Directus are tracked and stored in the activities collection. This gives you full accountability over everything that happens.
# Collections
Collections are the individual collections of items, similar to tables in a database.
Changes to collections will alter the schema of the database.
# Collection Presets
Collection presets hold the preferences of individual users of the platform. This allows Directus to show and maintain custom item listings for users of the app.
# Extensions
Directus can easily be extended through the addition of several types of extensions, including layouts, interfaces, and modules.
# Fields
Fields are individual pieces of content within an item. They are mapped to columns in the database.
# Folders
Folders don't do anything yet, but will be used in the (near) future to be able to group files.
# GraphQL
GraphQL provides a complete description of the data in your API, giving you the power to ask for exactly what you need, and nothing more.
Send electronic mail through the electronic post.
# Permissions
Permissions control who has access to what and when.
# Projects
Projects are the individual tenants of the platform. Each project has its own database and data.
# Relations
What data is linked to what other data. Allows you to assign authors to articles, products to sales, and whatever other structures you can think of.
# Revisions
Revisions are individual changes to items made. Directus keeps track of changes made, so you're able to revert to a previous state at will.
# Roles
Roles are groups of users that share permissions.
# SCIM
Directus partially supports Version 2 of System for Cross-domain Identity Management (SCIM). It is an open standard that allows for the exchange of user information between systems, therefore allowing users to be externally managed using the endpoints described below.
# Server
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.
# Settings
Settings control the way the platform works and acts.
# Users
Users are what gives you access to the data.
# Utilities
Directus comes with various utility endpoints you can use to simplify your development flow.
← Users Authentication →