openapi: 3.1.0
info:
  title: Torizon OTA v2 API Endpoints
  version: '2.0'
  description: |2+

    This API is rate limited and will return the following headers for each API call.

      - X-RateLimit-Limit - The total number of requests allowed within a time period
      - X-RateLimit-Remaining - The total number of requests still allowed until the end of the rate limiting period
      - X-RateLimit-Reset - The number of seconds until the limit is fully reset

    In addition, if an API client is rate limited, it will receive a HTTP 420 response with the following header:

       - Retry-After - The number of seconds to wait until this request is allowed

servers:
- url: https://app.torizon.io/api/v2
  description: Torizon Platform API
paths:
  /devices:
    get:
      tags:
      - Devices
      summary: Query device information
      description: "\nRetrieves a list of devices in your repository. This endpoint\
        \ has two different modes of operation.\n\n* You can specify `deviceId`s and/or\
        \ `deviceUuid`s any number of times as query parameters, and all\ndevices\
        \ matching those ids will be returned.\n* You can specify a number of different\
        \ filter parameters, and only devices matching all of the\nfilter parameters\
        \ you specify will be returned. Available filter parameters:\n    * `nameContains`\n\
        \    * `hibernated`\n    * `status`\n    * `activatedAfter`\n    * `activatedBefore`\n\
        \    * `lastSeenStart`\n    * `lastSeenEnd`\n    * `createdAtStart`\n    *\
        \ `createdAtEnd`\n    * `tags`\n    * `tagRegex`\n\n    When specifying `tags`,\
        \ you cannot specify any other filter parameter. `tags` must have the format\
        \ `<tagid>=<tag value>`\n\n    The `tagRegex` parameter allows filtering devices\
        \ by tag name and a regular expression pattern for the tag value.\n    Format:\
        \ `<tag_name>=<regex_pattern>` where `tag_name` must be a valid tag identifier\
        \ ([\\w\\-_]{1,20})\n    and `regex_pattern` is a valid regular expression\
        \ (up to 50 characters) that will be matched against the tag value.\n    "
      operationId: getDevices
      parameters:
      - name: offset
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: limit
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: deviceUuid
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
      - name: deviceId
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
      - name: nameContains
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: hibernated
        in: query
        required: false
        schema:
          type:
          - boolean
          - 'null'
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/DeviceStatus'
          - type: 'null'
      - name: activatedAfter
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: date-time
      - name: activatedBefore
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: date-time
      - name: lastSeenStart
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: date-time
      - name: lastSeenEnd
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: date-time
      - name: createdAtStart
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: date-time
      - name: createdAtEnd
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: date-time
      - name: hardwareIds
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
      - name: tags
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            pattern: '[\w\-_ ]{1,20}=[\w\-_/ ]{1,50}'
      - name: tagRegex
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: sortBy
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/DeviceSort'
          - type: 'null'
      - name: sortDirection
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/DeviceSortDirection'
          - type: 'null'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationResult_DeviceInfoBasic'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
    post:
      tags:
      - Devices
      summary: Manually create a new device
      description: "\nCreates a new device in your repository, returning the device\
        \ credentials as a zipfile. This should not normally\nbe used; the usual way\
        \ to add a device is for the device itself to call this endpoint, using a\
        \ short-lived\nprovisioning token (for example, as retrieved from the [GET\
        \ /devices/token](#/Devices/getDevicesToken) endpoint).\n\nYou can use this\
        \ endpoint to create devices in bulk, but you will then have to manually provision\
        \ the individual\ncredentials onto each device.\n\n`deviceId` must be specified.\
        \ `deviceName` is optional; if not specified a random name will be generated.\n\
        The `hibernated` parameter is optional, and defaults to `false`. If `hibernated`\
        \ is set to `true`,\nthe device will automatically be placed in hibernation\
        \ mode as soon as it is created.\n\nThe `tags` field is optional. If provided,\
        \ the specified tags will be assigned to the device upon creation.\nTag keys\
        \ must match `[\\w\\-_]+` and be at most 20 characters; tag values must match\
        \ `[\\w\\-_/ ]+` and be at most 50 characters.\nRequests containing invalid\
        \ tag entries will be rejected with a 400 response.\n        "
      operationId: postDevices
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceCreateReq'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictRepr'
  /devices/token:
    get:
      tags:
      - Devices
      summary: Retrieve device provisioning token
      description: "\nRetrieves a short-lived access token that can only be used to\
        \ provision device\n\n### NOTE:\nTypical users of this API can create devices\
        \ directly with their API token and will\nhave no use for calling this endpoint.\
        \ \nThis endpoint is intended to be used to generate a short-lived access\
        \ token solely used\nto provision a device. (Like the Torizon Web App)\n \
        \               "
      operationId: getDevicesToken
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProvisionInfo'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /devices/uptane/{deviceUuid}/assignment:
    get:
      tags:
      - Devices
      summary: Show detailed information about the currently-assigned update for a
        single device
      description: "\nReturns the device's current update assignment, if any.\n\n\
        Update assignments are an Uptane concept. The assignment is what the device\
        \ will be instructed to install,\nthe next time it checks for an update. An\
        \ update assignment does not necessarily mean the device will install\nan\
        \ update. If, for example, the device reports that it already has all of the\
        \ assigned software components\ninstalled, it will take no further action.\n\
        \        "
      operationId: getDevicesUptaneDeviceuuidAssignment
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/QueueResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /devices/network:
    get:
      tags:
      - Devices
      summary: Get network information for many devices
      description: "\nRetrieves network information (local IP address, MAC, hostname)\
        \ for multiple devices. A list of devices can be specified\nas a query parameter;\
        \ if no devices are specified will return information for all devices in the\
        \ repository.\n        "
      operationId: getDevicesNetwork
      parameters:
      - name: offset
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: limit
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: deviceUuid
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationResult_NetworkInfo'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
  /devices/network/{deviceUuid}:
    get:
      tags:
      - Devices
      summary: Get network information for a single device
      description: Retrieves network information (local IP address, MAC, hostname)
        for a single device.
      operationId: getDevicesNetworkDeviceuuid
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetworkInfo'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /devices/uptane/{deviceUuid}/components:
    get:
      tags:
      - Devices
      summary: Get a list of the software components reported by a single device
      description: "\nReturns a list of the device components.\n\nComponents are an\
        \ Uptane concept. In the Uptane standard, they are normally referred to as\
        \ \"ECUs\", and\nrepresent individual discrete hardware modules in a vehicle.\
        \ In TorizonCore, we use this concept to allow\nupdates to be sent independently\
        \ to different software components of the system.\n\nIn particular, TorizonCore\
        \ devices will normally have at least two components: one for the base OS,\
        \ and\none for the application software.\n\nComponents have an ID (assumed\
        \ to be the component's serial number in the automotive case) and a hardwareID\n\
        (an indicator of the make or model of the component, for determining firmware/package\
        \ compatibility). In\nTorizonCore, we give the application component the hardwareID\
        \ \"docker-compose\", and the base OS component a\nhardwareID corresponding\
        \ to the SoM's model (e.g. \"apalis-imx8\").\n\nThis endpoint returns a list\
        \ of the components registered on the device, and the current software image\n\
        installed on each one, if known.\n        "
      operationId: getDevicesUptaneDeviceuuidComponents
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EcuInfoResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /devices/name/{deviceUuid}:
    get:
      tags:
      - Devices
      summary: Get the display name of a single device
      description: "\nGets the display name of a device. The displayed name of the\
        \ device is only a server-side concept; the device\nis not aware of its display\
        \ name.\n        "
      operationId: getDevicesNameDeviceuuid
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceNameRequest'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
    put:
      tags:
      - Devices
      summary: Set the display name of a single device
      description: "\nSets the display name of a device. The displayed name of the\
        \ device is only a server-side concept; the device\nis not aware of its display\
        \ name.\n        "
      operationId: putDevicesNameDeviceuuid
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceNameRequest'
        required: true
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /devices/notes/{deviceUuid}:
    get:
      tags:
      - Devices
      summary: Get the device notes for a specific device
      description: "\nGets the device notes for a device. Device notes are shown in\
        \ the web UI, and can be used to store additional\ninformation about the device.\n\
        \        "
      operationId: getDevicesNotesDeviceuuid
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceNotesRequest'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
    put:
      tags:
      - Devices
      summary: Set the device notes for a specific device
      description: "\nSets the device notes for a device. Device notes are shown in\
        \ the web UI, and can be used to store additional\ninformation about the device.\
        \ Accepts a string up to approximately 64kb; will be rendered as Markdown\
        \ in the\nweb UI.\n        "
      operationId: putDevicesNotesDeviceuuid
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceNotesRequest'
        required: true
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /devices/packages/{deviceUuid}:
    get:
      tags:
      - Devices
      summary: Get information about the installed packages for a single device
      description: |-
        Returns a list of the packages installed on the device.

        Package reporting logic implemented as defined in: [Devices/getDevicesPackages](#/Devices/getDevicesPackages)
        "
      operationId: getDevicesPackagesDeviceuuid
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevicePackages'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
  /devices/packages:
    get:
      tags:
      - Devices
      summary: Get information about the installed packages for many devices
      description: |2

        Returns a list of devices and the packages those devices have installed. A list of devices can be specified as
        a query parameter; if no devices are specified will return information for all devices in the repository.

        Packages are reported according to the following process:

        1. The image repository is searched using the package hash provided by the device.
        2. The search results are evaluated according to these rules:

           - **Single match**
             If exactly one package is found matching the hash, this package will be reported.

           - **Multiple matches**
             - If one of the matching packages also matches the `packageId` reported by the device, that package will be reported.
             - If none of the matching packages correspond to the device’s `packageId`, the package with the first `packageId` in alphabetical order will be reported.

           - **No matches**
             If no packages are found matching the hash, it will be reported that the package is not present in the repository.
      operationId: getDevicesPackages
      parameters:
      - name: offset
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: limit
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: deviceUuid
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
      - name: nameContains
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationResult_DevicePackages'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
        '416':
          description: Range not Satisfiable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RangeNotSatisfiableRepr'
    post:
      tags:
      - Devices
      summary: Get information about the installed packages for many devices
      description: |2

        Returns a list of devices and the packages those devices have installed. A list of devices can be specified
        using the request body; if no devices are specified will return information for all devices in the repository.

        The number of provided deviceUuids in the request body is limited to 100

        Package reporting logic implemented as defined in: [Devices/getDevicesPackages](#/Devices/getDevicesPackages)
      operationId: postDevicesPackages
      parameters:
      - name: offset
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: limit
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/DevicePackagesSearchParams'
              - type: 'null'
        required: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationResult_DevicePackages'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
        '416':
          description: Range not Satisfiable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RangeNotSatisfiableRepr'
  /devices/{deviceUuid}:
    get:
      tags:
      - Devices
      summary: Get detailed information about a single device
      description: "\nShows all available information about a single device. Included\
        \ information:\n* Name, ID, UUID, notes (if any)\n* Time of provisioning,\
        \ activation, latest update, and last connection to the repository\n* Any\
        \ fleets the device is part of\n* Installed packages, if known\n* Network\
        \ information (local IP address, MAC, hostname)\n* Device tags, if any\n\n\
        Package reporting logic implemented as defined in: [Devices/getDevicesPackages](#/Devices/getDevicesPackages)\n\
        \        "
      operationId: getDevicesDeviceuuid
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceInfoExtended'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
    delete:
      tags:
      - Devices
      summary: Delete a single device
      description: "\nPermanently delete a device from your repository. Once deleted,\
        \ the device will no longer be able\nto connect to the server.\n        "
      operationId: deleteDevicesDeviceuuid
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '202':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /devices/hibernation/{deviceUuid}:
    put:
      tags:
      - Devices
      summary: Set the hibernation status of a device
      description: "\nDevices can be placed in _hibernation_ mode. When a device is\
        \ hibernated, Torizon Cloud will respond to almost\nall requests from the\
        \ device with a 403 HTTP status. It won't be able to check for or receive\
        \ updates, send\nmetrics, or be available for remote access.\n\nDepending\
        \ on your plan and billing contract, a hibernated device may not count towards\
        \ your billable device\nquota. If you aren't sure how hibernated devices will\
        \ affect your bill, contact Toradex sales.\n        "
      operationId: putDevicesHibernationDeviceuuid
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateHibernationStatusRequest'
        required: true
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /devices/tags/{deviceUuid}:
    get:
      tags:
      - Devices
      operationId: getDevicesTagsDeviceuuid
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Map_Refined_String_And__Refined'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
    patch:
      tags:
      - Devices
      summary: Update the tags/attributes for a specific device
      description: "\nUpdates the tags/attributes for a specific device. If a tag\
        \ already exists, it's value will be overwritten,\notherwise the tag will\
        \ be created.\n\nIf the value of the tag/attribute is null, the tag will be\
        \ deleted.\n        "
      operationId: patchDevicesTagsDeviceuuid
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Map_Refined_String_And__Option'
        required: true
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /fleets:
    get:
      tags:
      - Fleets
      summary: Get information about all fleets in your repository
      description: "\nReturns a list of fleets along with their UUIDs. You can filter\
        \ the results by name using the nameContains parameter\nand sort them using\
        \ the sortBy parameter.\n        "
      operationId: getFleets
      parameters:
      - name: offset
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: limit
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: nameContains
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: sortBy
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/FleetSort'
          - type: 'null'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationResult_Fleet'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
    post:
      tags:
      - Fleets
      summary: Create a new fleet
      description: "\nCreates a new fleet. You must specify a fleet name and a fleet\
        \ type, which can be `static` or `dynamic`.\nStatic fleets are the normal\
        \ way of creating fleets on the Torizon platform. Dynamic fleets have an associated\n\
        pattern matching expression, and devices that match the pattern are automatically\
        \ added to the group.\n\nIf you are interested in using dynamic groups, please\
        \ contact support--the expression language is not fully\ndocumented yet.\n\
        \        "
      operationId: postFleets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFleet'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: string
                format: uuid
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictRepr'
  /fleets/{fleetId}:
    get:
      tags:
      - Fleets
      summary: Get information about a single fleet in your repository
      description: "\nReturns fleet info for a single fleet.\n        "
      operationId: getFleetsFleetid
      parameters:
      - name: fleetId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Fleet'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
    put:
      tags:
      - Fleets
      summary: Update fleet
      description: "\nUpdates fleet information.\n        "
      operationId: putFleetsFleetid
      parameters:
      - name: fleetId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFleet'
        required: true
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
    delete:
      tags:
      - Fleets
      summary: Delete a fleet
      description: "\nPermanently delete a fleet. Devices in the fleet are not deleted,\
        \ but are no longer associated with the deleted fleet.\n        "
      operationId: deleteFleetsFleetid
      parameters:
      - name: fleetId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /fleets/{fleetId}/devices:
    get:
      tags:
      - Fleets
      summary: Get information about the devices in a single fleet
      description: "\nReturns device information for all devices in the specified\
        \ fleet. The schema for device data is the same as\nthe [GET /devices](#/Devices/getDevices)\
        \ endpoint.\n        "
      operationId: getFleetsFleetidDevices
      parameters:
      - name: fleetId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: offset
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: limit
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationResult_DeviceInfoBasic'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
    post:
      tags:
      - Fleets
      summary: Add devices to a fleet
      description: "\nAdds devices, specified by a list of device UUIDs in the body,\
        \ to a specific fleet.\n\nNote: only applicable to static fleets.\n      \
        \  "
      operationId: postFleetsFleetidDevices
      parameters:
      - name: fleetId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
                format: uuid
        required: false
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
        '416':
          description: Range not Satisfiable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RangeNotSatisfiableRepr'
    delete:
      tags:
      - Fleets
      summary: Remove devices from a fleet
      description: "\nRemoves devices, specified by a list of device UUIDs in the\
        \ body, from a specific fleet.\n\nNote: only applicable to static fleets.\n\
        \        "
      operationId: deleteFleetsFleetidDevices
      parameters:
      - name: fleetId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
                format: uuid
        required: false
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
        '416':
          description: Range not Satisfiable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RangeNotSatisfiableRepr'
  /fleets/{fleetId}/hardware-ids:
    get:
      tags:
      - Fleets
      summary: Get all hardware IDs for devices in a fleet
      description: "\nReturns a distinct list of hardware identifiers for all ECUs\
        \ of devices in the specified fleet.\n        "
      operationId: getFleetsFleetidHardware-ids
      parameters:
      - name: fleetId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: offset
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: limit
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationResult_Refined'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /packages:
    get:
      tags:
      - Packages
      summary: Retrieve metadata about packages in your repository
      description: "\nReturns a list of packages which includes your own uploaded\
        \ packages as well as Toradex published delegated targets.\n\nCan be filtered\
        \ using the documented query parameters:\n\n   `nameContains` filters based\
        \ on a pattern found in the package name\n\n   `packageSource` filters packages\
        \ based on the metadata source (commonly \"targets.json\" or a delegated metadata\
        \ file)\n\n   `name` filters packages with an exact match of this name\n \
        \  \n   `version` filters packages with an exact match of this version\n\n\
        \   `hardwareIds` filters packages which pertain to one of the specified hardwareIds\n\
        \n   `hashes` filters packages which match the specified hashes\n\n   `packageIds`\
        \ filters packages which have the specified packageId. PackageId is the concatenation\
        \ of {name}-{version}\n\nCan be sorted in various ways specified with the\
        \ `sortBy` and `sortDirection` parameters\n\n        "
      operationId: getPackages
      parameters:
      - name: offset
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: limit
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: idContains
        in: query
        required: false
        deprecated: true
        schema:
          type:
          - string
          - 'null'
      - name: nameContains
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: packageSource
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
      - name: name
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: version
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: hardwareIds
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
      - name: hashes
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
      - name: packageIds
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
      - name: sortBy
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/TargetItemsSort'
          - type: 'null'
      - name: sortDirection
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/SortDirection'
          - type: 'null'
      - name: hasSBOM
        in: query
        required: false
        schema:
          type:
          - boolean
          - 'null'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationResult_Package'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
    post:
      tags:
      - Packages
      summary: Upload a new package
      description: "\nUpload a new package to your repository. The file to be added\
        \ should be in the body as an octet-stream, and\nthe content-length header\
        \ must be specified. You also must supply a package name and version, and\
        \ the\nhardwareId(s) the package is built for (for example, `docker-compose`\
        \ for an application package).\n        "
      operationId: postPackages
      parameters:
      - name: name
        in: query
        required: true
        schema:
          type: string
          minLength: 1
      - name: version
        in: query
        required: true
        schema:
          type: string
      - name: hardwareId
        in: query
        required: true
        schema:
          type: array
          minItems: 1
          items:
            type: string
      - name: targetFormat
        in: query
        required: true
        schema:
          type: string
      - name: Content-Length
        in: header
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Package'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictRepr'
  /packages/{packageId}:
    get:
      tags:
      - Packages
      summary: Retrieve metadata about a single package
      description: "\nShould return metadata about a single package.\n        "
      operationId: getPackagesPackageid
      parameters:
      - name: packageId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Package'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
    delete:
      tags:
      - Packages
      summary: Delete a package
      description: "\nDeletes a package and its metadata from your repository. Once\
        \ you delete a package, it will no longer be a\nvalid install target. Any\
        \ devices that still have the deleted package installed will show as \"Package\
        \ not \nauthorized by your repository\".\n        "
      operationId: deletePackagesPackageid
      parameters:
      - name: packageId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictRepr'
    patch:
      tags:
      - Packages
      summary: Edit metadata about a package
      description: "\nEdits the metadata about a package.\n\nNot all metadata can\
        \ be edited. The package name and version cannot be changed, and the contents\
        \ of the package\ncannot be changed. (You should upload a new package, with\
        \ a new version number, if the contents of the package\nchange.) With this\
        \ endpoint, you can edit custom metadata fields, package comments, external\
        \ fetch URIs, and\nthe list of compatible components.\n        "
      operationId: patchPackagesPackageid
      parameters:
      - name: packageId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditPackage'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Package'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictRepr'
  /packages_external:
    get:
      tags:
      - Packages
      summary: Retrieve metadata about packages in your repository from other sources
      description: "\n\nThis endpoint is deprecated in favor of the `/packages` endpoint\
        \ which now supports external packages.\n\nThis endpoint returns the list\
        \ of packages in your repository that come from external sources, like\nTorizonCore\
        \ images published by Toradex. Can be filtered by package name.\n        "
      operationId: getPackages_external
      parameters:
      - name: offset
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: limit
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: idContains
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationResult_ExternalPackage'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
      deprecated: true
  /packages_external/info:
    get:
      tags:
      - Packages
      summary: Fetch information about external package sources
      description: "\nThis endpoint fetches information about external package sources\
        \ authorized in your repository. External\npackage sources are how you can\
        \ safely include packages from other sources in your repository. For example,\n\
        TorizonCore OS images and bootloader binaries published by Toradex are published\
        \ as an external package\nsource, and trusted by your repository by default.\n\
        \        "
      operationId: getPackages_externalInfo
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Map_DelegatedRoleName_DelegationInfo'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /packages_external/refresh/{source_file_name}:
    get:
      tags:
      - Packages
      summary: Refresh metadata from an external package source
      description: "\nThis endpoint refreshes the list of packages in your repository\
        \ that come from the specified external source.\nFor example \"tdx-nightly\"\
        \ is the external source for all Toradex-published TorizonCore nightly builds.\n\
        \nExternal package sources can expire periodically, with the expiration date\
        \ set by the external publisher. This\nhelps ensure that package lists remain\
        \ fresh and up to date. Your devices will not install packages from an\nexpired\
        \ source. Calling this endpoint will attempt to fetch the latest info from\
        \ the external publisher.\n        "
      operationId: getPackages_externalRefreshSource_file_name
      parameters:
      - name: source_file_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictRepr'
  /updates:
    post:
      tags:
      - Updates
      summary: Launch an update to one or more devices or fleets
      description: "\nThis endpoint launches a software update. You can specify a\
        \ list of packages to be installed, and a list of\ndevices that the packages\
        \ should be installed on. If you specify multiple packages, it will be\ntreated\
        \ as a [synchronous update](https://developer.toradex.com/torizon/torizon-platform/torizon-updates/torizon-updates-technical-overview/#synchronous-updates-540).\n\
        \nIt is also possible to add custom metadata or a custom download URI when\
        \ creating the update. This example\nsends a synchronous update containing\
        \ application package `foo-1.0` and OS package `bar-1.0` to a single\ndevice,\
        \ adding a custom download URI for the application package:\n\n```\n{\n  \"\
        packageIds\": [\n    \"foo-1.0\",\n    \"bar-1.0\"\n  ],\n  \"custom\": {\n\
        \    \"foo-1.0\": {\n      \"uri\": \"https://example.com/files/foo-1.0.yaml\"\
        ,\n    }\n  },\n  \"devices\": [\n    \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\
        \n  ]\n}\n```\n\nThe `fleets` attribute of the request body is deprecated.\
        \ To deploy an update to a fleet, a user can\nuse the POST /updates/fleets/{fleetId}\
        \ endpoint.\n\nThe number of devices targeted by an update is currently limited\
        \ to 50 devices. A user can create a fleet\nand use a fleet update to update\
        \ a bigger number of devices.\n        "
      operationId: postUpdates
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRequest'
        required: true
      responses:
        '201':
          description: Successfully created Update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateCreateResult'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/BadRequestRepr'
                - $ref: '#/components/schemas/UpstreamEndpointErrorRepr'
        '416':
          description: Range not Satisfiable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RangeNotSatisfiableRepr'
  /updates/{updateId}:
    patch:
      tags:
      - Updates
      summary: Cancel an update
      description: "\nCancels the update\n\nUpdates can only be cancelled when they\
        \ are Pending. After the device has received its update instructions,\nthe\
        \ update can no longer be cancelled from the server side.\n        "
      operationId: patchUpdatesUpdateid
      parameters:
      - name: updateId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictRepr'
  /updates/devices/{deviceId}:
    get:
      tags:
      - Updates
      summary: list updates
      description: "\nList all updates created a specific device\n              "
      operationId: getUpdatesDevicesDeviceid
      parameters:
      - name: deviceId
        in: path
        required: true
        schema:
          type: string
      - name: offset
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: limit
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationResult_LegacyUpdateResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
  /lockboxes/{lockbox_name}:
    get:
      tags:
      - Updates
      summary: Get the raw Uptane metadata for a lockbox
      description: "\nUptane metadata defines what packages are included in a lockbox.\
        \ It is signed with a key specific to the\noffline updates role, and lists\
        \ the valid packages (including their hashes) for a particular lockbox.\n\n\
        This endpoint returns the full Uptane metadata for a given lockbox.\n    \
        \    "
      operationId: getLockboxesLockbox_name
      parameters:
      - name: lockbox_name
        in: path
        required: true
        schema:
          type: string
      - name: version
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int32
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonSignedPayload'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/BadRequestRepr'
                - $ref: '#/components/schemas/UpstreamEndpointErrorRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
    post:
      tags:
      - Updates
      summary: Define a new lockbox, or update an existing one
      description: "\nSee the [secure offline updates](https://developer.toradex.com/torizon/torizon-platform/torizon-updates/how-to-use-secure-offline-updates-with-torizoncore/)\n\
        documentation for background on this feature.\n\nThis endpoint will create\
        \ a new lockbox with the specified name, or update the contents of a previously\n\
        defined lockbox, if one with the specified name already exists.\n\nThe schema\
        \ of the request body is similar to the [POST /updates](#/Updates/postUpdates)\
        \ endpoint, with\nthe principal difference that offline updates are not assigned\
        \ to specific devices or fleets. Instead,\nlockboxes define which update packages\
        \ are _valid_ for install via an offline update.\n\nIt is still possible to\
        \ add custom metadata when generating a lockbox, but custom URIs will be ignored\n\
        during an offline update, as the device will get its files directly from the\
        \ lockbox rather than fetching\nover the network.\n\nThis endpoint can also\
        \ be used to effectively revoke an existing lockbox. You can revoke a lockbox\
        \ by\nupdating it so that it does not contain any packages.\n        "
      operationId: postLockboxesLockbox_name
      parameters:
      - name: lockbox_name
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLockboxRequest'
        required: true
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/BadRequestRepr'
                - $ref: '#/components/schemas/UpstreamEndpointErrorRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
    delete:
      tags:
      - Updates
      summary: Delete a lockbox
      description: "\nDeletes a lockbox. The lockbox will no longer be available on\
        \ GET\n        "
      operationId: deleteLockboxesLockbox_name
      parameters:
      - name: lockbox_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /lockboxes:
    get:
      tags:
      - Updates
      summary: List all existing lockboxes on the repository
      description: "\nReturns a list of lockbox names.\n\nNote that _all_ lockboxes\
        \ will be returned, including lockboxes that are expired, or that do not contain\n\
        any packages.\n        "
      operationId: getLockboxes
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/BadRequestRepr'
                - $ref: '#/components/schemas/UpstreamEndpointErrorRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /lockbox-details:
    get:
      tags:
      - Updates
      summary: List all existing lockboxes on the repository, and their detailed contents
      description: "\nReturns a JSON object containing all lockbox metadata. The object\
        \ has the lockbox name as a key, and the\ncomplete metadata contents (same\
        \ as returned by the [GET /lockboxes/{lockbox_name}](#/Updates/getLockboxesLockbox_name)\n\
        endpoint) as a value.\n\nNote that _all_ lockboxes will be returned, including\
        \ lockboxes that are expired, or that do not contain\nany packages.\n    \
        \    "
      operationId: getLockbox-details
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Map_LockboxName_JsonSignedPayload'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/BadRequestRepr'
                - $ref: '#/components/schemas/UpstreamEndpointErrorRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /device-data/metric-names:
    get:
      tags:
      - Device Metrics
      summary: Get the list of metrics available in your repository
      description: "\nLists the metrics available in your repository.\n\nIn the default\
        \ TorizonCore configuration, devices will report certain default metrics.\
        \ You can also\nadd your own metrics, as described in the [TorizonCore documentation](https://developer.toradex.com/torizon/torizon-platform/device-monitoring-in-torizoncore/#customizing-device-metrics-for-torizon-platform).\n\
        Calling this endpoint will give you the list of valid metric names for your\
        \ repository; generally this\nwill include the default set plus any that you\
        \ have defined yourself.\n\nYou can optionally specify a time interval in\
        \ Unix Epoch milliseconds via the `from` and `to` query parameters.\nThis\
        \ will return the list of metrics reported by devices in your repository during\
        \ that specific interval.\n        "
      operationId: getDevice-dataMetric-names
      parameters:
      - name: from
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
          minimum: 1000
          maximum: 2147483647000
      - name: to
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
          minimum: 1000
          maximum: 2147483647000
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationResult_String'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/BadRequestRepr'
                - $ref: '#/components/schemas/UpstreamEndpointErrorRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
        '416':
          description: Range not Satisfiable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RangeNotSatisfiableRepr'
  /device-data/devices/{deviceUuid}/metrics:
    get:
      tags:
      - Device Metrics
      summary: Get metrics data from a single device
      description: "\nThis endpoint will return time-bucketed data as reported by\
        \ the specified device. You must specify a time interval in \nUnix Epoch milliseconds\
        \ via the `from` and `to` query parameters.\n\nYou can optionally specify\
        \ one or more metrics in the query parameter (e.g. `metrics=metric1&metrics=metrics2`,\
        \ etc. \nOR `metrics[]=metric1,metrics2`, etc.). If you do not specify, you\
        \ will get all metrics available in the repository.\n\nYou can also specify\
        \ a `resolution`. This parameter defaults to 200, with a maximum permitted\
        \ value of 2000, and \ndetermines the granularity of the data returned. The\
        \ data returned will be separated into buckets, with each bucket \nrepresenting\
        \ the mean value of the data returned during that period.\n\nFor example,\
        \ suppose you have a device reporting its CPU temperature every minute. You\
        \ request that metric, with a \nresolution of 24 and a time interval that\
        \ is 1 day long. You will get back 24 data points, each representing a\none-hour\
        \ slice of time. The value returned for each one-hour slice will be the average\
        \ of the 60 reported \nmeasurements that the device sent during that hour.\n\
        \        "
      operationId: getDevice-dataDevicesDeviceuuidMetrics
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      - name: metric
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
      - name: from
        in: query
        required: true
        schema:
          type: integer
          format: int64
          minimum: 1000
          maximum: 2147483647000
      - name: to
        in: query
        required: true
        schema:
          type: integer
          format: int64
          minimum: 1000
          maximum: 2147483647000
      - name: resolution
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int32
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/BadRequestRepr'
                - $ref: '#/components/schemas/UpstreamEndpointErrorRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
        '416':
          description: Range not Satisfiable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RangeNotSatisfiableRepr'
  /device-data/fleets/{fleetId}/metrics:
    get:
      tags:
      - Device Metrics
      summary: Get aggregated metrics data from a fleet of devices
      description: "\nThis endpoint will return aggregated time-bucketed data as reported\
        \ by the devices in the specified fleet. You must \nspecify a time interval\
        \ in Unix Epoch milliseconds via the `from` and `to` query parameters. \n\n\
        You can also specify a `resolution`. This parameter defaults to 200, with\
        \ a maximum permitted value of 2000, and \ndetermines the granularity of the\
        \ data returned. The data returned will be separated into buckets, with each\
        \ bucket \nrepresenting the aggregated data from the period. For example,\
        \ if you specify a one day long time interval with a\nresolution of 24, you\
        \ will get 24 buckets, each representing a one hour slice of the day. If you\
        \ request a resolution \nof 48, your buckets will be 30 minutes long.\n\n\
        You also must specify one or more metrics as query parameters (e.g. `metrics=metric1&metrics=metrics2`,\
        \ etc. OR \n`metrics[]=metric1,metrics2`, etc.). For each metric you specify,\
        \ you will get back four different series of datapoints: \n\n* `{metric}-count`\
        \ reports how many devices in the fleet actually reported data during this\
        \ time interval.\n* `{metric}-avg` reports the average value of all reported\
        \ values for the metric in the period. Note that the average \nis over the\
        \ number of devices that reported data: devices that didn't report the metric\
        \ during the interval will not\nbe reflected in this datapoint.\n* `{metric}-max`\
        \ gives the highest value reported by a device in the specified interval\n\
        * `{metric}-min` gives the lowest value reported by a device in the specified\
        \ interval\n        "
      operationId: getDevice-dataFleetsFleetidMetrics
      parameters:
      - name: fleetId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: metric
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
      - name: from
        in: query
        required: true
        schema:
          type: integer
          format: int64
          minimum: 1000
          maximum: 2147483647000
      - name: to
        in: query
        required: true
        schema:
          type: integer
          format: int64
          minimum: 1000
          maximum: 2147483647000
      - name: resolution
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int32
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/BadRequestRepr'
                - $ref: '#/components/schemas/UpstreamEndpointErrorRepr'
        '416':
          description: Range not Satisfiable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RangeNotSatisfiableRepr'
  /device-data/fleets/{fleetId}/metrics/outliers:
    post:
      tags:
      - Device Metrics
      summary: Get fleet outlier metrics from a fleet of devices
      description: "\nResponse will contain a list of outlier metrics for the provided\
        \ fleet of devices\n\nThe Request Body contains several keys:\n* metrics -\
        \ a list of metric names (max of 5)\n* from - unix timestamp (milliseconds\
        \ since epoch) marking beginning of sample\n* to - unix timestamp (milliseconds\
        \ since epoch) marking end of sample\n* aggregation - Optional whether the\
        \ outliers are above or below the average. Min|Max (default Max)\n* limit\
        \ - Optional Int limiting number of response values (maximum is 10)\n    \
        \      "
      operationId: postDevice-dataFleetsFleetidMetricsOutliers
      parameters:
      - name: fleetId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FleetMetricsOutliersRequest'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FleetMetricsOutliersResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/BadRequestRepr'
                - $ref: '#/components/schemas/UpstreamEndpointErrorRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
        '416':
          description: Range not Satisfiable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RangeNotSatisfiableRepr'
  /device-data/devices/{deviceUuid}/detailed-metrics:
    get:
      tags:
      - Device Metrics
      summary: Get detailed metrics data for a single device
      description: "\n\nThis endpoint will return either a csv or json file of time-bucketed\
        \ data as reported by the specified device.\n\nParameters:  \n* time - beginning\
        \ of interval in Unix Epoch milliseconds\n* from - end of interval in Unix\
        \ Epoch milliseconds\n* raw_datapoints - number of data points to return in\
        \ response\n* total_buckets - number of time buckets to return in response\n\
        \n**Note:** One of raw_datapoints OR total_buckets must be specified in parameters\n\
        \      "
      operationId: getDevice-dataDevicesDeviceuuidDetailed-metrics
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      - name: metrics
        in: query
        required: true
        schema:
          type: array
          minItems: 1
          items:
            type: string
      - name: from
        in: query
        required: true
        schema:
          type: integer
          format: int64
      - name: to
        in: query
        required: true
        schema:
          type: integer
          format: int64
      - name: raw_datapoints
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int32
      - name: total_buckets
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int32
      responses:
        '200':
          description: ''
          headers:
            Content-Disposition:
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
            text/csv:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/BadRequestRepr'
                - $ref: '#/components/schemas/UpstreamEndpointErrorRepr'
        '416':
          description: Range not Satisfiable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RangeNotSatisfiableRepr'
  /device-data/fleets/{fleetId}/metrics/report:
    post:
      tags:
      - Device Metrics
      summary: Get metrics report for fleet of devices
      description: "\nReturns either a csv or json file of all the datapoints specified\
        \ in the query\n\nThe query contains these keys:\n\n* metrics - a list of\
        \ metric names\n* from - unix timestamp (milliseconds since epoch) marking\
        \ beginning of report\n* to - unix timestamp (milliseconds since epoch) marking\
        \ end of report\n* datapointCount - Optional Int - the total number of datapoints\
        \ to be included in the report\n* totalBuckets - Optional Int - the total\
        \ number of buckets to be included in the report  \n\n**Note:** One of datapointCount\
        \ OR totalBuckets must be specified\n          "
      operationId: postDevice-dataFleetsFleetidMetricsReport
      parameters:
      - name: fleetId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DetailedMetricQuery'
        required: true
      responses:
        '200':
          description: ''
          headers:
            Content-Disposition:
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
            text/csv:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/BadRequestRepr'
                - $ref: '#/components/schemas/UpstreamEndpointErrorRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
        '416':
          description: Range not Satisfiable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RangeNotSatisfiableRepr'
  /remote-access/device/{deviceUuid}/sessions:
    get:
      tags:
      - Remote Access
      summary: get a remote access session for a device
      description: "\n        "
      operationId: getRemote-accessDeviceDeviceuuidSessions
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceSession'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
    post:
      tags:
      - Remote Access
      summary: Create new remote access session for device
      description: "\n  A remote-access session is an entity that allows the user\
        \ to connect to a device via ssh.\n  All sessions have an expiration and upon\
        \ expiration the connection will be terminated.\n\n  Before creating a session\
        \ the user must have at least 1 public key registered with the system.\n \
        \ To create a session, a valid, registered key must be included in the request.\n\
        \        "
      operationId: postRemote-accessDeviceDeviceuuidSessions
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSessionRequest'
        required: true
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestRepr'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictRepr'
    delete:
      tags:
      - Remote Access
      summary: Delete a remote access session for a device
      description: "\n        "
      operationId: deleteRemote-accessDeviceDeviceuuidSessions
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /remote-access/device/{deviceUuid}:
    get:
      tags:
      - Remote Access
      summary: Fetch remote access info for a device
      description: "\n        "
      operationId: getRemote-accessDeviceDeviceuuid
      parameters:
      - name: deviceUuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceInfo'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /remote-access/user/sessions:
    get:
      tags:
      - Remote Access
      summary: Fetch all sessions (and their related deviceId) for a user
      description: "\n        "
      operationId: getRemote-accessUserSessions
      parameters:
      - name: offset
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      - name: limit
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          format: int64
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationResult_UserSession'
        '400':
          description: 'Invalid value for: query parameter offset, Invalid value for:
            query parameter limit'
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /remote-access/user/public-keys:
    get:
      tags:
      - Remote Access
      summary: Fetch all remote-access public keys registered to a user
      description: "\n        "
      operationId: getRemote-accessUserPublic-keys
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicKeys'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
    post:
      tags:
      - Remote Access
      summary: Register an ssh public key to user
      description: "\n        "
      operationId: postRemote-accessUserPublic-keys
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyData'
        required: true
      responses:
        '200':
          description: ''
        '400':
          description: 'Invalid value for: body'
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /remote-access/user/public-keys/{keyId}:
    delete:
      tags:
      - Remote Access
      summary: Remove ssh public key from user
      description: "\n        "
      operationId: deleteRemote-accessUserPublic-keysKeyid
      parameters:
      - name: keyId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /remote-access/user/ip-accept-list:
    get:
      tags:
      - Remote Access
      summary: Retrieve list of accepted ip addresses
      description: "\nThe accepted ip addresses are a list of public client IPV4 addresses\
        \ used.\nThese IP addresses will be exempt from normal rate limiting by the\
        \ server.\n        "
      operationId: getRemote-accessUserIp-accept-list
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
    post:
      tags:
      - Remote Access
      summary: Add new ip to list of accepted ip addresses
      description: "\nThe accepted ip addresses are a list of public client IPV4 addresses\
        \ used.\nThese IP addresses will be exempt from normal rate limiting by the\
        \ server.\n        "
      operationId: postRemote-accessUserIp-accept-list
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IpAddressRequest'
        required: true
      responses:
        '200':
          description: ''
        '400':
          description: 'Invalid value for: body'
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
  /remote-access/user/ip-accept-list/{ip-address}:
    delete:
      tags:
      - Remote Access
      summary: Remove accepted ip address
      description: "\n        "
      operationId: deleteRemote-accessUserIp-accept-listIp-address
      parameters:
      - name: ip-address
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundRepr'
components:
  schemas:
    Average:
      title: Average
      type: object
    BadRequestRepr:
      title: BadRequestRepr
      type: object
      required:
      - msg
      - code
      properties:
        msg:
          type: string
        description:
          anyOf:
          - {}
          - type: 'null'
        code:
          type: string
        cause:
          anyOf:
          - {}
          - type: 'null'
        errorId:
          type:
          - string
          - 'null'
          format: uuid
    ClientSignature:
      title: ClientSignature
      type: object
      required:
      - keyid
      - method
      - sig
      properties:
        keyid:
          type: string
        method:
          $ref: '#/components/schemas/SignatureMethod'
        sig:
          type: string
    ConflictRepr:
      title: ConflictRepr
      type: object
      required:
      - msg
      - code
      properties:
        msg:
          type: string
        description:
          anyOf:
          - {}
          - type: 'null'
        code:
          type: string
        cause:
          anyOf:
          - {}
          - type: 'null'
        errorId:
          type:
          - string
          - 'null'
          format: uuid
    Count:
      title: Count
      type: object
    CreateFleet:
      title: CreateFleet
      type: object
      required:
      - name
      - fleetType
      properties:
        name:
          type: string
        fleetType:
          $ref: '#/components/schemas/FleetType'
        expression:
          type:
          - string
          - 'null'
    CreateLockboxRequest:
      title: CreateLockboxRequest
      type: object
      properties:
        packageIds:
          type: array
          items:
            type: string
        custom:
          anyOf:
          - $ref: '#/components/schemas/Map_Refined_String_ValidTargetFilename__CustomUpdateData'
          - type: 'null'
        expiresAt:
          type:
          - string
          - 'null'
          format: date-time
    CreateSessionRequest:
      title: CreateSessionRequest
      type: object
      required:
      - sessionDuration
      properties:
        publicKeys:
          type: array
          items:
            type: string
        sessionDuration:
          type: string
    CustomUpdateData:
      title: CustomUpdateData
      type: object
      properties:
        uri:
          type:
          - string
          - 'null'
          format: uri
        metadata:
          anyOf:
          - {}
          - type: 'null'
    DelegationInfo:
      title: DelegationInfo
      type: object
      properties:
        lastFetched:
          type:
          - string
          - 'null'
          format: date-time
        remoteUri:
          type:
          - string
          - 'null'
          format: uri
        friendlyName:
          type:
          - string
          - 'null'
        expires:
          type:
          - string
          - 'null'
          format: date-time
    DetailedMetricQuery:
      title: DetailedMetricQuery
      type: object
      required:
      - metrics
      - from
      - to
      properties:
        metrics:
          type: array
          minItems: 1
          items:
            type: string
        from:
          type: integer
          format: int64
        to:
          type: integer
          format: int64
        datapointCount:
          type:
          - integer
          - 'null'
          format: int32
        totalBuckets:
          type:
          - integer
          - 'null'
          format: int32
    DeviceCreateReq:
      title: DeviceCreateReq
      type: object
      required:
      - deviceId
      properties:
        deviceName:
          type:
          - string
          - 'null'
        deviceId:
          type: string
        hibernated:
          type:
          - boolean
          - 'null'
        fleetIds:
          type:
          - array
          - 'null'
          uniqueItems: true
          items:
            type: string
            format: uuid
        tags:
          anyOf:
          - $ref: '#/components/schemas/Map_Refined_String_And__Refined'
          - type: 'null'
    DeviceId:
      title: DeviceId
      type: object
      required:
      - uuid
      properties:
        uuid:
          type: string
          format: uuid
    DeviceInfo:
      title: DeviceInfo
      type: object
      required:
      - deviceId
      properties:
        deviceId:
          type: string
          format: uuid
        lastApiConnect:
          type:
          - string
          - 'null'
          format: date-time
        lastSshSessionConnect:
          anyOf:
          - $ref: '#/components/schemas/LastSshSession'
          - type: 'null'
        lastVersion:
          type:
          - string
          - 'null'
        lastUserConnect:
          anyOf:
          - $ref: '#/components/schemas/UserInfo'
          - type: 'null'
    DeviceInfoBasic:
      title: DeviceInfoBasic
      type: object
      pattern: ^[A-Z].*
      required:
      - deviceUuid
      - deviceName
      - deviceId
      - createdAt
      - deviceStatus
      - notes
      - tags
      - hibernated
      properties:
        deviceUuid:
          type: string
          format: uuid
        deviceName:
          type: string
        deviceId:
          type: string
        lastSeen:
          type:
          - string
          - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
        activatedAt:
          type:
          - string
          - 'null'
          format: date-time
        deviceStatus:
          $ref: '#/components/schemas/DeviceStatus'
        notes:
          type: string
        tags:
          $ref: '#/components/schemas/Map_Refined_String_And__Refined'
        hibernated:
          type: boolean
    DeviceInfoExtended:
      title: DeviceInfoExtended
      type: object
      required:
      - deviceUuid
      - deviceName
      - deviceId
      - createdAt
      - deviceStatus
      - notes
      - hibernated
      - tags
      - networkInfo
      properties:
        deviceUuid:
          type: string
          format: uuid
        deviceName:
          type: string
        deviceId:
          type: string
        lastSeen:
          type:
          - string
          - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
        activatedAt:
          type:
          - string
          - 'null'
          format: date-time
        deviceStatus:
          $ref: '#/components/schemas/DeviceStatus'
        notes:
          type: string
        hibernated:
          type: boolean
        lastUpdated:
          type:
          - string
          - 'null'
          format: date-time
        deviceFleets:
          type: array
          items:
            $ref: '#/components/schemas/Fleet'
        devicePackages:
          type: array
          items:
            $ref: '#/components/schemas/InstalledPackage'
        tags:
          $ref: '#/components/schemas/Map_Refined_String_And__Refined'
        networkInfo:
          $ref: '#/components/schemas/NetworkInfo'
    DeviceNameRequest:
      title: DeviceNameRequest
      type: object
      required:
      - name
      properties:
        name:
          type: string
    DeviceNotesRequest:
      title: DeviceNotesRequest
      type: object
      required:
      - notes
      properties:
        notes:
          type: string
    DevicePackages:
      title: DevicePackages
      type: object
      required:
      - deviceUuid
      properties:
        deviceUuid:
          type: string
          format: uuid
        installedPackages:
          type: array
          items:
            $ref: '#/components/schemas/InstalledPackage'
    DevicePackagesSearchParams:
      title: DevicePackagesSearchParams
      type: object
      properties:
        deviceUuids:
          type: array
          maxItems: 100
          items:
            type: string
            format: uuid
        nameContains:
          type:
          - string
          - 'null'
    DeviceSession:
      title: DeviceSession
      type: object
      required:
      - ssh
      properties:
        ssh:
          $ref: '#/components/schemas/SshSession'
    DeviceSort:
      title: DeviceSort
      type: string
      enum:
      - Name
      - DeviceId
      - Uuid
      - CreatedAt
      - ActivatedAt
      - LastSeen
    DeviceSortDirection:
      title: DeviceSortDirection
      type: string
      enum:
      - Asc
      - Desc
    DeviceStatus:
      title: DeviceStatus
      type: string
      enum:
      - NotSeen
      - Error
      - UpToDate
      - UpdatePending
      - Outdated
      - UpdateScheduled
    EcuInfoImage:
      title: EcuInfoImage
      type: object
      required:
      - filepath
      - size
      - hash
      properties:
        filepath:
          type: string
        size:
          type: integer
          format: int64
        hash:
          $ref: '#/components/schemas/Hashes'
    EcuInfoResponse:
      title: EcuInfoResponse
      type: object
      required:
      - id
      - hardwareId
      - primary
      - image
      properties:
        id:
          type: string
          maxLength: 64
          minLength: 1
        hardwareId:
          type: string
        primary:
          type: boolean
        image:
          $ref: '#/components/schemas/EcuInfoImage'
    EditPackage:
      title: EditPackage
      type: object
      properties:
        hardwareIds:
          type:
          - array
          - 'null'
          items:
            type: string
        uri:
          type:
          - string
          - 'null'
          format: uri
        proprietaryMeta:
          anyOf:
          - {}
          - type: 'null'
        comment:
          type:
          - string
          - 'null'
    ErrorRepresentation:
      title: ErrorRepresentation
      type: object
      required:
      - code
      - description
      properties:
        code:
          type: string
        description:
          type: string
        cause:
          anyOf:
          - {}
          - type: 'null'
        errorId:
          type:
          - string
          - 'null'
          format: uuid
    ExternalPackage:
      title: ExternalPackage
      type: object
      required:
      - name
      - delegationOrigin
      - version
      - packageId
      - size
      - hashes
      properties:
        name:
          type: string
        delegationOrigin:
          type: string
        version:
          type: string
        packageId:
          type: string
        size:
          type: integer
          format: int64
        hashes:
          $ref: '#/components/schemas/Map_Value_Refined_String_ValidChecksum'
        pkgType:
          type:
          - string
          - 'null'
        hardwareIds:
          type: array
          items:
            type: string
        createdAt:
          type:
          - string
          - 'null'
          format: date-time
        uri:
          type:
          - string
          - 'null'
          format: uri
        proprietaryMeta:
          anyOf:
          - {}
          - type: 'null'
    FileInfo:
      title: FileInfo
      type: object
      required:
      - hashes
      - length
      properties:
        hashes:
          $ref: '#/components/schemas/Hashes'
        length:
          type: integer
          format: int64
    Fleet:
      title: Fleet
      type: object
      pattern: ^[A-Z].*
      required:
      - id
      - name
      - createdAt
      - fleetType
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        createdAt:
          type: string
          format: date-time
        fleetType:
          $ref: '#/components/schemas/FleetType'
        expression:
          type:
          - string
          - 'null'
    FleetMetricsOutliersRequest:
      title: FleetMetricsOutliersRequest
      type: object
      required:
      - metrics
      - from
      - to
      properties:
        metrics:
          type: array
          minItems: 1
          items:
            type: string
        from:
          type: integer
          format: int64
        to:
          type: integer
          format: int64
        aggregation:
          anyOf:
          - $ref: '#/components/schemas/OutlierAggregationMethod'
          - type: 'null'
        limit:
          type:
          - integer
          - 'null'
          format: int32
    FleetMetricsOutliersResponse:
      title: FleetMetricsOutliersResponse
      type: object
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/OutlierValues'
    FleetSort:
      title: FleetSort
      type: string
      enum:
      - Name
      - CreatedAt
    FleetType:
      title: FleetType
      type: string
      enum:
      - static
      - dynamic
    Hashes:
      title: Hashes
      type: object
      required:
      - sha256
      properties:
        sha256:
          type: string
    Image:
      title: Image
      type: object
      required:
      - filepath
      - fileinfo
      properties:
        filepath:
          type: string
        fileinfo:
          $ref: '#/components/schemas/FileInfo'
    InstalledPackage:
      title: InstalledPackage
      type: object
      required:
      - component
      - installed
      properties:
        component:
          type: string
        installed:
          $ref: '#/components/schemas/Package'
    IpAddressRequest:
      title: IpAddressRequest
      type: object
      required:
      - ip
      properties:
        ip:
          type: string
    JsonSignedPayload:
      title: JsonSignedPayload
      type: object
      required:
      - signed
      properties:
        signatures:
          type: array
          items:
            $ref: '#/components/schemas/ClientSignature'
        signed: {}
    KeyData:
      title: KeyData
      type: object
      required:
      - pubkey
      - meta
      properties:
        pubkey:
          type: string
        meta: {}
    Last:
      title: Last
      type: object
    LastSshSession:
      title: LastSshSession
      type: object
      required:
      - connectedAt
      - ipAddress
      properties:
        connectedAt:
          type: string
          format: date-time
        ipAddress:
          type: string
    LegacyUpdateResponse:
      title: LegacyUpdateResponse
      type: object
      required:
      - updateId
      - status
      - createdAt
      - packages
      properties:
        updateId:
          type: string
          format: uuid
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        scheduledFor:
          type:
          - string
          - 'null'
          format: date-time
        completedAt:
          type:
          - string
          - 'null'
          format: date-time
        deviceResult:
          anyOf:
          - $ref: '#/components/schemas/UpdateReportedResult'
          - type: 'null'
        packages:
          $ref: '#/components/schemas/Map_Refined_String_ValidHardwareIdentifier__Refined'
    Map_DelegatedRoleName_DelegationInfo:
      title: Map_DelegatedRoleName_DelegationInfo
      type: object
      additionalProperties:
        $ref: '#/components/schemas/DelegationInfo'
    Map_KeyData:
      title: Map_KeyData
      type: object
      additionalProperties:
        $ref: '#/components/schemas/KeyData'
    Map_LockboxName_JsonSignedPayload:
      title: Map_LockboxName_JsonSignedPayload
      type: object
      additionalProperties:
        $ref: '#/components/schemas/JsonSignedPayload'
    Map_Refined_String_And__ErrorRepresentation:
      title: Map_Refined_String_And__ErrorRepresentation
      type: object
      additionalProperties:
        $ref: '#/components/schemas/ErrorRepresentation'
    Map_Refined_String_And__Option:
      title: Map_Refined_String_And__Option
      type: object
      additionalProperties:
        type:
        - string
        - 'null'
        maxLength: 50
        pattern: '[\w\-_/ ]+'
    Map_Refined_String_And__Refined:
      title: Map_Refined_String_And__Refined
      type: object
      additionalProperties:
        type: string
        maxLength: 50
        pattern: '[\w\-_/ ]+'
    Map_Refined_String_And__TargetImage:
      title: Map_Refined_String_And__TargetImage
      type: object
      additionalProperties:
        $ref: '#/components/schemas/TargetImage'
    Map_Refined_String_ValidHardwareIdentifier__Refined:
      title: Map_Refined_String_ValidHardwareIdentifier__Refined
      type: object
      additionalProperties:
        type: string
    Map_Refined_String_ValidTargetFilename__CustomUpdateData:
      title: Map_Refined_String_ValidTargetFilename__CustomUpdateData
      type: object
      additionalProperties:
        $ref: '#/components/schemas/CustomUpdateData'
    Map_Value_Refined_String_ValidChecksum:
      title: Map_Value_Refined_String_ValidChecksum
      type: object
      additionalProperties:
        type: string
    Max:
      title: Max
      type: object
    MetricsResponse:
      title: MetricsResponse
      type: object
      properties:
        series:
          type: array
          items:
            $ref: '#/components/schemas/Series'
    Min:
      title: Min
      type: object
    NetworkInfo:
      title: NetworkInfo
      type: object
      required:
      - deviceUuid
      properties:
        deviceUuid:
          type: string
          format: uuid
        localIpV4:
          type:
          - string
          - 'null'
        hostname:
          type:
          - string
          - 'null'
        macAddress:
          type:
          - string
          - 'null'
    None:
      title: None
      type: object
    NotFoundRepr:
      title: NotFoundRepr
      type: object
      required:
      - msg
      - code
      properties:
        msg:
          type: string
        description:
          anyOf:
          - {}
          - type: 'null'
        code:
          type: string
        cause:
          anyOf:
          - {}
          - type: 'null'
        errorId:
          type:
          - string
          - 'null'
          format: uuid
    Outlier:
      title: Outlier
      type: object
      required:
      - deviceId
      - observedAt
      properties:
        deviceId:
          type: string
          format: uuid
        value:
          type:
          - number
          - 'null'
          format: double
        observedAt:
          type: string
          format: date-time
    OutlierAggregationMethod:
      title: OutlierAggregationMethod
      type: string
      enum:
      - Max
      - Min
    OutlierValues:
      title: OutlierValues
      type: object
      required:
      - metricName
      - aggregation
      properties:
        metricName:
          type: string
        aggregation:
          $ref: '#/components/schemas/OutlierAggregationMethod'
        outliers:
          type: array
          items:
            $ref: '#/components/schemas/Outlier'
    Package:
      title: Package
      type: object
      required:
      - name
      - version
      - packageId
      - size
      - hashes
      - packageSource
      properties:
        name:
          type: string
        version:
          type: string
        packageId:
          type: string
        size:
          type: integer
          format: int64
        hashes:
          $ref: '#/components/schemas/Map_Value_Refined_String_ValidChecksum'
        packageSource:
          type: string
          minLength: 1
        pkgType:
          type:
          - string
          - 'null'
        hardwareIds:
          type: array
          items:
            type: string
        createdAt:
          type:
          - string
          - 'null'
          format: date-time
        uri:
          type:
          - string
          - 'null'
          format: uri
        proprietaryMeta:
          anyOf:
          - {}
          - type: 'null'
        comment:
          type:
          - string
          - 'null'
    PaginationResult_DeviceInfoBasic:
      title: PaginationResult_DeviceInfoBasic
      type: object
      required:
      - total
      - offset
      - limit
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/DeviceInfoBasic'
        total:
          type: integer
          format: int64
        offset:
          type: integer
          format: int64
        limit:
          type: integer
          format: int64
    PaginationResult_DevicePackages:
      title: PaginationResult_DevicePackages
      type: object
      required:
      - total
      - offset
      - limit
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/DevicePackages'
        total:
          type: integer
          format: int64
        offset:
          type: integer
          format: int64
        limit:
          type: integer
          format: int64
    PaginationResult_ExternalPackage:
      title: PaginationResult_ExternalPackage
      type: object
      required:
      - total
      - offset
      - limit
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/ExternalPackage'
        total:
          type: integer
          format: int64
        offset:
          type: integer
          format: int64
        limit:
          type: integer
          format: int64
    PaginationResult_Fleet:
      title: PaginationResult_Fleet
      type: object
      required:
      - total
      - offset
      - limit
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/Fleet'
        total:
          type: integer
          format: int64
        offset:
          type: integer
          format: int64
        limit:
          type: integer
          format: int64
    PaginationResult_LegacyUpdateResponse:
      title: PaginationResult_LegacyUpdateResponse
      type: object
      required:
      - total
      - offset
      - limit
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/LegacyUpdateResponse'
        total:
          type: integer
          format: int64
        offset:
          type: integer
          format: int64
        limit:
          type: integer
          format: int64
    PaginationResult_NetworkInfo:
      title: PaginationResult_NetworkInfo
      type: object
      required:
      - total
      - offset
      - limit
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/NetworkInfo'
        total:
          type: integer
          format: int64
        offset:
          type: integer
          format: int64
        limit:
          type: integer
          format: int64
    PaginationResult_Package:
      title: PaginationResult_Package
      type: object
      required:
      - total
      - offset
      - limit
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/Package'
        total:
          type: integer
          format: int64
        offset:
          type: integer
          format: int64
        limit:
          type: integer
          format: int64
    PaginationResult_Refined:
      title: PaginationResult_Refined
      type: object
      required:
      - total
      - offset
      - limit
      properties:
        values:
          type: array
          items:
            type: string
        total:
          type: integer
          format: int64
        offset:
          type: integer
          format: int64
        limit:
          type: integer
          format: int64
    PaginationResult_String:
      title: PaginationResult_String
      type: object
      required:
      - total
      - offset
      - limit
      properties:
        values:
          type: array
          items:
            type: string
        total:
          type: integer
          format: int64
        offset:
          type: integer
          format: int64
        limit:
          type: integer
          format: int64
    PaginationResult_UserSession:
      title: PaginationResult_UserSession
      type: object
      required:
      - total
      - offset
      - limit
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/UserSession'
        total:
          type: integer
          format: int64
        offset:
          type: integer
          format: int64
        limit:
          type: integer
          format: int64
    ProvisionInfo:
      title: ProvisionInfo
      type: object
      required:
      - token
      - autoProvUrl
      - gatewayUrl
      - provisionedDevices
      - standardDeviceLimit
      properties:
        token:
          type: string
        autoProvUrl:
          type: string
          format: uri
        gatewayUrl:
          type: string
          format: uri
        provisionedDevices:
          type: integer
          format: int32
        standardDeviceLimit:
          type: integer
          format: int32
    PublicKeys:
      title: PublicKeys
      type: object
      required:
      - keys
      properties:
        keys:
          $ref: '#/components/schemas/Map_KeyData'
    QueueResponse:
      title: QueueResponse
      type: object
      required:
      - correlationId
      - targets
      - inFlight
      properties:
        correlationId:
          type: string
        targets:
          $ref: '#/components/schemas/Map_Refined_String_And__TargetImage'
        inFlight:
          type: boolean
    RangeNotSatisfiableRepr:
      title: RangeNotSatisfiableRepr
      type: object
      required:
      - msg
      - code
      properties:
        msg:
          type: string
        description:
          anyOf:
          - {}
          - type: 'null'
        code:
          type: string
        cause:
          anyOf:
          - {}
          - type: 'null'
        errorId:
          type:
          - string
          - 'null'
          format: uuid
    Series:
      title: Series
      type: object
      required:
      - name
      - meta
      properties:
        name:
          type: string
        meta:
          $ref: '#/components/schemas/SeriesMeta'
        points:
          type: array
          items:
            $ref: '#/components/schemas/Tuple2_Long_Option_Double'
    SeriesMeta:
      title: SeriesMeta
      type: object
      required:
      - aggregation
      properties:
        aggregation:
          $ref: '#/components/schemas/TimeAggregation'
        deviceIds:
          type: array
          items:
            type: string
            format: uuid
    SignatureMethod:
      title: SignatureMethod
      type: string
      enum:
      - rsassa-pss-sha256
      - ed25519
      - ecPrime256v1
    SimpleDeviceInfo:
      title: SimpleDeviceInfo
      type: object
      required:
      - deviceUuid
      - deviceId
      - name
      properties:
        deviceUuid:
          type: string
          format: uuid
        deviceId:
          type: string
        name:
          type: string
    SimpleDeviceNotAffectedInfo:
      title: SimpleDeviceNotAffectedInfo
      type: object
      required:
      - deviceUuid
      - deviceId
      - name
      - ecuErrors
      properties:
        deviceUuid:
          type: string
          format: uuid
        deviceId:
          type: string
        name:
          type: string
        ecuErrors:
          $ref: '#/components/schemas/Map_Refined_String_And__ErrorRepresentation'
    SortDirection:
      title: SortDirection
      type: string
      enum:
      - Asc
      - Desc
    SshSession:
      title: SshSession
      type: object
      required:
      - reversePort
      - raServerUrl
      - raServerSshPubKey
      - reverseServerUrl
      - expiresAt
      properties:
        authorizedPubKeys:
          type: array
          items:
            type: string
        reversePort:
          type: integer
          format: int32
        raServerUrl:
          type: string
        raServerSshPubKey:
          type: string
        reverseServerUrl:
          type: string
          format: uri
        expiresAt:
          type: string
          format: date-time
    TargetImage:
      title: TargetImage
      type: object
      required:
      - image
      - createdAt
      properties:
        image:
          $ref: '#/components/schemas/Image'
        uri:
          type:
          - string
          - 'null'
          format: uri
        createdAt:
          type: string
          format: date-time
    TargetItemsSort:
      title: TargetItemsSort
      type: string
      enum:
      - Filename
      - CreatedAt
    TimeAggregation:
      title: TimeAggregation
      type: object
      required:
      - bucket
      - method
      properties:
        bucket:
          type: string
        method:
          $ref: '#/components/schemas/TimeAggregationMethod'
    TimeAggregationMethod:
      title: TimeAggregationMethod
      type: string
      enum:
      - last
      - average
      - max
      - min
      - count
      - none
    Tuple2_Long_Option_Double:
      title: Tuple2_Long_Option_Double
      type: array
      prefixItems:
      - type: integer
        format: int64
      - type:
        - number
        - 'null'
        format: double
    UpdateCreateResult:
      title: UpdateCreateResult
      type: object
      properties:
        affected:
          type: array
          items:
            $ref: '#/components/schemas/SimpleDeviceInfo'
        notAffected:
          type: array
          items:
            $ref: '#/components/schemas/SimpleDeviceNotAffectedInfo'
    UpdateFleet:
      title: UpdateFleet
      type: object
      required:
      - name
      properties:
        name:
          type: string
    UpdateHibernationStatusRequest:
      title: UpdateHibernationStatusRequest
      type: object
      required:
      - status
      properties:
        status:
          type: boolean
    UpdateReportedResult:
      title: UpdateReportedResult
      type: object
      required:
      - resultCode
      - success
      properties:
        resultCode:
          type: string
        success:
          type: boolean
        description:
          type:
          - string
          - 'null'
    UpdateRequest:
      title: UpdateRequest
      type: object
      properties:
        packageIds:
          type: array
          items:
            type: string
        custom:
          anyOf:
          - $ref: '#/components/schemas/Map_Refined_String_ValidTargetFilename__CustomUpdateData'
          - type: 'null'
        devices:
          type:
          - array
          - 'null'
          maxItems: 50
          items:
            type: string
            format: uuid
        fleets:
          deprecated: true
          type:
          - array
          - 'null'
          items:
            type: string
            format: uuid
    UpstreamEndpointErrorRepr:
      title: UpstreamEndpointErrorRepr
      type: object
      required:
      - msg
      - code
      properties:
        msg:
          type: string
        description:
          anyOf:
          - {}
          - type: 'null'
        code:
          type: string
        cause:
          anyOf:
          - {}
          - type: 'null'
        errorId:
          type:
          - string
          - 'null'
          format: uuid
    UserInfo:
      title: UserInfo
      type: object
      required:
      - remoteIp
      - connectedAt
      properties:
        remoteIp:
          type: string
        connectedAt:
          type: string
          format: date-time
    UserSession:
      title: UserSession
      type: object
      required:
      - deviceId
      - session
      properties:
        deviceId:
          type: string
          format: uuid
        session:
          $ref: '#/components/schemas/DeviceSession'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
security:
- BearerAuth: []
