Assign firmware
POST
/firmware-assignments
const url = 'https://app.buildtrace.eu/api/firmware-assignments';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"componentTypeId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","firmwareVersionId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","fleetId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","deviceId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
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://app.buildtrace.eu/api/firmware-assignments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "componentTypeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "firmwareVersionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "fleetId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "deviceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Required scope: firmware:write.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
componentTypeId
required
string format: uuid
firmwareVersionId
required
string format: uuid
fleetId
string format: uuid
deviceId
string format: uuid
Example generated
{ "componentTypeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "firmwareVersionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "fleetId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "deviceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”Created
Bad request
Media typeapplication/json
object
error
required
string
Example generated
{ "error": "example"}Unauthorized
Not found
The version is for a different component type, or is not released
Media typeapplication/json
object
error
required
string
Example generated
{ "error": "example"}