Home / Resources / API Reference

Package store - Upload package

Use this API endpoint to upload a package to the built-in workspace package store. Every workspace has its own package store.

This endpoint accepts files and text data at the same time. For this reason you must send the payload as form-data. Read more on MDN: Sending form data - Learn web development | MDN

Supported package types:

  • NuGet (*.nupkg)
  • zip
  • tar
  • tar.gz

This endpoint will read uploaded file name to determine:

  • Package type by looking at the file extensions (see above).
  • Pacakge version by looking at the filename suffix that matches Semantic Versioning 2.0.0 scheme major.minor.patch-[pre-release]
  • Package ID by looking at the file name after removing the extension, version and the trailing dot.
Example

Uploading a file named JawsDeploy-package.1.0.5-RC2.nupkg will result in the following:

Package ID: JawsDeploy-package
Version: 1.0.5-RC2
Type: NuGet

When sending the request make sure the file name follows the naming and versioning scheme explained above. The file name is important to identify the package and version correctly and avoid unnecessary duplicates in the package store. JawsDeploy supports multiple versions of the same package stored in the built-in workspace package store.

Request

Headers
Content-Type
string
required
Custom content type is required to indicate a Form-Data formatted request.
Parameters
workspaceId
string
required
Unique workspace identifier, which you can find under Settings / Workspaces in the App UI.
PackageFile
file
required
The package file to be uploaded.
Request body

POST /packagestore/package

Content-Type: multipart/form-data; boundary=<calculatePerRequest>

workspaceId=f17ed947-8f62-4984-9f6d-ed9d7413966f


<PackgeFile>

Response

This endpoint returns an empty response body.