Mutation
mutation CreateCompanyApiKey($input: CreateCompanyApiKeyInput!) {
createCompanyApiKey(input: $input) {
companyApiKey {
id
name
capabilities
workspaces {
edges {
__typename
}
pageInfo {
__typename
}
totalCount
}
createdAt
expiresAt
}
token
}
}Variables
{
"input": {
"name": "string",
"capabilityGroups": [
"VIEW_AUDIT_LOGS"
],
"workspaceUids": [
"string"
]
}
}Response
{
"data": {
"createCompanyApiKey": {
"companyApiKey": {
"id": "id",
"name": "string",
"capabilities": [
"string"
],
"workspaces": {
"edges": [
{
"__typename": "WorkspaceEdge"
}
],
"pageInfo": {
"__typename": "PageInfo"
},
"totalCount": 1
},
"createdAt": "value",
"expiresAt": "value"
},
"token": "string"
}
}
}createCompanyApiKey
Creates a company API key and returns its token, once. The key can never do more than the calling key. Rotate a key by creating its successor, then revoking it. Needs a company API key with api_keys:write.
MUTATION
createCompanyApiKey(input: CreateCompanyApiKeyInput!): CreateCompanyApiKeyPayload!Arguments
input
required
The key to create.
Returns
companyApiKey
The new key.
token
String!
The key's bearer token. This is the only time it is shown; store it now.
Mutation
mutation CreateCompanyApiKey($input: CreateCompanyApiKeyInput!) {
createCompanyApiKey(input: $input) {
companyApiKey {
id
name
capabilities
workspaces {
edges {
__typename
}
pageInfo {
__typename
}
totalCount
}
createdAt
expiresAt
}
token
}
}Variables
{
"input": {
"name": "string",
"capabilityGroups": [
"VIEW_AUDIT_LOGS"
],
"workspaceUids": [
"string"
]
}
}Response
{
"data": {
"createCompanyApiKey": {
"companyApiKey": {
"id": "id",
"name": "string",
"capabilities": [
"string"
],
"workspaces": {
"edges": [
{
"__typename": "WorkspaceEdge"
}
],
"pageInfo": {
"__typename": "PageInfo"
},
"totalCount": 1
},
"createdAt": "value",
"expiresAt": "value"
},
"token": "string"
}
}
}