Mutation
mutation RotateApiKey($input: RotateApiKeyInput!) {
rotateApiKey(input: $input) {
newApiKey {
createdAt
description
displayName
environmentId
expireAt
id
}
oldApiKey {
createdAt
description
displayName
environmentId
expireAt
id
}
}
}Variables
{
"input": {
"id": "value"
}
}Response
{
"data": {
"rotateApiKey": {
"newApiKey": {
"createdAt": "value",
"description": "string",
"displayName": "string",
"environmentId": "value",
"expireAt": "value",
"id": "value"
},
"oldApiKey": {
"createdAt": "value",
"description": "string",
"displayName": "string",
"environmentId": "value",
"expireAt": "value",
"id": "value"
}
}
}
}Mutations
rotateApiKey
Rotate an API key to generate a new token
MUTATION
rotateApiKey(input: RotateApiKeyInput!): RotateApiKeyResult!Arguments
input
required
Returns
newApiKey
The newly created API key details
oldApiKey
The old API key that is being rotated out
Mutation
mutation RotateApiKey($input: RotateApiKeyInput!) {
rotateApiKey(input: $input) {
newApiKey {
createdAt
description
displayName
environmentId
expireAt
id
}
oldApiKey {
createdAt
description
displayName
environmentId
expireAt
id
}
}
}Variables
{
"input": {
"id": "value"
}
}Response
{
"data": {
"rotateApiKey": {
"newApiKey": {
"createdAt": "value",
"description": "string",
"displayName": "string",
"environmentId": "value",
"expireAt": "value",
"id": "value"
},
"oldApiKey": {
"createdAt": "value",
"description": "string",
"displayName": "string",
"environmentId": "value",
"expireAt": "value",
"id": "value"
}
}
}
}