API Docs

REST API for automation of common tasks for debian, rpm, rubygems, and python packages. Still confused? Get in touch!

Getting Started

Important Info

Before getting started there are a handful of important things to know:

  1. All API requests must be made over HTTPS. There is no plain-text HTTP support.
  2. Most API requests are authenticated using an API token. API tokens are supplied to the API via HTTP basic authentication. Provide your API token as the username and leave the password empty. The APIs which are not authenicated in this way will be marked explicitly as so below.
  3. The API is versioned. This document describes v1 and the URLs start with https://packagecloud.io/api/v1/.
  4. If you have any questions or need help, email us.

HTTP Response Codes

HTTP Response codes returned by the API:

  • 200 OK
    An API request was successfully processed.
  • 201 Created
    An API request was successfully processed and a new resource was created.
  • 401 Unauthorized
    The username and password are incorrect or when the API token used for a request is invalid.
  • 404 Not Found
    The specified API resource was not found.
  • 422 Unprocessable Entity
    A parameter to the API was provided but was unexpected, malformed, not supported, or otherwise invalid. The response will be a JSON object mapping the erroneous field name to error message(s).

Error responses have a JSON body with a human readable string with a more detailed error explanation.

API Client Libraries

Our client libraries are open sourced on our GitHub account. We gladly accept pull requests and appreciate any issues being filed against the GitHub repositories.

Ruby

https://github.com/computology/packagecloud-ruby

Java

https://github.com/computology/io.packagecloud.client

Go

https://github.com/mlafeldt/pkgcloud

Other

We're always working on providing API client libraries for other programming languages. If you use a language other than Ruby or Java and need an API client library, we'd love to hear from you! Please email us and let us know.

Pagination

Any endpoint returning a list of things (like the Search, Versions and Packages API) uses the following headers for pagination information:

  • Link: Links for the next, previous and last page, according to the proposed RFC-5988 standard for Web linking. Example:
    Link:
         <https://packagecloud.io/api/v1/repos/julio/test/packages.json?page=5>; rel="last",
         <https://packagecloud.io/api/v1/repos/julio/test/packages.json?page=2>; rel="next"

  • Total: How many items exist in the total collection.
  • Per-Page: How many items are rendered in this response.
  • Max-Per-Page: Maximum number of items that can be returned per page.

Note: pass a ?per_page parameter to restrict how many items are returned per page. Default is 30. Any per_page parameter greater than Max-Per-Page will be ignored and the maximum set of items allowed per page will be returned instead.

API Tokens


In order to interact with the API, you will need to first obtain your access token. If you login, your token will appear on this page.

All API requests must contain a valid API token in the username field of HTTP basic authentication. For example, a request to the distributions endpoint would look like this:

curl https://somevalidapitoken:@packagecloud.io/api/v1/distributions

A request with a missing or invalid API token will result in a 401 Unauthorized response.

This token can also be retrieved programmatically via an API request which must be authenticated with your the email address and password associated with your packagecloud account.

To retrieve your token programmatically, you can make the following API call:

GET https://email:password@packagecloud.io/api/v1/token.json

An example CURL request:

curl "https://hi%40hi.com:Asdd45VvaarT4591@packagecloud.io/api/v1/token.json"

Parameters:

  • email must be your packagecloud account email address.
  • password must be your packagecloud password

Be sure to URL encode your username and password.

Responses

If successful, you will receive 200 OK response and the response body will be JSON hash mapping the key token to your API token.

An example response:

{"token":"f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0"}

You will use this API token for making all other API requests.

If unsuccessful, you will receive 401 Unauthorized and the error response body will be a JSON hash containing the key error whose value is a string describing the error in more detail.

An example error response:

{"error":"Unauthenticated"}

stats

downloads_count

Retrieve the number of times a particular package has been downloaded given a particular criteria. This is specific to a single package inside a repository.

Note:

Default date range is 7 days ago.

debian/redhat
GET /api/v1/repos/:user/:repo/package/:type/:distro/:version/:package/:arch/:package_version/:release/stats/downloads/count.json
gem
GET /api/v1/repos/:user/:repo/package/gem/:package/:version/stats/downloads/count.json
python
GET /api/v1/repos/:user/:repo/package/python/:package/:version/stats/downloads/count.json

Permissions:

Everyone for public repositories, Owners & Collaborators for private repositories.

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of this repository.

Query Params:

  • :start_date String ISO8601 starting date, like 20160231Z.
  • :end_date String ISO8601 starting date, like 20160231Z.
  • :master_token String The master_token name or id to filter downloads by.
  • :read_token String The read_token name or id to filter downloads by (:master_token required).
  • :user_agent String The user_agent to filter downloads by.
  • :source String The source to filter downloads by, must be "web" or "cli"

Response:

CountValue JSON object containing the value of the result.

Example request(s):

Note:

Instead of constructing these URLs by hand, you should use the generated versions returned from any of these API's, which are guaranteed to be correct for all supported package types:

Gem Downloads Count for my-gem-1.2.0.gem:
/api/v1/repos/julio/test_repo/package/gem/my-gem/1.2.0/stats/downloads/count.json
Python Downloads Count for packagecloud_test-1.2.1-py2.7.egg:
/api/v1/repos/julio/test_repo/package/python/packagecloud-test/1.2.1/stats/downloads/count.json
RPM Downloads Count for jake-1.0-2.x86_64.rpm on Fedora 18:
/api/v1/repos/julio/test_repo/package/rpm/fedora/18/jake/x86_64/1.0/2/stats/downloads/count.json
Debian Downloads Count for jake1.0-7amd64.deb on Ubuntu Hardy:
/api/v1/repos/julio/test_repo/package/deb/ubuntu/hardy/jake/amd64/1.0-7/stats/downloads/count.json
Debian Downloads Count for jake1.0-7amd64.deb on Ubuntu Hardy for User Agent "MyClient1":
/api/v1/repos/julio/test_repo/package/deb/ubuntu/hardy/jake/amd64/1.0-7/stats/downloads/count.json?user_agent=MyClient1
Debian Downloads Count for jake1.0-7amd64.deb on Ubuntu Hardy and Read Token "database":
/api/v1/repos/julio/test_repo/package/deb/ubuntu/hardy/jake/amd64/1.0-7/stats/downloads/count.json?read_token=database
Gem Downloads Count for my-gem-1.2.0.gem for all time:
/api/v1/repos/julio/test_repo/package/gem/my-gem/1.2.0/stats/downloads/count.json?start_date=19700101Z
Gem Downloads Count for my-gem-1.2.0.gem for all time CLI downloads:
/api/v1/repos/julio/test_repo/package/gem/my-gem/1.2.0/stats/downloads/count.json?start_date=19700101Z&source=cli

Example response:

< HTTP/1.0 200 OK
{
  "value": 5135
}

downloads_detail

Retrieve the details of all the downloads for a particular package given a particular criteria. This is specific to a single package inside a repository.

Note:

Default date range is 7 days ago. See response headers for pagination information.

debian/redhat
GET /api/v1/repos/:user/:repo/package/:type/:distro/:version/:package/:arch/:package_version/:release/stats/downloads/detail.json
gem
GET /api/v1/repos/:user/:repo/package/gem/:package/:version/stats/downloads/detail.json
python
GET /api/v1/repos/:user/:repo/package/python/:package/:version/stats/downloads/detail.json

Permissions:

Repository owners only

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of this repository.

Query Params:

  • :start_date String ISO8601 starting date, like 20160231Z.
  • :end_date String ISO8601 starting date, like 20160231Z.
  • :master_token String The master_token name or id to filter downloads by.
  • :read_token String The read_token name or id to filter downloads by (:master_token required).
  • :user_agent String The user_agent to filter downloads by.
  • :source String The source to filter downloads by, must be "web" or "cli"

Response:

PackageDownloads JSON object containing details of all downloads

Example request(s):

Note:

Instead of constructing these URLs by hand, you should use the generated versions returned from any of these API's, which are guaranteed to be correct for all supported package types:

Gem Downloads Details for my-gem-1.2.0.gem:
/api/v1/repos/julio/test_repo/package/gem/my-gem/1.2.0/stats/downloads/detail.json
Python Downloads Details for packagecloud_test-1.2.1-py2.7.egg:
/api/v1/repos/julio/test_repo/package/python/packagecloud-test/1.2.1/stats/downloads/detail.json
RPM Downloads Details for jake-1.0-2.x86_64.rpm on Fedora 18:
/api/v1/repos/julio/test_repo/package/rpm/fedora/18/jake/x86_64/1.0/2/stats/downloads/detail.json
Debian Downloads Details for jake1.0-7amd64.deb on Ubuntu Hardy:
/api/v1/repos/julio/test_repo/package/deb/ubuntu/hardy/jake/amd64/1.0-7/stats/downloads/detail.json
Debian Downloads Details for jake1.0-7amd64.deb on Ubuntu Hardy for User Agent "MyClient1":
/api/v1/repos/julio/test_repo/package/deb/ubuntu/hardy/jake/amd64/1.0-7/stats/downloads/detail.json?user_agent=MyClient1
Debian Downloads Details for jake1.0-7amd64.deb on Ubuntu Hardy and Read Token "database":
/api/v1/repos/julio/test_repo/package/deb/ubuntu/hardy/jake/amd64/1.0-7/stats/downloads/detail.json?read_token=database
Gem Downloads Details for my-gem-1.2.0.gem for all time:
/api/v1/repos/julio/test_repo/package/gem/my-gem/1.2.0/stats/downloads/detail.json?start_date=19700101Z
Gem Downloads Details for my-gem-1.2.0.gem for all time CLI downloads:
/api/v1/repos/julio/test_repo/package/gem/my-gem/1.2.0/stats/downloads/detail.json?start_date=19700101Z&source=cli

Example response:

