Directus is a headless CMS that gives you all the power of a database without any of the complexities. With Directus, you can easily build custom applications without having to worry about over-complicating your database.
Here are a few examples of what you can build with the Directus API:
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
directus: {
type: "app",
app: "directus",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.directus.$auth.api_host}/users/me`,
headers: {
Authorization: `Bearer ${this.directus.$auth.access_token}`,
},
})
},
})
Directus uses API keys for authentication. When you connect your Directus account, Pipedream securely stores the keys so you can easily authenticate to Directus APIs in both code and no-code steps.
For api_host
, use your API host url such as https://mywebsite.com
For access_token
, each user can have one static token that will never expire. This is useful for server-to-server communication. This token is saved to the database (directus_users.token
) in plain-text and can be retrieved through the /auth/login
endpoint. See docs.