Skip to main content

GraphQL API

The CivicEngine GraphQL API offers flexibility and the ability to define precisely the data you want to fetch. For more information on GraphQL visit graphql.org.

Authentication#

You'll need an OAuth token to be able to communicate with the GraphQL API. Contact your Customer Success representative for an API key. Note that this key will be different from CivicEngine REST API keys.

Root endpoint#

The GraphQL API has a single endpoint where you'll be able to send any query.

https://bpi.civicengine.com/graphql

Usage#

Check out the explorer to test the API and to browse the API schema documentation. For development we recommend using a GraphQL client to explore the schema. An example GraphQL client is Altair. It is also possible to send requests from the command line with cURL or any other HTTP library. For example, the following command will return a list of issue categories.

curl -X 'POST' \     -H 'Content-Type: application/json' \     -H 'Accept: application/json' \     -H 'Authorization: Bearer <INSERT TOKEN>' \     -d $'{"query": "{ issues { nodes { id, name } } }"}' \     'https://bpi.civicengine.com/graphql'