< HTTP/1.0 200 OK
{
  "downloaded_at": 2015-04-12T05:36:53.000Z,
  "ip_address": "12.51.22.21",
  "user_agent": "Ruby",
  "source": "cli",
  "read_token": "ubuntu-51.2.aws.com"
}

downloads_series

Retrieve a time series of all the downloads for a particular package given a particular criteria. This is specific to a single package inside a repository.

Note:

Default date range is 7 days ago. See response headers for pagination information.

debian/redhat
GET /api/v1/repos/:user/:repo/package/:type/:distro/:version/:package/:arch/:package_version/:release/stats/downloads/series/:interval.json
gem
GET /api/v1/repos/:user/:repo/package/gem/:package/:version/stats/downloads/series/:interval.json
python
GET /api/v1/repos/:user/:repo/package/python/:package/:version/stats/downloads/series/:interval.json

Permissions:

Everyone for public repositories, Owners & Collaborators for private repositories.

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of this repository.

Query Params:

  • :start_date String ISO8601 starting date, like 20160231Z.
  • :end_date String ISO8601 starting date, like 20160231Z.
  • :master_token String The master_token name or id to filter downloads by.
  • :read_token String The read_token name or id to filter downloads by (:master_token required).
  • :user_agent String The user_agent to filter downloads by.
  • :source String The source to filter downloads by, must be "web" or "cli"

Response:

SeriesValue JSON object containing details of all downloads

Example request(s):

Note:

Instead of constructing these URLs by hand, you should use the generated versions returned from any of these API's, which are guaranteed to be correct for all supported package types:

Gem Downloads Series for my-gem-1.2.0.gem:
/api/v1/repos/julio/test_repo/package/gem/my-gem/1.2.0/stats/downloads/series/daily.json
Python Downloads Series for packagecloud_test-1.2.1-py2.7.egg:
/api/v1/repos/julio/test_repo/package/python/packagecloud-test/1.2.1/stats/downloads/series/daily.json
RPM Downloads Series for jake-1.0-2.x86_64.rpm on Fedora 18:
/api/v1/repos/julio/test_repo/package/rpm/fedora/18/jake/x86_64/1.0/2/stats/downloads/series/daily.json
Debian Downloads Series for jake1.0-7amd64.deb on Ubuntu Hardy:
/api/v1/repos/julio/test_repo/package/deb/ubuntu/hardy/jake/amd64/1.0-7/stats/downloads/series/daily.json
Debian Downloads Series for jake1.0-7amd64.deb on Ubuntu Hardy for User Agent "MyClient1":
/api/v1/repos/julio/test_repo/package/deb/ubuntu/hardy/jake/amd64/1.0-7/stats/downloads/series/daily.json?user_agent=MyClient1
Debian Downloads Series for jake1.0-7amd64.deb on Ubuntu Hardy and Read Token "database":
/api/v1/repos/julio/test_repo/package/deb/ubuntu/hardy/jake/amd64/1.0-7/stats/downloads/series/daily.json?read_token=database
Gem Downloads Series for my-gem-1.2.0.gem for all time:
/api/v1/repos/julio/test_repo/package/gem/my-gem/1.2.0/stats/downloads/series/daily.json?start_date=19700101Z
Gem Downloads Series for my-gem-1.2.0.gem for all time CLI downloads:
/api/v1/repos/julio/test_repo/package/gem/my-gem/1.2.0/stats/downloads/series/daily.json?start_date=19700101Z&source=cli

Example response:

< HTTP/1.0 200 OK
{
 "20160221Z": 22,
 "20160222Z": 21,
 "20160223Z": 29,
 "20160224Z": 19,
 "20160225Z": 30,
 "20160226Z": 38,
 "20160227Z": 40
}

installs_count

Retrieve the number of times a particular repository has been installed given a particular criteria. This is specific to a single repository.

Note:

Default date range is 7 days ago.

all
GET /api/v1/repos/:user/:repo/stats/installs/count.json
by distro
GET /api/v1/repos/:user/:repo/stats/installs/:distro/count.json
by distro and version
GET /api/v1/repos/:user/:repo/stats/installs/:distro/:version/count.json

Permissions:

Everyone for public repositories, Owners & Collaborators for private repositories.

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of this repository.
  • :distro String The name of the distribution to filter repository installs by (i.e. ubuntu)
  • :version String The version name of the distribution to filter repository installs by (i.e. precise)

Query Params:

  • :start_date String ISO8601 starting date, like 20160231Z.
  • :end_date String ISO8601 starting date, like 20160231Z.
  • :master_token String The master_token name or id to filter repository installs by.
  • :user_agent String The user_agent to filter repository installs by.

Response:

CountValue JSON object containing the value of the result.

Example request(s):

Repository Installs Count for testuser/testrepo across all operating systems and distributions:
/api/v1/repos/julio/test_repo/stats/installs/count.json
Repository Installs Count for testuser/testrepo across all Ubuntu distributions:
/api/v1/repos/julio/test_repo/stats/installs/ubuntu/count.json
Repository Installs Count for testuser/testrepo specifically for Ubuntu Precise Pangolin:
/api/v1/repos/julio/test_repo/stats/installs/ubuntu/precise/count.json
Repository Installs Count for testuser/testrepo specifically for Ubuntu Precise Pangolin for all time:
/api/v1/repos/julio/test_repo/stats/installs/ubuntu/precise/count.json?start_date=19700101Z
Repository Installs Count for testuser/testrepo across all Ubuntu distributions matching a specific token:
/api/v1/repos/julio/test_repo/stats/installs/ubuntu/count.json?master_token=datacenter-2

Example response:

< HTTP/1.0 200 OK
{
  "value": 5135
}

installs_detail

Retrieve the details of all repository installations that match a particular criteria. This is specific to a single repository.

Note:

Default date range is 7 days ago. See response headers for pagination information.

all
GET /api/v1/repos/:user/:repo/stats/installs/detail.json
by distro
GET /api/v1/repos/:user/:repo/stats/installs/:distro/detail.json
by distro and version
GET /api/v1/repos/:user/:repo/stats/installs/:distro/:version/detail.json

Permissions:

Repository owners only

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of this repository.
  • :distro String The name of the distribution to filter repository installs by (i.e. ubuntu)
  • :version String The version name of the distribution to filter repository installs by (i.e. precise)

Query Params:

  • :start_date String ISO8601 starting date, like 20160231Z.
  • :end_date String ISO8601 starting date, like 20160231Z.
  • :master_token String The master_token name or id to filter repository installs by.
  • :user_agent String The user_agent to filter repository installs by.

Response:

RepositoryInstalls JSON object containing the details of repository installs.

Example request(s):

Repository Installs Details for testuser/testrepo across all operating systems and distributions:
/api/v1/repos/julio/test_repo/stats/installs/detail.json
Repository Installs Details for testuser/testrepo across all Ubuntu distributions:
/api/v1/repos/julio/test_repo/stats/installs/ubuntu/detail.json
Repository Installs Details for testuser/testrepo specifically for Ubuntu Precise Pangolin:
/api/v1/repos/julio/test_repo/stats/installs/ubuntu/precise/detail.json
Repository Installs Details for testuser/testrepo specifically for Ubuntu Precise Pangolin for all time:
/api/v1/repos/julio/test_repo/stats/installs/ubuntu/precise/detail.json?start_date=19700101Z
Repository Installs Details for testuser/testrepo across all Ubuntu distributions matching a specific token:
/api/v1/repos/julio/test_repo/stats/installs/ubuntu/detail.json?master_token=datacenter-2

Example response:

< HTTP/1.0 200 OK
{
  "installed_at": 2015-04-12T05:36:53.000Z,
  "ip_address": "12.51.22.21",
  "hostname": "localhost.localdomain",
  "user_agent": "Ruby",
  "master_token": "default",
  "distro_version": "ubuntu/precise"
}

installs_series

Retrieve a time series of all the repository installs that match a particular criteria for a give time period. This is specific to a single repository.

Note:

Default date range is 7 days ago. See response headers for pagination information.

all
GET /api/v1/repos/:user/:repo/stats/installs/series/:interval.json
by distro
GET /api/v1/repos/:user/:repo/stats/installs/:distro/series/:interval.json
by distro and version
GET /api/v1/repos/:user/:repo/stats/installs/:distro/:version/series/:interval.json

Permissions:

Everyone for public repositories, Owners & Collaborators for private repositories.

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of this repository.
  • :distro String The name of the distribution to filter repository installs by (i.e. ubuntu)
  • :version String The version name of the distribution to filter repository installs by (i.e. precise)
  • :interval String The version name of the distribution to filter repository installs by (i.e. precise)

Query Params:

  • :start_date String ISO8601 starting date, like 20160231Z.
  • :end_date String ISO8601 starting date, like 20160231Z.
  • :master_token String The master_token name or id to filter repository installs by.
  • :user_agent String The user_agent to filter repository installs by.

Response:

RepositoryInstalls JSON object containing the details of repository installs.

Example request(s):

Repository Installs Series for testuser/testrepo across all operating systems and distributions:
/api/v1/repos/julio/test_repo/stats/installs/series/weekly.json
Repository Installs Series for testuser/testrepo across all Ubuntu distributions:
/api/v1/repos/julio/test_repo/stats/installs/ubuntu/series/weekly.json
Repository Installs Series for testuser/testrepo specifically for Ubuntu Precise Pangolin:
/api/v1/repos/julio/test_repo/stats/installs/ubuntu/precise/series/weekly.json
Repository Installs Series for testuser/testrepo specifically for Ubuntu Precise Pangolin for all time:
/api/v1/repos/julio/test_repo/stats/installs/ubuntu/precise/series/weekly.json?start_date=19700101Z
Repository Installs Series for testuser/testrepo across all Ubuntu distributions matching a specific token:
/api/v1/repos/julio/test_repo/stats/installs/ubuntu/series/weekly.json?master_token=datacenter-2

Example response:

