Open Build Service API

Version: 2.9

The most recent API documentation is reachable at https://api.opensuse.org/apidocs-new/

Only authenticated users are allowed to access the API. Authentication is done
by sending a Basic HTTP Authorisation header.

Do NOT simply add api calls here without discussion before.

The main base routes are:
/source : To handle all source submissions and project setups
/build : To access build results and their states
/published : Read access to published repositories
/search : Access to search interface

Table of Contents

About

GET /about

Get information about API.

Result: Example Schema

Architectures

GET /architectures

Get a list of all known architectures known to OBS in general.
This is not the list of architectures provided by this instance, check the
schedulers element from the /configuration route for this.

Result: Example

Issues

GET /issue_trackers

Get the list of available issue trackers

Result: Example Schema

POST /issue_trackers

Create an issue tracker.

Result: Example Schema

GET /issue_trackers/<name>

Arguments:

  • name

Read issue tracker data.

Result: Example Schema

PUT /issue_trackers/<name>

Arguments:

  • name

Update issue tracker data.

Result: Example Schema

DELETE /issue_trackers/<name>

Arguments:

  • name

Delete issue tracker.

Body: none

Result: Example Schema

GET /issue_trackers/<tracker_name>/issues/<issue_name>

Arguments:

  • tracker_name
  • issue_name

Show the issue

Result: Schema

Distribution List

GET /distributions

Get all the base distributions hosted on this OBS instance

Result: Example Schema

GET /distributions/<distribution_id>

Arguments:

  • distribution_id

Get a base distribution hosted on this OBS instance

Result: Example Schema

POST /distributions/

Creates a base distribution

Body: Example Schema

Result: Example Schema

PUT /distributions/<distribution_id>

Arguments:

  • distribution_id

Updates a base distribution. Note: Updating distribution from remote is not allowed.

Body: Example Schema

Result: Example Schema

GET /distributions/include_remotes

Get the list of base distributions hosted on this OBS instance and on all used remote instances

Result: Example Schema

POST /distributions/bulk_replace

Replace all the base distributions hosted on this OBS instance

Body: Example Schema

Result: Example Schema

User data

GET /person

List all user accounts

confirmed: list only active users

Result: collection

GET /person/<userid>

Arguments:

  • userid - Id of user

Read user data.

Result: Example Schema

PUT /person/<userid>

Arguments:

  • userid - Id of user

Write user data.

Body: Example Schema

Result: Example Schema

POST /person?cmd=register

Can be used to register a new user, if OBS instance is allowing this.

POST /person/<userid>

Arguments:

  • userid - Id of user

cmd=change_password to post the new password in the request body. Just the first line gets used.

Body: password

Result: Example Schema

cmd: change_password
cmd: lock # will lock the user and their home projects
cmd: delete # will mark the user as deleted and remove her home projects

GET /person/<userid>/token

Arguments:

  • userid - Id of user

Lists all authentication token for a user

Result: Example Schema

POST /person/<userid>/token

Arguments:

  • userid - Id of user

Create a new authentication token for this user. It may be limited for a specific package
via optional project&package parameters.

project: together with package, used to create a token for a specific package
package: together with project, used to create a token for a specific package
operation: runservice(default), rebuild, release
scm_token: (Beta/Unstable) SCM token used in OBS workflows to report back the
workflow status, when the operation is workflow.

Result: Example Schema

DELETE /person/<userid>/token/<id>

Arguments:

  • userid - Id of user
  • id

Delete a specific authentication token. The <id> is listed in GET call.

Body: none

Result: Example Schema

Group data

GET /group

List available groups

Result: Example Schema

login: List available groups of this user.

GET /group/<group title>

Arguments:

  • group title

Read group data.

Result: Example Schema

PUT /group/<group title>

Arguments:

  • group title

Write group data.

Body: Example Schema

Result: Example Schema

POST /group/<group title>

Arguments:

  • group title

Modify group data.

Multiple commands on processing group.
add_user: add a user to a group
remove_user: remove a user from a group
set_email: set email adress of group.

userid: user login name, required for add_user and remove_user command
email: email address for set_email command. email of group gets removed if not defined

Result: Example Schema

DELETE /group/<group title>

Arguments:

  • group title

Delete a group.

Body: none

Result: Example Schema

Sources

Projects

GET /source/

Read list of projects.

Result: Example Schema

deleted: show deleted projects instead of existing

POST /source

Commands on processing sources globally. Possible commands are
branch: branch a set of packages based on attributes or on existing request
orderkiwirepos: sort the repositories inside of a kiwi file according to path relationships
createmaintenanceincident: create mainatenance incident projects based on attribute search

linkrev: linked revision, optional (for linkrev=base)
attribute: attribute used for package search, default is OBS:Maintained
update_project_attribute: attribute name used to find out possible existing update projects of a package
request: branch by request, branch all packages in actions of request for superseding it
noaccess: the new created project will be read protected
target_project: project which will get used or created

GET /source/<project>/_meta

Arguments:

  • project

Read project meta file.

Result: Example Schema

PUT /source/<project>/_meta

Arguments:

  • project

Write project meta file.

If the project does not exist, create it.

comment: comment, optional

Body: Example Schema

Result: Example Schema

DELETE /source/<project>

Arguments:

  • project

Deletes specified project. All packages of this project are deleted as if a
DELETE request were issued for each package.

force: If force = 1, the project is deleted even if repositories of other
projects include a path to a repository from this project. The path
in the other repository is replaced by one pointing to 'deleted/standard',
preventing the build and publishing of the other repository.
comment: comment, optional

Body: none

Result: Example Schema

GET /source/<project>/_project

Arguments:

  • project

List project files

meta: switch for _meta files, optional
rev: revision, optional

Result: Example Schema

GET /source/<project>/_project/<file>

Arguments:

  • project
  • file

Read a project file.

meta: switch for _meta files, optional
rev: revision, optional

GET /source/<project>/_attribute/<attribute>

Arguments:

  • project
  • attribute

Get all attributes or a specific one

Body: attribute

POST /source/<project>/_attribute/<attribute>

Arguments:

  • project
  • attribute

Modifies a specific attribute as in body

comment: comment, optional

Result: Example Schema

DELETE /source/<project>/_attribute/<attribute>

