viola
viola

Reputation: 23

JFrog Artifactory Access API returns 404 Not Found / Request should be a repo request and does not match any repo key

I want to use the access API to manage tokens.
For example to get a list of all tokens by calling: GET /access/api/v1/tokens .

I am using an admin access token with an expiration period of 1 hour generated in the web uis Administration | Identity & Access | Access Tokens section as bearer token (I am able to call other endpoints using this token).

When trying to call the access API I get a "Status 404 Not Found" in Postman and the System Logs show "Request /access/api/v1/tokens should be a repo request and does not match any repo key"

Is there anything I missed? Do I need to specify headers or configure the token differently?

JFrog ref: https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API#ArtifactoryRESTAPI-GetTokens.1

Commercial license 7.35.2


Update: I called /artifactory/access/api/v1/tokens instead of /access/api/v1/tokens

Correcting the URL solved my problem.

Upvotes: 2

Views: 6740

Answers (1)

Maxim Y
Maxim Y

Reputation: 369

My guess is you're using the wrong URL. This works for me:

curl https://<INSTANCEID>.jfrog.io/access/api/v1/tokens -H "Authorization: Bearer <TOKEN>"

Upvotes: 4

Related Questions