< HTTP/1.0 200 OK
{
 "20160221Z": 22,
 "20160222Z": 21,
 "20160223Z": 29,
 "20160224Z": 19,
 "20160225Z": 30,
 "20160226Z": 38,
 "20160227Z": 40
}

licenses

index

Retreive a packagecloud:enterprise license file and GPG signature. Signature can be verified with the packagecloud GPG key: https://packagecloud.io/gpg.key.

GET /api/v1/licenses/:license_key/license.json

URL Params:

  • :license_key String The packagecloud:enterprise license key

Response:

Hash JSON hash containing the license data and GPG signature

Example request(s):

curl https://packagecloud.io/api/v1/licenses/aabbccddeeffaa/license.json

Example response:

< HTTP/1.0 200 OK
{
  "license": "---\n:company_name: company-2\n:company_domain:
  www.domain2.com\n:user_email: joe3@joe.com\n:user_max:
  -1\n:repository_max: -1\n:token_max: -1\n:apt: true\n:yum:
  true\n:rubygem: true\n:start_date: \n:end_date: \n",
  "signature": "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG
      v1.4.11
      (GNU/Linux)\n\niQIcBAABAgAGBQJU2DiPAAoJEB/spSUmciijLT4P/0PFZSJigrm8vzEM6xmfo2OD\neS16BgN/neF0UGAoysMmfO0bTETk9l4ow4xn2eKLLQ7h0aXYoX7Rz/GD/YKu67UQ\nHor8j61jabFVHBwiZjWQsmQfoJRFkAW4eG1bAfTy/PeUpVt9crYv/IMe7cLCk/Ki\nQlRZuj/uoAHSMZsl1zsr1gGHCGoEaX3sVwtmYOsn7GvyJ+MnYqNET4qGV9WXxSCj\nwNC2IjPH6KBcUZO6YZ6hUW3wCwxtRKIaq+H6qtVPpQbMYvPRKax1h8jEbzl1NqmL\n6YyAu/Xuf80JZQ19cW6SswaU8eSxpCWdfC8Pnx3ocpQMVnzNhJp/vbSJUKSsLO2V\nGhBW0nPBLJ4LWvt3mqtnrpNntyt5NHNJSMXc8ODEiLMd9oxn68g7yWmKqH28yD2n\nOEG4IhvTg+NruO1tRr5ENGeqR/SsagFbH0qNpTInaYVq/OJj34+9nPO7Br09698D\nWPjvkfoiScyz9k8wH8vpA524ckL1+WMEfpf/84nmwlFUOJR7L7J5jE5UVDkk3px1\nmcZeOlsiNUSK5nn3UURtSxnwF87t7FyJPcTiK78ZqHPje1JTv78y0ZZnyrRNa7D4\n/m5TSCwHwu150ioPHAUXzUwzj1Rx/DVOEUscqtau62usirjmjU3eJkWUXS37tOwt\nMk1Bmnzaij2d8LglcvYV\n=ZmwX\n-----END PGP SIGNATURE-----\n"
}

packages

contents

Inspect the contents of a debian source package.

POST /api/v1/repos/:user/:repo/packages/contents.json

URL Params:

  • package[distro_version_id] Integer The id of the DistroVersion to push this package to. Get this from the distributions endpoint.
  • package[package_file] File The `.dsc` file to inspect the contents of.

Response:

PackageContents A JSON object with a `files` key containing an array of files referenced in this source package.

Example request(s):

curl -X POST                                                  \
     -F "package[distro_version_id]=17"                       \
     -F "package[package_file]=@package_path.ext"             \
        "https://packagecloud.io/api/v1/repos/user/repo/packages/contents.json"

Example response:

< HTTP/1.1 200 OK
{
    "files": [
        {
            "filename": "acpid_2.0.10.orig.tar.gz",
            "size": 76092,
            "md5sum": "d5dd88bcfaa4a0bf51905e95115da6df"
        },
        {
            "filename": "acpid_2.0.10-1ubuntu3.diff.gz",
            "size": 21428,
            "md5sum": "b29bd4456fd8e883717fab97d6af1bbc"
        }
    ]
}

create

Push a package.

NOTE: that for Deban .dsc packages, you must upload each of the files contained in the .dsc. You can use the package_contents API to determine the filename, md5sum, and size of the files referenced by the DSC. All other package types (.deb, .rpm, .gem) need only specify the distro_version_id and package_file parameters.

POST /api/v1/repos/:user/:repo/packages.json

URL Params:

  • package[distro_version_id] Integer The id of the DistroVersion to push this package to. Get this from the distributions endpoint. Not required for rubygems.
  • package[package_file] File The package file.
  • package[source_files][] Array<File> For debian source packages only: the source files that are specified in the .dsc.

Response:

Empty An empty JSON object if successful.

Example request(s):

curl -X POST https://packagecloud.io/api/v1/repos/user/repo/packages.json \
     -F "package[distro_version_id]=48"     \
     -F "package[package_file]=@../packages/rpms/jake-1.0-3.el6.x86_64.rpm"

Example response:

< HTTP/1.1 201 Created
{
  "name": "jake",
  "distro_version": "el/7",
  "architecture": "x86_64",
  "repository": "testrepo",
  "size": "4536",
  "summary": "jake douglas is a very nice young man.",
  "filename": "jake-1.0-3.el6.x86_64.rpm",
  "description": "as it so happens, jake douglas is a very nice young man.",
  "md5sum": "ef9dc4cb512be90ab0b6c7460320ff1d",
  "sha1sum": "ea721867eb0389e28bcd32e2deef7d4472c6ced8",
  "sha256sum": "e3d70ac2bd1564db84d1cd74c78146b24377dbf285b6dbf9345ac9e1e529280d",
  "sha512sum": "2c56952341d28a7bc383aa80395b2e67dea4a734fb059c78293c59e4db4905b6114fccd5649826515b408f355eca6bfc5f431f8f7ae3af78c92c6f0fa90cebe6",
  "private": false,
  "indexed": false,
  "uploader_name": "armando",
  "created_at": "2015-04-12T05:36:53.000Z",
  "licenses": [
    "GPL"
  ],
  "version": "1.0",
  "release": "3.el6",
  "epoch": 87,
  "repository_url": "/api/v1/repos/user/repo",
  "versions_url": "/api/v1/repos/user/repo/package/rpm/el/7/jake/x86_64/versions.json",
  "package_url": "/api/v1/repos/user/repo/package/rpm/el/7/jake/x86_64/1.0/3.el6.json",
  "package_html_url": "/user/repo/packages/el/7/jake-1.0-3.el6.x86_64.rpm",
  "self_url": "/api/v1/repos/user/repo/package/rpm/el/7/jake/x86_64/1.0/3.el6.json"
}

Example request(s):

curl -X POST \
     -F "package[distro_version_id]=17"     \
     -F "package[package_file]=@../packages/debs/iputils_20101006-1ubuntu1.dsc"  \
     -F "package[source_files][]=@../packages/debs/iputils_20101006.orig.tar.gz" \
     -F "package[source_files][]=@../packages/debs/iputils_20101006-1ubuntu1.debian.tar.gz" \
        "https://packagecloud.io/api/v1/repos/user/repo/packages.json"

Example response:

< HTTP/1.1 201 Created
{
 "package": {
  "source": {
    "id": 1358,
    "source": "iputils",
    "binary": "iputils-ping, iputils-tracepath, iputils-arping, iputils-clockdiff",
    "version": "20101006-1ubuntu1",
    "priority": null,
    "section": null,
    "maintainer": "Ubuntu Developers \u003Cubuntu-devel-discuss@lists.ubuntu.com\u003E",
    "architecture": "any",
    "standards_version": null,
    "format": "3.0 (quilt)",
    "homepage": null,
    "uploaders": null,
    "vcs": "git",
    "vcs_url": "git://git.debian.org/collab-maint/iputils.git",
    "vcs_browser": "http://git.debian.org/?p=collab-maint/iputils.git;a=summary",
    "original_maintainer": null,
    "original_uploaders": null,
    "filename": "iputils_20101006-1ubuntu1.dsc",
    "size": 2180,
    "repository_id": 101001,
    "uploader_id": 101,
    "distro_version_id": 17,
    "deleted_by_id": null,
    "deleted_at": null,
    "component": "main",
    "created_at": "2016-01-07T19:12:48.346Z",
    "updated_at": "2016-01-07T19:12:48.346Z",
    "epoch": "3"
  },
  "version": "20101006",
  "filename": "iputils_20101006-1ubuntu1.dsc",
  "size": 973785.0,
  "distro_version_id": 17,
  "created_at": "2016-01-07T19:12:48.346Z",
  "epoch": "3"
 }
}

promote

Promote a package.

POST /api/v1/repos/:user/:repo/:distro/:version/:package/promote.json

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of the repository.
  • :distro String The name of the distribution the package is in. (i.e. ubuntu)
  • :version String The version name of the distribution the package is in. (i.e. precise)
  • :package String The full name of the package.
  • :destination String Specified as a query parameter, the fully qualified repository name (e.g., "user/repo") to move the package.

Response:

PackageDetails A JSON object representing the package.

Example request(s):

Notes:

This API is similar to a move operation. Once this API call completes successfull, the package being promoted will only exist in the destination.

Upon successful completion of this API, download statistics for the package being moved will be cleared.

Instead of constructing these URLs by hand, you should use the generated versions returned from any of these API's, which are guaranteed to be correct for all supported package types:

For jake-1.0-3.el6.x86_64.rpm on Enterprise Linux 7,

from user/example-repo to julio/testrepo:

curl -X POST                                \
     -F "destination=julio/testrepo"        \
     "https://packagecloud.io/api/v1/repos/user/example-repo/el/7/jake-1.0-3.el6.x86_64.rpm/promote.json"

Example response:

RPM Package

