Create a System Service Account Token with the APC API

The examples on this page show common ways to use the APC API — they’re not a complete API reference. For the full, interactive API documentation for your installation, including every available query, mutation, and type, go to https://houston.<your-base-domain>/v1, and click on the Docs tab. See Develop and test APC API queries for more on using the built-in GraphQL explorer.

System administrators can create a global system service account token to integrate with external systems, such as CI/CD pipelines. Use the following example mutation to create the service account token:

1mutation systemSACreate {
2 createSystemServiceAccount(
3 label: "your-sa"
4 role: SYSTEM_ADMIN
5 ) {
6 id
7 apiKey
8 }
9}

Save a copy of the returned API key value in a secure place as it won’t be displayed again.