Arguments:

  • project
  • attribute

Removes a specific attribute

comment: comment, optional

Body: none

Result: Example Schema

GET /source/<project>/_config

Arguments:

  • project

Read project configuration

rev: revision, mandatory

Result: configuration as text/plain

PUT /source/<project>/_config

Arguments:

  • project

Change project configuration

comment: comment, optional

Result: Example Schema

GET /source/<project>/_pattern

Arguments:

  • project

Get list of all patterns set up for this project

Result: Schema

GET /source/<project>/_pattern/<patternfile>

Arguments:

  • project
  • patternfile

Get pattern

Result: Schema

PUT /source/<project>/_pattern/<patternfile>

Arguments:

  • project
  • patternfile

Write pattern

Body: Schema

Result: Example Schema

DELETE /source/<project>/_pattern/<patternfile>

Arguments:

  • project
  • patternfile

Remove pattern

Body: none

Result: Example Schema

GET /source/<project>/_pubkey

Arguments:

  • project

Get project GPG key. If the project has no own key (default), it uses
the first available one in the namespace hierarchy, ending at the global
buildservice key.

Result: gpgkey

DELETE /source/<project>/_pubkey

Arguments:

  • project

Removes the current gpg key. Has no effect if no key is set.

Body: none

Result: Example Schema

POST /source/<project>?cmd=$COMMAND

Arguments:

  • project

createkey: Generate a new gpg key. If the project already has an own gpg key, the old key is discarded.
extendkey: Extend the expiration date of gpg keys.
undelete: undelete the project and all packages existing when the project got removed.
freezelink: create/update a freeze of a project link
showlinked: List all projects linking to this one
copy: copy the entire project
move: ADMIN ONLY. schedulers need to be stopped. move all sources and binaries around from oproject.
createmaintenanceincident: create a single mainatenance incident project as sub project
createpatchinfo: create a new patchinfo package collecting all mentioned issues in sources
addchannels: add channel packages and repositories for matching packages in project
addcontainers: add docker container packages and repositories using the main

modifychannels: modify existing channels by specified mode
set_flag: change a defined flag, requires at least flag and status parameters
remove_flag: remove a defined flag, requires at least flag and status parameters
lock: lock a project
unlock: unlock a locked project
release: release sources and binaries according to release target specification

comment: description for the history
# for set_flag command only:
arch: set_flag for given arch (optional)
flag: modify this flag (build/publish/..) for set_flag command
repository: set_flag for given repository or release just this repository (optional)
status: enable or disable for set_flag command
# for modifychannels and addchannels command only:
mode: how to deal with disabled channels: add_disabled(default), skip_disabled, enable_all
# for copy command only:
oproject: origin project name (required)
makeolder: make target older, the source vrev is bumped by two numbers and target by one
makeoriginolder: make origin older, the source vrev is extended and target is guaranteed to be newer
noaccess: the new created project will be read protected
nodelay: disables background copy operation, request will return after the job is finished
noservice: do not run source services
resign: resign all binaries with new target project key
setrelease: define a specific release tag when used with "release" command. Setting it to "-" strips
the release string. Note: this modifies only the filename.
withbinaries: copies also binaries on copy command
withhistory: copies sources with history on copy command

Result: Example Schema

Packages

GET /source/<project>

Arguments:

  • project

Read list of packages.

Result: Example Schema

deleted: bool, show deleted package instead of existing, optional
expand: bool, include also packages from linked projects, optional
view: issues, can be used to show all tracked issues for all packages in project
productlist, shows all containing products, unifies result when used with expand
verboseproductlist, same as productlist, but with detailed information about the product

GET /source/<project>/<package>

Arguments:

  • project
  • package

Package source listing

rev: revision of new package, optional
linkrev: linked revision, optional
emptylink: bool, , optional
expand: bool, expand links, optional
meta: bool, switch to meta files, optional
view: The "info" view will show data like source version, md5sums and build description files. May be used together with parse, arch or repository parameter, optional
"issues" can be used to show all tracked issues for all packages in project, optional
"products" show all products of a package (works only on "_product" packages)
"productrepositories" show all repositories used in product definitions (or given product)
extension: filter for file extension, optional
lastworking: bool, show sources of last mergeable sources in case of conflicting changes, optional
withlinked: bool, show all used package containers (in case of multiple link indirections) in linkinfo information, optional
deleted: bool, show content of deleted package instance
parse: bool, for view=info: take build description into account, optional
arch: string, for view=info: parse buildinfo for this architecture, optinal
repository: string, for view=info: parse buildinfo for this repository, optinal
product: string, limit the product view to a given product

Result: Example Schema

GET /source/<project>/<package>/_meta

Arguments:

  • project
  • package

Read project meta data.

rev: revision of new package, optional

Result: Example Schema

PUT /source/<project>/<package>/_meta

Arguments:

  • project
  • package

Write project meta data. Writing of the project meta data commits the packages
contained in the project to the build backend.

If the package does not exist, create it.

comment: comment, optional

Body: Example Schema

Result: Example Schema

DELETE /source/<project>/<package>

Arguments:

  • project
  • package

Deletes specified package including all source files

comment: comment, optional

Body: none

Result: Example Schema

GET /source/<project>/<package>/_attribute/<attribute>

Arguments:

  • project
  • package
  • attribute

Get all attributes or a specific one

Body: attribute

POST /source/<project>/<package>/_attribute/<attribute>

Arguments:

  • project
  • package
  • attribute

Modifies a specific attribute as in body

comment: comment, optional

Result: Example Schema

DELETE /source/<project>/<package>/_attribute/<attribute>

Arguments:

  • project
  • package
  • attribute

Removes a specific attribute

comment: comment, optional

Body: none

Result: Example Schema

GET /source/<project>/<package>/_history

Arguments:

  • project
  • package

Get package commit history

Result: Example Schema

POST /source/<project>/<package>?cmd=showlinked

Arguments:

  • project
  • package

List all package instances linking to this one.

Result: package list

POST /source/<project>/<package>?cmd=diff

Arguments:

  • project
  • package

Create a source diff