< HTTP/1.1 200 OK
{
  "name": "jake",
  "distro_version": "el/7",
  "architecture": "x86_64",
  "repository": "testrepo",
  "size": "4536",
  "summary": "jake douglas is a very nice young man.",
  "filename": "jake-1.0-3.el6.x86_64.rpm",
  "description": "as it so happens, jake douglas is a very nice young man.",
  "dependencies": [
    {
      "context": "requires",
      "dependencies": [
        "libc.so.6(GLIBC_2.2.5)(64bit)",
        "rtld(GNU_HASH)"
      ]
    }
  ],
  "md5sum": "ef9dc4cb512be90ab0b6c7460320ff1d",
  "sha1sum": "ea721867eb0389e28bcd32e2deef7d4472c6ced8",
  "sha256sum": "e3d70ac2bd1564db84d1cd74c78146b24377dbf285b6dbf9345ac9e1e529280d",
  "sha512sum": "2c56952341d28a7bc383aa80395b2e67dea4a734fb059c78293c59e4db4905b6114fccd5649826515b408f355eca6bfc5f431f8f7ae3af78c92c6f0fa90cebe6",
  "private": false,
  "indexed": true,
  "uploader_name": "user",
  "created_at": "2015-04-12T05:36:53.000Z",
  "licenses": [
    "GPL"
  ],
  "version": "1.0",
  "release": "3.el6",
  "epoch": 87,
  "repository_html_url": "/api/v1/repos/julio/testrepo",
  "versions_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/versions.json",
  "package_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6.json",
  "downloads_detail_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6/stats/downloads/detail.json",
  "downloads_series_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6/stats/downloads/series/daily.json",
  "downloads_count_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6/stats/downloads/count.json",
  "package_html_url": "/julio/testrepo/packages/el/7/jake-1.0-3.el6.x86_64.rpm",
  "download_url": "/julio/testrepo/packages/el/7/jake-1.0-3.el6.x86_64.rpm/download",
  "self_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6.json"
}

Note:

The dependencies array for Debian packages will list dependencies for the following contexts: depends, recommends, suggests, enhances, pre-depends

Example request(s):

Deb Package

For packagecloud-test1.1-2amd64.deb on Ubuntu

Yakkety, from user/test to armando/test:

curl -X POST                                \
     -F "destination=armando/test"          \
     "https://packagecloud.io/api/v1/repos/user/test/ubuntu/trusty/packagecloud-test_1.1-2_amd64.deb/promote.json"

Example response:

Deb Package

< HTTP/1.1 200 OK
{
  "name": "packagecloud-test",
  "distro_version": "ubuntu/yakkety",
  "architecture": "amd64",
  "repository": "test",
  "size": "2830",
  "summary": null,
  "filename": "packagecloud-test_1.1-2_amd64.deb",
  "description": "packagecloud-test a hello world program from the packagecloud crew",
  "dependencies": [
      {
        "context": "depends",
        "dependencies": [
          "libc6 (>= 2.2.5)"
        ]
      }
  ],
  "md5sum": "b709d6a5b2e6883ee97803e5fd1b204e",
  "sha1sum": "ba4500d3b385aced8c8ed3c48981eba2dd2005b4",
  "sha256sum": "8ed8bb73915088d422c26ce3e92c6477b3afdfcd7377713880db8ba68a697289",
  "sha512sum": "afcde64a1bfc5fdce1fff00002a2007a7f05eef51e45eb223885b89e2deb45cefd51dd596d79dea1daf020312afb14967eaef2d1a4c45f7da28ec045bfc2efc6",
  "private": false,
  "uploader_name": "user",
  "created_at": "2016-07-16T01:25:51.000Z",
  "licenses": [],
  "version": "1.1",
  "release": "2",
  "epoch": 0,
  "indexed": true,
  "repository_url": "/api/v1/repos/armando/test",
  "versions_url": "/api/v1/repos/armando/test/package/deb/ubuntu/yakkety/packagecloud-test/amd64/versions.json",
  "total_downloads_count": 0,
  "download_url": "https://packagecloud.io/armando/test/packages/ubuntu/yakkety/packagecloud-test_1.1-2_amd64.deb/download",
  "package_html_url": "/armando/test/packages/ubuntu/yakkety/packagecloud-test_1.1-2_amd64.deb",
  "self_url": "/api/v1/repos/armando/test/package/deb/ubuntu/yakkety/packagecloud-test/amd64/1.1-2.json"
}

Note:

The dependencies array for Debian Source packages (DSC) will list dependencies for the following contexts: build-depends and build-depends-indep

Example request(s):

DSC Package

For jake_1.0-7.dsc on Ubuntu

Trusty, from user/test to armando/test:

curl -X POST                                \
     -F "destination=armando/test"          \
     "https://packagecloud.io/api/v1/repos/joe/test/ubuntu/trusty/jake_1.0-7.dsc/promote.json"

Example response:

DSC Package

< HTTP/1.1 200 OK
{
  "name": "phantomjs",
  "distro_version": "ubuntu/trusty",
  "architecture": "any",
  "repository": "test",
  "size": "182793268.0",
  "summary": null,
  "filename": "phantomjs_2.0.0.dsc",
  "description": null,
  "dependencies": [
    {
      "context": "build-depends",
      "dependencies": [
        "debhelper (>= 8.0.0)"
      ]
    }
  ],
  "md5sum": null,
  "sha1sum": null,
  "sha256sum": null,
  "sha512sum": null,
  "private": false,
  "uploader_name": "user",
  "created_at": "2016-07-17T02:10:28.000Z",
  "licenses": [],
  "version": "2.0.0",
  "release": null,
  "epoch": 0,
  "indexed": true,
  "repository_url": "/api/v1/repos/saldo/test",
  "versions_url": "/api/v1/repos/saldo/test/package/dsc/ubuntu/trusty/phantomjs/any/versions.json",
  "total_downloads_count": 0,
  "download_url": "https://packagecloud.io/armando/test/packages/ubuntu/trusty/phantomjs_2.0.0.dsc/download",
  "package_html_url": "/armando/test/packages/ubuntu/trusty/phantomjs_2.0.0.dsc",
  "self_url": "/api/v1/repos/armando/test/package/dsc/ubuntu/trusty/phantomjs/any/2.0.0.json"
}

show

Show Package

GET /api/v1/repos/:user/:repo/package/:type/:distro/:version/:package/:arch/:package_version/:release.json

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of the repository.
  • :type String The type of package it is, "rpm" or "deb".
  • :distro String The name of the distribution the package is in. (i.e. ubuntu)
  • :version String The version name of the distribution the package is in. (i.e. precise)
  • :package String The name of the package.
  • :arch String The architecture of the package. (note: debs use amd64 while rpms use x86_64 for arch)
  • :package_version String The version (without epoch) of the package.

Query Params:

  • :release String The release, if the package contains one.

Response:

PackageDetails A JSON object representing the package.

Example request(s):

Note:

Instead of constructing these URLs by hand, you should use the generated versions returned from any of these API's, which are guaranteed to be correct for all supported package types:

For jake-1.0-3.el6.x86_64.rpm on Enterprise Linux 7:
/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6.json

Example response:

RPM Package

< HTTP/1.1 200 OK
{
  "name": "jake",
  "distro_version": "el/7",
  "architecture": "x86_64",
  "repository": "testrepo",
  "size": "4536",
  "summary": "jake douglas is a very nice young man.",
  "filename": "jake-1.0-3.el6.x86_64.rpm",
  "description": "as it so happens, jake douglas is a very nice young man.",
  "dependencies": [
    {
      "context": "requires",
      "dependencies": [
        "libc.so.6(GLIBC_2.2.5)(64bit)",
        "rtld(GNU_HASH)"
      ]
    }
  ],
  "md5sum": "ef9dc4cb512be90ab0b6c7460320ff1d",
  "sha1sum": "ea721867eb0389e28bcd32e2deef7d4472c6ced8",
  "sha256sum": "e3d70ac2bd1564db84d1cd74c78146b24377dbf285b6dbf9345ac9e1e529280d",
  "sha512sum": "2c56952341d28a7bc383aa80395b2e67dea4a734fb059c78293c59e4db4905b6114fccd5649826515b408f355eca6bfc5f431f8f7ae3af78c92c6f0fa90cebe6",
  "private": false,
  "indexed": true,
  "uploader_name": "julio",
  "created_at": "2015-04-12T05:36:53.000Z",
  "licenses": [
    "GPL"
  ],
  "version": "1.0",
  "release": "3.el6",
  "epoch": 87,
  "repository_html_url": "/api/v1/repos/julio/testrepo",
  "versions_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/versions.json",
  "package_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6.json",
  "downloads_detail_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6/stats/downloads/detail.json",
  "downloads_series_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6/stats/downloads/series/daily.json",
  "downloads_count_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6/stats/downloads/count.json",
  "package_html_url": "/julio/testrepo/packages/el/7/jake-1.0-3.el6.x86_64.rpm",
  "download_url": "/julio/testrepo/packages/el/7/jake-1.0-3.el6.x86_64.rpm/download",
  "self_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6.json"
}

Note:

The dependencies array for RPM packages will list all Requires and PreReq values under the context requires

Example request(s):

Deb Package

curl "https://packagecloud.io/api/v1/repos/armando/test/package/deb/ubuntu/yakkety/packagecloud-test/amd64/1.1-2.json"

Example response:

Deb Package

