Skip to main content

Get Build

curl -X GET \
  "https://copr.fedorainfracloud.org/api_3/build/12345"
Get details for a single Copr build.

Path Parameters

build_id
integer
required
Build ID

Response

id
integer
Build ID
state
string
Build state: “importing”, “pending”, “starting”, “running”, “succeeded”, “failed”, “canceled”, “skipped”
projectname
string
Project name
ownername
string
Project owner name
repo_url
string
Repository URL for DNF/Yum
source_package
object
Source package information
submitted_on
integer
Unix timestamp when build was submitted
started_on
integer
Unix timestamp when build started
ended_on
integer
Unix timestamp when build ended
submitter
string
Username of build submitter
chroots
array
List of chroot names where build is executed
is_background
boolean
Whether this is a background build

List Builds

curl -X GET \
  "https://copr.fedorainfracloud.org/api_3/build/list?ownername=@copr&projectname=copr-dev&limit=20"
List all builds in a Copr project with pagination and filtering.

Query Parameters

ownername
string
required
Project owner name
projectname
string
required
Project name
packagename
string
Filter by package name
status
string
Filter by build status (succeeded, failed, canceled, etc.)
limit
integer
default:"100"
Number of items per page
offset
integer
default:"0"
Number of items to skip

Response

items
array
Array of build objects (same structure as Get Build)
meta
object
Pagination metadata

Get Source Chroot

curl -X GET \
  "https://copr.fedorainfracloud.org/api_3/build/source-chroot/12345"
Get source chroot information for a build (SRPM build phase).

Path Parameters

build_id
integer
required
Build ID

Response

state
string
Source build state
result_url
string
URL to source build results

Get Source Build Config

curl -X GET \
  "https://copr.fedorainfracloud.org/api_3/build/source-build-config/12345"
Get source build configuration for a build.

Path Parameters

build_id
integer
required
Build ID

Response

source_type
string
Source type: “link”, “upload”, “scm”, “pypi”, “rubygems”, “custom”
source_dict
object
Source-specific configuration dictionary
memory_limit
integer
Memory limit in MB
timeout
integer
Build timeout in seconds
is_background
boolean
Whether this is a background build

Get Built Packages

curl -X GET \
  "https://copr.fedorainfracloud.org/api_3/build/built-packages/12345"
Get built packages (NEVRA dicts) for a given build.

Path Parameters

build_id
integer
required
Build ID

Response

Returns a dictionary where keys are chroot names and values are package information.

Cancel Build

curl -X PUT \
  "https://copr.fedorainfracloud.org/api_3/build/cancel/12345"
Cancel a running or pending build. Requires authentication.

Path Parameters

build_id
integer
required
Build ID

Response

Returns the canceled build object with 200 status code.

Create Build from URL

curl -X POST \
  "https://copr.fedorainfracloud.org/api_3/build/create/url" \
  -H "Content-Type: application/json" \
  -d '{
    "ownername": "myuser",
    "projectname": "my-project",
    "pkgs": "https://example.com/package.src.rpm",
    "chroots": ["fedora-40-x86_64"]
  }'
Create a build from SRPM URL(s). Requires authentication.

Request Body

ownername
string
required
Project owner name
projectname
string
required
Project name
pkgs
string
required
SRPM URL(s), one per line for multiple packages
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

items
array
Array of created build objects

Create Build from Upload

curl -X POST \
  "https://copr.fedorainfracloud.org/api_3/build/create/upload" \
  -F "ownername=myuser" \
  -F "projectname=my-project" \
  -F "pkgs=@/path/to/package.src.rpm" \
  -F "chroots=[\"fedora-40-x86_64\"]"
Create a build from an uploaded SRPM file. Requires authentication.

Request Body (multipart/form-data)

ownername
string
required
Project owner name
projectname
string
required
Project name
pkgs
file
required
SRPM file to upload
chroots
array
List of chroot names to build in

Response

Returns the created build object with 200 status code.

Create Build from SCM

curl -X POST \
  "https://copr.fedorainfracloud.org/api_3/build/create/scm" \
  -H "Content-Type: application/json" \
  -d '{
    "ownername": "myuser",
    "projectname": "my-project",
    "clone_url": "https://github.com/user/repo.git",
    "committish": "main",
    "subdirectory": "",
    "spec": "package.spec",
    "source_build_method": "rpkg",
    "chroots": ["fedora-40-x86_64"]
  }'
Create a build from a source code management system (Git, SVN). Requires authentication.