rev: revision of new package, optional
oproject: old project, optional
opackage: old package, optional
orev: old revision, optional
unified: set to 1 to use unified format without looking into archives,
instead of custom format with showing diff of files inside archives
expand: set to 1 to expand any link before diffing, optional
filelimit: integer to limit the diff size by line numbers. built-in default
is used by default, disable it via 0, optional
tarlimit: integer to limit the diff size by line numbers. built-in default is
used by default for tar ball content, disable it via 0, optional
linkrev: specify a link revision in base package, use linkrev=base to use the
commit revision, optional
olinkrev: specify a link revision in origin package, use linkrev=base to use
the commit revision, optional
missingok: for diffing against inexisting origin, optional
meta: diff meta data instead of sources by setting it to 1, optional
file: limit diff to the given file name, optional
view: view=xml for structured content, optional
withissues: includes parsed issue tracker issues and their change state, optional
onlyissues: no source diff, just the tracker issues and their change state, optional

Result: diff as text/plain

POST /source/<project>/<package>?cmd=instantiate

Arguments:

  • project
  • package

Instantiate a package container, which is available via project links only so far.

makeoriginolder: optional, can be used to modify source and target to guarantee that new version
stay older also on future updates in older code stream

Result: Example Schema

POST /source/<project>/<package>?cmd=release

Arguments:

  • project
  • package

Releases sources and binaries of that package. This requires a set
release target in the repository definitions of <project>. Also the
trigger must be set to "manual"

comment: description for the history
repository: limit the release to the specified repository
target_repository: specify the target repository name (together with target_project)
target_project: overwrites the target definition from project meta
(repository and target_repository parameter required as well)

Result: Example Schema

POST /source/<project>/<package>?cmd=unlock

Arguments:

  • project
  • package

Unlocks a locked package

comment: description for the history

Result: Example Schema

POST /source/<project>/<package>?cmd=branch

Arguments:

  • project
  • package

Create a source link from a package of an existing project to a
new subproject of the requesters home project.
The default target is home:<user>:branches:<project>/<package>
A possible defined devel project in the package meta data gets ignored.

ignoredevel: bool, optional
target_project: target project name, optional
target_package: target package name, optional
noaccess: the new created project will be read protected, bool, optional
missingok: the target package does not exist
newinstance: the target package exists only via project links, but the link should point to given project
add_repositories: bool, optional, adds repositories base on source project (default for new projects)
update_path_elements: bool, optional, update all path elements if needed (used repositories depend on each other)
extend_package_names: bool, optional, extends package and repository names to allow multiple instances of same package
add_repositories_rebuild: use defined rebuild policy for new repos ("transitive", "direct" or "local") or copy it from the source project ("copy")
add_repositories_block: use defined block policy for new repos

Result: Example Schema

POST /source/<project>/<package>?cmd=set_flag

Arguments:

  • project
  • package

Modify or set a defined flag for package

repository: set_flag for given repository (optional)
arch: set_flag for given arch (optional)
flag: modify this flag (build/publish/..) for set_flag command
status: enable or disable for set_flag command

Result: Example Schema

POST /source/<project>/<package>?cmd=createSpecFileTemplate

Arguments:

  • project
  • package

Create template for RPM SPEC file. Returns an error, if the SPEC file already
exists.

Result: Example Schema

POST /source/<project>/<package>?cmd=commit

Arguments:

  • project
  • package

Commits package changes to buildservice

rev: revision, mandatory
comment: comment, optional

Result: Example Schema

POST /source/<project>/<package>?cmd=collectbuildenv

Arguments:

  • project
  • package

Creates _buildenv files based on origin package builds. This can be used
to re-use exact older build enviroment even when further new binary packages
got added. For example to re-build an old maintenance update in the same way.

oproject: Origin project to copy from (required)
opackage: Origin package to copy from (required)
comment: Optional comment by the user

Result: Example Schema

POST /source/<project>/<package>?cmd=importchannel

Arguments:

  • project
  • package

Import a kiwi channel file for OBS. Project names will be set
to update projects if defined.

target_project: optional target repository to set
target_repository: optional target repository to set

Result: Example Schema

POST /source/<project>/<package>?cmd=deleteuploadrev

Arguments:

  • project
  • package

Removes all changes made to the upload revision and reverts to last revision

none

Result: Example Schema

Source files

GET /source/<project>/<package>

Arguments:

  • project
  • package

Get directory listing of all source files in the package

rev: package source revision, optional
linkrev: linked revision, optional
expand: expand links, optional
meta: switch to meta files
lastworking: auto detect last working link revision, optional
view: The "cpio" view will stream all files as cpio, optional
extension: filter for file extension, optional

GET /source/<project>/<package>/<filename>

Arguments:

  • project
  • package
  • filename - File name

Read source file.

Result: Content of file

meta: switch to meta files

PUT /source/<project>/<package>/<filename>

Arguments:

  • project
  • package
  • filename - File name

Write source file.

rev: if set to 'upload', multiple files can be uploaded one by one in one commit, before
finishing the commit with cmd=commit (see below), optional
comment: comment, optional
keeplink: bool, optional
meta: switch to meta files

Body: Content of file

Result: Example Schema

DELETE /source/<project>/<package>/<filename>

Arguments:

  • project
  • package
  • filename - File name

Delete the specified file and commits the changes.

Body: none

Result: Example Schema

meta: switch to meta files

POST /source/<project>/<package>

Arguments:

  • project
  • package

Multiple commands on processing sources in package. Possible commands are
diff: for server side diff
linkdiff: for server side diff of a linked or branched package
servicediff: shows the changes of the service run
commit: commit files in upload revision
deleteuploadrev: delete all uploaded sources which are not committed yet
copy: copy package sources from another package
undelete: undelete the package
unlock: unlock a package with lock enabled. A comment is required.
release: release sources and binaries according to release target specification
branch: branch a package into another one
linktobranch: convert a plain source link into a full branch
enablechannel: adds repositories and enable this channel package
addchannels: add channel packages and repositories for matching packages in project
addcontainers: add docker container packages and repositories using the maintained version of this package
updatepatchinfo: update _patchinfo file, esp. the issues list
remove_flag: remove a specific flag from meta (flag must be defined, optionally arch and repository)
set_flag: remove a specific flag from meta (flag must be defined, optionally arch and repository)
showlinked: show all source packages linking to this one
rebuild: rebuild all builds
getprojectservices: list all service defined in project spaces defined for this package.
runservice: trigger run of defined services in _service file
waitservice: returns when all services have finished, code 200 when service run was successful
mergeservice: drops the _service file and commits all server side generated files
time: set the time on undelete operation (admin only operation)
wipe: wipe all build results of this package