< HTTP/1.1 200 OK
{
  "name": "packagecloud-test",
  "distro_version": "ubuntu/yakkety",
  "architecture": "amd64",
  "repository": "test",
  "size": "2830",
  "summary": null,
  "filename": "packagecloud-test_1.1-2_amd64.deb",
  "description": "packagecloud-test a hello world program from the packagecloud crew",
  "dependencies": [
      {
        "context": "depends",
        "dependencies": [
          "libc6 (>= 2.2.5)"
        ]
      }
  ],
  "md5sum": "b709d6a5b2e6883ee97803e5fd1b204e",
  "sha1sum": "ba4500d3b385aced8c8ed3c48981eba2dd2005b4",
  "sha256sum": "8ed8bb73915088d422c26ce3e92c6477b3afdfcd7377713880db8ba68a697289",
  "sha512sum": "afcde64a1bfc5fdce1fff00002a2007a7f05eef51e45eb223885b89e2deb45cefd51dd596d79dea1daf020312afb14967eaef2d1a4c45f7da28ec045bfc2efc6",
  "private": false,
  "uploader_name": "armando",
  "created_at": "2016-07-16T01:25:51.000Z",
  "licenses": [],
  "version": "1.1",
  "release": "2",
  "epoch": 0,
  "indexed": true,
  "repository_url": "/api/v1/repos/armando/test",
  "versions_url": "/api/v1/repos/armando/test/package/deb/ubuntu/yakkety/packagecloud-test/amd64/versions.json",
  "total_downloads_count": 0,
  "download_url": "https://packagecloud.io/armando/test/packages/ubuntu/yakkety/packagecloud-test_1.1-2_amd64.deb/download",
  "package_html_url": "/armando/test/packages/ubuntu/yakkety/packagecloud-test_1.1-2_amd64.deb",
  "self_url": "/api/v1/repos/armando/test/package/deb/ubuntu/yakkety/packagecloud-test/amd64/1.1-2.json"
}

Note:

The dependencies array for Debian packages will list dependencies for the following contexts: depends, recommends, suggests, enhances, pre-depends

Example request(s):

DSC Package

curl "https://packagecloud.io/api/v1/repos/armando/test/package/dsc/ubuntu/trusty/phantomjs/any/2.0.0.json"

Example response:

DSC Package

< HTTP/1.1 200 OK
{
  "name": "phantomjs",
  "distro_version": "ubuntu/trusty",
  "architecture": "any",
  "repository": "test",
  "size": "182793268.0",
  "summary": null,
  "filename": "phantomjs_2.0.0.dsc",
  "description": null,
  "dependencies": [
    {
      "context": "build-depends",
      "dependencies": [
        "debhelper (>= 8.0.0)"
      ]
    }
  ],
  "md5sum": null,
  "sha1sum": null,
  "sha256sum": null,
  "sha512sum": null,
  "private": false,
  "uploader_name": "saldo",
  "created_at": "2016-07-17T02:10:28.000Z",
  "licenses": [],
  "version": "2.0.0",
  "release": null,
  "epoch": 0,
  "indexed": true,
  "repository_url": "/api/v1/repos/saldo/test",
  "versions_url": "/api/v1/repos/saldo/test/package/dsc/ubuntu/trusty/phantomjs/any/versions.json",
  "total_downloads_count": 0,
  "download_url": "https://packagecloud.io/armando/test/packages/ubuntu/trusty/phantomjs_2.0.0.dsc/download",
  "package_html_url": "/armando/test/packages/ubuntu/trusty/phantomjs_2.0.0.dsc",
  "self_url": "/api/v1/repos/armando/test/package/dsc/ubuntu/trusty/phantomjs/any/2.0.0.json"
}

Note:

The dependencies array for Debian Source packages (DSC) will list dependencies for the following contexts: build-depends and build-depends-indep

gem_show

Show Rubygem Package

GET /api/v1/repos/:user/:repo/package/gem/:package/:version.json

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of the repository.
  • :package String The name of the package.
  • :version String The version of the package.

Response:

PackageDetails A JSON object representing the package

Example request(s):

Note:

Instead of constructing these URLs by hand, you should use the generated versions returned from any of these API's, which are guaranteed to be correct for all supported package types:

For jakedotrb-0.0.1.gem:
/api/v1/repos/julio/testrepo/package/gem/jakedotrb/0.0.1.json

Example response:

< HTTP/1.1 200 OK
{
  "name": "jakedotrb",
  "distro_version": "RubyGem",
  "architecture": "all",
  "repository": "testrepo",
  "size": "3072",
  "summary": "helping people learn about my friend jake douglas.",
  "filename": "jakedotrb-0.0.1.gem",
  "description": "helping people learn about my friend jake douglas.",
  "dependencies": [
    {
      "context": "runtime",
      "dependencies": [
        "mini_portile2 (~> 2.1.0)",
        "pkg-config (~> 1.1.7)"
      ]
    },
    {
      "context": "development",
      "dependencies": [
        "rdoc (~> 4.0)",
        "rake (~> 10.5.0)"
      ]
    }
  ],
  "md5sum": null,
  "sha1sum": null,
  "sha256sum": null,
  "sha512sum": null,
  "private": false,
  "indexed": true,
  "uploader_name": "julio",
  "created_at": "2015-04-14T23:14:52.000Z",
  "licenses": [
    "MIT"
  ],
  "version": "0.0.1",
  "release": null,
  "epoch": null,
  "repository_url": "/api/v1/repos/julio/testrepo",
  "package_url": "/api/v1/repos/julio/another/package/gem/jakedotrb/0.0.1.json",
  "downloads_detail_url": "/api/v1/repos/julio/another/package/gem/jaktdotrb/0.0.1/stats/downloads/detail.json",
  "downloads_series_url": "/api/v1/repos/julio/another/package/gem/jakedotrb/0.0.1/stats/downloads/series/daily.json",
  "downloads_count_url": "/api/v1/repos/julio/another/package/gem/jakedotrb/0.0.1/stats/downloads/count.json",
  "versions_url": "/api/v1/repos/julio/testrepo/package/gem/jakedotrb/versions.json",
  "package_html_url": "/julio/testrepo/packages/gems/jakedotrb-0.0.1.gem",
  "download_url": "/julio/testrepo/packages/gems/jakedotrb-0.0.1.gem/download",
  "self_url": "/api/v1/repos/julio/testrepo/package/gem/jakedotrb/0.0.1.json"
}

Note:

The dependencies array for RubyGem packages will list dependencies for the following contexts: runtime and development

python_show

Show Python Package

GET /api/v1/repos/:user/:repo/package/python/:package/:version.json

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of the repository.
  • :package String The name of the package.
  • :version String The version of the package.

Response:

PackageDetails A JSON object representing the package

Example request(s):

Note:

Instead of constructing these URLs by hand, you should use the generated versions returned from any of these API's, which are guaranteed to be correct for all supported package types:

For jake-1.2-py3-none-any.whl:
/api/v1/repos/julio/testrepo/package/python/jake/1.2.json

Example response:

< HTTP/1.1 200 OK
{
  "name": "jake",
  "distro_version": "python",
  "architecture": null,
  "repository": "testrepo",
  "size": "2650",
  "summary": "jake python package",
  "filename": "jake-1.2-py3-none-any.whl",
  "description": null,
  "dependencies": [
    {
      "context": "requires",
      "dependencies": [
        "lxml",
        "httplib2"
      ]
    }
  ],
  "md5sum": "237434c12595ac8d2cf0943df1a5911d",
  "sha1sum": "e04d1a22ad90da54c0a7eaf1ed5f427657f71030",
  "sha256sum": "28908e2dce292f36160c30f52ee9aa3d257aef05b6d7764a0707b5f360a81ba7",
  "sha512sum": "1c43cd07ecc176769d97b09bd0592d9a4a727390cc05c3e651317f9a8d2aa5ad4d7e337d47ac12d3a209ec8c52d36b2506e4a126e96e8a2e5bc043d2d16a8187",
  "private": false,
  "indexed": true,
  "uploader_name": "julio",
  "created_at": "2015-12-13T22:40:02.000Z",
  "licenses": null,
  "version": "1.2",
  "release": null,
  "epoch": null,
  "package_url": "/api/v1/repos/julio/another/package/python/jake/1.2.json",
  "downloads_detail_url": "/api/v1/repos/julio/another/package/python/jake/1.2/stats/downloads/detail.json",
  "downloads_series_url": "/api/v1/repos/julio/another/package/python/jake/1.2/stats/downloads/series/daily.json",
  "downloads_count_url": "/api/v1/repos/julio/another/package/python/jake/1.2/stats/downloads/count.json",
  "repository_url": "/api/v1/repos/julio/testrepo",
  "versions_url": "/api/v1/repos/julio/testrepo/package/python/jake/versions.json",
  "package_html_url": "/julio/testrepo/packages/python/jake-1.2-py3-none-any.whl",
  "download_url": "/julio/testrepo/packages/python/jake-1.2-py3-none-any.whl/download",
  "self_url": "/api/v1/repos/julio/testrepo/package/python/jake/1.2.json"
}

Note:

The dependencies array for Python packages will list dependencies for the following contexts: requires, requires-dist, requires-external, requires-extra, and requires-python

versions

List Package Versions

GET /api/v1/repos/:user/:repo/package/:type/:distro/:version/:package/:arch/versions.json

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of the repository.
  • :type String The type of package it is, "rpm" or "deb".
  • :distro String The name of the distribution the package is in. (i.e. ubuntu)
  • :version String The version name of the distribution the package is in. (i.e. precise)
  • :package String The name of the package.
  • :arch String The architecture of the package. (note: debs use amd64 while rpms use x86_64 for arch)

Response:

PackageFragment An JSON array of all the versions for this package

Example request(s):

Note:

Instead of constructing these URLs by hand, you should use the generated versions returned from any of these API's, which are guaranteed to be correct for all supported package types:

/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/versions.json

Example response:

< HTTP/1.1 200 OK
[
  {
    "name": "jake",
    "distro_version": "el/7",
    "created_at": "2015-04-12T05:36:53.000Z",
    "version": "1.0",
    "release": "3.el6",
    "epoch": 87,
    "private": false,
    "indexed": true,
    "type": "rpm",
    "uploader_name": "julio",
    "repository_html_url": "/julio/testrepo",
    "package_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6.json",
    "package_html_url": "/julio/testrepo/packages/el/7/jake-1.0-3.el6.x86_64.rpm"
    "download_url": "/julio/testrepo/packages/el/7/jake-1.0-3.el6.x86_64.rpm/download"
  }
]

gem_versions

