createSystemPermissionsTokenV2()

API Stability Long-Term

The createSystemPermissionsTokenV2() GraphQL mutation is used to create a system permissions token with the specified permissions.

Syntax

Below is the syntax for the createSystemPermissionsTokenV2() mutation field:

graphql
createSystemPermissionsTokenV2(
       input: CreateSystemPermissionTokenV2Input!
    ): CreateSystemPermissionsTokenV2Output!

Below is an example of how this mutation field might be used:

Show:
graphql
mutation {
	createSystemPermissionsTokenV2( input:
	  { name: "my-token",
      systemPermissions: [ ViewOrganizations,
                           ManageOrganizations ]
    } )
  { token, tokenMetadata { name } }
}
Example Responses
Show:
json
{
  "data": {
    "createSystemPermissionsTokenV2": {
      "token": "abc123",
      "tokenMetadata": {
        "name": "my-token"
      }
    }
  }
}

Given Datatypes

For CreateSystemPermissionTokenV2Input, there are a few parameters that may be given. Below is a list of them along with a description of each:

Table: CreateSystemPermissionTokenV2Input

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Feb 28, 2025
expireAtlong  Long-TermThe time at which the token expires.
ipFilterIdstring  Long-TermThe unique identifier of the IP filter.
namestringyes Long-TermThe name of the token.
systemPermissions[SystemPermission]yes Long-TermA list of system permissions. See SystemPermission.

Returned Data Types

CreateSystemPermissionsTokenV2Output returns a couple parameters. They're described below:

Table: CreateSystemPermissionsTokenV2Output

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Feb 28, 2025
tokenstringyes Long-TermThe system permissions token.
tokenMetadataSystemPermissionsTokenyes Long-TermThe token's metadata. See SystemPermissionsToken.