Get active authentication tokens for user

Returns the list of authorization tokens for a user. Only metadata for the tokens is returned; the token secrets themselves are not available. Only users with 'Manage Security' permission can use this function for users other than themselves.

Request

GET https://{hostname}:{port}
    /cli/teamsecurity/tokensForUser?{parameters}
Accept: {contentType}
Table 1. Request parameters
Parameter Type Required Description
user string false The user for which tokens are returned. Required if querying tokens for a user other than the one making the request.
Table 2. Header parameters
Parameter Type Required Description
Accept
  • application/json
  • application/yaml
true

Example

curl -k -u jsmith:passwd 
   
  "https://deployserver.example.com:8443/cli/teamsecurity/tokensForUser?user=jsmith"

Example response for a specific user

{
  "tokens": [{
    "id": "194dba1b-ff4a-473e-19a8-c96d1246b690",
    "expiration": 1740208500000,
    "host": "",
    "description": "dummyuser",
    "createdDate": 1738851598324,
    "verbToUrls": [{
      "verb": "ALL",
      "url": "*"
    }]
  }],
  "userId": "a51fe9df-9625-48c2-bd01-4b50acf4c72b",
  "userName": "jsmith"
}

Related CLI command: getAuthTokensForUser.