• Document Up to Date

Create Access Token

Creates a new access token.

Resource Information

This service uses the tomcat application on port 8080 by default. To see a list of default ports click here

The context for this API is /crafter-profile, please prefix the API URLs with this context.

HTTP Verb
POST
URL
/api/1/access_token/create
Response Formats
JSON

Parameters

Name
Type
Required
Description
accessTokenId

String


The access token ID of the application
making the call

Example

Request

POST .../api/1/access_token/create?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

 1{
 2  "application": "sample-app",
 3  "master": false,
 4  "tenantPermissions": [
 5    {
 6      "allowedActions": [
 7        "MANAGE_TICKETS",
 8        "READ_TENANT",
 9        "MANAGE_PROFILES"
10      ],
11      "tenant": "sample-tenant"
12    }
13  ],
14  "expiresOn": 1704067200000
15}

Response

Status 200 OK

 1{
 2  "application": "sample-app",
 3  "master": false,
 4  "tenantPermissions": [
 5    {
 6      "allowedActions": [
 7        "MANAGE_TICKETS",
 8        "READ_TENANT",
 9        "MANAGE_PROFILES"
10      ],
11      "tenant": "sample-tenant"
12    }
13  ],
14  "expiresOn": 1704067200000,
15  "id": "a3f1a69c-3a7d-4b28-a944-61a7dc6877b8"
16}

Responses

Status
Location
Response Body
200

See example above.

403




{"errorCode":"ACTION_DENIED", "message":"Current
subject does not have permission to execute global
action \"CREATE_TOKEN\""}
500

{ "message" : "Internal server error" }