Publish a firmware release
POST
/firmware/releases
const url = 'https://localhost:8080/api/v1/firmware/releases';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"notes":"Adds secure BLE pairing.","sha256":"53ff9481b8ea2e8ec2c9533432c1e66df99c68a0a9e3079dc455547b13d39346","size":1600800,"url":"https://github.com/open-aiq/aqs-device/releases/download/v0.2.0/device_rust.bin","version":"0.2.0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://localhost:8080/api/v1/firmware/releases \ --header 'Content-Type: application/json' \ --data '{ "notes": "Adds secure BLE pairing.", "sha256": "53ff9481b8ea2e8ec2c9533432c1e66df99c68a0a9e3079dc455547b13d39346", "size": 1600800, "url": "https://github.com/open-aiq/aqs-device/releases/download/v0.2.0/device_rust.bin", "version": "0.2.0" }'Registers an OTA image hosted at an HTTPS URL. Called by the device release pipeline with the FIRMWARE_PUBLISH_TOKEN bearer token. Owners are then offered the update in the app.
Request Body
Section titled “Request Body”Release metadata
Media typeapplication/json
object
notes
string
Example
Adds secure BLE pairing.sha256
required
string
Example
53ff9481b8ea2e8ec2c9533432c1e66df99c68a0a9e3079dc455547b13d39346size
required
integer
Example
1600800url
required
string
Example
https://github.com/open-aiq/aqs-device/releases/download/v0.2.0/device_rust.binversion
required
string
Example
0.2.0Responses
Section titled “Responses”Created
Media typeapplication/json
object
data
object
created_at
string
id
string
notes
string
sha256
string
size
integer
url
string
version
string
Example
{ "data": { "size": 1600800, "version": "0.2.0" }}Unauthorized
Media typeapplication/json
object
detail
string
errors
Array<object>
object
code
string
detail
string
in
string
name
string
instance
string
status
integer
title
string
type
string
Example
{ "detail": "One or more request values are invalid.", "errors": [ { "code": "required", "detail": "name is required", "in": "body", "name": "name" } ], "instance": "/api/v1/devices", "status": 422, "title": "Request validation failed", "type": "https://docs.air-iq.net/reference/errors/#validation-error"}Conflict
Media typeapplication/json
object
detail
string
errors
Array<object>
object
code
string
detail
string
in
string
name
string
instance
string
status
integer
title
string
type
string
Example
{ "detail": "One or more request values are invalid.", "errors": [ { "code": "required", "detail": "name is required", "in": "body", "name": "name" } ], "instance": "/api/v1/devices", "status": 422, "title": "Request validation failed", "type": "https://docs.air-iq.net/reference/errors/#validation-error"}Unsupported Media Type
Media typeapplication/json
object
detail
string
errors
Array<object>
object
code
string
detail
string
in
string
name
string
instance
string
status
integer
title
string
type
string
Example
{ "detail": "One or more request values are invalid.", "errors": [ { "code": "required", "detail": "name is required", "in": "body", "name": "name" } ], "instance": "/api/v1/devices", "status": 422, "title": "Request validation failed", "type": "https://docs.air-iq.net/reference/errors/#validation-error"}Unprocessable Entity
Media typeapplication/json
object
detail
string
errors
Array<object>
object
code
string
detail
string
in
string
name
string
instance
string
status
integer
title
string
type
string
Example
{ "detail": "One or more request values are invalid.", "errors": [ { "code": "required", "detail": "name is required", "in": "body", "name": "name" } ], "instance": "/api/v1/devices", "status": 422, "title": "Request validation failed", "type": "https://docs.air-iq.net/reference/errors/#validation-error"}Internal Server Error
Media typeapplication/json
object
detail
string
errors
Array<object>
object
code
string
detail
string
in
string
name
string
instance
string
status
integer
title
string
type
string
Example
{ "detail": "One or more request values are invalid.", "errors": [ { "code": "required", "detail": "name is required", "in": "body", "name": "name" } ], "instance": "/api/v1/devices", "status": 422, "title": "Request validation failed", "type": "https://docs.air-iq.net/reference/errors/#validation-error"}