openapi: 3.0.0
info:
  title: VisibilityIQ Lifeguard Analytics
  version: 1.0.0
servers:
- url: https://api.zebra.com/v2/data/visibility/services/lifeguard
  description: For US
- url: https://api.zebra.com/v2/eu/data/visibility/services/lifeguard
  description: For EU
security:
- BearerAuth: []
- ApiKeyAuth: []
paths:
  /recommended-updates:
    get:
      tags:
      - Recommended Updates for Devices
      summary: Retrieves available software updates for the devices
      description: Retrieves the recommendations of available software updates for
        the devices of a company partner as of yesterday.
      operationId: Retrieve Recommended Updates
      parameters:
      - name: companyName
        in: header
        description: Company name
        required: true
        schema:
          type: string
      - name: partnerName
        in: header
        description: Partner name
        required: true
        schema:
          type: string
      - name: offset
        in: query
        description: 'Pagination parameter indicating the starting record position
          for returning the results from the result set.  Any positive value is acceptable.
          An offset bigger than the number of available results will result in an
          error. A negative value will be replaced with 0. Normally, value should
          be 0 or a positive multiple of limit. '
        required: false
        schema:
          type: integer
          default: 0
      - name: limit
        in: query
        description: 'Pagination size indicating the maximum number of results to
          be returned in the response. Valid values are 1 to 20000. Values higher
          than 20000 will be replaced with 20000. Values less than 1 will be replaced
          with 250. '
        required: false
        schema:
          type: integer
          default: 250
      - name: sort
        in: header
        description: "Sort order for the results.  Specified as a JSON object. Currently,\
          \ only one sort case is supported in the criteria even though it is an array.\
          \ Elements other than the first one will be ignored currently and sorting\
          \ for os,   bsp, lgUpdate, androidSecurityPatchLevel is supported for current\
          \ version information.\n  {\n    \"criteria\": [\n      {\n        \"a\"\
          : \"deviceCount\",\n        \"o\": \"desc\"\n      }\n    ]\n  } "
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecommendedUpdatesSortCriteria'
      - name: filter
        in: header
        description: |-
          Filter based on column values.  Numeric value will be filtered by an exact match.  Strings will be filtered by partial matches as well and are case insensitive matches. Filter criteria for osVersion,bspVersion, lifeguardUpdateLevel matches to current version information. The filter criteria are ANDed together. Example
           {
             "bsp": XXXX,
             "fullModel": "TXXX",
           }
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecommendedUpdatesFilterCriteria'
      - name: recommendationThreshold
        in: header
        description: If the difference between availability dates of the installed
          version and the latest available version for the device is more than this
          threshold in number of days, an update is recommended. Example recommendationThreshold:60
        required: false
        style: simple
        explode: false
        schema:
          type: integer
          default: 90
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecommendedUpdatesApiResponse'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
  /up-to-date-device-groups:
    get:
      tags:
      - Up-to-Date Device Groups
      summary: Retrieves device groups that are up-to-date with software updates
      description: Retrieves device groups which are up-to-date with software updates
        for a company partner as of  yesterday. Up-to-date status is determined based
        on the recommendationThreshold parameter. It doesn’t mean that no new updates
        are available. To determine whether any updates are available, set the threshold
        to 0.
      operationId: Retrieve Up-to-date Device Groups
      parameters:
      - name: companyName
        in: header
        description: Company name
        required: true
        schema:
          type: string
      - name: partnerName
        in: header
        description: Partner name
        required: true
        schema:
          type: string
      - name: offset
        in: query
        description: 'Pagination parameter indicating the starting record position
          for returning the results from the result set.  Any positive value is acceptable.
          An offset bigger than the number of available results will result in an
          error. A negative value will be replaced with 0. Normally, value should
          be 0 or a positive multiple of limit. '
        required: false
        schema:
          type: integer
          default: 0
      - name: limit
        in: query
        description: 'Pagination size indicating the maximum number of results to
          be returned in the response. Valid values are 1 to 20000. Values higher
          than 20000 will be replaced with 20000. Values less than 1 will be replaced
          with 250. '
        required: false
        schema:
          type: integer
          default: 250
      - name: sort
        in: header
        description: "Sort order for the results.  Specified as a JSON object. Currently,\
          \ only one sort case is supported in the criteria even though it is an array.\
          \ Elements other than the first one will be ignored currently.\n  {\n  \
          \  \"criteria\": [\n      {\n        \"a\": \"deviceCount\",\n        \"\
          o\": \"desc\"\n      }\n    ]\n  } "
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UptodateDeviceGroupsSortCriteria'
      - name: filter
        in: header
        description: |-
          Filter based on column values.  Numeric value will be filtered by an exact match.  Strings will be filtered by partial matches as well and are case insensitive matches.  The filter criteria are ANDed together. Example
           {
             "deviceCount": XXXX,
             "model": "TXXX",
           }
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UptodateDeviceGroupsFilterCriteria'
      - name: recommendationThreshold
        in: header
        description: Up-to-date device groups are decided based on the recommendationThreshold,
          It doesn’t mean that no new updates are available. If you want to check
          whether any updates are available, set the recommendationThreshold to 0.
          Example recommendationThreshold:60
        required: false
        style: simple
        explode: false
        schema:
          type: integer
          default: 90
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UptodateDeviceGroupsApiResponse'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
  /devices:
    get:
      tags:
      - Devices
      summary: Retrieves all devices with software update status
      description: Retrieves all devices with software update status for a company
        partner as of yesterday UTC.
      operationId: getAllDevices
      parameters:
      - name: companyName
        in: header
        description: Company name
        required: true
        schema:
          type: string
      - name: partnerName
        in: header
        description: Partner name
        required: true
        schema:
          type: string
      - name: offset
        in: query
        description: 'Pagination parameter indicating the starting record position
          for returning the results from the result set.  Any positive value is acceptable.
          An offset bigger than the number of available results will result in an
          error. A negative value will be replaced with 0. Normally, value should
          be 0 or a positive multiple of limit. '
        required: false
        schema:
          type: integer
          default: 0
      - name: limit
        in: query
        description: 'Pagination size indicating the maximum number of results to
          be returned in the response. Valid values are 1 to 20000. Values higher
          than 20000 will be replaced with 20000. Values less than 1 will be replaced
          with 250. '
        required: false
        schema:
          type: integer
          default: 250
      - name: sort
        in: header
        description: "Sort order for the results.  Specified as a JSON object. Currently,\
          \ only one sort case is supported in the criteria even though it is an array.\
          \ Elements other than the first one will be ignored currently and sorting\
          \ for os,   bsp, lgUpdate, androidSecurityPatchLevel is supported for current\
          \ version information.\n  {\n    \"criteria\": [\n      {\n        \"a\"\
          : \"serialNum\",\n        \"o\": \"desc\"\n      }\n    ]\n  } "
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DevicesSortCriteria'
      - name: filter
        in: header
        description: |-
          Filter based on column values.  Numeric value will be filtered by an exact match.  Strings will be filtered by partial matches as well and are case insensitive matches. Filter criteria for osVersion, bspVersion, lifeguardUpdateLevel, androidSecurityPatchLevel matches to current version information. The filter criteria are ANDed together. Example
           {
             "serialNum": "21XXXXXXXXXX84",
             "fullModel": "TXXX",
           }
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DevicesFilterCriteria'
      - name: recommendationThreshold
        in: header
        description: If the difference between availability dates of the installed
          version and the latest available version for the device is more than this
          threshold in number of days, an update is recommended. Example recommendationThreshold:60
        required: false
        style: simple
        explode: false
        schema:
          type: integer
          default: 90
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevicesApiResponse'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    Date:
      type: string
      format: date
    RecommendedUpdatesApiResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiResponseStatus'
        meta:
          $ref: '#/components/schemas/ApiResponseMeta'
        data:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/RecommendedUpdates'
        links:
          $ref: '#/components/schemas/ApiResponseLinks'
    UptodateDeviceGroupsApiResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiResponseStatus'
        meta:
          $ref: '#/components/schemas/ApiResponseMeta'
        data:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/UptodateDeviceGroups'
        links:
          $ref: '#/components/schemas/ApiResponseLinks'
    DevicesApiResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiResponseStatus'
        meta:
          $ref: '#/components/schemas/ApiResponseMeta'
        data:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/Devices'
        links:
          $ref: '#/components/schemas/ApiResponseLinks'
    ApiResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiResponseStatus'
        meta:
          $ref: '#/components/schemas/ApiResponseMeta'
        data:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/RecommendedUpdates'
            - $ref: '#/components/schemas/UptodateDeviceGroups'
            - $ref: '#/components/schemas/Devices'
        links:
          $ref: '#/components/schemas/ApiResponseLinks'
    ApiError:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for this particular occurrence of the problem
        links:
          type: object
          properties:
            about:
              type: string
              description: A link that leads to further details about this particular
                occurrence of the problem
          description: Links providing information related to this error
        status:
          type: integer
          description: The HTTP status code applicable to this problem
          format: int32
        code:
          type: string
          description: An application-specific error code, expressed as a string value
        title:
          type: string
          description: A short, human-readable summary of the problem that SHOULD
            NOT change from occurrence to occurrence of the problem, except for purposes
            of localization
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of
            the problem. Like title, this field’s value can be localized
        source:
          type: object
          properties:
            pointer:
              type: string
              description: A JSON Pointer [RFC6901] to the associated entity in the
                request document [e.g. "/data" for a primary data object, or "/data/attributes/title"
                for a specific attribute]
            parameter:
              type: string
              description: A string indicating which URI query parameter caused the
                error
          description: An object containing references to the source of the error
        meta:
          type: object
          description: A meta object containing non-standard meta-information about
            the error
    RecommendedUpdatesSortCriteria:
      type: object
      properties:
        criteria:
          type: array
          items:
            type: object
            properties:
              a:
                type: string
                description: Attribute name
                enum:
                - deviceCount
                - model
                - fullModel
                - osType
                - os
                - bsp
                - lgUpdate
                - androidSecurityPatchLevel
              o:
                type: string
                description: order for attribute values
                enum:
                - asc
                - desc
    RecommendedUpdatesFilterCriteria:
      type: object
      properties:
        deviceCount:
          type: integer
        model:
          type: string
        fullModel:
          type: string
        osType:
          type: string
        os:
          type: string
        bsp:
          type: string
        lgUpdate:
          type: string
    UptodateDeviceGroupsSortCriteria:
      type: object
      properties:
        criteria:
          type: array
          items:
            type: object
            properties:
              a:
                type: string
                description: Attribute name
                enum:
                - deviceCount
                - model
                - fullModel
                - osType
                - os
                - bsp
                - lgUpdate
                - androidSecurityPatchLevel
              o:
                type: string
                description: order for attribute values
                enum:
                - asc
                - desc
    UptodateDeviceGroupsFilterCriteria:
      type: object
      properties:
        deviceCount:
          type: integer
        model:
          type: string
        fullModel:
          type: string
        osType:
          type: string
        os:
          type: string
        bsp:
          type: string
        lgUpdate:
          type: string
        androidSecurityPatchLevel:
          $ref: '#/components/schemas/Date'
    DevicesSortCriteria:
      type: object
      properties:
        criteria:
          type: array
          items:
            type: object
            properties:
              a:
                type: string
                description: Attribute name
                enum:
                - status
                - model
                - fullModel
                - osType
                - os
                - bsp
                - lgUpdate
                - androidSecurityPatchLevel
                - serialNum
              o:
                type: string
                description: order for attribute values
                enum:
                - asc
                - desc
    DevicesFilterCriteria:
      type: object
      properties:
        status:
          type: string
        model:
          type: string
        fullModel:
          type: string
        osType:
          type: string
        os:
          type: string
        bsp:
          type: string
        lgUpdate:
          type: string
        androidSecurityPatchLevel:
          $ref: '#/components/schemas/Date'
        serialNum:
          type: string
    RecommendedUpdates:
      type: object
      properties:
        deviceCount:
          type: integer
        model:
          type: string
        fullModel:
          type: string
        osType:
          type: string
        lgVersion:
          type: object
          properties:
            current:
              type: object
              properties:
                os:
                  type: string
                bsp:
                  type: string
                lgUpdate:
                  type: string
                androidSecurityPatchLevel:
                  $ref: '#/components/schemas/Date'
            latestForCurrentOsBsp:
              type: object
              properties:
                lgUpdate:
                  type: string
                androidSecurityPatchLevel:
                  $ref: '#/components/schemas/Date'
                cveFixesOverCurrent:
                  type: string
                estimatedDownloadSize:
                  type: string
            latestForCurrentOs:
              type: object
              properties:
                bsp:
                  type: string
                lgUpdate:
                  type: string
                androidSecurityPatchLevel:
                  $ref: '#/components/schemas/Date'
                cveFixesOverCurrent:
                  type: string
                estimatedDownloadSize:
                  type: string
            latest:
              type: object
              properties:
                os:
                  type: string
                bsp:
                  type: string
                lgUpdate:
                  type: string
                androidSecurityPatchLevel:
                  $ref: '#/components/schemas/Date'
                cveFixesOverCurrent:
                  type: string
                estimatedDownloadSize:
                  type: string
      example:
        deviceCount: 2439
        model: TXXX
        fullModel: TXXXXK-2PAZU4P-XX
        osType: XXXXXXX
        lgVersion:
          current:
            os: 8.X.0
            bsp: 01.XX.XX.00
            lgUpdate: U08
            androidSecurityPatchLevel: 2019-11-01
          latestForCurrentOsBsp:
            lgUpdate: U15
            androidSecurityPatchLevel: 2020-03-01
            cveFixesOverCurrent: "111"
            estimatedDownloadSize: "1548031069"
          latestForCurrentOs:
            bsp: 01.XX.XX.00
            lgUpdate: U15
            androidSecurityPatchLevel: 2020-03-01
            cveFixesOverCurrent: "211"
            estimatedDownloadSize: "1616238033"
          latest:
            os: "10"
            bsp: 10.XX.XX.00
            lgUpdate: U28
            androidSecurityPatchLevel: 2021-01-05
            cveFixesOverCurrent: "111"
            estimatedDownloadSize: "179914485"
    UptodateDeviceGroups:
      type: object
      properties:
        deviceCount:
          type: integer
        model:
          type: string
        fullModel:
          type: string
        osType:
          type: string
        os:
          type: string
        bsp:
          type: string
        lgUpdate:
          type: string
        androidSecurityPatchLevel:
          $ref: '#/components/schemas/Date'
      example:
        deviceCount: 2456
        model: TXXX
        fullModel: TXXXXK-2PAZU4P-XX
        osType: XXXXXXX
        os: 8.1.1
        bsp: 01.23.18.00
        lgUpdate: U09
        androidSecurityPatchLevel: 2020-02-16
    Devices:
      type: object
      properties:
        status:
          type: string
        model:
          type: string
        fullModel:
          type: string
        osType:
          type: string
        serialNum:
          type: string
        lgVersion:
          type: object
          properties:
            current:
              type: object
              properties:
                os:
                  type: string
                bsp:
                  type: string
                lgUpdate:
                  type: string
                androidSecurityPatchLevel:
                  $ref: '#/components/schemas/Date'
            latestForCurrentOsBsp:
              type: object
              properties:
                lgUpdate:
                  type: string
                androidSecurityPatchLevel:
                  $ref: '#/components/schemas/Date'
            latestForCurrentOs:
              type: object
              properties:
                bsp:
                  type: string
                lgUpdate:
                  type: string
                androidSecurityPatchLevel:
                  $ref: '#/components/schemas/Date'
            latest:
              type: object
              properties:
                os:
                  type: string
                bsp:
                  type: string
                lgUpdate:
                  type: string
                androidSecurityPatchLevel:
                  $ref: '#/components/schemas/Date'
      example:
        status: Up-to-date
        model: TXXX
        fullModel: TXXXXK-2PAZU4P-XX
        osType: XXXXXXX
        serialNum: 210XXXXX513210
        lgVersion:
          current:
            os: 8.X.0
            bsp: 01.XX.XX.00
            lgUpdate: U08
            androidSecurityPatchLevel: 2019-11-01
          latestForCurrentOsBsp:
            lgUpdate: U15
            androidSecurityPatchLevel: 2019-10-01
          latestForCurrentOs:
            bsp: 01.XX.XX.00
            lgUpdate: U15
            androidSecurityPatchLevel: 2020-03-01
          latest:
            os: "10"
            bsp: 10.XX.XX.00
            lgUpdate: U28
            androidSecurityPatchLevel: 2021-01-05
    ApiResponseStatus:
      type: integer
      description: The HTTP status code
      format: int32
    ApiResponseMeta:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for this request
        total:
          type: integer
          description: The total number of results
        offset:
          type: integer
          description: The offset used in this request
        limit:
          type: integer
          description: The effective limit used in this request
    ApiResponseLinks:
      type: object
      properties:
        self:
          type: string
          description: URL to this page
        first:
          type: string
          description: URL to the first page
        last:
          type: string
          description: URL to the last page
        prev:
          type: string
          description: URL to the previous page
        next:
          type: string
          description: URL to the next page
      description: Links for navigation. Only the applicable links are required to
        be present.
  responses:
    Response200:
      description: Successful operation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiResponse'
    Response400:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Response401:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Response403:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Response500:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  parameters:
    companyName:
      name: companyName
      in: header
      description: Company name
      required: true
      schema:
        type: string
    partnerName:
      name: partnerName
      in: header
      description: Partner name
      required: true
      schema:
        type: string
    offset:
      name: offset
      in: query
      description: 'Pagination parameter indicating the starting record position for
        returning the results from the result set.  Any positive value is acceptable.
        An offset bigger than the number of available results will result in an error.
        A negative value will be replaced with 0. Normally, value should be 0 or a
        positive multiple of limit. '
      required: false
      schema:
        type: integer
        default: 0
    limit:
      name: limit
      in: query
      description: 'Pagination size indicating the maximum number of results to be
        returned in the response. Valid values are 1 to 20000. Values higher than
        20000 will be replaced with 20000. Values less than 1 will be replaced with
        250. '
      required: false
      schema:
        type: integer
        default: 250
  requestBodies: {}
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
    ApiKeyAuth:
      type: apiKey
      name: X-APIKey
      in: header
  links: {}
  callbacks: {}