List Rubygem Package Versions

GET /api/v1/repos/:user/:repo/package/gem/:package/versions.json

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of the repository.
  • :package String The name of the package.

Response:

PackageFragment An JSON array of all the versions for this package.

Example request(s):

Note:

Instead of constructing these URLs by hand, you should use the generated versions returned from any of these API's, which are guaranteed to be correct for all supported package types:

/api/v1/repos/julio/testrepo/package/gem/jakedotrb/versions.json

Example response:

< HTTP/1.1 200 OK
[
  {
    "name": "jakedotrb",
    "distro_version": "RubyGem",
    "created_at": "2015-04-14T23:14:52.000Z",
    "version": "0.0.1",
    "release": null,
    "epoch": null,
    "private": false,
    "indexed": true,
    "type": "gem",
    "uploader_name": "julio",
    "repository_html_url": "/julio/testrepo",
    "package_url": "/api/v1/repos/julio/testrepo/package/gem/jakedotrb/0.0.1.json",
    "package_html_url": "/julio/testrepo/packages/gems/jakedotrb-0.0.1.gem"
  }
]

python_versions

List Python Package Versions

GET /api/v1/repos/:user/:repo/package/python/:package/versions.json

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of the repository.
  • :package String The name of the package.

Response:

PackageFragment An JSON array of all the versions for this package.

Example request(s):

Note:

Instead of constructing these URLs by hand, you should use the generated versions returned from any of these API's, which are guaranteed to be correct for all supported package types:

/api/v1/repos/julio/testrepo/package/python/jake/versions.json

Example response:

< HTTP/1.1 200 OK
[
  {
    "name": "jake",
    "distro_version": "python",
    "created_at": "2015-12-13T22:40:02.000Z",
    "version": "1.2",
    "release": null,
    "epoch": null,
    "private": false,
    "indexed": true,
    "type": "python",
    "filename": "jake-1.2-py3-none-any.whl",
    "uploader_name": "julio",
    "repository_html_url": "/julio/testrepo",
    "package_url": "/api/v1/repos/julio/testrepo/package/python/jake/1.2.json",
    "package_html_url": "/julio/testrepo/packages/jake-1.2-py3-none-any.whl"
  }
]

index

List Packages by type, distribution, version, and architecture, grouped by package version

GET /api/v1/repos/:user/:repo/packages/:type/:distro/:version/:arch.json

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of the repository.
  • :type String The type of package it is, "rpm" or "deb".
  • :distro String The name of the distribution the package is in. (i.e. ubuntu)
  • :version String The version name of the distribution the package is in. (i.e. precise)

Query Params:

  • :arch String The architecture to search for.

Response:

PackageVersion An JSON array of all packages that match the criteria.

Example request(s):

 /api/v1/repos/julio/testrepo/packages/rpm.json

Example response:

< HTTP/1.1 200 OK
[
  {
    "name": "jake",
    "versions_count": 1,
    "versions_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/versions.json",
    "repository_url": "/api/v1/repos/julio/testrepo",
    "repository_html_url": "/julio/testrepo"
  },
  {
    "name": "ceph-devel",
    "versions_count": 1,
    "versions_url": "/api/v1/repos/julio/testrepo/package/rpm/el/6/ceph-devel/x86_64/versions.json",
    "repository_url": "/api/v1/repos/julio/testrepo",
    "repository_html_url": "/julio/testrepo"
  }
]

Example request(s):

 curl "https://packagecloud.io/api/v1/repos/julio/testrepo/packages/rpm/el.json"

Example request(s):

 curl "https://packagecloud.io/api/v1/repos/julio/testrepo/packages/gem.json"

Example request(s):

 curl "https://packagecloud.io/api/v1/repos/julio/testrepo/packages/python.json"

Example request(s):

 curl "https://packagecloud.io/api/v1/repos/julio/testrepo/packages/deb/ubuntu/precise.json"

Example request(s):

 curl "https://packagecloud.io/api/v1/repos/julio/testrepo/packages/deb/ubuntu/precise.json"

Example request(s):

 curl "https://packagecloud.io/api/v1/repos/julio/testrepo/packages/deb/ubuntu/precise/amd64.json"

Example request(s):

 curl "https://packagecloud.io/api/v1/repos/julio/testrepo/packages/deb/*/*/amd64.json"

all

List All Packages (not grouped by package version)

GET /api/v1/repos/:user/:repo/packages.json

URL Params:

  • :user String The user this repo belongs to.
  • :repo String The name of the repository.

Response:

AllPackages An JSON array of all packages in the repository.

Example request(s):

/api/v1/repos/julio/testrepo/packages.json

Example response:

< HTTP/1.1 200 OK
[
  {
    "name": "jake",
    "distro_version": "el/7",
    "created_at": "2015-04-12T05:36:53.000Z",
    "version": "1.0",
    "release": "3.el6",
    "epoch": 87,
    "private": false,
    "indexed": false,
    "type": "rpm",
    "uploader_name": "julio",
    "repository_html_url": "/julio/testrepo",
    "package_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6.json",
    "package_html_url": "/julio/testrepo/packages/el/7/jake-1.0-3.el6.x86_64.rpm"
  },
  {
    "name": "jake",
    "distro_version": "el/6",
    "created_at": "2015-04-12T05:37:01.000Z",
    "version": "1.0",
    "release": "3.el6",
    "epoch": 87,
    "private": false,
    "indexed": true,
    "type": "rpm",
    "uploader_name": "julio",
    "repository_html_url": "/julio/testrepo",
    "package_url": "/api/v1/repos/julio/testrepo/package/rpm/el/6/jake/x86_64/1.0/3.el6.json",
    "package_html_url": "/julio/testrepo/packages/el/6/jake-1.0-3.el6.x86_64.rpm"
  }
]

destroy_gem

DELETE /api/v1/repos/:user/:repo/gems/:package.gem

URL Params:

  • :user String The owner of the repo.
  • :repo String The name of the repo.
  • :package String The name of the package to be yanked.

Response:

Empty An empty JSON hash.

Example request(s):

curl -X DELETE "https://packagecloud.io/api/v1/repos/cooluser/mystuff/gems/jake-1.0.0.gem"

Example response:

< HTTP/1.1 200 OK
{}

destroy

DELETE /api/v1/repos/:user/:repo/:distro/:version/:package.:ext

URL Params:

  • :user String The owner of the repo.
  • :repo String The name of the repo.
  • :distro String The name of the distribution the package is in. (i.e. ubuntu)
  • :version String The version name of the distribution the package is in. (i.e. precise)
  • :package String The name of the package to be yanked.
  • :ext String The file extension of the package to be yanked.

Response:

Empty An empty JSON hash.

Example request(s):

Deleting an Ubuntu Precise package
curl -X DELETE "https://packagecloud.io/api/v1/repos/cooluser/mystuff/ubuntu/precise/jake_1.0-7.dsc"
Deleting an Enterprise Linux 6.0 package:
curl -X DELETE "https://packagecloud.io/api/v1/repos/cooluser/mystuff/el/6/jake-1.0-2.el6.x86_64.rpm"
Deleting a Python package:
curl -X DELETE "https://packagecloud.io/api/v1/repos/cooluser/mystuff/pypi/1/packagecloud_test-0.9.7b1.zip"
Deleting a Java package:
curl -X DELETE "https://packagecloud.io/api/v1/repos/cooluser/mystuff/java/maven2/jake-2.3.jar"

Example response:

< HTTP/1.1 200 OK
{}

search

GET /api/v1/repos/:user/:repo/search

Query Params:

  • :q String The query string to search for package filename. If empty string is passed, all packages are returned
  • :filter String Search by package type (RPMs, Debs, DSCs, Gem, Python) - Ignored when [:dist] is present.
  • :dist String The name of the distribution the package is in. (i.e. ubuntu, el/6) - Overrides [:filter]
  • :per_page String The number of packages to return from the results set. If nothing passed, default is 30

Response:

AllPackages An JSON array of all packages that match the query parameters.

Example request(s):

Note:

Pass pagination information using the following headers listed here:

API Pagination

curl -X GET "https://f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0:packagecloud.io/api/v1/repos/cooluser/test/search?q="
curl -X GET "https://f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0:packagecloud.io/api/v1/repos/cooluser/test/search?filter=rpms&per_page=1"
curl -X GET "https://f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0:packagecloud.io/api/v1/repos/cooluser/test/search?q=coolpackage&dist=ubuntu&per_page=1"

Example response:

< HTTP/1.1 200 OK
[{
  "name": "packagecloud-test",
  "distro_version": "ubuntu/yakkety",
  "created_at": "2016-07-16T01:25:51.000Z",
  "version": "1.1",
  "release": "2",
  "epoch": 0,
  "private": false,
  "type": "deb",
  "filename": "packagecloud-test_1.1-2_amd64.deb",
  "uploader_name": "cooluser",
  "indexed": true,
  "repository_html_url": "/cooluser/test",
  "package_url": "/api/v1/repos/cooluser/test/package/deb/ubuntu/yakkety/packagecloud-test/amd64/1.1-2.json",
  "downloads_detail_url": "/api/v1/repos/cooluser/test/package/deb/ubuntu/yakkety/packagecloud-test/amd64/1.1-2/stats/downloads/detail.json",
  "downloads_series_url": "/api/v1/repos/cooluser/test/package/deb/ubuntu/yakkety/packagecloud-test/amd64/1.1-2/stats/downloads/series/daily.json",
  "downloads_count_url": "/api/v1/repos/cooluser/test/package/deb/ubuntu/yakkety/packagecloud-test/amd64/1.1-2/stats/downloads/count.json",
  "package_html_url": "/cooluser/test/packages/ubuntu/yakkety/packagecloud-test_1.1-2_amd64.deb"
}]

read_tokens

index

List read tokens for a master token.

GET /api/v1/repos/:user/:repo/master_tokens/:master_token/read_tokens.json

