Database APIs
Use our dynamic REST and GraphQL APIs to access and efficiently manage your data.
Resource Hub
Explore our resources and powerful data engine to build your projects confidently.
import { createDirectus, rest, readItems } from '@directus/sdk';
const client = createDirectus('https://xyz.directus.app').with(rest());
const item = await client.request(
readItems('articles', {
fields: ['id', 'title', 'date_published', 'summary']
})
);
import { createDirectus, rest, readItems } from '@directus/sdk';
const client = createDirectus('https://xyz.directus.app').with(rest());
const item = await client.request(
readItems('articles', {
fields: ['id', 'title', 'date_published', 'summary']
})
);
import { createDirectus, rest, createItem } from '@directus/sdk';
const client = createDirectus('https://xyz.directus.app').with(rest());
const item = await client.request(
createItem('articles', {
title: 'Hello, world!',
summary: 'This is my next big thing.'
})
);
import { createDirectus, rest, createItem } from '@directus/sdk';
const client = createDirectus('https://xyz.directus.app').with(rest());
const item = await client.request(
createItem('articles', {
title: 'Hello, world!',
summary: 'This is my next big thing.'
})
);
import { createDirectus, rest, createUser, authentication } from '@directus/sdk';
const client = createDirectus('https://xyz.directus.app').with(rest()).with(authentication());
const newUser = await client.request(
createUser({
email: 'user@example.com',
password: 'd1r3ctu5'
})
);
const user = await client.login('user@example.com', 'd1r3ctu5');
import { createDirectus, rest, createUser, authentication } from '@directus/sdk';
const client = createDirectus('https://xyz.directus.app').with(rest()).with(authentication());
const newUser = await client.request(
createUser({
email: 'user@example.com',
password: 'd1r3ctu5'
})
);
const user = await client.login('user@example.com', 'd1r3ctu5');
import { createDirectus, realtime } from '@directus/sdk'
const client = createDirectus('https://xyz.directus.app').with(realtime({ authMode: 'public' }));
const { subscription } = await client.subscribe('messages');
for await (const item of subscription) {
console.log(item);
}
import { createDirectus, realtime } from '@directus/sdk'
const client = createDirectus('https://xyz.directus.app').with(realtime({ authMode: 'public' }));
const { subscription } = await client.subscribe('messages');
for await (const item of subscription) {
console.log(item);
}
Use our dynamic REST and GraphQL APIs to access and efficiently manage your data.
Structure and organize items, fields, and relationships in your collections.
Use our powerful and simple authentication features in your own applications.
Build, modify or expand any feature needed for your project with our flexible extensions.
Access real-time data in your project with WebSockets, backed by your database.
Create custom, event-driven data processing and task automation workflows.
Project tutorials, tips & tricks, and best practices from the Directus team and community.
Combine Directus with your favorite framework to create flexible and fast web applications.
Learn how to run Directus on your own machine, customize settings, and deploy with confidence.
There are many ways in which you can contribute to the health and growth of the Directus project.
Propose new features to improve Directus. Find out how we use GitHub Discussions to organize requests.
Make a significant impact with code contributions. Read our Pull Request process and find out about our CLA.
Sponsor our project, increase its visibility and find out how to share the word with others!