Skip to main content

Deployments

Roll a runtime out to a cohort of devices and track per-device deployment status.

Endpoints

MethodPathDescription
GET/api/orgs/{org_id}/projects/{project_id}/deploymentsList deployments
POST/api/orgs/{org_id}/projects/{project_id}/deploymentsCreate a deployment
GET/api/orgs/{org_id}/projects/{project_id}/deployments/{id}Get a deployment
PUT/api/orgs/{org_id}/projects/{project_id}/deployments/{id}Update a deployment (PUT)
DELETE/api/orgs/{org_id}/projects/{project_id}/deployments/{id}Delete a deployment
POST/api/orgs/{org_id}/projects/{project_id}/deployments/{id}/cancelCancel a deployment
GET/api/orgs/{org_id}/projects/{project_id}/deployments/{id}/devicesList a deployment's devices

List deployments

GET /api/orgs/{org_id}/projects/{project_id}/deployments

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.
project_idstring (uuid)Project UUID.

Query parameters:

NameTypeRequiredDescription
searchstringNo
statusstringNo
cohort_idstringNo
cursorstringNoOpaque pagination cursor from a prior response's meta.after/meta.before.
limitintegerNoMax items per page (clamped 1–100). Defaults to 20. Range 1–100.
directionstringNoPage direction relative to the cursor. One of: after, before. Defaults to "after".

Responses:

StatusBodyDescription
200data: array of Deployment, meta: PaginationMetaDeployments.

Example request:

curl "https://connect.peridio.com/api/orgs/{org_id}/projects/{project_id}/deployments" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": [
{
"id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"name": "string",
"description": "string",
"status": "string",
"rollout_percentage": 0,
"started_at": "2026-08-14T12:00:00Z",
"completed_at": "2026-08-14T12:00:00Z",
"tuf_repos_total": 0,
"tuf_repos_generated": 0,
"tuf_generation_started_at": "2026-08-14T12:00:00Z",
"tuf_generation_completed_at": "2026-08-14T12:00:00Z",
"project_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"cohort_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"runtime_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"created_by_user_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"device_ids": ["string"],
"filter_tags": ["string"],
"is_targeted": true,
"inserted_at": "2026-08-14T12:00:00Z",
"updated_at": "2026-08-14T12:00:00Z"
}
],
"meta": {
"after": "string",
"before": "string",
"has_next": true,
"has_previous": true,
"total": 0
}
}

Create a deployment

POST /api/orgs/{org_id}/projects/{project_id}/deployments

Admin only. Targets a cohort, optionally narrowed by device_ids or filter_tags.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.
project_idstring (uuid)Project UUID.

Request body:

FieldTypeRequiredDescription
deploymentobjectYes
deployment.namestringYes
deployment.descriptionstringNo
deployment.cohort_idstring (uuid)Yes
deployment.runtime_idstring (uuid)Yes
deployment.rollout_percentageintegerNoDefaults to 0. Range 0–100.
deployment.device_idsstring (uuid)[]NoExplicit device targeting.
deployment.filter_tagsstring[]NoTag-based targeting.

Responses:

StatusBodyDescription
201data: DeploymentCreated.
422ValidationErrorRequest body failed validation.

Example request:

curl -X POST "https://connect.peridio.com/api/orgs/{org_id}/projects/{project_id}/deployments" \
-H "Authorization: Bearer $AVOCADO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"deployment": {
"name": "string",
"description": "string",
"cohort_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"runtime_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"rollout_percentage": 0,
"device_ids": [
"0198a2e6-6f24-7cc3-b456-663cd21c4b12"
],
"filter_tags": [
"string"
]
}
}'

Example response (201):

