### Repository Installs Details Response Example Source: https://packagecloud.io/docs/api Example JSON response for repository installation details, showing installation timestamp, IP address, hostname, user agent, master token, and distribution version. ```json { "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" } ``` -------------------------------- ### Repository Installs Details JSON Example Source: https://packagecloud.io/docs/api This JSON object provides details about a repository installation, including the installation timestamp, IP address, user agent, master token, and the distribution version it was installed for. ```json { "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" } ``` -------------------------------- ### Example JSON Response for Installs Count Source: https://packagecloud.io/docs/api A sample JSON object containing the installation count value for a repository. ```json { "value": 5135 } ``` -------------------------------- ### Repository Installs Detail (By Distro and Version with Date Range) Source: https://packagecloud.io/docs/api Get detailed installation data for a specific distribution and version, within a defined date range. Useful for analyzing historical installation trends. ```http /api/v1/repos/julio/test_repo/stats/installs/ubuntu/precise/detail.json?start_date=19700101Z ``` -------------------------------- ### Force OS/Dist for Repository Installation (Example) Source: https://packagecloud.io/docs Demonstrates how to override OS detection by setting 'os' and 'dist' variables when running the installation script, useful for unsupported or misdetected systems. ```bash os=ubuntu dist=trusty ./script.sh ``` -------------------------------- ### Repository Installs Series - By Distribution, Version, and Start Date Source: https://packagecloud.io/docs/api Retrieves a time series of repository installs for a specific distribution and version, with a custom start date to analyze historical data. Useful for long-term trend analysis. ```bash /api/v1/repos/julio/test_repo/stats/installs/ubuntu/precise/series/weekly.json?start_date=19700101Z ``` -------------------------------- ### Repository Installs Detail (By Distro) Source: https://packagecloud.io/docs/api Get detailed installation data for a repository, filtered by a specific distribution. This allows for targeted analysis of user behavior on different platforms. ```http GET /api/v1/repos/:user_id/:repo/stats/installs/:distro/detail.json ``` ```http /api/v1/repos/julio/test_repo/stats/installs/ubuntu/detail.json ``` -------------------------------- ### Example Package Response Source: https://packagecloud.io/docs/api This is an example JSON response when retrieving package details. ```json [ { "name": "hello", "distro_version": "anyfile/1", "created_at": "2017-03-13T23:54:48.000Z", "version": "0.0.4", "release": null, "epoch": null, "private": false, "type": "anyfile", "filename": "hello-0.0.4.asc", "uploader_name": "test_user", "indexed": false, "sha256sum": "f101e1f32d7e4863c3e983b3709fe1755a34a8f45184ef507868267c23f76f0e", "repository_html_url": "/test_user/test_repo", "package_url": "/api/v1/repos/test_user/test_repo/package/anyfile/hello/0.0.4.json "downloads_detail_url": "/api/v1/repos/test_user/test_repo/package/anyfile/hello/0.0.4/stats/downloads/detail.json", "downloads_series_url": "/api/v1/repos/test_user/test_repo/package/anyfile/hello/0.0.4/stats/downloads/series/daily.json", "downloads_count_url": "/api/v1/repos/test_user/test_repo/package/anyfile/hello/0.0.4/stats/downloads/count.json", "package_html_url": "/test_user/test_repo/packages/anyfile/hello-0.0.4.asc", "download_url": "https://packagecloud.io/test_user/test_repo/packages/anyfile/hello-0.0.4.asc/download?distro_version_id=129", "promote_url": "/api/v1/repos/test_user/test_repo/anyfile/1/hello-0.0.4.asc/promote.json", "destroy_url": "/api/v1/repos/test_user/test_repo/anyfile/1/hello-0.0.4.asc" } ] ``` -------------------------------- ### Make Installation Script Executable Source: https://packagecloud.io/docs Grants execute permissions to the downloaded installation script. ```bash chmod 755 script.sh ``` -------------------------------- ### Example Package Response Source: https://packagecloud.io/docs/api This is an example JSON response for a package. It includes details such as name, version, checksums, and download URLs. ```json { "name": "hello", "distro_version": "anyfile/1", "architecture": null, "repository": "test_repo", "size": "659", "summary": null, "filename": "hello-0.0.6.asc", "description": "null", "dependencies": null, "md5sum": "63f15a3efcf982d610b0376aae0a40fe", "sha1sum": "0080db94bb9b3fbfae2ae2c9a720d5cf7a724bbc", "sha256sum": "f101e1f32d7e4863c3e983b3709fe1755a34a8f45184ef507868267c23f76f0e", "sha512sum": "b50259b470eb609688fd99b30db7e6664e5bf3e47e43266a34e321b928b8c687dc11e9d461d4eb980697a17bb96a8cde197ea755396e25a831d78deeab696061", "private": false, "uploader_name": "test_user", "created_at": "2017-03-14T15:58:49.000Z", "licenses": null, "version": "0.0.6", "release": null, "epoch": null, "indexed": false, "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/anyfile/hello/0.0.6.json", "versions_url": "/api/v1/repos/test_user/test_repo/package/anyfile/hello/versions.json", "promote_url": "/api/v1/repos/test_user/test_repo/anyfile/1/hello-0.0.6.asc/promote.json", "total_downloads_count": 0, "download_url": "https://packagecloud.io/test_user/test_repo/packages/anyfile/hello-0.0.6.asc/download?distro_version_id=129", "package_html_url": "/test_user/test_repo/packages/anyfile/hello-0.0.6.asc", "downloads_detail_url": "/api/v1/repos/test_user/test_repo/package/anyfile/hello/0.0.6/stats/downloads/detail.json", "downloads_series_url": "/api/v1/repos/test_user/test_repo/package/anyfile/anyfile/hello/0.0.6/stats/downloads/series/daily.json", "downloads_count_url": "/api/v1/repos/test_user/test_repo/package/anyfile/hello/0.0.6/stats/downloads/count.json", "destroy_url": "/api/v1/repos/test_user/test_repo/anyfile/1/hello-0.0.6.asc", "self_url": "/api/v1/repos/test_user/test_repo/package/anyfile/hello/0.0.6.json" } ``` -------------------------------- ### Repository Installs Details Source: https://packagecloud.io/docs/api Retrieves detailed installation statistics for a specific repository across all Ubuntu distributions matching a master token. Useful for granular tracking of package installations. ```bash /api/v1/repos/julio/test_repo/stats/installs/ubuntu/detail.json?master_token=datacenter-2 ``` -------------------------------- ### Example Package List Response Source: https://packagecloud.io/docs/api This is an example JSON response when listing packages by type and distribution. ```json [ { "name": "jake", "versions_count": 1, "versions_url": "/api/v1/repos/test_user/test_repo/package/rpm/fedora/22/jake/x86_64/versions.json", "repository_url": "/api/v1/repos/test_user/test_repo", "repository_html_url": "/test_user/test_repo" } ] ``` -------------------------------- ### Repository Installs Detail (All) Source: https://packagecloud.io/docs/api Retrieve detailed information about all repository installations across all distributions. This is useful for in-depth analysis of user activity. ```http GET /api/v1/repos/:user_id/:repo/stats/installs/detail.json ``` ```http /api/v1/repos/julio/test_repo/stats/installs/detail.json ``` -------------------------------- ### Get Package Download Count (Debian/Redhat) Source: https://packagecloud.io/docs/api This is a GET request example for retrieving the download count of a specific package. It requires detailed package information in the URL path. ```bash GET /api/v1/repos/:user_id/:repo/package/:type/:distro/:version/:package/:arch/:package_version/:release/stats/downloads/count.json ``` -------------------------------- ### Install a Deb Repository Source: https://packagecloud.io/docs Use the `package_cloud repository install` command to install a debian repository on your system. Specify the repository name and the type 'deb'. ```bash > package_cloud repository install username/_reponame_ deb ``` -------------------------------- ### Repository Details JSON Example Source: https://packagecloud.io/docs/api This JSON object details a repository, including its name, creation timestamp, Packagecloud URL, human-readable package count, privacy status, total installs, and fully qualified name. ```json { "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" } ``` -------------------------------- ### CircleCI Configuration for Package Pushing Source: https://packagecloud.io/docs Example circle.yml file to install the package_cloud gem and push packages to Packagecloud from CircleCI. ```yaml dependencies: pre: - gem install package_cloud deployment: production: branch: master commands: - package_cloud push user/repo/os/version /path/to/pkg.ext ``` -------------------------------- ### Example Distributions Response Source: https://packagecloud.io/docs/api This is an example of the JSON response when requesting the distributions list. It includes details about different Linux distributions and their versions. ```json { "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 Installs Count (By Distro and Version) Source: https://packagecloud.io/docs/api Get the install count for a repository for a specific distribution and version. This provides granular insights into usage patterns. ```http GET /api/v1/repos/:user_id/:repo/stats/installs/:distro/:version/count.json ``` ```http /api/v1/repos/julio/test_repo/stats/installs/ubuntu/precise/count.json ``` -------------------------------- ### Repository Installs Detail (By Distro and Version) Source: https://packagecloud.io/docs/api Retrieve detailed installation information for a repository, specific to a distribution and version. This provides highly granular insights. ```http GET /api/v1/repos/:user_id/:repo/stats/installs/:distro/:version/detail.json ``` ```http /api/v1/repos/julio/test_repo/stats/installs/ubuntu/precise/detail.json ``` -------------------------------- ### Example Package JSON Response Source: https://packagecloud.io/docs/api This JSON object represents an example response for package details, including metadata and storage paths. ```json { "packages": [ "package": { "id": 6, "created_at": "2025-10-22T07:49:39.000Z", "updated_at": "2025-10-22T07:50:08.000Z", "deleted_at": "2025-10-22T07:50:08.000Z", "deleted_by_id": 2, "filename": "bye-2.0.1.zip", "family": "bye", "release": "2.0.1", "variant": "zip", "distro_version_id": 1, "metadata": { "semver": { "major": "2", "minor": "0", "patch": "1", "prerelease": null, "buildmetadata": null } }, "weekly_downloads": {}, "digest": "ea87009e7e679bec8c57798aaca7b5341ec639e15c57b5da1d51d41cff3a8093", "bucket_name": "packagecloud-repositories-development", "bucket_storage_path": "2/134/anyfile/packages/6.zip", "target_bucket_storage_path": "018ca431-b028-7565-b846-e806ef4b72af/019a0add-2b10-70ff-b727-f490aba5cbb6/blobs//bye-2.0.1.zip" } ] } ``` -------------------------------- ### Get Package Download Count (Node.js) Source: https://packagecloud.io/docs/api This is a GET request example for retrieving the download count of a Node.js package. It requires package and version information in the URL path. ```bash GET /api/v1/repos/:user_id/:repo/package/node/:package/:version/stats/downloads/count.json ``` -------------------------------- ### Install packagecloud CLI Source: https://packagecloud.io/docs Install the packagecloud Ruby gem to use the command line client. ```bash > sudo gem install package_cloud ``` -------------------------------- ### RepositoryInstalls Source: https://packagecloud.io/docs/api Details about when a repository was installed, including the installation date, IP address, user agent, master token, and distribution version. ```APIDOC ## 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: ```json { "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. ``` -------------------------------- ### Install DEB Package with APT Source: https://packagecloud.io/docs Install a desired DEB package using apt-get install. ```shell apt-get install ``` -------------------------------- ### RubyGem Package Version Response Example Source: https://packagecloud.io/docs/api Example JSON response for a RubyGem package version, including its name, version, and associated repository and download URLs. ```json [ { "name": "jakedotrb", "distro_version": "RubyGem", "created_at": "2017-03-14T14:31:16.000Z", "version": "0.0.1", "release": null, "epoch": null, "private": false, "type": "gem", "filename": "jakedotrb-0.0.1.gem", "uploader_name": "test_user", "indexed": false, "repository_html_url": "/test_user/test_repo", "package_url": "/api/v1/repos/test_user/test_repo/package/gem/jakedotrb/0.0.1.json", "downloads_detail_url": "/api/v1/repos/test_user/test_repo/package/gem/jakedotrb/0.0.1/stats/downloads/detail.json", "downloads_series_url": "/api/v1/repos/test_user/test_repo/package/gem/jakedotrb/0.0.1/stats/downloads/series/daily.json", "downloads_count_url": "/api/v1/repos/test_user/test_repo/package/gem/jakedotrb/0.0.1/stats/downloads/count.json", "package_html_url": "/test_user/test_repo/packages/gems/jakedotrb-0.0.1.gem", "download_url": "https://packagecloud.io/test_user/test_repo/packages/gems/jakedotrb-0.0.1.gem/download", "promote_url": "/api/v1/repos/test_user/test_repo/gems/jakedotrb-0.0.1.gem/promote.json", "destroy_url": "/api/v1/repos/test_user/test_repo/gems/jakedotrb-0.0.1.gem" } ] ``` -------------------------------- ### Example RPM Package Request Source: https://packagecloud.io/docs/api This example demonstrates how to use `curl` to request details for an RPM package on Enterprise Linux. It shows the structure of a typical API call for fetching package information. ```bash curl "https://packagecloud.io/api/v1/repos/test_user/test_repo/package/rpm/fedora/22/jake/x86_64/1.0/1.el6.json" ``` -------------------------------- ### Repository Installs Detail Source: https://packagecloud.io/docs/api Retrieves detailed information about repository installations, with options to filter by distribution and version. ```APIDOC ## GET /api/v1/repos/:user_id/:repo/stats/installs/detail.json ### Description Retrieve the details of all repository installations that match a particular criteria across all operating systems and distributions. ### Method GET ### Endpoint /api/v1/repos/:user_id/:repo/stats/installs/detail.json ### Parameters #### Path Parameters - **user_id** (String) - Required - The user this repo belongs to. - **repo** (String) - Required - The name of this repository. #### Query Parameters - **start_date** (String) - Optional - ISO8601 starting date, like 20160231Z. - **end_date** (String) - Optional - ISO8601 ending date, like 20160231Z. - **master_token** (String) - Optional - The master_token name or id to filter repository installs by. - **user_agent** (String) - Optional - The user_agent to filter repository installs by. ### Response #### Success Response (200) - **RepositoryInstalls** (Object) - JSON object containing the details of repository installs. ### Response Example (Response body structure not detailed in source, but would contain installation details.) ``` ```APIDOC ## GET /api/v1/repos/:user_id/:repo/stats/installs/:distro/detail.json ### Description Retrieve the details of all repository installations that match a particular criteria for a specific distribution. ### Method GET ### Endpoint /api/v1/repos/:user_id/:repo/stats/installs/:distro/detail.json ### Parameters #### Path Parameters - **user_id** (String) - Required - The user this repo belongs to. - **repo** (String) - Required - The name of this repository. - **distro** (String) - Required - The name of the distribution to filter repository installs by (i.e. ubuntu). #### Query Parameters - **start_date** (String) - Optional - ISO8601 starting date, like 20160231Z. - **end_date** (String) - Optional - ISO8601 ending date, like 20160231Z. - **master_token** (String) - Optional - The master_token name or id to filter repository installs by. - **user_agent** (String) - Optional - The user_agent to filter repository installs by. ### Response #### Success Response (200) - **RepositoryInstalls** (Object) - JSON object containing the details of repository installs for the specified distribution. ### Response Example (Response body structure not detailed in source, but would contain installation details.) ``` ```APIDOC ## GET /api/v1/repos/:user_id/:repo/stats/installs/:distro/:version/detail.json ### Description Retrieve the details of all repository installations that match a particular criteria for a specific distribution and version. ### Method GET ### Endpoint /api/v1/repos/:user_id/:repo/stats/installs/:distro/:version/detail.json ### Parameters #### Path Parameters - **user_id** (String) - Required - The user this repo belongs to. - **repo** (String) - Required - The name of this repository. - **distro** (String) - Required - The name of the distribution to filter repository installs by (i.e. ubuntu). - **version** (String) - Required - The version name of the distribution to filter repository installs by (i.e. precise). #### Query Parameters - **start_date** (String) - Optional - ISO8601 starting date, like 20160231Z. - **end_date** (String) - Optional - ISO8601 ending date, like 20160231Z. - **master_token** (String) - Optional - The master_token name or id to filter repository installs by. - **user_agent** (String) - Optional - The user_agent to filter repository installs by. ### Response #### Success Response (200) - **RepositoryInstalls** (Object) - JSON object containing the details of repository installs for the specified distribution and version. ### Response Example (Response body structure not detailed in source, but would contain installation details.) ``` -------------------------------- ### Install Specific Package Version Source: https://packagecloud.io/docs Installs a specific version of a package using APT after the repository has been configured. ```bash sudo apt-get install packagecloud-test=1.1-2 ``` -------------------------------- ### RPM Package Version Response Example Source: https://packagecloud.io/docs/api Example JSON response detailing a specific RPM package version, including metadata like name, version, release, and download URLs. ```json [ { "name": "jake", "distro_version": "fedora/22", "created_at": "2017-03-13T02:49:29.000Z", "version": "1.0", "release": "1.el6", "epoch": 0, "private": false, "type": "rpm", "filename": "jake-1.0-1.el6.x86_64.rpm", "uploader_name": "test_user", "indexed": false, "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", "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", "package_html_url": "/test_user/test_repo/packages/fedora/22/jake-1.0-1.el6.x86_64.rpm", "download_url": "https://packagecloud.io/test_user/test_repo/packages/fedora/22/jake-1.0-1.el6.x86_64.rpm/download", "promote_url": "/api/v1/repos/test_user/test_repo/fedora/22/jake-1.0-1.el6.x86_64.rpm/promote.json", "destroy_url": "/api/v1/repos/test_user/test_repo/fedora/22/jake-1.0-1.el6.x86_64.rpm" } ] ``` -------------------------------- ### Repository Installs Details Source: https://packagecloud.io/docs/api Retrieves detailed installation statistics for a specific repository across all Ubuntu distributions, filtered by a master token. ```APIDOC ## GET /api/v1/repos/:user_id/:repo/stats/installs/ubuntu/detail.json ### Description Retrieves detailed installation statistics for a specific repository across all Ubuntu distributions, filtered by a master token. ### Method GET ### Endpoint /api/v1/repos/:user_id/:repo/stats/installs/ubuntu/detail.json ### Parameters #### Query Parameters - **master_token** (string) - Required - The master token name or id to filter repository installs by. ### Response #### Success Response (200) - **installed_at** (string) - The timestamp when the package was installed. - **ip_address** (string) - The IP address from which the package was installed. - **hostname** (string) - The hostname from which the package was installed. - **user_agent** (string) - The user agent string of the client. - **master_token** (string) - The master token used for the installation. - **distro_version** (string) - The distribution version (e.g., 'ubuntu/precise'). #### Response 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" } ``` -------------------------------- ### Example GPG Keys Response Source: https://packagecloud.io/docs/api This is an example of the JSON response when listing GPG keys for a repository. It contains details about each GPG key, including its download URL and fingerprint. ```json { "gpg_keys" : [ { "self" : "/api/v1/repos/username/reponame/gpg_keys/username-reponame-85D7FBF915DFCBC6.pub.gpg.json", "download_url" : "https://packagecloud.io/username/reponame/gpgkey/username-reopname-85D7FBF915DFCBC6.pub.gpg", "keytype" : "repo", "destroy_url" : "/api/v1/repos/username/reponame/gpg_keys/username-reponame-85D7FBF915DFCBC6.pub.gpg.json", "fingerprint" : "26F67F3E5E89BB30DCD7AC6E85D7FBF915DFCBC6", "name" : "username-reponame-85D7FBF915DFCBC6.pub.gpg" } ] } ``` -------------------------------- ### Download Repository Installation Script Source: https://packagecloud.io/docs Downloads the Debian package installation script from packagecloud. Ensure the URL is correct for your repository. ```bash curl -s https://packagecloud.io/install/repositories/Computology/packagecloud-test-packages/script.deb.sh > script.sh ``` -------------------------------- ### Repository Installs Series - All Operating Systems Source: https://packagecloud.io/docs/api Retrieves a time series of all repository installs for a given repository across all operating systems and distributions. Useful for understanding overall download trends. ```bash /api/v1/repos/julio/test_repo/stats/installs/series/weekly.json ``` -------------------------------- ### Destroy Generic Package Request Examples Source: https://packagecloud.io/docs/api Examples of how to delete various types of packages using the generic destroy endpoint. This includes Ubuntu .dsc files, Enterprise Linux RPMs, Python zip archives, Java JARs, and Node.js packages. ```bash curl -X DELETE "https://packagecloud.io/api/v1/repos/cooluser/mystuff/ubuntu/precise/jake_1.0-7.dsc" ``` ```bash curl -X DELETE "https://packagecloud.io/api/v1/repos/cooluser/mystuff/el/6/jake-1.0-2.el6.x86_64.rpm" ``` ```bash curl -X DELETE "https://packagecloud.io/api/v1/repos/cooluser/mystuff/pypi/1/packagecloud_test-0.9.7b1.zip" ``` ```bash curl -X DELETE "https://packagecloud.io/api/v1/repos/cooluser/mystuff/java/maven2/jake-2.3.jar" ``` ```bash curl -X DELETE "https://packagecloud.io/api/v1/repos/cooluser/mystuff/node/1/packagecloud-test-1.0.0.tgz" ``` -------------------------------- ### Example RubyGem Package Response Source: https://packagecloud.io/docs/api This is an example JSON response for a RubyGem package. It contains package metadata, including name, version, summary, and checksums. ```json { "name": "jakedotrb", "distro_version": "RubyGem", "architecture": null, "repository": "test_repo", "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": null, "md5sum": "448024a4ac0b6244659c707cfa070df6", "sha1sum": "c4365658774d8c259885471acb6cc659caca16b9", "sha256sum": "1897be32375d4fc3337df00930ab94afbdfeb26545492127bdbe7fe05e7e1e9d", "sha512sum": "27f6286aa047a5c1dd5c7c80e1cf1eccc8ca9c8a61a17cc552277d0d6d745275523fa6cdac610d6a6abb9091509241de447b673e84ead83947f3378641e11217", "private": false, "uploader_name": "test_user", "created_at": "2017-03-14T14:31:16.000Z", "licenses": [ "MIT" ], "version": "0.0.1", "release": null, "epoch": null, "indexed": false, "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/gem/jakedotrb/0.0.1.json", "versions_url": "/api/v1/repos/test_user/test_repo/package/gem/jakedotrb/versions.json", "promote_url": "/api/v1/repos/test_user/test_repo/gems/jakedotrb-0.0.1.gem/promote.json", "total_downloads_count": 0, "download_url": "https://packagecloud.io/test_user/test_repo/packages/gems/jakedotrb-0.0.1.gem/download", "package_html_url": "/test_user/test_repo/packages/gems/jakedotrb-0.0.1.gem", "downloads_detail_url": "/api/v1/repos/test_user/test_repo/package/gem/jakedotrb/0.0.1/stats/downloads/detail.json", "downloads_series_url": "/api/v1/repos/test_user/test_repo/package/gem/jakedotrb/0.0.1/stats/downloads/series/daily.json", "downloads_count_url": "/api/v1/repos/test_user/test_repo/package/gem/jakedotrb/0.0.1/stats/downloads/count.json", "destroy_url": "/api/v1/repos/test_user/test_repo/gems/jakedotrb-0.0.1.gem", "self_url": "/api/v1/repos/test_user/test_repo/package/gem/jakedotrb/0.0.1.json" } ``` -------------------------------- ### Repository Installs Count (By Distro and Version with Date Range) Source: https://packagecloud.io/docs/api Retrieve the install count for a specific distribution and version, with a custom date range. Useful for historical analysis. ```http /api/v1/repos/julio/test_repo/stats/installs/ubuntu/precise/count.json?start_date=19700101Z ``` -------------------------------- ### Repository Installs Series - By Distribution and Version Source: https://packagecloud.io/docs/api Retrieves a time series of repository installs filtered by a specific distribution and version, like Ubuntu Precise Pangolin. Useful for targeted trend analysis. ```bash /api/v1/repos/julio/test_repo/stats/installs/ubuntu/precise/series/weekly.json ``` -------------------------------- ### Force OS/Dist for Repository Installation Source: https://packagecloud.io/docs Executes the installation script while explicitly setting the OS and distribution to force the correct repository configuration, especially when automatic detection might fail or is not desired. ```bash os=ubuntu dist=precise ./script.sh ``` -------------------------------- ### Repository Installs Count (All) Source: https://packagecloud.io/docs/api Get the total number of installs for a repository across all distributions. This is useful for a general overview of a repository's popularity. ```http GET /api/v1/repos/:user_id/:repo/stats/installs/count.json ``` ```http /api/v1/repos/julio/test_repo/stats/installs/count.json ``` -------------------------------- ### Get Package Download Count (Python) Source: https://packagecloud.io/docs/api This is a GET request example for retrieving the download count of a Python package. It requires package and version information in the URL path. ```bash GET /api/v1/repos/:user_id/:repo/package/python/:package/:version/stats/downloads/count.json ``` -------------------------------- ### Create Packagecloud Configuration File Source: https://packagecloud.io/docs Manually create the Packagecloud configuration file by echoing your API token and URL into ~/.packagecloud. Ensure you use your actual token and URL. ```bash echo '{"url":"https://packagecloud.io/", "token": "f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0"}' >> ~/.packagecloud ``` -------------------------------- ### Get Package Download Count (Gem) Source: https://packagecloud.io/docs/api This is a GET request example for retrieving the download count of a Ruby Gem package. It requires package and version information in the URL path. ```bash GET /api/v1/repos/:user_id/:repo/package/gem/:package/:version/stats/downloads/count.json ``` -------------------------------- ### Deploy with Gradle Source: https://packagecloud.io/docs Execute the Gradle publish task to deploy your project artifacts. ```bash ./gradlew publish ``` -------------------------------- ### Get Maven Package Details Source: https://packagecloud.io/docs/api Retrieves detailed information about a specific Maven package within a repository. This is useful for inspecting package metadata before installation or for programmatic access. ```json { "name": "jake", "distro_version": "java/maven2", "architecture": null, "repository": "test_repo", "size": "2404", "summary": null, "filename": "jake-2.3.jar", "description": null, "dependencies": [ { "context": "test", "dependencies": [ "junit.junit 3.8.1" ] } ], "md5sum": null, "sha1sum": null, "sha256sum": null, "sha512sum": null, "private": false, "uploader_name": "test_user", "created_at": "2017-03-13T23:54:48.000Z", "licenses": null, "version": "2.3", "release": null, "epoch": null, "indexed": true, "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/java/maven2/io.packagecloud/jake/2.3.json", "versions_url": "/api/v1/repos/test_user/test_repo/package/java/maven2/io.packagecloud/jake/versions.json", "promote_url": "/api/v1/repos/test_user/test_repo/java/maven2/io.packagecloud/jake-2.3.jar/promote.json", "total_downloads_count": 0, "download_url": "https://packagecloud.io/test_user/test_repo/packages/java/jake-2.3.jar/artifacts/jake-2.3.jar/download" "package_html_url": "/test_user/test_repo/packages/java/jake-2.3.jar", "downloads_detail_url": "N/A", "downloads_series_url": "N/A", "downloads_count_url": "N/A", "destroy_url": "/api/v1/repos/test_user/test_repo/java/maven2/io.packagecloud/jake-2.3.jar", "self_url": "/api/v1/repos/test_user/test_repo/package/java/maven2/io.packagecloud/jake/2.3.json" } ``` -------------------------------- ### Series Value JSON Example Source: https://packagecloud.io/docs/api This JSON hash represents a series of values keyed by date, commonly used for tracking metrics like package downloads or repository installs over time. ```json { "20160221Z": 22, "20160222Z": 21, "20160223Z": 29, "20160224Z": 19, "20160225Z": 30, "20160226Z": 38, "20160227Z": 40 } ``` -------------------------------- ### Example Package Contents Response Source: https://packagecloud.io/docs/api The response detailing the files within a Debian source package, including filename, size, and MD5 sum. ```json { "files": [ { "filename": "jake_1.0.orig.tar.bz2", "size": 1108, "md5sum": "a7a309b55424198ee98abcb8092d7be0" }, { "filename": "jake_1.0-7.debian.tar.gz", "size": 1571, "md5sum": "0fa5395e95ddf846b419e96575ce8044" } ] } ``` -------------------------------- ### List Repositories Response Source: https://packagecloud.io/docs/api This is an example response when listing repositories, showing an array of repository objects with their details. ```json [{ "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" }] ``` -------------------------------- ### Example JSON Response for Downloads Series Source: https://packagecloud.io/docs/api A sample JSON object representing daily download counts for a package over a period. ```json { "20160221Z": 22, "20160222Z": 21, "20160223Z": 29, "20160224Z": 19, "20160225Z": 30, "20160226Z": 38, "20160227Z": 40 } ``` -------------------------------- ### Repository Installs Count (By Distro with Master Token) Source: https://packagecloud.io/docs/api Filter repository installs by a specific master token for a given distribution. This helps in tracking installs associated with particular tokens. ```http /api/v1/repos/julio/test_repo/stats/installs/ubuntu/count.json?master_token=datacenter-2 ``` -------------------------------- ### Create Repository Response Source: https://packagecloud.io/docs/api This is an example of a successful response when creating a repository, providing the URL of the newly created resource. ```json {"url": "https://packagecloud.io/cooluser/thename"} ``` -------------------------------- ### Repository Installs Series - By Distribution and Master Token Source: https://packagecloud.io/docs/api Retrieves a time series of repository installs for a specific distribution, filtered by a master token. Useful for analyzing installs associated with specific access tokens. ```bash /api/v1/repos/julio/test_repo/stats/installs/ubuntu/series/weekly.json?master_token=datacenter-2 ``` -------------------------------- ### List Repositories Source: https://packagecloud.io/docs/api Retrieve a list of all repositories associated with your account. Optionally include repositories from collaborations. ```bash curl https://packagecloud.io/api/v1/repos ``` -------------------------------- ### Install Package on Alpine Source: https://packagecloud.io/docs Install a desired package using apk add on Alpine Linux. ```shell apk add ``` -------------------------------- ### Example HTTP Response Source: https://packagecloud.io/docs/api An example of a successful HTTP response indicating a 200 OK status. ```http < HTTP/1.0 200 OK ``` -------------------------------- ### Fetch Anyfile Package Details Source: https://packagecloud.io/docs/api This curl command demonstrates how to fetch details for an Anyfile package. It requires specifying the user ID, repository name, package name, and version in the URL. ```bash curl "https://packagecloud.io/api/v1/repos/test_user/test_repo/package/anyfile/hello/0.0.6.json" ``` -------------------------------- ### Create a Repository Source: https://packagecloud.io/docs/api Use this endpoint to create a new repository. You can specify whether the repository should be private. The response contains the URL of the new repository. ```bash curl -X POST \ -H "Content-Type: application/json" \ -d '{"repository": {"name": "thename", "private": "1"}}' \ "https://packagecloud.io/api/v1/repos.json" ``` -------------------------------- ### Install RPM Package with YUM Source: https://packagecloud.io/docs Install a specific package, ensuring it comes only from the defined RPM repository. ```shell yum install --disablerepo=* --enablerepo=username_reponame_rpm_any ``` -------------------------------- ### Repository Installs Series (By Distro) Source: https://packagecloud.io/docs/api Retrieves a time series of repository installs for a given repository, filtered by distribution. ```APIDOC ## GET /api/v1/repos/:user_id/:repo/stats/installs/:distro/series/:interval.json ### Description Retrieves a time series of repository installs for a given repository, filtered by distribution. ### Method GET ### Endpoint /api/v1/repos/:user_id/:repo/stats/installs/:distro/series/:interval.json ### Parameters #### Path Parameters - **user_id** (string) - Required - The user this repo belongs to. - **repo** (string) - Required - The name of this repository. - **distro** (string) - Required - The name of the distribution to filter repository installs by (i.e. ubuntu). - **interval** (string) - Required - The interval for the time series (e.g., 'weekly'). #### Query Parameters - **start_date** (string) - Optional - ISO8601 starting date, like 20160231Z. - **end_date** (string) - Optional - ISO8601 ending date, like 20160231Z. - **master_token** (string) - Optional - The master token name or id to filter repository installs by. - **user_agent** (string) - Optional - The user_agent to filter repository installs by. ### Response #### Success Response (200) - RepositoryInstalls JSON object containing the details of repository installs. #### Response Example { "20160221Z": 22, "20160222Z": 21, "20160223Z": 29, "20160224Z": 19, "20160225Z": 30, "20160226Z": 38, "20160227Z": 40 } ``` -------------------------------- ### packagecloud CLI Help Source: https://packagecloud.io/docs Access the built-in help for the packagecloud CLI tool. ```bash > package_cloud help ```