Access token specific API calls:

ARTIFACTORY: Creating Access Tokens in Artifactory

AuthorFullName__c
Bassel Mbariky
articleNumber
000004927
FirstPublishedDate
2020-11-18T11:47:53Z
lastModifiedDate
2025-05-15
VersionNumber
12

To get all tokens:

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.