To get all tokens:
To obtain tokens based on specific criteria, such as tokens with descriptions starting with "test":
Creating a token:
NOTE: Refreshable tokens are not available on the UI yet. By adding the following key “refreshable” to the API call json object, you can refresh an existing access token without having to provide the old token. The Refresh Token is the same API endpoint as Create Token, with a specific grant type: refresh_token. You may find more information about the available and the required keys here.
curl -XGET -H "Authorization: Bearer $token " "http://artifactory-ip:8082/access/api/v1/tokens"
To obtain tokens based on specific criteria, such as tokens with descriptions starting with "test":
curl -XGET -H "Authorization: Bearer $token " "http://artifactory-ip:8082/access/api/v1/tokens?description=test* "
Creating a token:
curl -H "Authorization: Bearer $token " -XPOST "http://artifactory-up:8082/access/api/v1/tokens" -d '{"description" : "test", "scope" : "applied-permissions/admin", "include_reference_token" : "true", "refreshable" : "true"}' -H "Content-type: application/json"
NOTE: Refreshable tokens are not available on the UI yet. By adding the following key “refreshable” to the API call json object, you can refresh an existing access token without having to provide the old token. The Refresh Token is the same API endpoint as Create Token, with a specific grant type: refresh_token. You may find more information about the available and the required keys here.