Skip to content

Requests that a device be updated to the given firmware channel and or version​

POST
/devices/{id}/firmware/update

Authorizations​

ApiKeyAuth

API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See Authentication for more details.

Type
API Key (header: Authorization)
Example"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Parameters​

Path Parameters

id*

Device ID

Type
integer
Required

Request Body​

application/json
JSON
{
  
"availability": 0,
  
"build": "string",
  
"channel": "string"
}

Request example

Responses​

OK

application/json
JSON
{
  
"availability": 0,
  
"build": "string",
  
"channel": "string"
}
Try this endpoint

Playground​

Authorization
Variables
Key
Value
Body

OpenAPI definition ​

References are expanded below, except recursive definitions and references with sibling fields. Documentation overrides are included. Full original OpenAPI spec (JSON).

View endpoint OpenAPI definition
yaml
info:
  title: Lightbug API
  version: '2'
externalDocs:
  description: ''
  url: ''
openapi: 3.1.0
servers:
  - url: https://api.lightbug.cloud/v2
security:
  - ApiKeyAuth: []
tags: []
paths:
  /devices/{id}/firmware/update:
    post:
      parameters:
        - description: Device ID
          in: path
          name: id
          required: true
          schema:
            type: integer
requestBody:
yaml
        content:
          application/json:
            schema:
              properties:
                availability:
                  description: |-
                    The availability of the update
                    0 - No update available, or no priority given to the update
                    2 - Update available (minor or un-important), Device may check-in to download if it wants to
                    4 - Update available (major), Device may check-in to download, could be useful, but not critical
                    6 - Update available (critical), Device will check-in to download, this is critical and should be done ASAP
                    9 - Force check-in (maybe an update, maybe not...)
                  type: integer
                build:
                  description: |-
                    A build to update to now.
                    Can be specific, such as 123, or a special value such as "latest"
                    If passed with a channel, the build must be available in that channel
                  type: string
                channel:
                  description: Channel to to use for future updates for the device
                  type: string
              type: object
        description: Request
        required: true
yaml
      responses:
'200':
yaml
          content:
            application/json:
              schema:
                properties:
                  availability:
                    description: |-
                      The availability of the update
                      0 - No update available, or no priority given to the update
                      2 - Update available (minor or un-important), Device may check-in to download if it wants to
                      4 - Update available (major), Device may check-in to download, could be useful, but not critical
                      6 - Update available (critical), Device will check-in to download, this is critical and should be done ASAP
                      9 - Force check-in (maybe an update, maybe not...)
                    type: integer
                  build:
                    description: |-
                      A build to update to now.
                      Can be specific, such as 123, or a special value such as "latest"
                      If passed with a channel, the build must be available in that channel
                    type: string
                  channel:
                    description: Channel to to use for future updates for the device
                    type: string
                type: object
          description: OK
'400':
yaml
          content:
            application/json:
              schema:
                properties:
                  code:
                    example: 400
                    type: integer
                  message:
                    example: status bad request
                    type: string
                type: object
          description: Bad Request
'401':
yaml
          content:
            application/json:
              schema:
                properties:
                  code:
                    example: 400
                    type: integer
                  message:
                    example: status bad request
                    type: string
                type: object
          description: Unauthorized
'404':
yaml
          content:
            application/json:
              schema:
                properties:
                  code:
                    example: 400
                    type: integer
                  message:
                    example: status bad request
                    type: string
                type: object
          description: Not Found
'429':
yaml
          content:
            application/json:
              schema:
                type: string
          description: Limit exceeded
          headers:
            X-Ratelimit-Limit:
              schema:
                type: integer
            X-Ratelimit-Remaining:
              schema:
                type: integer
            X-Ratelimit-Reset:
              schema:
                type: integer
yaml
      security:
        - ApiKeyAuth: []
      summary: Requests that a device be updated to the given firmware channel and or version
      tags:
        - devices
      operationId: post-devices-id-firmware-update
components:
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: Authorization
      type: apiKey
      description: API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See <a href='/apis/authentication'>Authentication</a> for more details.
      example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...