This guide describes interactions with Jaws Deploy platform programmatically via its RESTful API.
The API is focused on creating, deploying and promoting releases. More API endpoints related to topology management are coming soon.
When issuing a request append the specific request endpoint to this base URL:
https://app.jawsdeploy.net/api
All endpoints are protected with Basic Authentication. In order to authenticate against the API:
When issuing an HTTP request attach the following request header:
Authorization: Basic <credentials>
where <credentials>
is a string created by base-64 encoding login and API key delimited by a single colon. Pseudo-code:
request.Headers["Authorization"] =
"Basic " +
Base64_Encode("{login}:{apiKey}");
In case the credentials header is missing or is incorrect, the following response will be returned:
401 Unauthorized
{
"error": "invalid credentials",
"errorcode": 2002,
"requestid": null
}
More information on creating the <credentials>
token:
RFC 7617 - The 'Basic' HTTP Authentication Scheme (ietf.org)
HTTP authentication - HTTP | MDN (mozilla.org)
POST
, PUT
and DELETE
requests accept JSON-encoded bodies. Use the following request header when issuing these type of requests:
Content-Type: application/json
GET
requests accept parameters in the query string.
The API responds with JSON-encoded bodies and standard HTTP status codes:
200 OK
when the request was successfully processed.400 Bad request
when the request body is missing, when it is invalid (e.g. does not include required parameters) or when JSON content is malformed.401 Unauthorized
when authentication fails (e.g. incorrect API key was used, or the API key did not have sufficient access rights).415 Unsupported Media Type
when the Content-Type
header was incorrect for endpoints that expect JSON payload (POST
, PUT
and DELETE
).
UnknownError = 1001
InvalidAccessToken = 2001
InvalidCredentials = 2002
InsufficientPermissions = 2003
InvalidParameter = 3001
This API endpoint creates a new release of a specific project. Release is an entity that represents state of the project (including a snapshot of all variable values and step logic). This endpoint does not trigger a deployment. Response includes releaseId
which can be used to execute a deployment.
Default
- this channel will be used, but only when request field ignoreDefaultChannel
is not specified, or set to false
. When this field is set to true
then the default channel will not be selected for this release (even if such channel exists in the project).ignoreDefaultChannel=true
then release will be created without a channel, which means it can be deployed freely to any environment in this workspacetrue
to create a release without a channel, even if the project has a channel tagged as Default
.POST /release
{
"version": "1.2.7023-RC1",
"projectId": "a39dc3b5-39b2-478d-a179-51660813a5ff",
"channelName": "NameOfTheChannel",
"ignoreDefaultChannel": true,
"notes": "Release notes",
"packageVersions":
{
"package-01": "2.5.66-alpha",
"package-02": "0.0.999"
}
}
{
"releaseId": "b34732f4-bcad-4b7f-a26b-a771cc7457ff"
}
This API endpoint deploys an existing release to specified environments or using specific lifecycle phase. After successful execution the response will include a list of deployment IDs which you can later use to check the deployments status.
environments
must be provided.environments
instead.phaseName
must be provided.POST /release/deploy
{
"releaseId": "b34732f4-bcad-4b7f-a26b-a771cc7457ff",
"phaseName": "First phase",
"environmentName": "Staging",
"environments": ["Staging", "UAT"],
"redownloadPackages": false,
"deploymentDateUnixMillis": 1744308919000,
"excludeStepNames": ["step A", "step C"]
}
{
"deploymentIds": [
"603af550-e241-4a3f-9545-5971c2f455ff",
"603af550-e241-4a3f-9545-5971c2f45500"
]
}
This API endpoint deploys a specific release version of a given project to specified environments or using specific lifecycle phase. If no release version is provided then Jaws Deploy will pick an existing release with the highest version number (according to SemVer 2.0 rules). In such case the specified project needs to have at least one release. Otherwise an error will occur.
This endpoint is especially useful in CI/CD scenarios, where the build server does not track Jaws Deploy release identifiers. In such case it is enough to provide only project ID and the environment name to promote the latest release.
Similar to Release - Deploy response contains unique identifier of the created deployment entity.
Release version comparison and sorting is based on SemVer 2.0. More information: Semantic Versioning 2.0.0 | Semantic Versioning (semver.org)
environments
must be provided.environments
instead.phaseName
must be provided.POST /release/promote
{
"projectId": "139118d5-bcac-4c92-b1d1-da755d7e78ff",
"version": "1.0.5-rc2",
"phaseName": "First phase",
"environmentName": "Staging",
"environments": ["Staging", "UAT"],
"redownloadPackages": false,
"deploymentDateUnixMillis": 1744308919000,
"excludeStepNames": ["step A", "step C"]
}
{
"deploymentIds": [
"603af550-e241-4a3f-9545-5971c2f455ff",
"603af550-e241-4a3f-9545-5971c2f45500"
]
}
This API endpoint returns deployment status and logs based on deployment unique identifier.
GET /deployment?
deploymentId=603af550-e241-4a3f-9545-5971c2f455ff
&skipLogs=true
&getLogsAfter=1744308919000
Status
property: Queued, Running, Completed, Failed, Cancelled, Validating, AwaitingSlot
LogLevel
property:Trace,Debug, Information, Warning, Error, Critical, None
{
"status": {
"Status": "Completed",
"ErrorCount": 0,
"WarningCount": 0,
"LastLogDate": "2024-08-12T08:39:20.443063+00:00",
"LastLogDateTick": 638590487604430630,
"LastUpdate": "2024-08-12T08:39:20.448381+00:00",
"CancellationRequestedDate": null,
"LastAttemptDate": "2024-08-12T08:39:10.204873+00:00",
"CompleteDate": "2024-08-12T08:39:20.448381+00:00"
},
"logs": [
{
"CreatedLocalTime": null,
"CreatedUtc": "2024-08-12T08:39:10.215781+00:00",
"CreatedUtcTick": 638590487502157810,
"Data": "Deployment starting",
"DeploymentId": "c49f8f8b-7db4-4062-83c6-4a7c7f09a570",
"DeploymentMonitorId": null,
"ErrorCount": 0,
"WarningCount": 0,
"ExceptionData": null,
"Id": "87d2f661-bed0-455a-a0f6-deb6a9b8f2c5",
"LogLevel": "Information",
"ParentLogId": null,
"StepId": null
},
...
]
}
This API endpoint interrupts and cancels a pending deployment based on unique deployment identifier.
POST /deployment/cancel
{
"deploymentId" : "f17ed947-8f62-4984-9f6d-ed9d7413966f"
}
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:
This endpoint will read uploaded file name to determine:
major.minor.patch-[pre-release]
Example
Uploading a file namedJawsDeploy-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.
POST /packagestore/package
Content-Type: multipart/form-data; boundary=<calculatePerRequest>
workspaceId=f17ed947-8f62-4984-9f6d-ed9d7413966f
<PackgeFile>