Skip to main content

Check Build Permission

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

who
string
required
Username to check permissions for
ownername
string
required
Project owner name
projectname
string
required
Project name

Response

who
string
Username that was checked
ownername
string
Project owner name
projectname
string
Project name
can_build_in
boolean
Whether the user can submit builds in the project

Get Project Permissions

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

ownername
string
required
Project owner name
projectname
string
required
Project name

Response

permissions
object
Dictionary of permissions keyed by username
{
  "permissions": {
    "alice": {
      "admin": "approved",
      "builder": "approved"
    },
    "bob": {
      "admin": "nothing",
      "builder": "approved"
    },
    "charlie": {
      "admin": "request",
      "builder": "nothing"
    }
  }
}

Set Project Permissions

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

ownername
string
required
Project owner name
projectname
string
required
Project name

Request Body

Dictionary where keys are usernames and values are permission sets.
username
object
required
User’s permission configuration

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

updated
array
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

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

ownername
string
required
Project owner name
projectname
string
required
Project name

Request Body

admin
boolean
required
Request admin permission (true) or not (false)
builder
boolean
required
Request builder permission (true) or not (false)

Response

updated
boolean
Whether the permission request resulted in changes
Project administrators receive email notifications when users request permissions (if email notifications are enabled).

Workflow

  1. User requests permission using this endpoint
  2. Project admins receive notification
  3. Admins approve/deny using the Set Project Permissions endpoint
  4. User receives notification of decision

Build docs developers (and LLMs) love