rev: package source revision, optional
linkrev: linked revision, optional
orev: origin package source revision as defined in opackage/project, optional
olinkrev: origin linked revision, optional
oproject: origin project, used as base project
opackage: origin package, used as base package
requestid: log the requestid in source history, optional (copy and commitfilelist only)
expand: expand links, optional
extend_package_names: bool, optional, extends package and repository names to allow multiple instances of same package. used by default in incident projects.
keeplink: keep link on source commit, optional
repairlink: repair link on source commit, optional
dontupdatesource: Do not update origin package, optional (copy only)
noservice: do not run source services
comment: comment for history, optional
meta: switch to meta files
arch: architecture when using flag modifing command
repository: repository when using flag modifing command
view: may be "xml" for structured answered (for diff commands)
withissues: set to get issues parsed from changelogs (for diff commands)
onlyissues: used to limit to issues (for diff commands)
setrelease: define a specific release tag when used with "release" command. Setting it to "-" strips
the release string.
withvrev: copy also the vrev counter of the revision

POST /source/<project>/<package>?cmd=commitfilelist

Arguments:

  • project
  • package

creating a new commit including defined files already uploaded to the repository.
This can be done via PUT using rev=repository which avoids a commit.

This requires a directory xml providing file name and md5 as body.
It is recommended to use the withvalidate parameter and including the
sha256 sum including "sha256:" prefix in "hash" attribute for security reason.

withvalidate: activate sha validation code (optional, but recommended)
comment: comment for history, optional
keeplink: bool, optional. If the package is a link and keeplink is true, then the link is preserved. By default keeplink is false and the link is replaced with the expanded sources when creating a new revision.
linkrev: optional, specifies the revision to link against when used together with keeplink parameter.
repairlink: boolean, optional, for solving conflicts. The additional linkrev parameter is recommended.

Body: Example Schema

GET /source/<project>/<package>/<binary>/_attribute/<attribute>

Arguments:

  • project
  • package
  • binary
  • attribute

Get all attributes or a specific one

Body: attribute

POST /source/<project>/<package>/<binary>/_attribute/<attribute>

Arguments:

  • project
  • package
  • binary
  • attribute

Modifies a specific attribute as in body

comment: comment, optional

Result: Example Schema

DELETE /source/<project>/<package>/<binary>/_attribute/<attribute>

Arguments:

  • project
  • package
  • binary
  • attribute

Removes a specific attribute

comment: comment, optional

Body: none

Result: Example Schema

Requests

GET /request

Get a list of requests. When using the "view=collection" you need also to filter
either by user, project or package.

view: collection, return a collection of requests instead of directory listing
user: filter for given user, includes all target projects and packages where
the user is maintainer and also open review requests
project: limit to result to defined target project or review requests
package: limit to result to defined target package or review requests
states: filter for given request state, multiple matches can be added as comma seperated list (eg states=new,review)
types: filter for given action types (comma seperated)
roles: filter for given roles (creator, maintainer, reviewer, source or target)
withhistory: includes the request history in result
withfullhistory: includes the request and review history in result
limit: to limit the result to the given number of requests

Result: collection

GET /request/<id>

Arguments:

  • id

Get a request

withhistory: includes the request history in result
withfullhistory: includes the request and review history in result

Result: Example Schema

POST /request

Create a new request

Result: Example Schema

Commands on processing requests
create: to create a new request

addrevision: ask the server to add revisions of current sources to the request
ignore_delegate: enforce a new package instance in a project which has OBS:DelegateRequestTarget set
ignore_build_state: skip the build state check

PUT /request/<id>

Arguments:

  • id

Modify a request. NOTE: Only admins can change all parts of a request.

Result: Example Schema

POST /request/<id>?cmd=diff

Arguments:

  • id

Shows the diff of all affected packages.

diff_to_superseded: diff relative to a given superseded request
view: can be set to "xml" for structured diff
withissues: included parsed issues

Result: diff as text/plain or xml based on view parameter

POST /request/<id>

Arguments:

  • id

Modify a request

Result: Example Schema

Commands on processing requests
addreview: Adds a review to a request
assignreview: Adds a review for a user and accepts it for the used group
changestate: Modifies the state of a request
changereviewstate: Modifies the state of a review inside a request
setpriority: Modifies the priority of a requst
setincident: Change the target incident for maintenance_incident actions
setacceptat: Set or modify the accept_at time. Either specified by time parameter or now.
approve: pre-approve a request in review state. Will turn into accepted after last review
cancelapproval: reset the approval

comment: Comment for the request history
newstate: Define the new state
priority: Define the new priority
by_user: Specify the user of the new review
by_group: Specify the group of the new review
by_project: Specify the project of the new review
by_package: Specify the user of the new review
keep_packages_locked: keep packages locked when revoking a maintenance release request
incident: Specifiy inicdent number for setincident
time: Specifiy time for setacceptat

Attribute definition api

GET /attribute/

List all attribute namespaces

Result: Example Schema

GET /attribute/<namespace>/

Arguments:

  • namespace

List all attributes under given namespace

Result: Example Schema

GET /attribute/<namespace>/_meta

Arguments:

  • namespace

shows namespace setup

Result: Example Schema

DELETE /attribute/<namespace>/_meta

Arguments:

  • namespace

Delete a attribute namespace and all attributes below

Body: none

Result: Example Schema

PUT /attribute/<namespace>/_meta

Arguments:

  • namespace

change attribute namespace meta

Body: attribute_namespace_meta_data

Result: Example Schema

GET /attribute/<namespace>/<name>/_meta

Arguments:

  • namespace
  • name

shows attribute setup

Result: attribute_meta

DELETE /attribute/<namespace>/<name>/_meta

Arguments:

  • namespace
  • name

Delete a attribute and all its values in projects or packages

Body: none

Result: Example Schema

PUT /attribute/<namespace>/<name>/_meta

