GraphQL Admin API reference - Introduction


GraphQL Admin API reference

The Admin API lets you build apps and integrations that extend and enhance the opCenter. You can also use it to connect third party apps like an ERP system to the Cobai platform. This documentation will help you get up and running with Cobai’s GraphQL API. New to GraphQL APIs? Start here.

Important note: This GraphQL API is in an early Beta stage and we are moving things around a lot. Available features will change, break, or be removed without warning. If you discover a problem or would like to suggest a change, please open an issue in the public GitHub issueproject.

Authorization

To access the API you'll need a Bearer token that can be generated in the opCenter ("Settings" / "API-Keys"). Enter any name for the token and click "create". Once created, a token is everlasting. To revoke token access, just delete it.

To use the token, add an Authorization header to you POST request and use Bearer <Your token> as the value (screenshot from our embedded Apollo Explorer):

bearer token

API endpoint

Access the Admin API at https://opcenter.cobai.com/graphql. This is the production version of the GraphQL API and also the endpoint used by our embedded Apollo Explorer. The URL is likely to change once the API leaves Beta.

If you need to access the development version of the api, use the endpoint at https://opc-dev2.cobai.io/graphql. Using this endpoint in production is not recommended. It contains the latest changes to the API, but runs on development hardware that can go offline anytime.