Skip to content

Files

Latest commit

 

History

History
45 lines (40 loc) · 1.27 KB

using-the-oauth-token.adoc

File metadata and controls

45 lines (40 loc) · 1.27 KB

Using the OAuth token

After invoking the API, you can call out the rest of the {productname} API by specifying the returned OAuth code.

Prerequisites
  • You have invoked the /api/v1/user/initialize API, and passed in the username, password, and email address.

Procedure
  • Obtain the list of current users by entering the following command:

    $ curl -X GET -k -H "Authorization: Bearer 6B4QTRSTSD1HMIG915VPX7BMEZBVB9GPNY2FC2ED" https://example-registry-quay-quay-enterprise.apps.docs.quayteam.org/api/v1/superuser/users/

    Example output:

    {
        "users": [
            {
                "kind": "user",
                "name": "quayadmin",
                "username": "quayadmin",
                "email": "quayadmin@example.com",
                "verified": true,
                "avatar": {
                    "name": "quayadmin",
                    "hash": "3e82e9cbf62d25dec0ed1b4c66ca7c5d47ab9f1f271958298dea856fb26adc4c",
                    "color": "#e7ba52",
                    "kind": "user"
                },
                "super_user": true,
                "enabled": true
            }
        ]
    }

    In this instance, the details for the quayadmin user are returned as it is the only user that has been created so far.