Summary:
List details of a specified access token, modify the paramets of an access token, and delete an access token. Applicable to Entuity v21.0 P02 upwards.
URL:
http(s)://{server hostname}/api/accessTokens/[tokenId]
Methods summary
- GET Method - lists details of a specified access token.
- PUT Method - modify details of a specified access token.
- DELETE Method - deletes a specified access token.
GET Method detail
Lists details of the specified access token.
Response:
Name | Description |
---|---|
tokenId | ID of the token. |
tokenValue | value of the token. |
userId | ID of the user account by which the token is authenticated, i.e. if specified as 'User 1', then the token session will provide access based on User 1's privileges. |
expiryTimeSec | timestamp of when this token will expire, in seconds. |
creationTimeSec | timestamp of when this token was created, in seconds. |
createdBy | user account that created this token. Note, if access keys have been previously created in the accessKeys.properties file for SAMLv2 purposes, which are not done by any particular user, you might see <system> in this column. |
lastUpdateTimeSec | timestamp of when this token was last edited, in seconds. |
lastUpdatedBy | user account that last edited the token. |
description | description of this access token, if specified. |
userName | user account by which the token is authenticated, i.e. if specified as 'User 1', then the token session will provide access based on User 1's privileges. |
activeSessionCount | number of current active sessions using this token. |
lastLoginTimeSec | timestamp of when this token was last used to access Entuity, in seconds. |
loginCount | number of times this token has been used to access Entuity. |
Example:
INPUT
curl -u admin:admin https://localhost/api/accessTokens/17?media=json
OUTPUT
{
"tokenId" : 17 ,
"tokenValue" : "WlT6a0I6gGAc6V6h0XqM/L2PUVzUQ63H" ,
"userId" : 10 ,
"expiryTimeSec" : 1682418245 ,
"creationTimeSec" : 1683033889 ,
"createdBy" : "admin" ,
"lastUpdateTimeSec" : 1683033889 ,
"lastUpdatedBy" : "admin" ,
"description" : "Token for guy2 expiring Tue Apr 25 11:24:05 2023",
"userName" : "guy2" ,
"activeSessionCount" : 0 ,
"stats" : {
"lastLoginTimeSec" : 0 ,
"loginCount" : 0
}
}
PUT Method detail
Modfy details of the specified access token.
Parameters:
Specify the parameter that you wish to edit, as per the parameters of GET Response above.
Response:
The updated access token.
Example:
INPUT
curl -u admin:admin https://localhost/api/cfg/serverGroupConfig/bb816bfa-4f95-4337-9618-de220e055905/users/guy9 -X PUT -H "content-type:application/json" -d '
{
"description": "Edited description"
} '
OUTPUT
{
"tokenId" : 17 ,
"tokenValue" : "WlT6a0I6gGAc6V6h0XqM/L2PUVzUQ63H" ,
"userId" : 10 ,
"expiryTimeSec" : 1682418245 ,
"creationTimeSec" : 1683033889 ,
"createdBy" : "admin" ,
"lastUpdateTimeSec" : 1683034410 ,
"lastUpdatedBy" : "admin" ,
"description" : "Edited description" ,
"userName" : "guy2" ,
"activeSessionCount" : 0 ,
"stats" : {
"lastLoginTimeSec" : 0 ,
"loginCount" : 0
}
}
DELETE Method detail
Deletes a specified access token.
Response:
No value returned.
Example:
INPUT
curl -u admin:admin https://localhost/api/accessTokens/17?media=json -X DELETE
OUTPUT
no return value
Comments
0 comments
Please sign in to leave a comment.