openapi: 3.0.0
info:
  title: VisibilityIQ Predictive State Insights
  version: 1.0.0
servers:
- url: https://api.zebra.com/v2/data/devices/operation/analytics/visibility
  description: For US
- url: https://api.zebra.com/v2/eu/data/devices/operation/analytics/visibility
  description: For EU
security:
- BearerAuth: []
- ApiKeyAuth: []
tags:
- name: Predictive Insights
paths:
  /predictions/summary:
    get:
      tags:
      - Predictive Insights
      summary: Retrieves the predictive insights summary
      description: Retrieves the predictive insights summary for a company partner
      operationId: Retrieve Predictive Insights Summary
      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: startDatetime
        in: header
        description: ISO timestamp for the start of the time period in which data
          is retrieved. The startDatetime should be less than endDatetime. Example=2020-04-13T00:00:00Z
        required: true
        schema:
          $ref: '#/components/schemas/DateTime'
      - name: endDatetime
        in: header
        description: ISO timestamp for the end of the time period in which data is
          fetched. The difference between start and end date should be 1 day or 24
          hours.
        required: true
        style: simple
        explode: false
        schema:
          $ref: '#/components/schemas/DateTime'
      - 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.
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PredictiveInsightSortCriteria'
      - name: filter
        in: header
        description: "Filter based on column values.  Numeric value will be filtered\
          \ by an partial match.  Strings will be filtered by partial matches as well\
          \ and are case insensitive matches.  The filter criteria are ANDed together.\
          \ Example \n  {\n    \"siteCount\": 100\n    \"insightCategory\": \"application\"\
          \n  }"
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PredictiveInsightFilterCriteria'
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictiveInsightApiResponse'
        "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
  /predictions/categories:
    get:
      tags:
      - Predictive Insights
      summary: Retrieves  device insights for an Insight Category and Insight ReasonCode.
      description: Retrieves the predictive insights summary for an Insight Category
        and an Insight Reason Code
      operationId: Retrieve predictive insights Summary for Insight Category and Reason
        Code
      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: startDatetime
        in: header
        description: ISO timestamp for the start of the time period in which data
          is retrieved. The startDatetime should be less than endDatetime. Example=2020-04-13T00:00:00Z
        required: true
        schema:
          $ref: '#/components/schemas/DateTime'
      - name: endDatetime
        in: header
        description: ISO timestamp for the end of the time period in which data is
          fetched. The difference between start and end date should be 1 day or 24
          hours.
        required: true
        style: simple
        explode: false
        schema:
          $ref: '#/components/schemas/DateTime'
      - 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: insightCategory
        in: header
        description: Insight category name
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: insightReasonCode
        in: header
        description: Insight reason code
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: sort
        in: header
        description: Sort order for the results.  Specified as a JSON object.
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceSortCriteria'
      - name: filter
        in: header
        description: "Filter based on column values.  Numeric value will be filtered\
          \ by an partial match.  Strings will be filtered by partial matches as well\
          \ and are case insensitive matches.  The filter criteria are ANDed together.\
          \ Example \n  {\n    \"siteCount\": 100\n    \"insightCategory\": \"application\"\
          \n  }"
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceFilterCriteria'
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceApiResponse'
        "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:
    PredictiveInsightApiResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiResponseStatus'
        meta:
          $ref: '#/components/schemas/ApiResponseMeta'
        data:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/PredictiveInsight'
        links:
          $ref: '#/components/schemas/ApiResponseLinks'
    DeviceApiResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiResponseStatus'
        meta:
          $ref: '#/components/schemas/ApiResponseMeta'
        data:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/Device'
        links:
          $ref: '#/components/schemas/ApiResponseLinks'
    DateTime:
      type: string
      format: date-time
    ApiResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiResponseStatus'
        meta:
          $ref: '#/components/schemas/ApiResponseMeta'
        data:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/PredictiveInsight'
            - $ref: '#/components/schemas/Device'
        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
    PredictiveInsight:
      type: object
      properties:
        insightCategory:
          type: string
          description: Insight category name
        deviceCount:
          type: integer
          description: Number of devices
        modelCount:
          type: integer
          description: Number of models
        siteCount:
          type: integer
          description: Number of sites
        insightReasonCode:
          type: string
          description: Insight reason code
        deviceInsight:
          type: string
          description: Device insight for company parter
      example:
        insightCategory: UTILIZATION
        deviceCount: 800
        modelCount: 600
        siteCount: 7
        deviceInsight: Low Device Utilization Compared to Group
        insightReasonCode: "009"
    PredictiveInsightSortCriteria:
      type: object
      properties:
        criteria:
          type: array
          items:
            type: object
            properties:
              a:
                type: string
                description: Attribute name
                enum:
                - insightCategory
                - deviceCount
                - modelCount
                - siteCount
                - insightReasonCode
              o:
                type: string
                description: Order for attribute values
                enum:
                - asc
                - desc
    PredictiveInsightFilterCriteria:
      type: object
      properties:
        insightCategory:
          type: string
          description: Insight category name
        deviceCount:
          type: integer
          description: Number of devices
        modelCount:
          type: integer
          description: Number of models
        siteCount:
          type: integer
          description: Number of sites
        insightReasonCode:
          type: string
          description: Insight reason code
    Device:
      type: object
      properties:
        severity:
          type: string
          description: Severity of the action category
        serialNum:
          type: string
          description: The device serial number.
        assetName:
          type: string
          description: Asset Name of the device
        model:
          type: string
          description: The model of the device.
        fullModel:
          type: string
          description: The model information which is added to contract.
        deviceType:
          type: string
          description: The type of the device. The possible value is MOBILE COMPUTER
        os:
          type: string
          description: The operating system of the device.
        siteName:
          type: string
          description: The name of the site that the device belongs to.
        siteHierarchy:
          type: string
          description: The Site hierarchy  that the device belongs to.
      example:
        severity: warning
        serialNum: KQXXXXX
        assetName: ETXX_4XXXXXX
        model: ETXX
        fullModel: ETXXXX-XXX-XXX
        deviceType: XXXXX
        os: 6.0.1
        siteName: 0612 XXXX XXXX XXXXXX
        siteHierarchy: company/region/country/timezome/state/sitename
    DeviceSortCriteria:
      type: object
      properties:
        criteria:
          type: array
          items:
            type: object
            properties:
              a:
                type: string
                description: Attribute name
                enum:
                - severity
                - serialNum
                - assetName
                - model
                - fullModel
                - deviceType
                - os
                - siteName
                - siteHierarchy
              o:
                type: string
                description: Order for attribute values
                enum:
                - asc
                - desc
    DeviceFilterCriteria:
      type: object
      properties:
        severity:
          type: string
          description: Severity of the action category
        serialNum:
          type: string
          description: The device serial number.
        assetName:
          type: string
          description: Asset Name of the device
        model:
          type: string
          description: The model of the device.
        fullModel:
          type: string
          description: The model information which is added to contract.
        deviceType:
          type: string
          description: The type of the device. The possible values are MOBILE COMPUTER,PRINTER
        os:
          type: string
          description: The operating system of the device.
        siteName:
          type: string
          description: The name of the site that the device belongs to.
        siteHierarchy:
          type: string
          description: The Site hierarchy  that the device belongs to.
    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
    startDatetime:
      name: startDatetime
      in: header
      description: ISO timestamp for the start of the time period in which data is
        retrieved. The startDatetime should be less than endDatetime. Example=2020-04-13T00:00:00Z
      required: true
      schema:
        $ref: '#/components/schemas/DateTime'
    endDatetime:
      name: endDatetime
      in: header
      description: ISO timestamp for the end of the time period in which data is fetched.
        The difference between start and end date should be 1 day or 24 hours.
      required: true
      style: simple
      explode: false
      schema:
        $ref: '#/components/schemas/DateTime'
    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: {}