URL Params:

  • :user String The username to which the repo belongs.
  • :repo String The name of the repo.
  • :master_token String The value or id of the master_token.

Response:

Array<ReadToken> An array of read token objects that belong to this repository.

Example request(s):

curl https://packagecloud.io/api/v1/repos/username/reponame/master_tokens/123/read_tokens.json

Example response:

< HTTP/1.1 200 OK
{
   "read_tokens" : [
      {
         "id" : 1234,
         "value" : "3fe453060fd7f017219e308eb98ccf273b4c3655ba57577a",
         "name" : "app1.someservice.com"
      }
   ]
}

create

Create a read token.

POST /api/v1/repos/:user/:repo/master_tokens/:master_token/read_tokens.json

URL Params:

  • :user String The username to which the repo belongs.
  • :repo String The name of the repo.
  • :master_token String The value or id of the master_token.
  • read_token[name] String The name of the token to create.

Response:

Empty An empty response.

Example request(s):

curl -X POST -F "read_token[name]=tokename" https://packagecloud.io/api/v1/repos/username/reponame/master_tokens/123/read_tokens.json

Example response:

< HTTP/1.1 201 Created
{"name":"tokenname","value":"ea6eef3f26bdcaa5a10ed32b5f8262dbad233900b2571a1c"}

destroy

Destroy a read token

DELETE /api/v1/repos/:user/:repo/master_tokens/:master_token/read_tokens/:id

URL Params:

  • :user String The username to which the repo belongs.
  • :repo String The name of the repo.
  • :master_token String The value or id of the master_token.
  • :id Integer The id of the read token to be destroyed.

Example request(s):

curl -X DELETE https://packagecloud.io/api/v1/repos/username/reponame/master_tokens/123/read_tokens/33

Example response:

< HTTP/1.1 204 OK

show

View a single read token

GET /api/v1/repos/:user/:repo/master_tokens/:master_token/read_tokens/:id

URL Params:

  • :user String The username to which the repo belongs.
  • :repo String The name of the repo.
  • :master_token String The value or id of the master_token.
  • :id Integer The id of the read token to view

Example request(s):

curl -X GET https://packagecloud.io/api/v1/repos/username/reponame/master_tokens/123/read_tokens/33

Example response:

< HTTP/1.1 200 OK
{
   "id" : 1234,
   "value" : "3fe453060fd7f017219e308eb98ccf273b4c3655ba57577a",
   "name" : "app1.someservice.com"
}

repositories

index

GET /api/v1/repos

Response:

Array<Repository> An array of Repository objects that belong to your account.

Example request(s):

curl https://packagecloud.io/api/v1/repos

Example response:

[{
   "name": "myrepo",
   "created_at": "2014-02-26T00:03:28.000Z",
   "url": "https://packagecloud.io/cooluser/myrepo",
   "last_push_human": "3 days ago",
   "package_count_human": "17 packages",
   "private": false,
   "fqname": "cooluser/myrepo"
 },
 {
   "name": "myrepo2",
   "created_at": "2014-03-25T19:16:26.000Z",
   "url": "https://packagecloud.io/cooluser/myrepo2",
   "last_push_human": "6 days ago",
   "package_count_human": "3 packages",
   "private": false,
   "fqname": "cooluser/myrepo2"
}]

create

POST /api/v1/repos

URL Params:

  • name String The repository name.
  • private Boolean Whether the repo to be created is private.

Response:

String The URL of the new repository resource.

Example request(s):

curl -X POST                                                  \
     -H "Content-Type: application/json"                      \
     -d '{"repository": {"name": "thename", "private": "1"}}' \
     "https://packagecloud.io/api/v1/repos.json"

Example response:

{"url": "https://packagecloud.io/cooluser/thename"}

show

GET /api/v1/repos/:user/:name

URL Params:

  • :user String The username of the owner.
  • :name String The name of the repo.

Response:

Repository The repository object

Example request(s):

curl https://packagecloud.io/api/v1/repos/cooluser/myrepo

Example response:

{
  "name": "myrepo",
  "created_at": "2014-02-26T00:03:28.000Z",
  "url": "https://packagecloud.io/cooluser/myrepo",
  "last_push_human": "3 days ago",
  "package_count_human": "17 packages",
  "private": false,
  "fqname": "cooluser/myrepo"
}

master_tokens

index

List master tokens for a repo.

GET /api/v1/repos/:user/:repo/master_tokens

URL Params:

  • :user String The username to which the repo belongs.
  • :repo String The name of the repo.

Response:

Array<MasterToken> An array of master token objects that belong to this repository.

Example request(s):

curl https://packagecloud.io/api/v1/repos/username/reponame/master_tokens

Example response:

< HTTP/1.1 200 OK
[{
   "value" : "e5480f5b38f1f78de2aaa0fa732d1427b1b83113371fd97d",
   "name" : "default",
   "read_tokens" : [
      {
         "value" : "3fe453060fd7f017219e308eb98ccf273b4c3655ba57577a",
         "name" : "app1.someservice.com"
      }
   ],
   "paths" : {
      "self" : "/api/v1/repos/username/reponame/master_tokens/1"
   }
}]

search

Search for master tokens

Note:

Default is 30 per page, see response headers for pagination information.

GET /api/v1/repos/:user/:repo/master_tokens/search

URL Params:

  • :user String The username to which the repo belongs.
  • :repo String The name of the repo.

Query Params:

  • :q String The name of the MasterToken.

Response:

Array<MasterTokensResult> An array of {MasterTokensResult} objects for this search query.

Example request(s):

curl https://packagecloud.io/api/v1/repos/username/reponame/master_tokens/search?q=prod

Example response:

< HTTP/1.1 200 OK
[{
   "name" : "production",
   "value" : "e5480f5b38f1f78de2aaa0fa732d1427b1b83113371fd97d",
   "self_url": "/api/v1/repos/username/reponame/master_tokens/1"
   "read_tokens_url" : "/api/v1/repos/username/reponame/master_tokens/1/read_tokens"
}]

show

Show a master token.

GET /api/v1/repos/:user/:repo/master_tokens/:id

URL Params:

  • :user String The username to which the repo belongs.
  • :repo String The name of the repo.
  • :id Integer The id or value of the MasterToken.

Response:

Array The name and value of the master token and API path for associated Read Tokens

Example request(s):

curl https://packagecloud.io/api/v1/repos/username/reponame/master_tokens/1

Example response:

< HTTP/1.1 200 OK
[{
   "value" : "e5480f5b38f1f78de2aaa0fa732d1427b1b83113371fd97d",
   "name" : "default",
   "read_tokens_url" : "/api/v1/repos/username/reponame/master_tokens/1/read_tokens"
}]

create

Create a master token.

POST /api/v1/repos/:user/:repo/master_tokens

URL Params:

  • :user String The username to which the repo belongs.
  • :repo String The name of the repo.
  • master_token[name] String The name of the token to create.

Response:

MasterToken The newly created master token

Example request(s):

curl -X POST -F "master_token[name]=app_servers" https://packagecloud.io/api/v1/repos/username/reponame/master_tokens

Example response:

< HTTP/1.1 201 Created
{
    "value" : "1f3311f78de2aaa0fa732d1427b1b83113371fd97d",
    "name" : "app_servers",
    "paths" : {
        "self" : "/api/v1/repos/username/reponame/master_tokens/1"
    }
}

destroy

Destroy a master token and all of its read token children.

NOTE: Default tokens have their token value rotated when used with this API. All private repositories must have default master tokens.

DELETE /api/v1/repos/:user/:repo/master_tokens/:id

URL Params:

  • :user String The username to which the repo belongs.
  • :repo String The name of the repo.
  • :id Integer The id of the master token to be destroyed.

Example request(s):

curl -X DELETE https://packagecloud.io/api/v1/repos/username/reponame/master_tokens/1

Example response:

< HTTP/1.1 204 OK

distributions

index

GET /api/v1/distributions

Response:

Hash<String, Distribution> The response will be a JSON hash with the keys "deb", "dsc", and "rpm" whose values will be an array of hashes describing each distribution. This distribution hash will have an key called "versions" whose value is an array of JSON hashes describing each version of a particular Linux distribution which supports the package type.

Example request(s):

curl https://packagecloud.io/api/v1/distributions.json

Example response:

{
  "deb": [
      {
          "display_name": "Ubuntu",
          "index_name": "ubuntu",
          "versions": [
              {
                  "id": 4,
                  "display_name": "5.10 Breezy Badger",
                  "index_name": "breezy"
              },
              {
                  "id": 5,
                  "display_name": "6.06 LTS Dapper Drake",
                  "index_name": "dapper"
              },
              {
                  "id": 6,
                  "display_name": "6.10 Edgy Eft",
                  "index_name": "edgy"
              },
          ]
      },
      {
          "display_name": "Debian",
          "index_name": "debian",
          "versions": [
              {
                  "id": 22,
                  "display_name": "4.0 etch",
                  "index_name": "etch"
              },
              ...
          ]
       },
    ...
  ]
}

repository_readme

create

Create a README

POST /api/v1/repos/:user/:repo/readme.json

URL Params:

  • body String The markdown body of the readme.

Response:

String The URL of the repository.

Example request(s):

curl -X POST                                     \
     -H "Content-Type: application/json"         \
     -d '{"repository_readme": {"body": # Hi"}}' \
     "https://packagecloud.dev:3000/api/v1/repos/saldo/test/readme.json"

Example response:

  {"url": "https://packagecloud.io/user/repo"}

update

Append a README

PATCH /api/v1/repos/:user/:repo/readme.json

URL Params:

  • body String The markdown to append the existing README.

Response:

String The URL of the repository.

Example request(s):

curl -X PATCH                                                                 \
     -H "Content-Type: application/json"                                      \
     -d '{"repository_readme": {"body": \r\n # This is some data to append"}}'\
     "https://packagecloud.dev:3000/api/v1/repos/saldo/test/readme.json"

