Chapter 14. prototype
Manage default permissions added to repositories.
14.1. updateOrganizationPrototypePermission Copy linkLink copied to clipboard!
Update the role of an existing permission prototype.
PUT /api/v1/organization/{orgname}/prototypes/{prototypeid}
Authorizations: oauth2_implicit (org:admin)
Path parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| path |
prototypeid | The ID of the prototype | string |
| path |
orgname | The name of the organization | string |
Request body schema (application/json)
Description of a the new prototype role
| Name | Description | Schema |
|---|---|---|
|
role | Role that should be applied to the permission | 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 PUT \
-H "Authorization: Bearer <bearer_token>" \
-H "Content-Type: application/json" \
--data '{
"role": "write"
}' \
https://<quay-server.example.com>/api/v1/organization/<organization_name>/prototypes/<prototypeid>
14.2. deleteOrganizationPrototypePermission Copy linkLink copied to clipboard!
Delete an existing permission prototype.
DELETE /api/v1/organization/{orgname}/prototypes/{prototypeid}
Authorizations: oauth2_implicit (org:admin)
Path parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| path |
prototypeid | The ID of the prototype | string |
| path |
orgname | The name of the organization | 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>" \
-H "Accept: application/json" \
https://<quay-server.example.com>/api/v1/organization/<organization_name>/prototypes/<prototype_id>
14.3. createOrganizationPrototypePermission Copy linkLink copied to clipboard!
Create a new permission prototype.
POST /api/v1/organization/{orgname}/prototypes
Authorizations: oauth2_implicit (org:admin)
Path parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| path |
orgname | The name of the organization | string |
Request body schema (application/json)
Description of a new prototype
| Name | Description | Schema |
|---|---|---|
|
role | Role that should be applied to the delegate | string |
|
activating_user | Repository creating user to whom the rule should apply | object |
|
delegate | Information about the user or team to which the rule grants access | object |
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" --data '{
"role": "<admin_read_or_write>",
"delegate": {
"name": "<username>",
"kind": "user"
},
"activating_user": {
"name": "<robot_name>"
}
}' https://<quay-server.example.com>/api/v1/organization/<organization_name>/prototypes
14.4. getOrganizationPrototypePermissions Copy linkLink copied to clipboard!
List the existing prototypes for this organization.
GET /api/v1/organization/{orgname}/prototypes
Authorizations: oauth2_implicit (org:admin)
Path parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| path |
orgname | The name of the organization | 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>" \
-H "Accept: application/json" \
https://<quay-server.example.com>/api/v1/organization/<organization_name>/prototypes