Search code examples
artifactoryjfrog-cli

Get SetMeUp token API


I want to know the api endpoint where I can post username and password and that should return me the auth token. For more clarity I am attaching the screenshot.

enter image description here

I know it's making call to following endpoint but these endpoint are not having any documentation, maybe they are not public.

https://containerimages.azz.net/artifactory/ui/userProfile

https://containerimages.azz.net/artifactory/ui/userApiKey


Solution

  • The APIs you mention in the question are UI APIs. Those are not public and might be a subject to change. You should rely on them.

    If you wish to generate a Docker config.json file as the one shown in the screenshot, the auth part is simply a base64 encoding of the <USERNAME>:<PASSWORD>. For the part use can use:

    1. An access token - this is the preferred method as tokens are revokable an expirable
    2. API Key
    3. Encrypted password
    4. Clear text password

    All options should be base64 encoded as mentioned above.

    You can avoid storing the Docker credentials in the config.json file by using a credentials store as described in the Docker login documentation.

    If you wish to get an Artifactory API key for a user, you should use the Get API Key REST API.