Arguments:

  • namespace
  • name

change attribute meta

Body: attribute_meta_data

Result: Example Schema

Comments api

GET /comments/package/:project/:pname

Get all comments for the object

Result: Example Schema

DELETE /comment/:id

Delete a comment specified by the comment id

Body: none

Result: Example Schema

Build Results

GET /build/

List all repositories

Result: Example Schema

GET /build/<project>

Arguments:

  • project

List all repositories of the specified project

Result: Example Schema

GET /build/<project>/<repository>

Arguments:

  • project
  • repository

List all architectures of the specified project repository

Result: Example Schema

GET /build/<project>/<repository/<arch>

Arguments:

  • project
  • repository/<arch

List all packages used in this project repository for given architecture.

Result: Example Schema

Binaries

GET /build/<project>/<repository>/<arch>/<package>

Arguments:

  • project
  • repository
  • arch
  • package

Get list of binaries built by the sources of the given package

Result: binarylist

GET /build/<project>/<repository>/<arch>/<package>/<binaryname>

Arguments:

  • project
  • repository
  • arch
  • package
  • binaryname

Get single binary from build results of given package

Result: binary file

GET /build/<project>/<repository>/<arch>/<package>/<binaryname>?view=fileinfo

Arguments:

  • project
  • repository
  • arch
  • package
  • binaryname

GET /build/<project>/<repository>/<arch>/<package>/<binaryname>?view=fileinfo_ext

Arguments:

  • project
  • repository
  • arch
  • package
  • binaryname

Get information about the binary from build results of given package

Result: fileinfo

POST /build/<project>/<repository>/<arch>/_builddepinfo

Arguments:

  • project
  • repository
  • arch

Shows all build dependencies of one or more packages, a change in any of them will
trigger a build.
A changed dependency can be posted to let the server recalculate the order
including the local dependency changes.

package=<name> filter package container, can be used multiple times
view=pkgnames show package names instead of binary names
view=revpkgnames show which packages will be triggered if the package is changed
view=order sort packages ordered by dependencies

Result: build dependencies

GET /build/<project>/<repository>/<arch>/_jobhistory?package=<package>&code=succeeded&limit=10

Arguments:

  • project
  • repository
  • arch

Get the build log of all finished builds in this repository, including
time and trigger reason. Optional filtering for one ore more packages/codes is
possible.

Result: jobhistory

GET /build/<project>/<repository>/<arch>/_repository

Arguments:

  • project
  • repository
  • arch

Get list of binaries in given repository (binaries produced by all packages
of the project)

Result: binarylist

POST /build/<project>/<repository>/<arch>/_repository?match=

Arguments:

  • project
  • repository
  • arch

Uploads binaries to a given repository. ADMIN ONLY

Result: status

PUT /build/<project>/<repository>/<arch>/_repository/<file>

Arguments:

  • project
  • repository
  • arch
  • file

Uploads binaries into the repository. ADMIN ONLY.

Result: status

GET /build/<project>/<repository>/<arch>/_repository/<binaryname>

Arguments:

  • project
  • repository
  • arch
  • binaryname

Get single binary from the given repository

Result: binary file

Status

GET /build/<project>/_result

Arguments:

  • project

Return build results for the packages, architectures and repositories
specified by the parameters. If no parameters are given, all results for the
project are returned.

The view parameter specifies which sections are included in the results.
view=summary includes the summary of the status values. view=status includes
detailed status information. view=binarylist includes the list of generated
binary files. If no view parameter is given, view=status is assumed. To
combine views the parameter can be given multiple times.

package: package name, optional, multiple
arch: architecture, optional, multiple
repository: name of repository, optional, multiple
view: summary | status | binarylist
lastbuild: bool, show last build result (avoiding current building job state)
locallink: bool, include build results from packages with project local links
multibuild: bool, include build results from _multibuild definitions

Result: Example Schema

GET /build/<project>/<repository>/<arch>/<package>/_history

Arguments:

  • project
  • repository
  • arch
  • package

Get build history

Result: Example Schema

GET /build/<project>/<repository>/<arch>/<package>/_reason

Arguments:

  • project
  • repository
  • arch
  • package

Detailed reason, why the last build got triggered. This may be
caused by a source change, meta change (binary package below changed) or
release number sync.
A user triggered build will show up as source change.

Result: buildreason

GET /build/<project>/<repository>/<arch>/<package>/_jobstatus

Arguments:

  • project
  • repository
  • arch
  • package

Get build status of a current running build job or empty result if no job is running.

Result: Example Schema

GET /build/<project>/<repository>/<arch>/<package>/_status

Arguments:

  • project
  • repository
  • arch
  • package

Get build status of the specified project/package/repo/arch combination

Result: Example Schema

GET /build/<project>/<repository>/<arch>/<package>/_log

Arguments:

  • project
  • repository
  • arch
  • package

Get build log.

nostream: do not hang if the build is currently running
last: show log from last finished build
lastsucceeded: show last succeeded log
start: start at a given number of bytes
end: stop after the given number of bytes
view: special view instead of plain logfile. "entry" shows the size and mtime of logfile.

Result: Build log as text file.

Worker

GET /worker/_status

Lists all running jobs, waiting jobs, status of the backend services and general statistics.

Result: Example

GET /worker/<hostarch>:<workerid>

Arguments:

  • hostarch
  • workerid

Lists all capabilities of the worker. Can be used for constraints

Result: workercapability

POST /worker?cmd=checkconstraints

Calculates the possible workers with a given constraints rule. Further required parameters
are:

project: project name
package: package name
arch: architecture
repository: name of repository

Result: Example Schema

Control

POST /build/<project>?cmd=rebuild

Arguments:

  • project

Triggers package rebuild for the repositories/architectures of the package
specified by the parameters. If no parameters are given, all packages of the
project are completely rebuilt.

Possible values for the code parameter are:

succeeded - build succeeded
failed - build failed
disabled - build is disabled in package config
excluded - build is excluded in spec file
scheduled - package is ready to be built
building - package is building on a worker
broken - package source is bad (i.e. no specfile)
unresolvable - build needs unavailable binary packages

package: package name, optional, multiple
arch: architecture, optional, multiple
repository: name of repository, optional, multiple
code: build status code, optional, multiple
lastbuild: use the state of last build result (together with code)

