v5

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-167122208.0 KB
packages

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 (debian, rpm, python, and java) need only specify the distro_version_id and package_file parameters.

Example request:

curl -X POST https://packagecloud.io/api/v1/repos/test_user/test_repo/packages.json \
     -F "package[distro_version_id]=48"     \
     -F "package[package_file]=@path/to/jake-1.0-1.el6.x86_64.rpm"
post/api/v1/repos/{user_id}/{repo}/packages.json

Path parameters

user_idstring required
repostring required

Response

PackageDetails A JSON object representing the package.

namestring required

The name of the package.

distro_versionstring required

The distro_version for the package.

architecturestring nullable required

The architecture of the package.

repositorystring required

The name of the repository for the package.

sizestring required

The size (in bytes) of the package. Returned as a String for JavaScript support.

summarystring nullable required

The summary of the package (if available).

filenamestring required

The filename of the package.

descriptionstring nullable required

The description of the package (if available).

md5sumstring nullable required

The MD5 checksum for the package (if available).

sha1sumstring nullable required

The SHA1 checksum for the package (if available).

sha256sumstring nullable required

The SHA256 checksum for the package (if available).

sha512sumstring nullable required

The SHA512 checksum for the package (if available).

privateboolean required

Whether or not the package is in a private repository.

uploader_namestring required

The name of the uploader for the package.

created_atstring required

When the package was uploaded.

licensesstring[] required

Array of licenses for this package (if available).

versionstring required

The version of the package.

releasestring nullable required

The release of the package (if available).

epochinteger nullable required

The epoch of the package (if available).

indexedboolean required

Whether or not this package has been indexed.

scopestring nullable required

The scope of the package (if available).

repository_html_urlstring required

The HTML url of the repository.

versions_urlstring required

The API url of other versions of this package.

promote_urlstring required

The API url that can be used to promote this package.

total_downloads_countinteger required

The number of times this package has been downloaded.

download_urlstring required

The url to download this package.

package_html_urlstring required

The HTML url for this package.

downloads_detail_urlstring required

The url to get access log details for package downloads.

downloads_series_urlstring required

The url to get time series data for package downloads.

downloads_count_urlstring required

The url to get the total number of package downloads.

destroy_urlstring required

The url for the HTTP DELETE request to destroy this package.

self_urlstring required

The API url for this response.

repository_urlstring required
package_urlstring required

Example response

{
  "name": "jake",
  "distro_version": "fedora/22",
  "architecture": "x86_64",
  "repository": "test_repo",
  "size": "3712",
  "summary": "jake douglas is a very nice young man.",
  "filename": "jake-1.0-1.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": "5abe922fc4bbf5bbdac9b85173371892",
  "sha1sum": "062fd41ecf96587309ec9a3ae2035cc44c348b8f",
  "sha256sum": "070da5370a96ba3ae679e7d02d7de6309e4d159340d9f3b555d6d5b4b7cf260a",
  "sha512sum": "406fa288d5dfff194ec2b119b798c4658375a5d07b34f2d6350885cdf6b620f3fdeee45427fef8bcd37e6624049fba0c633b5b4030b79bf96028db6b4f01de87",
  "private": false,
  "uploader_name": "test_user",
  "created_at": "2017-03-13T02:49:29.000Z",
  "licenses": [
    "GPL"
  ],
  "version": "1.0",
  "release": "1.el6",
  "epoch": 0,
  "indexed": false,
  "scope": null,
  "repository_url": "/api/v1/repos/test_user/test_repo",
  "repository_html_url": "/test_user/test_repo",
  "package_url": "/api/v1/repos/test_user/test_repo/package/rpm/fedora/22/jake/x86_64/1.0/1.el6.json",
  "versions_url": "/api/v1/repos/test_user/test_repo/package/rpm/fedora/22/jake/x86_64/versions.json",
  "promote_url": "/api/v1/repos/test_user/test_repo/fedora/22/jake-1.0-1.el6.x86_64.rpm/promote.json",
  "total_downloads_count": 0,
  "download_url": "https://packagecloud.io/test_user/test_repo/packages/fedora/22/jake-1.0-1.el6.x86_64.rpm/download",
  "package_html_url": "/test_user/test_repo/packages/fedora/22/jake-1.0-1.el6.x86_64.rpm",
  "downloads_detail_url": "/api/v1/repos/test_user/test_repo/package/rpm/fedora/22/jake/x86_64/1.0/1.el6/stats/downloads/detail.json",
  "downloads_series_url": "/api/v1/repos/test_user/test_repo/package/rpm/fedora/22/jake/x86_64/1.0/1.el6/stats/downloads/series/daily.json",
  "downloads_count_url": "/api/v1/repos/test_user/test_repo/package/rpm/fedora/22/jake/x86_64/1.0/1.el6/stats/downloads/count.json",
  "destroy_url": "/api/v1/repos/test_user/test_repo/fedora/22/jake-1.0-1.el6.x86_64.rpm",
  "self_url": "/api/v1/repos/test_user/test_repo/package/rpm/fedora/22/jake/x86_64/1.0/1.el6.json"
}