Request Body

ownername
string
required
Project owner name
projectname
string
required
Project name
clone_url
string
required
SCM repository URL
committish
string
Branch, tag, or commit hash (defaults to default branch)
subdirectory
string
Subdirectory within repository
spec
string
Path to .spec file within repository
scm_type
string
SCM type: “git” or “svn” (auto-detected from URL)
source_build_method
string
SRPM build method: “rpkg”, “tito”, “tito_test”, “make_srpm”
chroots
array
List of chroot names to build in

Response

Returns the created build object with 200 status code.

Create Build from DistGit

curl -X POST \
  "https://copr.fedorainfracloud.org/api_3/build/create/distgit" \
  -H "Content-Type: application/json" \
  -d '{
    "ownername": "myuser",
    "projectname": "my-project",
    "package_name": "python3-requests",
    "distgit": "fedora",
    "committish": "f40",
    "chroots": ["fedora-40-x86_64"]
  }'
Create a build from a DistGit repository (Fedora, CentOS). Requires authentication.

Request Body

ownername
string
required
Project owner name
projectname
string
required
Project name
package_name
string
required
Package name in DistGit
distgit
string
DistGit instance: “fedora”, “centos”, etc.
namespace
string
DistGit namespace (e.g., “rpms”)
committish
string
Branch or tag name
chroots
array
List of chroot names to build in

Response

Returns the created build object with 200 status code.

Create Build from PyPI

curl -X POST \
  "https://copr.fedorainfracloud.org/api_3/build/create/pypi" \
  -H "Content-Type: application/json" \
  -d '{
    "ownername": "myuser",
    "projectname": "my-project",
    "pypi_package_name": "requests",
    "pypi_package_version": "2.28.1",
    "python_versions": ["3"],
    "chroots": ["fedora-40-x86_64"]
  }'
Create a build from a PyPI package. Requires authentication.

Request Body

ownername
string
required
Project owner name
projectname
string
required
Project name
pypi_package_name
string
required
Package name on PyPI
pypi_package_version
string
Specific version (defaults to latest)
python_versions
array
Python versions to build for (e.g., [“3”, “3.9”])
spec_generator
string
Spec generator tool
spec_template
string
Custom spec template
chroots
array
List of chroot names to build in

Response

Returns the created build object with 200 status code.

Create Build from RubyGems

curl -X POST \
  "https://copr.fedorainfracloud.org/api_3/build/create/rubygems" \
  -H "Content-Type: application/json" \
  -d '{
    "ownername": "myuser",
    "projectname": "my-project",
    "gem_name": "rails",
    "chroots": ["fedora-40-x86_64"]
  }'
Create a build from a RubyGems package. Requires authentication.

Request Body

ownername
string
required
Project owner name
projectname
string
required
Project name
gem_name
string
required
Gem name on RubyGems.org
chroots
array
List of chroot names to build in

Response

Returns the created build object with 200 status code.

Create Build from Custom Method

curl -X POST \
  "https://copr.fedorainfracloud.org/api_3/build/create/custom" \
  -H "Content-Type: application/json" \
  -d '{
    "ownername": "myuser",
    "projectname": "my-project",
    "script": "#!/bin/bash\nmake srpm",
    "chroot": "fedora-40-x86_64",
    "builddeps": "make gcc",
    "resultdir": "results"
  }'
Create a build using a custom script. Requires authentication.

Request Body

ownername
string
required
Project owner name
projectname
string
required
Project name
script
string
required
Custom build script
chroot
string
required
Chroot name for SRPM build
builddeps
string
Build dependencies
resultdir
string
Directory containing build results
repos
array
Additional repository URLs

Response

Returns the created build object with 200 status code.

Delete Build

curl -X DELETE \
  "https://copr.fedorainfracloud.org/api_3/build/delete/12345"
Delete a build by its ID. Requires authentication and appropriate permissions.

Path Parameters

build_id
integer
required
Build ID

Response

Returns the deleted build object with 200 status code.

Delete Multiple Builds

curl -X DELETE \
  "https://copr.fedorainfracloud.org/api_3/build/delete/list" \
  -H "Content-Type: application/json" \
  -d '{
    "builds": [12345, 12346, 12347]
  }'
Delete multiple builds specified by a list of IDs. Requires authentication.

Request Body

builds
array
required
Array of build IDs to delete

Response

builds
array
Array of deleted build IDs

Build docs developers (and LLMs) love