Upload via Postman

Upload a raw package via the Cloudsmith APIs using Postman

In the following examples:

IdentifierDescription
OWNERYour Cloudsmith account name or organisation name (namespace)
REPOSITORYYour Cloudsmith Repository name (also called "slug")
USERNAMEYour Cloudsmith username
PASSWORDYour Cloudsmith password
API-KEYYour Cloudsmith API Key
PACKAGE_NAMEThe name of your package
PACKAGE_VERSIONThe version number of your package

Uploading a raw package to Cloudsmith via the URL is a 2 step process:

  1. A PUT req against the upload URL: https://upload.cloudsmith.io/OWNER/REPOSITORY/PACKAGE_NAME.
    The response to this PUT req gives you an identifier that you will need for the next stage.
  2. A POST req to https://help.cloudsmith.io/reference/packages_upload_raw

Postman is an application used for API testing. You can install Postman here

Lets see how you can upload a raw package using Postman:

PUT req against the upload URL

  1. Populate the PUT request URL https://upload.cloudsmith.io/CLOUDSMITH_ORG/CLOUDSMITH_REPO/PACKAGE_NAME
  2. Switch to the ‘Authorization’ tab and populate your credentials with either Basic Auth or your API Key
  3. Switch to the ‘Body’ tab and upload the file as a binary.
  4. Press send and receive the response.
  5. Read the identifier from the response to use in the next stage
1555

POST Raw package

  1. Populate the request with the POST url: https://api-prd.cloudsmith.io/v1/packages/CLOUDSMITH_ORG/CLOUDSMITH_REPO/upload/raw/
  2. Select the ‘Body’ tab and populate it with your JSON (NOTE: the package_file value should be populated with the identifier from the PUT response above):
    {"package_file": "IDENTIFIER", "name": "test-package", "description": "Everything about packaging files.", "summary": "My Package File", "version": "1.0"}
    package_file value has to be the same as the response from the PUT req above- it is populated in the identifier value.
  3. Switch to the ‘Authorization’ tab and populate your credentials with either Basic Auth or your API Key
  4. Press send to upload the raw package.
1531

Cloudsmith is the new standard in Package / Artifact Management and Software Distribution

With support for all major package formats, you can trust us to manage your software supply chain.


Start My Free Trial Now
Cookie Declaration (Manage Cookies)