Chapter 21. superuser
Superuser API.
21.1. createInstallUser Copy linkLink copied to clipboard!
Creates a new user.
POST /api/v1/superuser/users/
Authorizations: oauth2_implicit (super:user)
Request body schema (application/json)
Data for creating a user
| Name | Description | Schema | 
|---|---|---|
|   
								username  |   The username of the user being created  |   string  | 
|   
								email  |   The email address of the user being created  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   201  |   Successful creation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X POST -H "Authorization: Bearer <bearer_token>" -H "Content-Type: application/json" -d '{
$ curl -X POST -H "Authorization: Bearer <bearer_token>" -H "Content-Type: application/json" -d '{
  "username": "newuser",
  "email": "newuser@example.com"
}' "https://<quay-server.example.com>/api/v1/superuser/users/"
21.2. deleteInstallUser Copy linkLink copied to clipboard!
Deletes a user.
DELETE /api/v1/superuser/users/{username}
Authorizations: oauth2_implicit (super:user)
Request body schema (application/json)
Data for deleting a user
| Name | Description | Schema | 
|---|---|---|
|   
								username  |   The username of the user being deleted  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   201  |   Successful creation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X DELETE -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/users/{username}"
$ curl -X DELETE -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/users/{username}"
21.3. listAllUsers Copy linkLink copied to clipboard!
Returns a list of all users in the system.
GET /api/v1/superuser/users/
Authorizations: oauth2_implicit (super:user)
Query parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   query  |   
								next_page  |   The page token for the next page  |   string  | 
|   query  |   
								limit  |   Limit to the number of results to return per page. Max 100.  |   integer  | 
|   query  |   
								disabled  |   If false, only enabled users will be returned.  |   boolean  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X GET -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/users/"
$ curl -X GET -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/users/"
21.4. listAllLogs Copy linkLink copied to clipboard!
List the usage logs for the current system.
GET /api/v1/superuser/logs
Authorizations: oauth2_implicit (super:user)
Query parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   query  |   
								next_page  |   The page token for the next page  |   string  | 
|   query  |   
								page  |   The page number for the logs  |   integer  | 
|   query  |   
								endtime  |   Latest time to which to get logs (%m/%d/%Y %Z)  |   string  | 
|   query  |   
								starttime  |   Earliest time from which to get logs (%m/%d/%Y %Z)  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ "https://<quay_server>/api/v1/superuser/logs?starttime=<start_time>&endtime=<end_time>&page=<page_number>&next_page=<next_page_token>"
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  "https://<quay_server>/api/v1/superuser/logs?starttime=<start_time>&endtime=<end_time>&page=<page_number>&next_page=<next_page_token>"
21.5. listAllOrganizations Copy linkLink copied to clipboard!
List the organizations for the current system.
GET /api/v1/superuser/organizations
Authorizations: oauth2_implicit (super:user)
Query parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								name  |   The name of the organization being managed  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X GET -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/organizations/"
$ curl -X GET -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/organizations/"
21.6. createServiceKey Copy linkLink copied to clipboard!
POST /api/v1/superuser/keys
Authorizations: oauth2_implicit (super:user)
Request body schema (application/json)
Description of creation of a service key
| Name | Description | Schema | 
|---|---|---|
|   
								service  |   The service authenticating with this key  |   string  | 
|   
								name  |   The friendly name of a service key  |   string  | 
|   
								metadata  |   The key/value pairs of this key’s metadata  |   object  | 
|   
								notes  |   If specified, the extra notes for the key  |   string  | 
|   
								expiration  |   The expiration date as a unix timestamp  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   201  |   Successful creation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
21.7. listServiceKeys Copy linkLink copied to clipboard!
GET /api/v1/superuser/keys
Authorizations: oauth2_implicit (super:user)
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ "https://<quay_server>/api/v1/superuser/keys"
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  "https://<quay_server>/api/v1/superuser/keys"
21.8. changeUserQuotaSuperUser Copy linkLink copied to clipboard!
PUT /api/v1/superuser/organization/{namespace}/quota/{quota_id}
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								namespace  |   string  | |
|   path  |   
								quota_id  |   string  | 
Request body schema (application/json)
Description of a new organization quota
| Name | Description | Schema | 
|---|---|---|
|   
								limit_bytes  |   Number of bytes the organization is allowed  |   integer  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
21.9. deleteUserQuotaSuperUser Copy linkLink copied to clipboard!
DELETE /api/v1/superuser/organization/{namespace}/quota/{quota_id}
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								namespace  |   string  | |
|   path  |   
								quota_id  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   204  |   Deleted  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X DELETE "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota/<quota_id>" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
$ curl -X DELETE "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota/<quota_id>" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"
21.10. createUserQuotaSuperUser Copy linkLink copied to clipboard!
POST /api/v1/superuser/organization/{namespace}/quota
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								namespace  |   string  | 
Request body schema (application/json)
Description of a new organization quota
| Name | Description | Schema | 
|---|---|---|
|   
								limit_bytes  |   Number of bytes the organization is allowed  |   integer  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   201  |   Successful creation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
21.11. listUserQuotaSuperUser Copy linkLink copied to clipboard!
GET /api/v1/superuser/organization/{namespace}/quota
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								namespace  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X GET "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"
21.12. changeOrganizationQuotaSuperUser Copy linkLink copied to clipboard!
PUT /api/v1/superuser/users/{namespace}/quota/{quota_id}
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								namespace  |   string  | |
|   path  |   
								quota_id  |   string  | 
Request body schema (application/json)
Description of a new organization quota
| Name | Description | Schema | 
|---|---|---|
|   
								limit_bytes  |   Number of bytes the organization is allowed  |   integer  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
