Check Build Permission
GET /api_3/project/permissions/can_build_in/<who>/<ownername>/<projectname>
curl -X GET \
"https://copr.fedorainfracloud.org/api_3/project/permissions/can_build_in/someuser/@copr/copr-dev"
Check if a user can submit builds in a specific project.
Path Parameters
Username to check permissions for
Response
Username that was checked
Whether the user can submit builds in the project
Get Project Permissions
GET /api_3/project/permissions/get/<ownername>/<projectname>
curl -X GET \
"https://copr.fedorainfracloud.org/api_3/project/permissions/get/@copr/copr-dev"
Get all permissions configured for a project. Requires authentication and edit permissions.
Path Parameters
Response
Dictionary of permissions keyed by username User’s permission levels Admin permission: “nothing”, “request”, “approved”
Builder permission: “nothing”, “request”, “approved”
{
"permissions" : {
"alice" : {
"admin" : "approved" ,
"builder" : "approved"
},
"bob" : {
"admin" : "nothing" ,
"builder" : "approved"
},
"charlie" : {
"admin" : "request" ,
"builder" : "nothing"
}
}
}
Set Project Permissions
POST /api_3/project/permissions/set/<ownername>/<projectname>
PUT (same endpoint)
curl -X POST \
"https://copr.fedorainfracloud.org/api_3/project/permissions/set/myuser/my-project" \
-H "Content-Type: application/json" \
-d '{
"alice": {
"admin": "approved",
"builder": "approved"
},
"bob": {
"builder": "approved"
}
}'
Set or change permissions for users on a project. Requires authentication and admin permissions.
Both POST (create) and PUT (update) methods are supported.
Path Parameters
Request Body
Dictionary where keys are usernames and values are permission sets.
User’s permission configuration Admin permission level: “nothing”, “request”, “approved”
Builder permission level: “nothing”, “request”, “approved”
Permission Levels
nothing - No permission
request - Permission requested but not yet approved
approved - Permission granted
Permission Types
admin - Can edit project settings, manage permissions, delete project
builder - Can submit builds to the project
Response
List of usernames whose permissions were updated
Email notifications are sent to users when their permissions change (if email notifications are enabled).
Request Project Permissions
PUT /api_3/project/permissions/request/<ownername>/<projectname>
curl -X PUT \
"https://copr.fedorainfracloud.org/api_3/project/permissions/request/@copr/copr-dev" \
-H "Content-Type: application/json" \
-d '{
"admin": false,
"builder": true
}'
Request permissions (admin, builder) for a project. Requires authentication.
Both POST and PUT methods are supported (PUT is preferred).
Path Parameters
Request Body
Request admin permission (true) or not (false)
Request builder permission (true) or not (false)
Response
Whether the permission request resulted in changes
Project administrators receive email notifications when users request permissions (if email notifications are enabled).
Workflow
User requests permission using this endpoint
Project admins receive notification
Admins approve/deny using the Set Project Permissions endpoint
User receives notification of decision