Getting the Count of Non-Expired Tokens
Call the /tokens/count endpoint using GET to return a list of non-expired tokens for a specified user. You can get a count of NORMAL or IMPERSONATED tokens for the user:
• | NORMAL tokens—Specify the name or ID (email address) of the user for whom tokens were generated (as specified in the username field when POSTing to /uar/v1/token) in the username parameter. |
• | IMPERSONATED tokens—Specify the name or ID (email address) of the user who requested a token on behalf of another user (as returned in the tokenCreator field in the response to a token creation request) in the tokenCreator parameter. |
Important:You need the Create Impersonated Token permission and a Manage Users permission (see Permissions for access-token-controller) to get the count of IMPERSONATED tokens.
Tip:Use the /tokens API to get a list of non-expired tokens for a specified user.
Item |
Description |
||||||
URI |
/uar/v1/tokens/count |
||||||
Method |
GET |
||||||
Query parameters |
If you do not pass the username parameter, you must pass the tokenCreator parameter.
If you do not pass the tokenCreator parameter, you must pass the username parameter. |
||||||
Request body |
N/A |
||||||
Response codes |
200: Success 400: Unless you have the Create Impersonated Token permission and a Manage Users permission (see Permissions for access-token-controller), you cannot access tokens for other users. |
Sample Request
The following shows an example for a Curl call to get the number of unexpired NORMAL tokens for user fnouser3@mycompany.com.
curl -X GET --header 'Accept: application/json' 'https://<siteID>.flexnetoperations.com/flexnet/uar/v1/tokens/count?username=fnouser3%40mycompany.com'
Sample Response
The following shows a sample response for the count of unexpired NORMAL tokens returned for user fnouser3@mycompany.com:
{
"statusMessage": "Successful",
"responseObject": 2
}