API keys
We’re overhauling Dgraph’s docs to make them clearer and more approachable. If you notice any issues during this transition or have suggestions, please let us know.
Client apps accessing the Dgraph Cloud cluster endpoints
/query
/mutate
/commit
must present a valid client or admin API key in the Dg-Auth
or
X-Auth-Token
header of every HTTP request.
Client apps accessing the Dgraph Cloud cluster endpoints
/admin
/admin/slash
/alter
must present a valid admin API key in the Dg-Auth
or X-Auth-Token
header
of every HTTP request.
Client apps accessing the Dgraph Cloud cluster endpoint
/graphql
with anonymous access not set on the requested
operation, must present a valid client or admin API key in the Dg-Auth
or X-Auth-Token
header of every HTTP request.
Client API keys can only be used to perform query, mutation, and commit operations.
Admin API keys can be used to perform both client operations and admin operations like drop data, destroy backend, and update schema.
Generate a new API
To generate a new API key :
- Go to the Settings section of Dgraph Cloud console.
- Access
[API Keys](https://cloud.dgraph.io/_/settings?tab=api-keys)
tab. - Click Create New button.
- Give the key a name, and select
Client
orAdmin
type and click Create - Copy the key in a safe place, it isn’t accessible once you leave the page.
Was this page helpful?