GraphQL API

How to use and access the Datacake GraphQL API.

Introduction

Datacake is fully powered by a GraphQL API, accessible at https://api.datacake.co/graphql/.

Generate Access Token

To read or write any data, you need to authenticate with an access token. You can generate access tokens in your user settings.

See this guide on how to create access tokens:

pageGenerate Access Token

Note that access tokens give access to your account! Store them securely and do not share them with anyone.

You then have to pass this personal access token in the Authorization header as a token:

Authorization: Token <YOUR_TOKEN_HERE>

If you do not authorize correctly, your request will be treated as unauthenticated.

Browse Documentation

For now, the only documentation for the API is exploring the schema with the GraphiQL at https://api.datacake.co/graphql/ (click the "Docs" button on the upper right edge).

Authenticate

To authenticate in GraphiQL, paste your API token in the corresponding field at the top of the page:

If you do not authorize correctly, your request will be treated as unauthenticated. The easiest way to check if you are authorized is to query for the authenticated user data:

query {
    user {
        id
    }
}

If the returned user object is null, the request is not authenticated.

If you have any specific questions on how to achieve certain tasks, feel free to ping us directly at support@datacake.de, we would be happy to help!

Usage Guide

pageUsing GraphQL

Last updated