Result: Example Schema

POST /build/<project>?cmd=abortbuild

Arguments:

  • project

Kill all running builds, marking them as failed

see cmd=rebuild

POST /build/<project>?cmd=restartbuild

Arguments:

  • project

Restart all running builds

see cmd=rebuild

POST /build/<project>?cmd=unpublish

Arguments:

  • project

Delete all binary packages from publish area

see cmd=rebuild

POST /build/<project>?cmd=sendsysrq

Arguments:

  • project

Send a single sysrq char to the kernel of a running build
Only a subset of debugging requests a are supported (eg. 9, t or w)

see cmd=rebuild
sysrq: for specifing the sysrq

POST /build/<project>?cmd=wipe

Arguments:

  • project

Delete all binary packages from build area

see cmd=rebuild

Local Build

GET /build/<project>/<repository>/<arch>/<package>/_buildinfo

Arguments:

  • project
  • repository
  • arch
  • package

Get build information for local building

Result: buildinfo

POST /build/<project>/<repository>/<arch>/<package>/_buildinfo

Arguments:

  • project
  • repository
  • arch
  • package

Get build info for local building using the POSTed specfile.
<package> can be "_repository", if the designated package does not yet exist
on the server. Usefull for local build test before committing the initial package.

Body: specfile

Result: buildinfo

Trigger area

POST /trigger/runservice

This call needs a token to identify the user and package which shall be updated
via a source service. See the cmd=create in the /person/<userid>/token route.

The token itself must be delivered as a HTTP header:
Authorization: Token <TOKEN_STRING>

project: To be used together with "package" to identify the object. Must not be used
when the token is bound to a package.
package: see project parameter.

Result: Example Schema

Repository Information

GET /build/<project>/<repository>/<arch>/_repository

Arguments:

  • project
  • repository
  • arch

Returns list of binaries contained in the specified repository

Result: binarylist

GET /build/<project>/<repository>/<arch>/_repository/<binaryname>

Arguments:

  • project
  • repository
  • arch
  • binaryname

Returns binary

Result: binary file

GET /build/<project>/<repository>/<arch>/<package>

Arguments:

  • project
  • repository
  • arch
  • package

Returns list of binaries contained in the specified repository

Result: binarylist

GET /build/<project>/<repository>/<arch>/<package>/_buildinfo

Arguments:

  • project
  • repository
  • arch
  • package

Build info according to the committed sources

Result: buildinfo

POST /build/<project>/<repository>/<arch>/<package>/_buildinfo

Arguments:

  • project
  • repository
  • arch
  • package

Build info according to the uploaded sources

Result: buildinfo

GET /build/<project>/<repository>/<arch>/_builddepinfo

Arguments:

  • project
  • repository
  • arch

Returns dependency information of packages in the specified repository. One or more
packages can be specified with the 'package' parameter. By default dependencies for
all packages are returned.

Result: builddepinfo

GET /build/<project>/<repository>/_buildconfig

Arguments:

  • project
  • repository

Build configuration for this repository, all base package requirements, mappings and macros.

Search

GET /search/project

Searches for project metadata using xpath. A xpath predicate has to be
specified using the match parameter. The predicate will be used in this
expression: /project[<match>]. Only complete meta files will be returned.

match: xpath predicate, mandatory

Result: collection

GET /search/project/id

Searches for project metadata analogous to /search/project, only the root
element is returned without any children.

match: xpath predicate, mandatory

Result: collection

GET /search/package

Searches for package metadata using xpath. A xpath predicate has to be
specified using the match parameter. The predicate will be used in this
expression: /package[<match>]. Only complete meta files will be returned.

match: xpath predicate, mandatory

Result: collection

GET /search/package/id

Searches for package metadata analogous to /search/package, only the root
element is returned without any children.

match: xpath predicate, mandatory

Result: collection

GET /search/published/binary/id

Search for currenlty available binaries in the publish area.

match: xpath predicate, mandatory
limit: override limit of entries, optional
withdownloadurl: bool, add download url entries as well, optional

Result: collection

GET /search/published/repoinfo/id

Search for currenlty available repositories in the publish area.

match: xpath predicate, mandatory
limit: override limit of entries, optional
withdownloadurl: bool, add download url entries as well, optional

Result: collection

GET /search/published/pattern/id

Search for published patterns

match: xpath predicate, mandatory
limit: override limit of entries, optional
withdownloadurl: bool, add download url entries as well, optional

Result: collection

GET /search/channel/binary

Search for packages, sources or binaries which are referenced in channel files.
Unlike the released/binary search this works already after setting up a channel
even without releasing files.

match: xpath predicate, mandatory

Result: collection

GET /search/channel/binary/id

Search for packages, sources or binaries which are referenced in channel files.
Unlike the released/binary search this works already after setting up a channel
even without releasing files.

This is the short version without full release data information.

match: xpath predicate, mandatory

Result: collection

GET /search/released/binary

Search for binaries which got released. This works only for binaries published
via release mechanism. It also includes binaries which got removed again.

It is recommended to specify at least the @name binary package name or the
@disturl.

match: xpath predicate, mandatory

Result: collection

GET /search/released/binary/id

Search for binaries which got released. This works only for binaries published
via release mechanism. It also includes binaries which got removed again.

This is the short version without full release data information.

match: xpath predicate, mandatory

Result: collection

GET /search/request

Searches for requests using xpath. A xpath predicate has to be
specified using the match parameter. The predicate will be used in this
expression: /request[<match>]. Only complete meta files will be returned.

match: xpath predicate, mandatory
withhistory: includes the request history in result
withfullhistory: includes the request and review history in result

Result: collection

GET /search/issue

Searches for issue metadata using xpath. A xpath predicate has to be
specified using the match parameter. The predicate will be used in this
expression: /issue[<match>]. Only complete issue information will be returned.

match: xpath predicate, mandatory

Result: collection

GET /search/owner

Search for default responsible person or group.
Using the binary parameter the lookup happens via a build binary name
Using user or group all sources where they are responsible are for are listed.
Either binary, user or group parameter is required.

binary: specify the binary package to search for
user: specify a user login name to list their packages
group: specify a group title name to list their packages

