Mutation
mutation CreateApiKey($input: CreateApiKeyInput!) {
createApiKey(input: $input) {
apiKeyWithSecret {
id
key
}
errors {
__typename
... on GraphQlError {
code
details {
__typename
}
message
}
}
}
}Variables
{
"input": {
"apiId": "string",
"name": "string",
"scopeIds": [
"string"
]
}
}Response
{
"data": {
"createApiKey": {
"apiKeyWithSecret": {
"id": "string",
"key": "string"
},
"errors": [
{
"__typename": "GraphQlError",
"code": "string",
"details": [
{
"__typename": "KeyValuePairOfStringAndString"
}
],
"message": "string"
}
]
}
}
}Mutations
createApiKey
Creates a tenant-level API key for the API apiId, with the given scopes. Returns the key with its secret, the only time you can read it.
MUTATION
createApiKey(input: CreateApiKeyInput!): CreateApiKeyPayload!Arguments
input
required
Returns
apiKeyWithSecret
errors
Mutation
mutation CreateApiKey($input: CreateApiKeyInput!) {
createApiKey(input: $input) {
apiKeyWithSecret {
id
key
}
errors {
__typename
... on GraphQlError {
code
details {
__typename
}
message
}
}
}
}Variables
{
"input": {
"apiId": "string",
"name": "string",
"scopeIds": [
"string"
]
}
}Response
{
"data": {
"createApiKey": {
"apiKeyWithSecret": {
"id": "string",
"key": "string"
},
"errors": [
{
"__typename": "GraphQlError",
"code": "string",
"details": [
{
"__typename": "KeyValuePairOfStringAndString"
}
],
"message": "string"
}
]
}
}
}Was this page helpful?