Create access token for the user
Select
SaaS
Customer Managed
Create access token for the user
- application/json
Request Body
- tokenName string required
- tokenType
Possible values: [
DEFAULT
,MS_SCIM
,ALL
,CUSTOM
,OneTouch
]Default value:
ALL
(0)DEFAULT is ALL(2), (1) MS_SCIM is for Azure SCIM operations,(2)ALL has access to all APIs while in (3)CUSTOM, apiEndpoints can be defined and access scope is limited to those endpoints.
- renewableUntilTimestamp int32
Applicable only for ALL and CUSTOM token types. default value is 90days from creation time
- apiEndpoints string[]
Relevant only for tokenType 3(CUSTOM) and it is mandatory for type 3
- tokenExpiryTimestamp int32
Applicable only for MS_SCIM and OneTouch tokenTypes
Responses
- 200
- 400
- 403
- 500
OK
- application/json
- Schema
- Example (from schema)
Schema
error object
tokenInfo object
{
"error": {
"errorMessage": "string",
"errorCode": 0
},
"tokenInfo": {
"error": {
"errorMessage": "string",
"errorCode": 0
},
"accessTokenId": 0,
"tokenName": "string",
"userId": 0,
"tokenExpiryTimestamp": 0,
"accessToken": "string",
"refreshToken": "string",
"refreshTokenExpiryTimestamp": 0,
"renewableUntilTimestamp": 0
}
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
- errorMessage string
- errorCode int32
{
"errorMessage": "string",
"errorCode": 0
}
Forbidden
- application/json
- Schema
- Example (from schema)
Schema
- errorMessage string
- errorCode int32
{
"errorMessage": "string",
"errorCode": 0
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
Schema
- errorMessage string
- errorCode int32
{
"errorMessage": "string",
"errorCode": 0
}
POST /v4/accesstoken
Authorization
type: apiKeyname: Authtokenin: header
Request
Request
curl -L -X POST 'https://CommandCenterHostName/commandcenter/api/V4/AccessToken' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"tokenName": "string",
"renewableUntilTimestamp": 0,
"apiEndpoints": [
"string"
],
"tokenExpiryTimestamp": 0
}'
curl -L -X POST 'https://CommandCenterHostName/commandcenter/api/V4/AccessToken' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"tokenName": "string",
"renewableUntilTimestamp": 0,
"apiEndpoints": [
"string"
],
"tokenExpiryTimestamp": 0
}'
curl -L -X POST 'https://CommandCenterHostName/commandcenter/api/V4/AccessToken' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"tokenName": "string",
"renewableUntilTimestamp": 0,
"apiEndpoints": [
"string"
],
"tokenExpiryTimestamp": 0
}'
curl -L -X POST 'https://CommandCenterHostName/commandcenter/api/V4/AccessToken' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"tokenName": "string",
"renewableUntilTimestamp": 0,
"apiEndpoints": [
"string"
],
"tokenExpiryTimestamp": 0
}'
curl -L -X POST 'https://CommandCenterHostName/commandcenter/api/V4/AccessToken' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"tokenName": "string",
"renewableUntilTimestamp": 0,
"apiEndpoints": [
"string"
],
"tokenExpiryTimestamp": 0
}'
curl -L -X POST 'https://CommandCenterHostName/commandcenter/api/V4/AccessToken' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"tokenName": "string",
"renewableUntilTimestamp": 0,
"apiEndpoints": [
"string"
],
"tokenExpiryTimestamp": 0
}'
curl -L -X POST 'https://CommandCenterHostName/commandcenter/api/V4/AccessToken' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"tokenName": "string",
"renewableUntilTimestamp": 0,
"apiEndpoints": [
"string"
],
"tokenExpiryTimestamp": 0
}'