devel: true/false: include devel package definitions?
limit: limit the number of results. Default is "1" single result. Use 0 for all hits, -1 for deepest match.
This works only when used together with binary search otherwise always all items get returned.
project: specify project to search in
filter: Comma seperated list of role names to be taken into account
attribute: specify attribute which is marking the default project(s). Default is OBS:OwnerRootProject

Result: collection

GET /search/missing_owner

Search for missing definitions of specific role.
No parameter is required by default

devel: true/false: include devel package definitions?
limit: limit the number of results.
project: specify project to search in
filter: Comma seperated list of role names to be taken into account
attribute: specify attribute which is marking the default project(s). Default is OBS:OwnerRootProject

Result: collection

Published binary package tree

GET /published

List of published projects

Result: Example Schema

GET /published/<project>

Arguments:

  • project

List of repositories of published projects

Result: Example Schema

GET /published/<project>/<repository>

Arguments:

  • project
  • repository

List of published repositories for the given project/repo

Result: Example Schema

GET /published/<project>/<repository>?view=status

Arguments:

  • project
  • repository

Delivers last publish information like time and repository build id

Result: Example Schema

GET /published/<project>/<repository>/<arch>

Arguments:

  • project
  • repository
  • arch

List of published binaries for the given project/repo/arch

Result: Example Schema

GET /published/<project>/<repository>/<arch>/<binary>

Arguments:

  • project
  • repository
  • arch
  • binary

Download published binary
NOTE: use this only if you absolutely have to as it doesn't use
the redirector

Result: binary

GET /published/<project>/<repository>/<arch>/<binary>?view=ymp

Arguments:

  • project
  • repository
  • arch
  • binary

Generate an ymp pattern that includes the needed repositories to install the
given binary

Result: ymp

Build Results (Legacy)

This section describes the obsolete API for build results. It will be replaced
by the API available under /build.

Build Results

GET /result/<project>/<platform>/result

Arguments:

  • project
  • platform

Read project summary result.

Result: projectresult

GET /result/<project>/<platform>/<package>/result

Arguments:

  • project
  • platform
  • package

Read package result.

Result: Example Schema

GET /result/<project>/<platform>/<package>/<arch>/log

Arguments:

  • project
  • platform
  • package
  • arch

Read build log.

Result: Build log as text file.

Statistics

GET /statistics/latest_added?limit=<limit>

Get a list of packages and projects (mixed) latest added to the build
service. All entries are sorted by creation time.

Result: Example Schema

GET /statistics/added_timestamp/<project>/<package>

Arguments:

  • project
  • package

Get timestamp when project or package was added to the build service.

Result: Example Schema

GET /statistics/latest_updated?limit=<limit>

Get a list of packages and project that were last updated. All entries are
sorted by the update timestamp.

Result: Example Schema

GET /statistics/updated_timestamp/<project>/<package>

Arguments:

  • project
  • package

Get timestamp when project or package was last updated.

Result: Example Schema

GET /statistics/activity/<project>/<package>

Arguments:

  • project
  • package

Get activity in % of project or package.

Result: Example Schema

GET /statistics/most_active_projects?limit=<limit>

Get list of most active projects.

Result: Example Schema

GET /statistics/most_active_packages?limit=<limit>

Get list of most active packages.

Result: Example Schema

PUT /statistics/redirect_stats

Send download statistics from the openSUSE download redirector to the build
service api, to update the download_counter database.
User needs to have appropriate permissions.

Result: Example Schema

Status Messages

GET /status/messages/<id>

Arguments:

  • id

Get a the status message that matches <id>.

Result: Example Schema

GET /status/messages/?limit=<limit>

Get a list of status messages.

Result: Example Schema

POST /status/messages/

Send a new status message to the build service. User needs to have
appropriate permissions.

Result: Example Schema

DELETE /status/messages/<id>

Arguments:

  • id

Delete a status message. User needs to have appropriate permissions.

Status Checks

WARNING: This API is currently in beta and unstable

Repositories

GET /status_reports/published/<project>/<repository>/reports/<build_id>

Arguments:

  • project - The name of a project, e.g. home:user1
  • repository - The name of a repository of the project, e.g. openSUSE_Tumbleweed
  • build_id - The build id you have received for the repository, e.g. 12345

Get a status report with this build id

Result: Example

PUT /status_reports/published/<project>/<repository>/reports/<build_id>

Arguments:

  • project - The name of a project, e.g. home:user1
  • repository - The name of a repository of the project, e.g. openSUSE_Tumbleweed
  • build_id - The build id you have received for the repository, e.g. 12345

Create or update check data

Result: Example Schema

Requests

GET /status_reports/requests/<request>/reports

Arguments:

  • request - The number of the request, e.g. 12345

Get a the status report for this request

Result: Example

PUT /status_reports/requests/<request>/reports

Arguments:

  • request - The number of the request, e.g. 12345

Create or update check data

Result: Example Schema

Required Status Checks

WARNING: This API is currently in beta and unstable

Projects

GET /status_reports/projects/<project>/required_checks

Arguments:

  • project - The name of a project, e.g. home:user1

Get all required checks for this project

Result: Example

POST /status_reports/projects/<project>/required_checks/<check>

Arguments:

  • project - The name of a project, e.g. home:user1
  • check - The name of the required check

Create a required check

Result: Example

DELETE /status_reports/projects/<project>/required_checks/<check>

Arguments:

  • project - The name of a project, e.g. home:user1
  • check - The name of the required check

Delete a required check

Body: none

Result: Example

Repositories

GET /status_reports/repositories/<project>/<repository>/required_checks

Arguments:

  • project - The name of a project, e.g. home:user1
  • repository - The name of a repository of the project, e.g. openSUSE_Tumbleweed

Get all required checks for this repository

Result: Example

POST /status_reports/repositories/<project>/<repository>/required_checks/<check>

Arguments:

  • project - The name of a project, e.g. home:user1
  • repository - The name of a repository of the project, e.g. openSUSE_Tumbleweed
  • check - The name of the required check

Create a required check

Result: Example

DELETE /status_reports/repositories/<project>/<repository>/required_checks/<check>

