Mutation
mutation CreateApiKey($input: CreateApiKeyInput!) {
createApiKey(input: $input) {
apiKey {
id
name
capabilities
workspace {
name
uid
createdAt
dbtVersion
supportedDbtVersions
dbtPartialParsing
}
createdAt
expiresAt
}
token
}
}Variables
{
"input": {
"name": "string",
"capabilityGroups": [
"VIEW_AUDIT_LOGS"
]
}
}Response
{
"data": {
"createApiKey": {
"apiKey": {
"id": "id",
"name": "string",
"capabilities": [
"string"
],
"workspace": {
"name": "string",
"uid": "string",
"createdAt": "value",
"dbtVersion": "string",
"supportedDbtVersions": [
"string"
],
"dbtPartialParsing": true
},
"createdAt": "value",
"expiresAt": "value"
},
"token": "string"
}
}
}createApiKey
Creates a workspace 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 api_keys:write.
MUTATION
createApiKey(input: CreateApiKeyInput!): CreateApiKeyPayload!Arguments
input
required
The key to create.
Returns
apiKey
The new key.
token
String!
The key's bearer token. This is the only time it is shown; store it now.
Mutation
mutation CreateApiKey($input: CreateApiKeyInput!) {
createApiKey(input: $input) {
apiKey {
id
name
capabilities
workspace {
name
uid
createdAt
dbtVersion
supportedDbtVersions
dbtPartialParsing
}
createdAt
expiresAt
}
token
}
}Variables
{
"input": {
"name": "string",
"capabilityGroups": [
"VIEW_AUDIT_LOGS"
]
}
}Response
{
"data": {
"createApiKey": {
"apiKey": {
"id": "id",
"name": "string",
"capabilities": [
"string"
],
"workspace": {
"name": "string",
"uid": "string",
"createdAt": "value",
"dbtVersion": "string",
"supportedDbtVersions": [
"string"
],
"dbtPartialParsing": true
},
"createdAt": "value",
"expiresAt": "value"
},
"token": "string"
}
}
}