Example response:

  {"url": "https://packagecloud.io/user/repo"}

show

Show a README

GET /api/v1/repos/:user/:repo/readme.json

Response:

String A JSON object with the body of the README.

Example request(s):

curl -X GET https://packagecloud.dev:3000/api/v1/repos/saldo/test/readme.json

Example response:

  {"readme": "# Hi"}

destroy

Delete a README

DELETE /api/v1/repos/:user/:repo/readme.json

URL Params:

  • body String The markdown to append to the existing README.

Response:

String The URL of the repository.

Example request(s):

curl -X DELETE https://packagecloud.dev:3000/api/v1/repos/saldo/test/readme.json

Example response:

  {"url": "https://packagecloud.io/user/repo"}

Repository

Fields:

  • name The name of the repo.
  • created_at A timestamp of when the repo was created.
  • url The packagecloud URL for the repo.
  • last_push_human A human readable string describing the number of packages in the repo.
  • private A boolean value indicating whether or not the repo is private.
  • total_installs_count The number of times this repository has been installed.
  • fqname A string value of the fully qualified name (owner/reponame) for this repo. i.e. computology/public

Example:

{
    "name": "myrepo",
    "created_at": "2014-02-26T00:03:28.000Z",
    "url": "https://packagecloud.io/cooluser/myrepo",
    "last_push_human": "3 days ago",
    "package_count_human": "17 packages",
    "private": false,
    "total_installs_count": 1231,
    "fqname": "cooluser/myrepo"
}

See Also:

The docs on repos.

ReadToken

Fields:

  • name The name of the token. Probably the FQDN of the node that owns it.
  • value The value of the token. This is the value to use in the actual connection string to the repo.

Example:

{
  "id"   : 231,
  "value" : "3fe453060fd7f017219e308eb98ccf273b4c3655ba57577a",
  "name" : "app1.someservice.com"
}

See Also:

The docs on read tokens.

MasterToken

Fields:

  • name The name of the master token.
  • value The value of the master token, for use in the read token API.
  • paths[self] A URI for this master token. Can be used to destroy one.
  • read_tokens An array of {ReadToken} objects that belong to this master token.

Example:

{
   "value" : "e5480f5b38f1f78de2aaa0fa732d1427b1b83113371fd97d",
   "name" : "default",
   "read_tokens" : [
      {
         "value" : "3fe453060fd7f017219e308eb98ccf273b4c3655ba57577a",
         "name" : "app1.somewhere.com"
      }
   ],
   "paths" : {
      "self" : "/api/v1/repos/somewhere/production/master_tokens/1"
   }
}

See Also:

The docs on master tokens.

CountValue

Fields:

  • value The value of the result

Example:

{
   "value": 12312,
}

See Also:

The docs Package Downloads count API

The docs Repository Installs count API

SeriesValue

Fields:

  • A JSON hash of Dates and values

Example:

{
   "20160221Z": 22,
   "20160222Z": 21,
   "20160223Z": 29,
   "20160224Z": 19,
   "20160225Z": 30,
   "20160226Z": 38,
   "20160227Z": 40
}

See Also:

The docs Package Downloads series API

The docs Repository Installs series API

PackageFragment

Fields:

  • name The name of the package.
  • created_at When the package was uploaded.
  • distro_version The distro_version for the package.
  • version The version of the package.
  • release The release of the package (if available).
  • epoch The epoch of the package (if available).
  • private Whether or not the package is in a private repository.
  • type The type of package ("deb", "gem", or "rpm").
  • uploader_name The name of the uploader for the package.
  • repository_html_url The HTML url of the repository.
  • package_url The API url for this package.
  • package_html_url The HTML url for this package.

Example:

{
   "name": "jake",
   "distro_version": "el/7",
   "created_at": "2015-04-12T05:36:53.000Z",
   "version": "1.0",
   "release": "3.el6",
   "epoch": 87,
   "private": false,
   "type": "rpm",
   "uploader_name": "saldo",
   "repository_html_url": "/saldo/lol",
   "package_url": "/api/v1/repos/saldo/lol/package/rpm/el/7/jake/x86_64/1.0/3.el6.json",
   "package_html_url": "/saldo/lol/packages/el/7/jake-1.0-3.el6.x86_64.rpm"
}

See Also:

The docs on the Packages List All API.

The docs on the Package List/Filter API.

PackageDetails

Fields:

  • name The name of the package.
  • distro_version The distro_version for the package.
  • architecture The architecture of the package.
  • repository The name of the repository for the package.
  • size The size (in bytes) of the package. Returned as a String for JavaScript support.
  • summary The summary of the package (if available).
  • filename The filename of the package.
  • description The description of the package (if available).
  • md5sum The MD5 checksum for the package (if available).
  • sha1sum The SHA1 checksum for the package (if available).
  • sha256sum The SHA256 checksum for the package (if available).
  • sha512sum The SHA512 checksum for the package (if available).
  • private Whether or not the package is in a private repository.
  • uploader_name The name of the uploader for the package.
  • created_at When the package was uploaded.
  • licenses Array of licenses for this package (if available).
  • version The version of the package.
  • release The release of the package (if available).
  • epoch The epoch of the package (if available).
  • repository_html_url The HTML url of the repository.
  • versions_url The API url of other versions of this package.
  • promote_url The API url that can be used to promote this package.
  • total_downloads_count The number of times this package has been downloaded.
  • package_html_url The HTML url for this package.
  • self_url The API url for this response.

Example:

{
   "name": "jake",
   "distro_version": "el/7",
   "architecture": "x86_64",
   "repository": "testrepo",
   "size": 4536,
   "summary": "jake douglas is a very nice young man.",
   "filename": "jake-1.0-3.el6.x86_64.rpm",
   "description": "as it so happens, jake douglas is a very nice young man.",
   "md5sum": "ef9dc4cb512be90ab0b6c7460320ff1d",
   "sha1sum": "ea721867eb0389e28bcd32e2deef7d4472c6ced8",
   "sha256sum": "e3d70ac2bd1564db84d1cd74c78146b24377dbf285b6dbf9345ac9e1e529280d",
   "sha512sum": "2c56952341d28a7bc383aa80395b2e67dea4a734fb059c78293c59e4db4905b6114fccd5649826515b408f355eca6bfc5f431f8f7ae3af78c92c6f0fa90cebe6",
   "uploader_name": "julio",
   "created_at": "2015-04-12T05:36:53.000Z",
   "licenses": [
      "GPL"
   ],
   "version": "1.0",
   "release": "3.el6",
   "epoch": 87,
   "repository_url": "/api/v1/repos/julio/testrepo,
   "versions_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/versions.json",
   "package_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6.json",
   "total_downloads_count": 13039,
   "package_html_url": "/julio/testrepo/packages/el/7/jake-1.0-3.el6.x86_64.rpm",
   "self_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/jake/x86_64/1.0/3.el6.json"
}

See Also:

The docs on the Package show API.

The docs on the Rubygem show API.

PackageVersion

Fields:

  • name The name of the package.
  • versions_url The API url of all versions of this package.
  • versions_count How many versions this package has.
  • repository_url The API url of the repository.
  • repository_html_url The HTML url of the repository.

Example:

{
   "name": "ceph-devel",
   "versions_count": 2,
   "versions_url": "/api/v1/repos/julio/testrepo/package/rpm/el/7/ceph-devel/x86_64/versions.json",
   "repository_url": "/api/v1/repos/julio/testrepo",
   "repository_html_url": "/julio/testrepo"
}

See Also:

The docs on the Packages Versions API.

The docs on the Rubygem Versions API.

MasterTokenReadTokens

Fields:

  • name The name of the master token.
  • value The value of the master token, for use in the read token API.
  • paths[self] A URI for this master tokens read tokens.
  • read_tokens_url a URI to get all of the read tokens for this master token.

Example:

{
   "name" : "default",
   "value" : "e5480f5b38f1f78de2aaa0fa732d1427b1b83113371fd97d",
   "paths" : {
      "self" : "/api/v1/repos/somewhere/production/master_tokens/1"
   },
   "read_tokens_url" : "/api/v1/repos/somewhere/production/master_tokens/1/read_tokens"
}

See Also:

The docs on master tokens.

MasterTokensResult

Fields:

  • name The name of the master token.
  • value The value of the master token, for use in the read token API.
  • self_url A URI for this master token. Can be used to destroy one.
  • read_tokens_url a URI to get all of the read tokens for this master token.

Example:

{
   "name" : "default",
   "value" : "e5480f5b38f1f78de2aaa0fa732d1427b1b83113371fd97d",
   "self_url" : "/api/v1/repos/somewhere/production/master_tokens/1",
   "read_tokens_url" : "/api/v1/repos/somewhere/production/master_tokens/1"
}

See Also:

The docs on master tokens.

RepositoryInstalls

Fields:

  • installed_at The date this repository was installed (UTC)
  • ip_address The ip address of this repository install
  • user_agent The user agent of the client which installed this repository
  • master_token The master token associated with this repository install
  • distro_version The distribution version this repository was installed for

Example:

{
   "installed_at": 2015-04-12T05:36:53.000Z,
   "ip_address": "12.51.22.21",
   "hostname": "localhost.localdomain",
   "user_agent": "Ruby",
   "master_token": "default",
   "distro_version": "ubuntu/precise"
}

See Also:

The docs on the Repository Installs details API.

PackageDownloads

Fields:

  • downloaded_at The date this package was downloaded (UTC)
  • ip_address The ip address of this package download
  • user_agent The user agent of the client which downloaded the package
  • source The source of the package download ("web" or "cli")
  • read_token The name of the read token (for private repositories)

Example:

{
   "downloaded_at": 2015-04-12T05:36:53.000Z,
   "ip_address": "12.51.22.21",
   "user_agent": "Ruby",
   "source": "cli",
   "read_token": "ubuntu-51.2.aws.com"
}

See Also:

The docs on the Package Download details API.