To generate an Access token through a REST API call, follow these steps:
1. Create a token from the UI with the required permissions and copy the token or reference token.
2. Set the token as an environment variable. For example:
3. Use the following API call to create a token using the environment variable:
1. Create a token from the UI with the required permissions and copy the token or reference token.
2. Set the token as an environment variable. For example:
export token="cmVmdGtuOjAxOjAwMDAwMDAwMDA6RWJzSm"
curl -H "Authorization: Bearer $token " -XPOST "http://artifactory-up:8082/access/api/v1/tokens" -d '{"description" : "YOUR-DESCRIPTION", "token_id" : "YOUR-TOKEN-ID", "scope" : "applied-permissions/admin", "token_type" : "access_token", "include_reference_token" : "true"}' -H "Content-type: application/json"