GenerateApiTokenRequestV2

GenerateApiTokenRequestV2
GenerateApiTokenRequestV2

The request body for generating API token.

JSON Example
{
    "allowedScopes": {
        "generalScopes": [
            "string"
        ],
        "organizationScopes": {
            "allPermissions": false,
            "allRoles": false,
            "keptInToken": [
                "string"
            ],
            "permissions": [
                {
                    "permissionId": "string",
                    "resources": [
                        "string"
                    ]
                }
            ],
            "roles": [
                {
                    "name": "string",
                    "resource": "string"
                }
            ]
        },
        "servicesScopes": [
            {
                "allPermissions": false,
                "allRoles": false,
                "keptInToken": [
                    "string"
                ],
                "permissions": [
                    {
                        "permissionId": "string",
                        "resources": [
                            "string"
                        ]
                    }
                ],
                "roles": [
                    {
                        "name": "string",
                        "resource": "string"
                    }
                ],
                "serviceDefinitionId": "string"
            }
        ]
    },
    "idToken": "string",
    "notifyBeforeExpiry": 0,
    "orgId": "string",
    "refreshTokenTTL": 0,
    "tokenName": "string"
}
allowedScopes
Required

The allowed general, organization and service scopes of access.

string As ^[\p{Alnum}\-._ ]+$
idToken
Required

ID Token is signed JWT token returned from the authorization server and contains the user's profile information, includingthe domain of the identity provider. This domain is used to obtain the identity provider URL. This token is used for optimization so the application can know the identity of the user, without having to make any additional network requests. This token can be generated via the Authorization Code flow only.

integer As int32 As int32
notifyBeforeExpiry
Optional

Number of days to notify before token expiration

string
orgId
Optional

Id of the organization for which to generate token (if different from the logged in user organization). This functionality is allowed only for non-production environments.

integer As int32 As int32
refreshTokenTTL
Required

API Token Time To Live (TTL)

string
tokenName
Optional

The name of the API token. The value must be alphanumerical and can contain the following symbols -_.`':@&, and space. International characters are allowed.