GenerateApiTokenRequestV2

GenerateApiTokenRequestV2
GenerateApiTokenRequestV2

The request body for generating API token.

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

Number of days to notify before token expiration

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.

string
tokenName
Optional
Constraints: minLength: 0 maxLength: 64

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

integer As int32 As int32
refreshTokenTTL
Required
Constraints: minimum: 1800

API Token Time To Live (TTL)

allowedScopes
Required

The allowed general, organization and service scopes of access.

string
orgId
Optional
Constraints: minLength: 0 maxLength: 255

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.