Arguments:

  • project - The name of a project, e.g. home:user1
  • repository - The name of a repository of the project, e.g. openSUSE_Tumbleweed
  • check - The name of the required check

Delete a required check

Body: none

Result: Example

Built Repositories

GET /status_reports/built_repositories/<project>/<repository>/<arch>/required_checks

Arguments:

  • project - The name of a project, e.g. home:user1
  • repository - The name of a repository of the project, e.g. openSUSE_Tumbleweed
  • arch - architecture

Get all required checks for this repository

Result: Example

POST /status_reports/built_repositories/<project>/<repository>/<arch>/required_checks/<check>

Arguments:

  • project - The name of a project, e.g. home:user1
  • repository - The name of a repository of the project, e.g. openSUSE_Tumbleweed
  • arch - architecture
  • check - The name of the required check

Create a required check

Result: Example

DELETE /status_reports/built_repositories/<project>/<repository>/<arch>/required_checks/<check>

Arguments:

  • project - The name of a project, e.g. home:user1
  • repository - The name of a repository of the project, e.g. openSUSE_Tumbleweed
  • arch - architecture
  • check - The name of the required check

Delete a required check

Body: none

Result: Example

Staging

WARNING: This API is currently in beta and unstable

Staging Workflow

POST /staging/<staging_workflow_project>/workflow

Arguments:

  • staging_workflow_project - The name of the staging workflow project, e.g. openSUSE:Factory

Create a staging workflow for a given project.

Body: Example

Result: Example

PUT /staging/<staging_workflow_project>/workflow

Arguments:

  • staging_workflow_project - The name of the staging workflow project, e.g. openSUSE:Factory

Update the managers group of a staging workflow.

Body: Example

Result: Example

DELETE /staging/<staging_workflow_project>/workflow

Arguments:

  • staging_workflow_project - The name of the staging workflow project, e.g. openSUSE:Factory

Delete a staging workflow associated to a given project.

with_staging_projects: deletes all staging projects of the staging workflow

Body: none

Result: Example

GET /staging/<staging_workflow_project>/staging_projects?requests=1&status=1&history=1

Arguments:

  • staging_workflow_project - The name of the staging workflow project, e.g. openSUSE:Factory

Get the overall state of all staging projects belonging to a staging workflow project.
Extra information can be requested by adding any combination of these parameters in the URL: requests, status and history.

- If requests is present, the output includes the staged, untracked and obsolete requests as well as missing reviews.
- If status is present, the output includes the overall state and the status xml (broken packages, missing reviews, checks, etc.)
- If history is present, the output includes the history of the staging project.

Result: Example

GET /staging/<staging_workflow_project>/staging_projects/<staging_project>?requests=1&status=1&history=1

Arguments:

  • staging_workflow_project - The name of the staging workflow project, e.g. openSUSE:Factory
  • staging_project - The name of the staging project, e.g. openSUSE:Factory:Staging:A

Get the overall state of a staging project.
Extra information can be requested by adding any combination of these parameters in the URL: requests, status and history.

- If requests is present, the output includes the staged, untracked and obsolete requests as well as missing reviews.
- If status is present, the output includes the overall state and the status xml (broken packages, missing reviews, checks, etc.)
- If history is present, the output includes the history of the staging project.

Result: Example

POST /staging/<staging_workflow_project>/staging_projects/<staging_project>/copy/<staging_project_copy_name>

Arguments:

  • staging_workflow_project - The name of the staging workflow project, e.g. openSUSE:Factory
  • staging_project - The name of the staging project, e.g. openSUSE:Factory:Staging:A
  • staging_project_copy_name - The name of the staging project's copy, e.g. openSUSE:Factory:Staging:B

Copy a staging project

Result: Example

POST /staging/<staging_workflow_project>/staging_projects/<staging_project>/accept?force=1

Arguments:

  • staging_workflow_project - The name of the staging workflow project, e.g. openSUSE:Factory
  • staging_project - The name of the staging project, e.g. openSUSE:Factory:Staging:A

Accept staging project. This accepts all staged requests and sets the project state back to 'empty'.
Will return in an error if staging project is not acceptable, unless force is given. You can force
accept staging projects with building or failing packages, but not with missing reviews

Result: Example

POST /staging/<staging_workflow_project>/staging_projects

Arguments:

  • staging_workflow_project - The name of the staging workflow project, e.g. openSUSE:Factory

Create staging projects

Body: Example

Result: Example

Backlog

GET /staging/<staging_workflow_project>/backlog

Arguments:

  • staging_workflow_project - The name of the staging workflow project, e.g. home:user1

Get the list of requests that are not added into any staging project or excluded.

Result: Example

Excluded Requests

GET /staging/<project>/excluded_requests

Arguments:

  • project - The name of the main project of a Staging, e.g. openSUSE:Factory

Get the list of excluded request for this Staging

Result: Example

POST /staging/<project>/excluded_requests

Arguments:

  • project - The name of the main project of a Staging, e.g. openSUSE:Factory

Exclude this request from this Staging

Body: Example

Result: Example

DELETE /staging/<project>/excluded_requests

Arguments:

  • project - The name of the main project of a Staging, e.g. openSUSE:Factory

Stop excluding this request

Body: Example

Result: Example

Staged Requests

GET /staging/<staging_workflow_project>/staging_projects/<staging_project>/staged_requests

Arguments:

  • staging_workflow_project - The name of the staging workflow project, e.g. home:user1
  • staging_project - The name of the staging project, e.g. home:user1:Staging:A

Get all staged requests of a staging project.

Result: Example

POST /staging/<staging_workflow_project>/staging_projects/<staging_project>/staged_requests

Arguments:

  • staging_workflow_project - The name of the staging workflow project, e.g. home:user1
  • staging_project - The name of the staging project, e.g. home:user1:Staging:A

Add one or multiple bs_requests to the staged requests of a staging project
remove_exclusion: removes the request from exclusion request before staging it.

Body: Example

Result: Example

DELETE /staging/<staging_workflow_project>/staged_requests

Arguments:

  • staging_workflow_project - The name of the staging workflow project, e.g. home:user1

Remove requests from the staging projects they are staged in.

Body: Example

Result: Example

Configuration

GET /configuration

Publicly readable configuration of this OBS instance.

Result: Example Schema

Internal only routes