21.13. deleteOrganizationQuotaSuperUser Copy linkLink copied to clipboard!
DELETE /api/v1/superuser/users/{namespace}/quota/{quota_id}
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								namespace  |   string  | |
|   path  |   
								quota_id  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   204  |   Deleted  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X DELETE "https://quay-server.example.com/api/v1/superuser/users/<username>/quota/<quota_id>" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
$ curl -X DELETE "https://quay-server.example.com/api/v1/superuser/users/<username>/quota/<quota_id>" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"
21.14. createOrganizationQuotaSuperUser Copy linkLink copied to clipboard!
POST /api/v1/superuser/users/{namespace}/quota
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								namespace  |   string  | 
Request body schema (application/json)
Description of a new organization quota
| Name | Description | Schema | 
|---|---|---|
|   
								limit_bytes  |   Number of bytes the organization is allowed  |   integer  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   201  |   Successful creation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
21.15. listOrganizationQuotaSuperUser Copy linkLink copied to clipboard!
GET /api/v1/superuser/users/{namespace}/quota
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								namespace  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X GET "https://quay-server.example.com/api/v1/superuser/users/<username>/quota" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/users/<username>/quota" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"
21.16. changeOrganization Copy linkLink copied to clipboard!
Updates information about the specified user.
PUT /api/v1/superuser/organizations/{name}
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								name  |   The name of the organizaton being managed  |   string  | 
Request body schema (application/json)
Description of updates for an existing organization
| Name | Description | Schema | 
|---|---|---|
|   
								email  |   Organization contact email  |   string  | 
|   
								invoice_email  |   Whether the organization desires to receive emails for invoices  |   boolean  | 
|   
								invoice_email_address  |   The email address at which to receive invoices  | |
|   
								tag_expiration_s  |   The number of seconds for tag expiration  |   integer  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
21.17. deleteOrganization Copy linkLink copied to clipboard!
Deletes the specified organization.
DELETE /api/v1/superuser/organizations/{name}
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								name  |   The name of the organizaton being managed  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   204  |   Deleted  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X DELETE \ -H "Authorization: Bearer <bearer_token>" \ "https://<quay_server>/api/v1/superuser/organizations/<organization_name>"
$ curl -X DELETE \
  -H "Authorization: Bearer <bearer_token>" \
  "https://<quay_server>/api/v1/superuser/organizations/<organization_name>"
21.18. approveServiceKey Copy linkLink copied to clipboard!
POST /api/v1/superuser/approvedkeys/{kid}
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								kid  |   The unique identifier for a service key  |   string  | 
Request body schema (application/json)
Information for approving service keys
| Name | Description | Schema | 
|---|---|---|
|   
								notes  |   Optional approval notes  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   201  |   Successful creation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
21.19. deleteServiceKey Copy linkLink copied to clipboard!
DELETE /api/v1/superuser/keys/{kid}
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								kid  |   The unique identifier for a service key  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   204  |   Deleted  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X DELETE \ -H "Authorization: Bearer <bearer_token>" \ "https://<quay_server>/api/v1/superuser/keys/<kid>"
$ curl -X DELETE \
  -H "Authorization: Bearer <bearer_token>" \
  "https://<quay_server>/api/v1/superuser/keys/<kid>"
21.20. updateServiceKey Copy linkLink copied to clipboard!
PUT /api/v1/superuser/keys/{kid}
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								kid  |   The unique identifier for a service key  |   string  | 
Request body schema (application/json)
Description of updates for a service key
| Name | Description | Schema | 
|---|---|---|
|   
								name  |   The friendly name of a service key  |   string  | 
|   
								metadata  |   The key/value pairs of this key’s metadata  |   object  | 
|   
								expiration  |   The expiration date as a unix timestamp  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
21.21. getServiceKey Copy linkLink copied to clipboard!
GET /api/v1/superuser/keys/{kid}
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								kid  |   The unique identifier for a service key  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ "https://<quay_server>/api/v1/superuser/keys/<kid>"
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  "https://<quay_server>/api/v1/superuser/keys/<kid>"
21.22. getRepoBuildStatusSuperUser Copy linkLink copied to clipboard!
Return the status for the builds specified by the build uuids.
GET /api/v1/superuser/{build_uuid}/status
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								build_uuid  |   The UUID of the build  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/status" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/status" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"
21.23. getRepoBuildSuperUser Copy linkLink copied to clipboard!
Returns information about a build.
GET /api/v1/superuser/{build_uuid}/build
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								build_uuid  |   The UUID of the build  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/build" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/build" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"
21.24. getRepoBuildLogsSuperUser Copy linkLink copied to clipboard!
Return the build logs for the build specified by the build uuid.
GET /api/v1/superuser/{build_uuid}/logs
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								build_uuid  |   The UUID of the build  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/logs" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/logs" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"
21.25. getRegistrySize Copy linkLink copied to clipboard!
GET /api/v1/superuser/registrysize/
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								namespace  |   string  | 
Description of a image registry size
| Name | Description | Schema | 
|---|---|---|
|   
								size_bytes*  |   Number of bytes the organization is allowed  |   integer  | 
|   last_ran  |   integer  | |
|   queued  |   boolean  | |
|   running  |   boolean  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   CREATED  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ "https://<quay_server>/api/v1/superuser/registrysize/"
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  "https://<quay_server>/api/v1/superuser/registrysize/"
21.26. postRegistrySize Copy linkLink copied to clipboard!
POST /api/v1/superuser/registrysize/
Authorizations: oauth2_implicit (super:user)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								namespace  |   string  | 
Request body schema (application/json)
Description of a image registry size
| Name | Description | Schema | 
|---|---|---|
|   last_ran  |   integer  | |
|   queued  |   boolean  | |
|   running  |   boolean  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   201  |   CREATED  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  |