Download OpenAPI specification:
Public REST API specification
REST API that allows jobs to be run for a set of devices.
Retrieve a list of device jobs
| operationName | string (OperationName) [ 6 .. 128 ] characters ^(?!-)[a-zA-Z0-9:_-]{6,128}$ Examples:
User-defined operation name identifier, e.g. my-custom-op. Allows for querying based on that name, e.g., fetching the current execution for a specific operation, or getting a list of jobs with the same operation name. Custom names starting with "nrfcloud" are not allowed because these are reserved for internal use. |
| pageLimit | number (PageLimit) Examples:
|
| pageNextToken | string (PageToken) [ 1 .. 256 ] characters ^[^\s]{1,256}$ Examples:
Token used to retrieve the next page of items in the list. Present in a response only if the total available results exceeds the specified limit on a page. This token does not change between requests. When supplying as a request parameter, use URL-encoding. |
{- "items": [
- {
- "id": "66a2afc3-ab5b-4437-ae7c-0bf0d79c72ca",
- "name": "my-fota-job",
- "status": "IN_PROGRESS",
- "target": "my-device-group",
- "targetListType": "LOCKED",
- "document": {
- "operationName": "my-custom-op-name",
- "payload": {
- "path": "file-0.bin file-1.bin",
- "firmwareType": "APP",
- "fileSize": 150
}
}, - "configuration": {
- "executions": {
- "rollout": {
- "batchSize": 5000,
- "rate": 5
}
}
}, - "createdAt": "2024-04-16T12:34:56Z",
- "executionMetrics": {
- "queued": 39,
- "inProgress": 35,
- "timedOut": 1,
- "canceled": 0,
- "rejected": 0,
- "failed": 1,
- "succeeded": 5,
- "downloading": 11,
- "deviceCount": 100
}
}
], - "total": 1,
- "pageNextToken": "4bb1f9ab35bd"
}Create a device job
| name | string (JobName) [ 1 .. 128 ] characters ^.{1,128}$ |
| description | string (Description) [ 0 .. 1024 ] characters ^.{0,1024}$ Text describing something. Details. |
required | object (JobDocument) JSON object containing all the information a device needs to process the job. |
| target | string (JobTarget) [ 6 .. 128 ] characters ^[a-z0-9:_-]{6,128}$ Identifier for the device group targeted for this job. |
DeviceIdsTargetCriteria (object) or DeviceTagsTargetCriteria (object) or FirmwareTypeTargetCriteria (object) or FirmwareVersionsTargetCriteria (object) (JobTargetCriteria) Criteria a device must fit to be considered for a job. | |
| targetListType | string (JobTargetListType) Enum: "LOCKED" "UNLOCKED" |
object (JobSchedule) | |
object |
{- "name": "my-unscheduled-job",
- "document": {
- "operationName": "my-custom-op-name",
- "payload": {
- "path": "file-0.bin file-1.bin",
- "firmwareType": "APP",
- "fileSize": 150
}
}, - "targetCriteria": {
- "deviceIds": [
- "nrfsim-344933695104820300001"
]
}
}{- "id": "66a2afc3-ab5b-4437-ae7c-0bf0d79c72ca",
- "name": "my-fota-job",
- "status": "CREATED",
- "target": "my-device-group",
- "targetListType": "LOCKED",
- "document": {
- "operationName": "my-custom-op-name",
- "payload": {
- "path": "file-0.bin file-1.bin",
- "firmwareType": "APP",
- "fileSize": 150
}
}, - "configuration": {
- "executions": {
- "rollout": {
- "batchSize": 5000,
- "rate": 5
}
}
}, - "createdAt": "2024-04-16T12:34:56Z"
}Get information about a device job
required | NominalStringUuid (string) <uuid> (Uuid) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Examples:
Universally unique identifier |
{- "id": "66a2afc3-ab5b-4437-ae7c-0bf0d79c72ca",
- "name": "my-scheduled-job",
- "status": "IN_PROGRESS",
- "target": "my-device-group",
- "targetListType": "UNLOCKED",
- "document": {
- "operationName": "my-custom-op-name",
- "payload": {
- "path": "file-0.bin file-1.bin",
- "firmwareType": "APP",
- "fileSize": 150
}
}, - "schedule": {
- "startJobAtEpochMs": 1734907548000,
- "lockTargetListAtEpochMs": 1735080348000
}, - "configuration": {
- "executions": {
- "rollout": {
- "batchSize": 5000,
- "rate": 5
}
}
}, - "createdAt": "2024-04-16T12:34:56Z",
- "executionMetrics": {
- "queued": 39,
- "inProgress": 35,
- "timedOut": 1,
- "canceled": 0,
- "rejected": 0,
- "failed": 1,
- "succeeded": 5,
- "downloading": 11,
- "deviceCount": 100
}
}Update a job's status and target list type. Changing the status to IN_PROGRESS starts the job. Changing the status to CANCELED will cancel all currently QUEUED executions and put the job in a CANCELED state, although any IN_PROGRESS executions will continue to run. Locking a target list prevents any devices that are newly eligible for this job to be automatically added.
required | NominalStringUuid (string) <uuid> (Uuid) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Examples:
Universally unique identifier |
| name | string (JobName) [ 1 .. 128 ] characters ^.{1,128}$ |
| description | string (Description) [ 0 .. 1024 ] characters ^.{0,1024}$ Text describing something. Details. |
| status | string Enum: "IN_PROGRESS" "CANCELED" "ARCHIVED" |
| statusDetail | string (Description) [ 0 .. 1024 ] characters ^.{0,1024}$ Text describing something. Details. |
| targetListType | string Enum: "LOCKED" "UNLOCKED" |
{- "status": "CANCELED"
}Cancel all executions in a FAILED or TIMED_OUT status, then create new job to retry.
required | NominalStringUuid (string) <uuid> (Uuid) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Examples:
Universally unique identifier |
{- "id": "66a2afc3-ab5b-4437-ae7c-0bf0d79c72ca",
- "name": "Retry my-fota-job",
- "status": "IN_PROGRESS",
- "targetListType": "LOCKED",
- "document": {
- "operationName": "my-custom-op-name",
- "payload": {
- "path": "file-0.bin file-1.bin",
- "firmwareType": "APP",
- "fileSize": 150
}
}, - "configuration": {
- "executions": {
- "rollout": {
- "batchSize": 5000,
- "rate": 5
}
}
}, - "createdAt": "2024-04-16T12:34:56Z"
}Get a list of job executions for a device job
required | NominalStringUuid (string) <uuid> (Uuid) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Examples:
Universally unique identifier |
| status | string (JobExecutionStatus) Enum: "QUEUED" "IN_PROGRESS" "TIMED_OUT" "CANCELED" "REJECTED" "FAILED" "SUCCEEDED" "DOWNLOADING" Examples:
|
| pageLimit | number (PageLimit) Examples:
|
| pageNextToken | string (PageToken) [ 1 .. 256 ] characters ^[^\s]{1,256}$ Examples:
Token used to retrieve the next page of items in the list. Present in a response only if the total available results exceeds the specified limit on a page. This token does not change between requests. When supplying as a request parameter, use URL-encoding. |
Example response for getting a list of job executions for jobId 5aa580be-fbfd-452d-aca0-cccc7894c4a9.
{- "items": [
- {
- "id": "52eb33a0-101b-4034-a515-dfbf43be754e",
- "jobId": "5aa580be-fbfd-452d-aca0-cccc7894c4a9",
- "deviceInfo": {
- "deviceId": "d44ff5ee-c3eb-4ea7-ab14-c238793810a9"
}, - "status": "IN_PROGRESS",
- "retryable": true,
- "createdAt": "2024-04-16T12:45:00Z",
- "tenantId": "dc6ec7f2-b930-4165-90d0-9003234378a2"
}
], - "total": 1,
- "pageNextToken": "def456"
}This operation only affects job executions that are in the following states: QUEUED, TIMED_OUT, FAILED.
If no device IDs are specified in the request body, all job executions will be updated.
required | NominalStringUuid (string) <uuid> (Uuid) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Examples:
Universally unique identifier |
| status | string Enum: "QUEUED" "CANCELED" |
| detail | string (Description) [ 0 .. 1024 ] characters ^.{0,1024}$ Text describing something. Details. |
Array of NominalStringDeviceId (string) (DeviceId) [ 1 .. 100 ] items [ items [ 1 .. 128 ] characters ^[a-zA-Z0-9:_-]{1,128}$ ] |
{- "status": "CANCELED",
- "deviceIds": [
- "device1",
- "device2"
]
}Cancel all executions in a FAILED or TIMED_OUT status, then create new job to retry.
required | NominalStringUuid (string) <uuid> (Uuid) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Examples:
Universally unique identifier |
{- "id": "66a2afc3-ab5b-4437-ae7c-0bf0d79c72ca",
- "name": "Retry my-fota-job",
- "status": "IN_PROGRESS",
- "targetListType": "LOCKED",
- "document": {
- "operationName": "my-custom-op-name",
- "payload": {
- "path": "file-0.bin file-1.bin",
- "firmwareType": "APP",
- "fileSize": 150
}
}, - "configuration": {
- "executions": {
- "rollout": {
- "batchSize": 5000,
- "rate": 5
}
}
}, - "createdAt": "2024-04-16T12:34:56Z"
}Get list of job executions for a device in a job
required | NominalStringUuid (string) <uuid> (Uuid) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Examples:
Universally unique identifier |
required | NominalStringDeviceId (string) (DeviceId) [ 1 .. 128 ] characters ^[a-zA-Z0-9:_-]{1,128}$ Examples:
This is the canonical device id used in the device certificate, and as the MQTT client id. |
| pageLimit | number (PageLimit) Examples:
|
| pageNextToken | string (PageToken) [ 1 .. 256 ] characters ^[^\s]{1,256}$ Examples:
Token used to retrieve the next page of items in the list. Present in a response only if the total available results exceeds the specified limit on a page. This token does not change between requests. When supplying as a request parameter, use URL-encoding. |
Example response for getting a list of job executions for jobId 5aa580be-fbfd-452d-aca0-cccc7894c4a9 and deviceId nrf-1234567890123456789000.
{- "items": [
- {
- "id": "52eb33a0-101b-4034-a515-dfbf43be754e",
- "jobId": "5aa580be-fbfd-452d-aca0-cccc7894c4a9",
- "deviceInfo": {
- "deviceId": "nrf-1234567890123456789000"
}, - "status": "IN_PROGRESS",
- "retryable": true,
- "createdAt": "2024-04-16T12:45:00Z",
- "tenantId": "dc6ec7f2-b930-4165-90d0-9003234378a2"
}
], - "total": 1,
- "pageNextToken": "def456"
}By default, this operation updates the current job execution. For updating a specific job execution, specify the execution ID in the request body.
required | NominalStringUuid (string) <uuid> (Uuid) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Examples:
Universally unique identifier |
required | NominalStringDeviceId (string) (DeviceId) [ 1 .. 128 ] characters ^[a-zA-Z0-9:_-]{1,128}$ Examples:
This is the canonical device id used in the device certificate, and as the MQTT client id. |
NominalStringUuid (string) <uuid> (Uuid) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Universally unique identifier | |
| status | string (JobExecutionStatus) Enum: "QUEUED" "IN_PROGRESS" "TIMED_OUT" "CANCELED" "REJECTED" "FAILED" "SUCCEEDED" "DOWNLOADING" |
| detail | string (Description) [ 0 .. 1024 ] characters ^.{0,1024}$ Text describing something. Details. |
{- "id": "61fc1cd5-b789-4167-8892-12c8d92f94dd",
- "status": "TIMED_OUT",
- "detail": "failed to fetch bundle"
}Get list of job executions for a device
required | NominalStringDeviceId (string) (DeviceId) [ 1 .. 128 ] characters ^[a-zA-Z0-9:_-]{1,128}$ Examples:
This is the canonical device id used in the device certificate, and as the MQTT client id. |
| pageLimit | number (PageLimit) Examples:
|
| pageNextToken | string (PageToken) [ 1 .. 256 ] characters ^[^\s]{1,256}$ Examples:
Token used to retrieve the next page of items in the list. Present in a response only if the total available results exceeds the specified limit on a page. This token does not change between requests. When supplying as a request parameter, use URL-encoding. |
Example response for getting a list of job executions for deviceId nrf-1234567890123456789000.
{- "items": [
- {
- "id": "52eb33a0-101b-4034-a515-dfbf43be754e",
- "jobId": "5aa580be-fbfd-452d-aca0-cccc7894c4a9",
- "deviceInfo": {
- "deviceId": "nrf-1234567890123456789000"
}, - "status": "IN_PROGRESS",
- "retryable": true,
- "createdAt": "2024-04-16T12:45:00Z",
- "tenantId": "dc6ec7f2-b930-4165-90d0-9003234378a2"
}
], - "total": 1,
- "pageNextToken": "def456"
}Get the current device job execution for a device
required | NominalStringDeviceId (string) (DeviceId) [ 1 .. 128 ] characters ^[a-zA-Z0-9:_-]{1,128}$ Examples:
This is the canonical device id used in the device certificate, and as the MQTT client id. |
| operationName | string (OperationName) [ 6 .. 128 ] characters ^(?!-)[a-zA-Z0-9:_-]{6,128}$ Examples:
User-defined operation name identifier, e.g. my-custom-op. Allows for querying based on that name, e.g., fetching the current execution for a specific operation, or getting a list of jobs with the same operation name. Custom names starting with "nrfcloud" are not allowed because these are reserved for internal use. |
{- "id": "52eb33a0-101b-4034-a515-dfbf43be754e",
- "jobId": "5aa580be-fbfd-452d-aca0-cccc7894c4a9",
- "deviceInfo": {
- "deviceId": "d44ff5ee-c3eb-4ea7-ab14-c238793810a9"
}, - "status": "IN_PROGRESS",
- "retryable": true,
- "createdAt": "2024-04-16T12:45:00Z",
- "tenantId": "dc6ec7f2-b930-4165-90d0-9003234378a2"
}Upload a bundle as a .zip file, whether binary or base64-encoded. The bundle must contain a manifest.json file that conforms to this JSON schema:
{
name?: string,
description?: string,
fwversion: string,
'format-version': 1,
files: {
file: string,
size: number
}[]
}
Notes:
? fields are optionalfiles is an array of objects, all of which should be of the same type.type values application and mcuboot apply only to nRF91 FOTA. Values softdevice and init_packet apply only to Bluetooth LE FOTA..zip file must contain both the init_packet and the firmware image (application or soft device). The type field for the manifest must be application or softdevice, not init_packet.'format-version' should always be set to 1fwversion is validated against this regular expression: /^[a-zA-Z0-9._-]{1,30}$/fwversion field, so you will need to add that field.name, description, and fwversion fields. The UI will then properly generate the manifest.json file and zip file.An example of a valid manifest:
{
"name": "My application update",
"description": "Changelog: Fixed an issue with sleep mode. Power consumption improvements.",
"fwversion": "1.1",
"format-version": 1,
"files": [
{
"file": "my_application_v1_1.hex.bin",
"type": "application",
"size": 695672
}
]
}
Following are examples of uploading with curl (base64 and binary):
export FILE=$(base64 path/to/my-file.zip)
# If you get a console error such as "Argument list too long" try using a REST client like Postman.
curl -X POST $API_HOST/bundles -H "Authorization: Bearer $API_KEY" -H "Content-Type: text/plain" -d $FILE
curl -X POST $API_HOST/bundles -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/zip" --data-binary @/path/to/my-file.zip
For more information, see the FOTA documentation.
Base64-encoded content.
UEsDBBQACAAIALh42FgAAAAAAAAAAAwAAAAbACAAbXlfYXBwbGljYXRpb25fdjFfMS5oZXguYmluVVQNAAe97Xlmvu15Zr3teWZ1eAsAAQT1AQAABBQAAADLSM3JyVcozy/KSeECAFBLBwgtOwivDgAAAAwAAABQSwMEFAAIAAgAtXrYWAAAAAAAAAAAKwEAAA0AIABtYW5pZmVzdC5qc29uVVQNAAd38XlmePF5ZnfxeWZ1eAsAAQT1AQAABBQAAABNj8sKwkAMRff9itC1DozLbgV3gnuRMraxDXQeTKYvi/9uZyzUTSDnnlzIkgHkRmnMC8ivMyjnOqpUIGugd7UKmB+iUiNXnlzk0Ty3yjTY2aaAC01YgzJAzD3CSKEF7hAdaFujgJsd0UNlDfc63QNp5+2AGk1g8at/jQN63sqlkBu1Xqtw3CP5w9Qhr9t9XQCWNDccz/Vc/n1RDrKUosVJPMmk2iSH2SX5z9xDpncM5SmBzzof2Sf7AlBLBwjvpMcuuQAAACsBAABQSwMEFAAIAAgAtXrYWAAAAAAAAAAAsAAAABgAIABfX01BQ09TWC8uX21hbmlmZXN0Lmpzb25VVA0AB3fxeWZ48XlmoPF5ZnV4CwABBPUBAAAEFAAAAGNgFWNnYGJg8E1MVvAPVohQgAKQGAMnEBsBcR0Qg/gbGIgCjiEhQVAmSMcCIBZAU8KIEJdKzs/VSywoyEnVy0ksLiktTk1JSSxJVQ4IBiks+FiZBqK7c9YYg2gAUEsHCHtVkvVcAAAAsAAAAFBLAQIUAxQACAAIALh42FgtOwivDgAAAAwAAAAbACAAAAAAAAAAAACkgQAAAABteV9hcHBsaWNhdGlvbl92MV8xLmhleC5iaW5VVA0AB73teWa+7Xlmve15ZnV4CwABBPUBAAAEFAAAAFBLAQIUAxQACAAIALV62FjvpMcuuQAAACsBAAANACAAAAAAAAAAAACkgXcAAABtYW5pZmVzdC5qc29uVVQNAAd38XlmePF5ZnfxeWZ1eAsAAQT1AQAABBQAAABQSwECFAMUAAgACAC1ethYe1WS9VwAAACwAAAAGAAgAAAAAAAAAAAApIGLAQAAX19NQUNPU1gvLl9tYW5pZmVzdC5qc29uVVQNAAd38XlmePF5ZqDxeWZ1eAsAAQT1AQAABBQAAABQSwUGAAAAAAMAAwAqAQAATQIAAAAA
{- "id": "87918b0b-47ac-4527-8130-bc6dbab6423c",
- "files": [
- "my_application_v1_1.hex.bin",
- "manifest.json"
], - "visibility": "PRIVATE",
- "sizeBytes": 733,
- "createdAt": "2024-04-16T12:45:00Z"
}Get a list of device job bundles
| pageLimit | number (PageLimit) Examples:
|
| pageNextToken | string (PageToken) [ 1 .. 256 ] characters ^[^\s]{1,256}$ Examples:
Token used to retrieve the next page of items in the list. Present in a response only if the total available results exceeds the specified limit on a page. This token does not change between requests. When supplying as a request parameter, use URL-encoding. |
| public | boolean Examples:
Filter by public or private bundles |
{- "items": [
- {
- "id": "52eb33a0-101b-4034-a515-dfbf43be754e",
- "files": [
- "test1.bin",
- "manifest.json"
], - "sizeBytes": 733,
- "visibility": "PUBLIC",
- "createdAt": "2024-04-16T12:45:00Z"
}
], - "total": 1,
- "pageNextToken": "def456"
}Get information about a specific bundle
required | Uuid (NominalStringUuid (string)) or LegacyBundleId (string) (GetBundleRequest) Examples:
|
{- "id": "52eb33a0-101b-4034-a515-dfbf43be754e",
- "files": [
- "update.bin",
- "manifest.json"
], - "sizeBytes": 141442,
- "visibility": "PRIVATE",
- "createdAt": "2024-04-16T12:45:00Z"
}Get list of scheduled events for a job
required | NominalStringUuid (string) <uuid> (Uuid) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Examples:
Universally unique identifier |
| pageLimit | number (PageLimit) Examples:
|
| pageNextToken | string (PageToken) [ 1 .. 256 ] characters ^[^\s]{1,256}$ Examples:
Token used to retrieve the next page of items in the list. Present in a response only if the total available results exceeds the specified limit on a page. This token does not change between requests. When supplying as a request parameter, use URL-encoding. |
Example response for getting a list of scheduled events for jobId 5aa580be-fbfd-452d-aca0-cccc7894c4a9.
{- "items": [
- {
- "id": "8815bd3d-f7c5-4f71-83c7-ebaa738b0146",
- "name": "SCHEDULED_JOB_START",
- "date": 1726254279
}
], - "total": 1,
- "pageNextToken": "def456"
}Update the trigger date of a scheduled job event
required | NominalStringUuid (string) <uuid> (Uuid) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Examples:
Universally unique identifier |
required | NominalStringUuid (string) <uuid> (Uuid) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Examples:
Universally unique identifier |
| date required | number (EpochTimeInMilliseconds) : Scheduled start or end time in milliseconds since UNIX epoch. |
{- "date": 1726512267341
}