Skip to main content

Get Package

curl -X GET \
  "https://copr.fedorainfracloud.org/api_3/package/?ownername=@copr&projectname=copr-dev&packagename=copr-frontend"
Get a single package from a Copr project.

Query Parameters

ownername
string
required
Project owner name
projectname
string
required
Project name
packagename
string
required
Package name
with_latest_build
boolean
default:"false"
Include latest build information
with_latest_succeeded_build
boolean
default:"false"
Include latest successful build information

Response

id
integer
Package ID
name
string
Package name
projectname
string
Project name
ownername
string
Project owner name
source_type
string
Source type: “scm”, “link”, “upload”, “pypi”, “rubygems”, “custom”
source_dict
object
Source configuration dictionary
auto_rebuild
boolean
Whether automatic rebuilds via webhooks are enabled
builds
object
Build information (if requested)

List Packages

curl -X GET \
  "https://copr.fedorainfracloud.org/api_3/package/list?ownername=@copr&projectname=copr-dev"
Get a list of packages from a Copr project.

Query Parameters

ownername
string
required
Project owner name
projectname
string
required
Project name
with_latest_build
boolean
default:"false"
Include latest build information for each package
with_latest_succeeded_build
boolean
default:"false"
Include latest successful build information
limit
integer
default:"100"
Number of items per page
offset
integer
default:"0"
Number of items to skip

Response

items
array
Array of package objects (same structure as Get Package)
meta
object
Pagination metadata

Create Package

curl -X POST \
  "https://copr.fedorainfracloud.org/api_3/package/add/myuser/my-project/my-package/scm" \
  -H "Content-Type: application/json" \
  -d '{
    "clone_url": "https://github.com/user/repo.git",
    "committish": "main",
    "subdirectory": "",
    "spec": "package.spec",
    "source_build_method": "rpkg",
    "webhook_rebuild": true
  }'
Create a new package inside a Copr project. Requires authentication. See package source types documentation for required fields for each source type.

Path Parameters

ownername
string
required
Project owner name
projectname
string
required
Project name
package_name
string
required
Package name (must be unique within project)
source_type
string
required
Source type: “scm”, “link”, “upload”, “pypi”, “rubygems”, “custom”

Request Body (SCM source type)

clone_url
string
required
Git/SVN repository URL
committish
string
Branch, tag, or commit hash
subdirectory
string
Subdirectory within repository
spec
string
Path to .spec file
source_build_method
string
SRPM build method: “rpkg”, “tito”, “tito_test”, “make_srpm”
webhook_rebuild
boolean
default:"false"
Enable automatic rebuilds via webhooks
max_builds
integer
Maximum number of builds to keep
timeout
integer
Build timeout in seconds

Response

Returns the created package object with 200 status code.

Edit Package

curl -X POST \
  "https://copr.fedorainfracloud.org/api_3/package/edit/myuser/my-project/my-package" \
  -H "Content-Type: application/json" \
  -d '{
    "webhook_rebuild": true,
    "committish": "develop"
  }'
Edit an existing package within a Copr project. Requires authentication.

Path Parameters

ownername
string
required
Project owner name
projectname
string
required
Project name
package_name
string
required
Package name
source_type
string
Source type (optional, uses existing if not specified)

Request Body

Accepts the same fields as Create Package. Only provided fields will be updated.

Response

Returns the updated package object with 200 status code.

Reset Package

curl -X PUT \
  "https://copr.fedorainfracloud.org/api_3/package/reset" \
  -H "Content-Type: application/json" \
  -d '{
    "ownername": "myuser",
    "projectname": "my-project",
    "package_name": "my-package"
  }'
Reset a package to its initial state. Requires authentication.

Request Body

ownername
string
required
Project owner name
projectname
string
required
Project name
package_name
string
required
Package name

Response

Returns the reset package object with 200 status code.

Build Package

curl -X POST \
  "https://copr.fedorainfracloud.org/api_3/package/build" \
  -H "Content-Type: application/json" \
  -d '{
    "ownername": "myuser",
    "projectname": "my-project",
    "package_name": "my-package",
    "chroots": ["fedora-40-x86_64", "fedora-39-x86_64"]
  }'
Build a package using its configured source. Requires authentication.

Request Body

ownername
string
required
Project owner name
projectname
string
required
Project name
package_name
string
required
Package name
chroots
array
List of chroot names to build in (defaults to all project chroots)
background
boolean
default:"false"
Run as background build
timeout
integer
Build timeout in seconds
enable_net
boolean
Enable network access during build

Response

Returns the created build object with 200 status code.

Delete Package

curl -X DELETE \
  "https://copr.fedorainfracloud.org/api_3/package/delete" \
  -H "Content-Type: application/json" \
  -d '{
    "ownername": "myuser",
    "projectname": "my-project",
    "package_name": "my-package"
  }'
Delete a package from a Copr project. Requires authentication.

Request Body

ownername
string
required
Project owner name
projectname
string
required
Project name
package_name
string
required
Package name

Response

Returns the deleted package object with 200 status code.

Build docs developers (and LLMs) love