{
"data": {
"id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"name": "string",
"description": "string",
"status": "string",
"rollout_percentage": 0,
"started_at": "2026-08-14T12:00:00Z",
"completed_at": "2026-08-14T12:00:00Z",
"tuf_repos_total": 0,
"tuf_repos_generated": 0,
"tuf_generation_started_at": "2026-08-14T12:00:00Z",
"tuf_generation_completed_at": "2026-08-14T12:00:00Z",
"project_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"cohort_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"runtime_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"created_by_user_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"device_ids": ["string"],
"filter_tags": ["string"],
"is_targeted": true,
"inserted_at": "2026-08-14T12:00:00Z",
"updated_at": "2026-08-14T12:00:00Z"
}
}

Get a deployment

GET /api/orgs/{org_id}/projects/{project_id}/deployments/{id}

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.
project_idstring (uuid)Project UUID.
idstring

Responses:

StatusBodyDescription
200data: DeploymentDeployment.
404ErrorResource not found.

Example request:

curl "https://connect.peridio.com/api/orgs/{org_id}/projects/{project_id}/deployments/{id}" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": {
"id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"name": "string",
"description": "string",
"status": "string",
"rollout_percentage": 0,
"started_at": "2026-08-14T12:00:00Z",
"completed_at": "2026-08-14T12:00:00Z",
"tuf_repos_total": 0,
"tuf_repos_generated": 0,
"tuf_generation_started_at": "2026-08-14T12:00:00Z",
"tuf_generation_completed_at": "2026-08-14T12:00:00Z",
"project_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"cohort_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"runtime_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"created_by_user_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"device_ids": ["string"],
"filter_tags": ["string"],
"is_targeted": true,
"inserted_at": "2026-08-14T12:00:00Z",
"updated_at": "2026-08-14T12:00:00Z"
}
}

Update a deployment (PUT)

PUT /api/orgs/{org_id}/projects/{project_id}/deployments/{id}

Admin only. Same handler as PATCH. Supports status transitions (e.g. activation) and field edits.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.
project_idstring (uuid)Project UUID.
idstring

Request body:

FieldTypeRequiredDescription
deploymentobjectYes
deployment.namestringNo
deployment.descriptionstringNo
deployment.statusstringNo
deployment.rollout_percentageintegerNo

Responses:

StatusBodyDescription
200data: DeploymentUpdated.
404ErrorResource not found.
422ValidationErrorRequest body failed validation.

Example request:

curl -X PUT "https://connect.peridio.com/api/orgs/{org_id}/projects/{project_id}/deployments/{id}" \
-H "Authorization: Bearer $AVOCADO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"deployment": {
"name": "string",
"description": "string",
"status": "string",
"rollout_percentage": 0
}
}'

Example response (200):

{
"data": {
"id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"name": "string",
"description": "string",
"status": "string",
"rollout_percentage": 0,
"started_at": "2026-08-14T12:00:00Z",
"completed_at": "2026-08-14T12:00:00Z",
"tuf_repos_total": 0,
"tuf_repos_generated": 0,
"tuf_generation_started_at": "2026-08-14T12:00:00Z",
"tuf_generation_completed_at": "2026-08-14T12:00:00Z",
"project_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"cohort_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"runtime_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"created_by_user_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"device_ids": ["string"],
"filter_tags": ["string"],
"is_targeted": true,
"inserted_at": "2026-08-14T12:00:00Z",
"updated_at": "2026-08-14T12:00:00Z"
}
}

Delete a deployment

DELETE /api/orgs/{org_id}/projects/{project_id}/deployments/{id}

Admin only.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.
project_idstring (uuid)Project UUID.
idstring

Responses:

StatusBodyDescription
200OkDeleted.
404ErrorResource not found.

Example request:

curl -X DELETE "https://connect.peridio.com/api/orgs/{org_id}/projects/{project_id}/deployments/{id}" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"ok": true
}

Cancel a deployment

POST /api/orgs/{org_id}/projects/{project_id}/deployments/{id}/cancel

Admin only.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.
project_idstring (uuid)Project UUID.
idstring

Responses:

StatusBodyDescription
200data: DeploymentCancelled.
404ErrorResource not found.

Example request:

curl -X POST "https://connect.peridio.com/api/orgs/{org_id}/projects/{project_id}/deployments/{id}/cancel" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": {
"id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"name": "string",
"description": "string",
"status": "string",
"rollout_percentage": 0,
"started_at": "2026-08-14T12:00:00Z",
"completed_at": "2026-08-14T12:00:00Z",
"tuf_repos_total": 0,
"tuf_repos_generated": 0,
"tuf_generation_started_at": "2026-08-14T12:00:00Z",
"tuf_generation_completed_at": "2026-08-14T12:00:00Z",
"project_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"cohort_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"runtime_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"created_by_user_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"device_ids": ["string"],
"filter_tags": ["string"],
"is_targeted": true,
"inserted_at": "2026-08-14T12:00:00Z",
"updated_at": "2026-08-14T12:00:00Z"
}
}

List a deployment's devices

GET /api/orgs/{org_id}/projects/{project_id}/deployments/{id}/devices

Lists the devices targeted by the deployment and their per-device status. Before activation, returns preview rows (with deployment_device: null).

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.
project_idstring (uuid)Project UUID.
idstring

Query parameters:

NameTypeRequiredDescription
sort_bystringNo
sort_dirstringNoOne of: asc, desc.
cursorstringNoOpaque pagination cursor from a prior response's meta.after/meta.before.
limitintegerNoMax items per page (clamped 1–100). Defaults to 20. Range 1–100.
directionstringNoPage direction relative to the cursor. One of: after, before. Defaults to "after".

Responses:

StatusBodyDescription
200data: array of DeploymentDeviceRow, meta: PaginationMetaDevices.

Example request:

curl "https://connect.peridio.com/api/orgs/{org_id}/projects/{project_id}/deployments/{id}/devices" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": [
{
"device": {
"id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"name": "string",
"identifier": "string",
"status": "string",
"last_seen_at": "2026-08-14T12:00:00Z",
"shadow_runtime_build_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12"
},
"deployment_device": {
"status": "string"
}
}
],
"meta": {
"after": "string",
"before": "string",
"has_next": true,
"has_previous": true,
"total": 0
}
}

Object reference

Deployment

FieldTypeDescription
idstring
namestring
descriptionstringNullable.
statusstring
rollout_percentageintegerNullable.
started_atstring (date-time)Nullable.
completed_atstring (date-time)Nullable.
tuf_repos_totalintegerNullable.
tuf_repos_generatedintegerNullable.
tuf_generation_started_atstring (date-time)Nullable.
tuf_generation_completed_atstring (date-time)Nullable.
project_idstring
cohort_idstringNullable.
runtime_idstring
created_by_user_idstringNullable.
device_idsstring[]Explicit device targeting; null for cohort-wide. Nullable.
filter_tagsstring[]Tag-based targeting. Nullable.
is_targetedbooleanTrue when device_ids or filter_tags is set.
inserted_atstring (date-time)
updated_atstring (date-time)

PaginationMeta

Cursor pagination metadata. Present only when the request supplied a pagination param (cursor, limit, or direction); otherwise the full list is returned unpaginated with no meta.

FieldTypeDescription
afterstringOpaque cursor for the next page. Pass back as ?cursor=. Nullable.
beforestringOpaque cursor for the previous page. Nullable.
has_nextboolean
has_previousboolean
totalintegerNullable.

ValidationError

Changeset validation error. Keys are field names; values are lists of messages.

FieldTypeDescription
errorsobject

Error

Standard error envelope.

FieldTypeDescription
errorstringMachine-readable error code.
messagestringHuman-readable explanation.

Ok

Simple acknowledgement.

FieldTypeDescription
okboolean

DeploymentDeviceRow

FieldTypeDescription
deviceobject
device.idstring
device.namestringNullable.
device.identifierstring
device.statusstring
device.last_seen_atstring (date-time)Nullable.
device.shadow_runtime_build_idstringNullable.
deployment_deviceobjectNull for preview (pre-activation) rows. Nullable.
deployment_device.statusstring