openapi: 3.0.1
info:
  title: ESPER API REFERENCE
  x-logo:
    url: esper-logo-white.svg
    backgroundColor: '#141418'
    altText: Logo
  description: >
    # Introduction

    Welcome to Esper’s API documentation. The Esper API allows users to
    accomplish operations outside of the console. Some common uses for our APIs
    include observing device information and console activity, installing and
    updating apps, uploading files, and sending files to devices. Our users have
    also used the API to automate app updates, perform bulk actions, and more.


    Esper API endpoints use REST-based architecture and return JSON responses.


    See our documentation for:


    * [Getting started
    guides](https://help.esper.io/hc/en-us/articles/14199291792145-Getting-Started-with-APIs)

    * [Commonly used API
    examples](https://help.esper.io/hc/en-us/articles/16036992814609-Commonly-Used-APIs)

    * [API command
    examples](https://help.esper.io/hc/en-us/articles/16693582666769-Scheduling-API-Commands)

    * [Automated Script
    examples](https://help.esper.io/hc/en-us/articles/22957898441745-Automating-App-Updates-Using-the-API)

    * [And more](https://help.esper.io/hc/en-us/sections/11388094627857-API)



    # Authentication

    You need to create an API Key to interact with our APIs. Learn more about
    generating an API Key. You can also learn more about Esper and sign up for
    an account at esper.io/signup.


    Some endpoints also require an Enterprise ID. This ID can be found in the
    API Management section of the Esper console.

    # Pagination

    Responses may be paginated.

    Use the following parameters to query the data. A full list of parameters
    can be found on the endpoint’s documentation page.

    <table>
      <thead>
        <tr>
          <th>Parameter</th>
          <th>Data Type</th>
          <th>Explanation</th>
        </tr>
      </thead>
      <tbody>
        <tr>
        <td>limit</td>
        <td>integer</td>
        <td>Limit the data returned. Default = 20.</td>
      </tr>
      <tr>
        <td>offset</td>
        <td>integer</td>
        <td>Offset to the first item returned. Default = 0.</td>
      </tr>
      <tr>
        <td>ordering</td>
        <td>string</td>
        <td>Order the results set by the field name. Varies by endpoint.</td>
      </tr>
      <tr>
        <td>next</td>
        <td>string</td>
        <td>Paginate to the next response set.</td>
      </tr>
      <tr>
        <td>previous</td>
        <td>string</td>
        <td>Paginate to the last set response.</td>
      </tr>
    </table>


    # Errors

    We use standard HTTP status codes for success or failure.

    A typical error response may look something like this:


    ```json

    {
      "errors": [],
      "message": "error message",
      "status": 400
    }

    ```

    * `errors` -  List of error details

    * `message` - Error description

    * `status` - HTTP status code


    Some common status codes and messages are:


    <table>
      <thead>
        <tr>
          <th>Number</th>
          <th>Message</th>
          <th>Explanation</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>200</td>
          <td>OK</td>
          <td>The request succeeded.</td>
        </tr>
        <tr>
          <td>201</td>
          <td>Resource creation</td>
          <td>A resource was created.</td>
        </tr>
        <tr>
          <td>401</td>
          <td>Unauthorized</td>
          <td>The API key is invalid.</td>
        </tr>
        <tr>
          <td>404</td>
          <td>Not found</td>
          <td>The resource was not found.</td>
        </tr>
        <tr>
          <td>429</td>
          <td>Rate limit exceeded</td>
          <td>Too many requests. Wait a moment and try again.</td>
        </tr>
        <tr>
          <td>500</td>
          <td>Server error</td>
          <td>Internal error. Wait a moment and try again. If the issue persists, <a target="_blank" href="https://help.esper.io/hc/en-us/articles/14800200348561-Contacting-Esper-Support">contact Esper.</a></td>
        </tr>
      </tbody>
    </table>


    See how our systems are doing by checking our [status
    page](https://status.esper.cloud/).


    # Rate Limits

    To ensure quality of service for all customers, we enforce rate limits for
    API requests. Most customers won’t hit this limit with normal use. In case
    you experience 429 or rate limit exceeded errors, we recommend the
    following:

    * Try sending requests in batches.

    * Begin with about 20 requests at a time and building up from there.

    * Ensure your scripts are efficient and don’t contain redundant calls.

    * Reach out to your account manager to discuss your options.
  termsOfService: https://esper.io/terms-of-service
  contact:
    email: developer@esper.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://{foo}-api.esper.cloud/api
    variables:
      foo:
        default: develop
        description: Custom end point
tags:
  - name: 0_Company Settings
    description: "The Company Settings API manage the account information set up for your organization. Formerly known as Enterprise Information.\_"
    externalDocs:
      description: Find out more about Company Settings
      url: >-
        https://help.esper.io/hc/en-us/articles/12656541757457-Introduction-to-Company-Settings
    x-displayName: Company Settings
  - name: 0_Application
    description: APIs for application management
    externalDocs:
      description: Find out more about application management
      url: https://help.esper.io/hc/en-us/articles/12652127923857
    x-displayName: Application
  - name: 0_Application V1
    description: APIs for application management
    x-displayName: Application V1
  - name: 0_AndroidDevice
    description: APIs for android device management
    externalDocs:
      description: Find out more about device management
      url: https://help.esper.io/hc/en-us/articles/12523891684369
    x-displayName: AndroidDevice
  - name: 0_Device Group
    description: APIs for device group management
    externalDocs:
      description: Find out more about device group management
      url: https://help.esper.io/hc/en-us/articles/12523891684369
    x-displayName: Device Group
  - name: 0_Token (Deprecated)
    description: >
      ⚠️ **Deprecation Notice:** The following APIs will soon be deprecated. Use
      the console to manage API keys instead.
    externalDocs:
      description: Find out more about API Key generation
      url: https://help.esper.io/hc/en-us/articles/12656959508497
    x-displayName: Token (Deprecated)
  - name: 0_Commands V2
    description: >-
      Commands V2.0 provides advanced device commands capabilities like queuing,
      support for offline devices, dynamic device set for commands and command
      history. Commands 2.0 is in active development and we will add support for
      all the commands soon
    externalDocs:
      description: Find out more about commands V2.0
      url: https://help.esper.io/hc/en-us/articles/12524618746129
    x-displayName: Commands V2
  - name: 0_Enterprise Policy
    description: APIs to Esper Compliance Policy
    externalDocs:
      description: Find out more about Compliance Policy
      url: https://help.esper.io/hc/en-us/articles/12653153592977
    x-displayName: Enterprise Policy
  - name: 0_Geofence
    description: APIs for geofence management
    externalDocs:
      description: Find out more about Geofence
      url: https://help.esper.io/hc/en-us/articles/12655621844753
    x-displayName: Geofence
  - name: 0_Content
    description: APIs to manage files
    externalDocs:
      description: Find out more about Content management
      url: https://help.esper.io/hc/en-us/articles/12655910179473
    x-displayName: Content
  - name: 0_User (Deprecated)
    description: >-
      ⚠️ **Deprecation Notice:** The following APIs will soon be deprecated.
      Please transition to the User APIs.
    externalDocs:
      description: Find out more about User management
      url: https://help.esper.io/hc/en-us/articles/12656615814929
    x-displayName: User (Deprecated)
  - name: 0_User
    description: APIs for User Management
    externalDocs:
      description: Find out more about User management
      url: https://help.esper.io/hc/en-us/articles/12656615814929
    x-displayName: User
  - name: 0_Blueprint (Deprecated)
    description: >
      This is the API for the former Blueprints service.


      ⚠️ **Deprecation Notice:** The following APIs will soon be deprecated. Use
      [Blueprints API](https://api.esper.io/tag/Blueprints-API) instead.
    x-displayName: Blueprint (Deprecated)
  - name: 0_Directory Record
    description: >-
      APIs for Directory Record management. These APIs are only available to the
      customers using the new Onboarding experience.
    x-displayName: Directory Record
  - name: 0_Tile Icon
    description: >
      APIs to manage tile icons. Tile icons allow Templates-based users to apply
      a icons to devices.
    x-displayName: Tile Icon
  - name: 0_Alerts
    x-displayName: Alerts
  - name: 0_Alarms
    x-displayName: Alarms
  - name: 0_Wallpapers
    x-displayName: Wallpapers
  - name: 0_Device Telemetry
    x-displayName: Device Telemetry
  - name: 0_Daily and Custom Reports
    x-displayName: Daily and Custom Reports
  - name: 0_SSO Connections
    x-displayName: SSO Connections
  - name: 0_Roles
    x-displayName: Roles
  - name: 0_Personal Access Token
    x-displayName: Personal Access Token
  - name: 1_Blueprints API
    description: >-
      APIs to manage blueprints. Learn more about
      [blueprints](https://help.esper.io/hc/en-us/articles/19118758564369-Introduction-to-Blueprints).
    x-displayName: Blueprints API
  - name: 1_Custom Actions API
    description: >-
      APIs to manage custom actions. Custom actions allow you to define custom
      scripts and commands that can be executed on Linux devices. Currently,
      only Linux platform is supported for custom actions.
    x-displayName: Custom Actions API
  - name: 2_System Status Code
    description: |
      System status code descriptions
        * 900 (INTERNAL_REQUEST_SKIPPED) - Response code is used when a request is valid, but cannot be fulfilled.
    x-displayName: System Status Code
  - name: 2_System
    description: System level APIs
    x-displayName: System
  - name: 2_Pipelines
    description: Pipelines composition APIs
    x-displayName: Pipelines
  - name: 2_Stages
    description: APIs to modify Stage information
    x-displayName: Stages
  - name: 2_Target Lists
    description: APIs to modify Target List
    x-displayName: Target Lists
  - name: 2_Targets
    description: Targets subsystem
    x-displayName: Targets
  - name: 2_Device Groups
    description: APIs to modify Device Groups
    x-displayName: Device Groups
  - name: 2_Operation Lists
    description: APIs to modify Operation List
    x-displayName: Operation Lists
  - name: 2_Operations
    description: Operations subsystem
    x-displayName: Operations
  - name: 2_Pipeline Runs
    description: |
      APIs to manage Pipeline Runs. Pipeline run status descriptions
        * PENDING - Pipeline run created.
        * QUEUED - Pipeline run queued for processing.
        * PROCESSING - Pipeline run received by scheduler for processing. (Processing a pipeline involves performing the operations required before starting a pipeline)
        * RUNNING - Pipeline run has started running.
        * WAITING -  Pipeline run is waiting for an action (manual/automatic).
        * COMPLETE - The pipeline run has completed processing i.e. All stage runs are processed. A complete pipeline run can move to success or failure.
        * SUCCESS - A completed pipeline run moves to success if all stage runs are successful.
        * FAILURE - A completed pipeline run moves to failure if all stage runs are not successful.
        * CANCELLED - Pipeline run is cancelled by the user.
        * TIMEOUT -  The pipeline run has a timed out. This happens when the pipeline has not completed processing even after the timeout period (Default 21 days).
        * INVALID - A pipeline run moves to invalid state when Pipeline run has no stageruns i.e pipeline has zero stages.
    x-displayName: Pipeline Runs
  - name: 2_Stage Runs
    description: |
      APIs to manage Stage Runs. Stage run status descriptions
        * PENDING - Stage run created.
        * QUEUED - Stage run queued for processing.
        * PROCESSING - Stage run received by scheduler for processing.(Processing a stage run can involve performing the operations required before starting a stage run. In this case creating the target runs for the stage.)
        * RUNNING - Stage run has started running.  
        * COMPLETE - Stage run moves to complete if all target runs are complete (target runs are complete if they are in a terminal state).
        * SUCCESS - A completed stage run moves to success if all target runs are successful. 
        * FAILURE - A completed stage moves to failure if all target runs are not successful.
        * CANCELLED - Stage run cancelled by user.
        * TIMEOUT - The stage run has a timed out. This happens when the stage run has not completed processing even after the timeout period (Default 7 days).
        * INVALID -  A stage run moves to invalid state when 
                      a. The associated stage has no targets.
                      b. The associated stage has no operations.
    x-displayName: Stage Runs
  - name: 2_Target Runs
    description: |
      APIs to manage Target Runs. Target run status descriptions
        * PENDING - Target run created.
        * QUEUED - Target run queued for processing.
        * PROCESSING - Target run received by scheduler for processing (During target run processing the command request for the target run is created).
        * DISPATCHED - Target run moves to dispatched when a command is successfully queued for the target run. (Command status - QUEUED)
        * RUNNING - Target run moves to running state when the command has been sent to the device (Command status - INITIATED, ACKNOWLEDGED, INPROGRESS)
        * COMPLETE - Target run moves to complete state when it has completed running (Command status - FAILURE, SUCCESS, TIMEOUT, CANCELLED)
        * SUCCESS - A completed target run moves to success when the associated command is successful (Command status - SUCCESS)
        * FAILURE - A completed target run moves to success when the associated command is unsuccessful (Command status - FAILED, TIMEOUT, CANCELLED)
        * CANCELLED - Target run cancelled by the user (Target runs ind Pending, Queued and Processing state can be cancelled by the user)
        * TIMEOUT -  The target run has a timed out. This happens when the target run has not completed processing even after the timeout period (7 days).
        * INVALID - Target run is invalid.
    x-displayName: Target Runs
  - name: 3_Device
    description: APIs to retrieve information about the device or delete the device.
    x-displayName: Device
  - name: 3_Device Heartbeat
    description: >-
      APIs to retrieve information about device's heartbeat which contains the
      last seen details.
    x-displayName: Device Heartbeat
  - name: 3_Device Apps
    description: >-
      APIs to get apps installed on iOS devices. Use
      [Application](https://api.esper.io/tag/Application/) to get apps for
      Android devices.
    x-displayName: Device Apps
  - name: 3_Device Enrollment in EMM
    description: APIs to enroll device with Google EMM
    x-displayName: Device Enrollment in EMM
  - name: 3_Operations
    description: APIs to get information about operations
    x-displayName: Operations
  - name: 3_DeviceOperations
    description: APIs to get information about device operations
    x-displayName: DeviceOperations
  - name: 3_MultiOS Remote Viewer
    description: >-
      API to get Remote Viewer activity for the tenant. Currently supports only
      Android devices with DPC 8.4 and above along with RemoteViewer 3.x.
    x-displayName: MultiOS Remote Viewer
  - name: 3_Device V2
    x-displayName: Device V2
  - name: 4_VPP License Management
    description: >-
      APIs for managing VPP licenses for apps. Learn more about [VPP
      licenses](https://help.esper.io/hc/en-us/articles/20361103311761-Setting-Up-Apple-MDM-Management).
    x-displayName: VPP License Management
  - name: 4_VPP App Management
    description: >-
      APIs for getting information about VPP apps. Learn more about [VPP
      apps](https://help.esper.io/hc/en-us/articles/20518326865681-Managing-iOS-Applications).
    x-displayName: VPP App Management
  - name: 4_Tenant Apps
    description: API to manage Enterprise iOS apps for a tenant.
    x-displayName: Tenant Apps
  - name: 4_Apple App Store
    description: API to search apple app store for apps
    x-displayName: Apple App Store
  - name: 4_App List
    description: Unified API to query Webclips and Tenant IOS Apps
    x-displayName: App List
  - name: 4_Webclips
    description: API to manage webclips for a tenant
    x-displayName: Webclips
  - name: 4_Provisioning Profiles
    description: APIs for managing iOS provisioning profiles for app distribution
    x-displayName: Provisioning Profiles
  - name: 4_Esper Apps
    x-displayName: Esper Apps
  - name: 4_Tenant Esper Apps
    x-displayName: Tenant Esper Apps
  - name: 5_Command Request
    description: >-
      APIs to view and manage command requests. Learn more about
      [commands](https://help.esper.io/hc/en-us/articles/16036992814609-Commonly-Used-APIs#h_01H2GZ8WM86BSQBGXE998QY8SM)
      or how to [schedule a
      command](https://help.esper.io/hc/en-us/articles/16036992814609-Commonly-Used-APIs#h_01H2GZ8WM86BSQBGXE998QY8SM).


      Scheduled commands are currently compatible with Android devices.
    x-displayName: Command Request
  - name: 5_Command Status
    description: APIs to view, filter, and manage command requests.
    x-displayName: Command Status
  - name: 6_Converge
    description: >-
      APIs to list and create converge actions for devices. Learn more about
      [converge](https://help.esper.io/hc/en-us/articles/24210344910865-Blueprint-Converge-and-Revert).
    x-displayName: Converge
  - name: 6_Converge Command
    description: API for converge command
    x-displayName: Converge Command
  - name: 7_DEP Sync Request
    description: >-
      APIs to create and access DEP sync request information. Use DEP sync to
      sync the information from your Apple Business Manager account to the Esper
      console.
    x-displayName: DEP Sync Request
  - name: 7_ABM Provisioning
    description: >-
      APIs to perform ABM provisioning. Learn more about [ABM
      provisioning](https://help.esper.io/hc/en-us/articles/20361103311761-Setting-Up-Apple-MDM-Management)
    x-displayName: ABM Provisioning
  - name: 8_APNs certificate
    description: >-
      APIs for managing APNS certificates. Learn more about [APNS
      certificates](https://help.esper.io/hc/en-us/articles/20361103311761-Setting-Up-Apple-MDM-Management)
    x-displayName: APNs certificate
  - name: 8_DEP Tokens
    description: >-
      APIs to create and access DEP tokens. Learn more about [DEP
      tokens](https://help.esper.io/hc/en-us/articles/20361103311761-Setting-Up-Apple-MDM-Management)
    x-displayName: DEP Tokens
  - name: 8_VPP Token Management
    description: >-
      APIs to create, access, and delete VPP tokens. Learn more about [VPP
      tokens](https://help.esper.io/hc/en-us/articles/20361103311761-Setting-Up-Apple-MDM-Management).
    x-displayName: VPP Token Management
  - name: 8_Google Enterprise
    description: APIs to enroll the enterprise in Google EMM.
    x-displayName: Google Enterprise
  - name: 9_FoundryBuilds
    x-displayName: FoundryBuilds
  - name: 9_FoundryDeviceModels
    x-displayName: FoundryDeviceModels
  - name: 9_FoundryEvents
    x-displayName: FoundryEvents
  - name: 10_Reports API
    description: >-
      APIs for managing reports.<br /> Currently supports [App
      Reports](https://help.esper.io/hc/en-us/articles/27379366650257-App-Reports).
    x-displayName: Reports API
  - name: 10_Query API
    x-displayName: Query API
  - name: 10_Ingest API
    x-displayName: Ingest API
paths:
  /enterprise/{enterprise_id}/application/:
    get:
      tags:
        - Application
      summary: List apps in enterprise
      description: Returns Application list
      operationId: getAllApplications
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: application_name
          in: query
          description: filter by application name
          schema:
            type: string
        - name: package_name
          in: query
          description: filter by package name
          schema:
            type: string
        - name: package_name_exact
          in: query
          description: filter by package name (exact match)
          schema:
            type: string
        - name: has_uploaded_version
          in: query
          description: Returns applications having atleast one version uploaded
          schema:
            type: boolean
        - name: category
          in: query
          description: filter by category
          schema:
            type: string
        - name: supported_sdk
          in: query
          description: filter by supported sdk versions
          schema:
            type: integer
        - name: is_active
          in: query
          description: filter by active applications
          schema:
            type: boolean
        - name: is_hidden
          in: query
          description: filter default esper apps
          schema:
            type: boolean
            default: false
        - name: created_on_gt
          in: query
          description: filter applications created after a given timestamp
          schema:
            type: string
            format: datetime
        - name: created_on_lt
          in: query
          description: filter applications created before a given timestamp
          schema:
            type: string
            format: datetime
        - name: updated_on_gt
          in: query
          description: filter applications updated after a given timestamp
          schema:
            type: string
            format: datetime
        - name: updated_on_lt
          in: query
          description: filter applications updated before a given timestamp
          schema:
            type: string
            format: datetime
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Application'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/{enterprise_id}/application/{application_id}/:
    get:
      tags:
        - Application
      summary: Get application information
      description: Returns Application instance
      operationId: getApplication
      parameters:
        - name: application_id
          in: path
          description: A UUID string identifying this application.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Application'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    delete:
      tags:
        - Application
      summary: Delete an application
      description: Empty response
      operationId: deleteApplication
      parameters:
        - name: application_id
          in: path
          description: A UUID string identifying this application.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: The resource was deleted successfully.
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/{enterprise_id}/application/{application_id}/version/:
    get:
      tags:
        - Application
      summary: List App versions
      description: Returns AppVersion list
      operationId: getAppVersions
      parameters:
        - name: application_id
          in: path
          description: A UUID string identifying this application.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
        - name: version_code
          in: query
          description: filter by version code
          schema:
            type: string
        - name: build_number
          in: query
          description: filter by build number
          schema:
            type: string
        - name: is_g_play
          in: query
          description: filter google play applications
          schema:
            type: boolean
        - name: approval_status
          in: query
          description: filter by approval status
          schema:
            type: string
            enum:
              - AVAILABLE
              - ACCEPTED
              - APPROVED
              - REJECTED
        - name: is_enabled
          in: query
          description: filter by enabled versions
          schema:
            type: boolean
        - name: is_default
          in: query
          description: filter by default versions
          schema:
            type: boolean
        - name: created_on_gt
          in: query
          description: filter applications created after a given timestamp
          schema:
            type: string
            format: datetime
        - name: created_on_lt
          in: query
          description: filter applications created before a given timestamp
          schema:
            type: string
            format: datetime
        - name: updated_on_gt
          in: query
          description: filter applications updated after a given timestamp
          schema:
            type: string
            format: datetime
        - name: updated_on_lt
          in: query
          description: filter applications updated before a given timestamp
          schema:
            type: string
            format: datetime
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
            default: 0
        - name: ordering
          in: query
          schema:
            type: string
          description: |
            Order result set by field name.
            * installed_count: order by asc
            * -installed_count: order by desc
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/AppVersion'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/:
    get:
      tags:
        - Application
      summary: Get app version information
      description: Returns AppVersion instance
      operationId: getAppVersion
      parameters:
        - name: version_id
          in: path
          description: A UUID string identifying this app version.
          required: true
          schema:
            type: string
            format: uuid
        - name: application_id
          in: path
          description: A UUID string identifying this application.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
        - name: request_id
          in: query
          description: >-
            If this value exists in cache, delete the application and cache
            entry.
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppVersion'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    delete:
      tags:
        - Application
      summary: Delete app version
      description: Empty response
      operationId: deleteAppVersion
      parameters:
        - name: version_id
          in: path
          description: A UUID string identifying this app version.
          required: true
          schema:
            type: string
            format: uuid
        - name: application_id
          in: path
          description: A UUID string identifying this application.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            No request id is provided and the application is linked to one or
            more templates. Returns a request_id. Call with this request id to
            delete the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppVersionDelete'
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    patch:
      tags:
        - Application
      summary: Patch an App version instance
      operationId: patchAppVersion
      parameters:
        - name: version_id
          in: path
          description: A UUID string identifying this app version.
          required: true
          schema:
            type: string
            format: uuid
        - name: application_id
          in: path
          description: A UUID string identifying this application.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              type: object
              properties:
                release_name:
                  title: Release name
                  type: string
                  description: Name of the Release
                release_comments:
                  title: Release comments
                  type: string
                  description: Additional comments about the release
                release_track:
                  title: Release track
                  type: string
                  description: Description of the content
                  enum:
                    - Alpha
                    - Beta
                    - Production
                is_enabled:
                  title: Is Enabled
                  type: boolean
                  description: Is the app version enabled
                min_sdk_version:
                  title: Minimum SDK version
                  type: string
                  description: >-
                    Version number of minimum SDK version that supports this app
                    version
                target_sdk_version:
                  title: Target SDK version
                  type: string
                  description: Target SDK version that supports this app version
                build_number:
                  title: Build Number
                  type: string
                  description: Build number of this app version
                version_code:
                  title: Version Code
                  type: string
                  description: Verion code of this app version
                approval_status:
                  title: Approval Status
                  type: string
                  description: Approval status of this app version
                  enum:
                    - AVAILABLE
                    - ACCEPTED
                    - APPROVED
                    - REJECTED
                is_default:
                  title: Is default
                  type: boolean
                  description: Is the app version default
        required: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppVersion'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
      x-codegen-request-body-name: data
  /enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/installdevices:
    get:
      tags:
        - Application
      summary: List install devices
      description: Returns list of devices with the specified app version installed
      operationId: getInstallDevices
      parameters:
        - name: version_id
          in: path
          description: A UUID string identifying this app version.
          required: true
          schema:
            type: string
            format: uuid
        - name: application_id
          in: path
          description: A UUID string identifying this application.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
        - name: search
          in: query
          description: >-
            A search term, search based on device name, device alias_name, group
            name
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results to return per page
          schema:
            type: integer
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/InstallDevices'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/{enterprise_id}/application/upload/:
    post:
      tags:
        - Application
      summary: Upload an application to enterprise
      description: Returns application
      operationId: upload
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - app_file
              properties:
                app_file:
                  type: string
                  description: Valid APK file
                  format: binary
          application/x-www-form-urlencoded:
            schema:
              required:
                - app_file
              properties:
                app_file:
                  type: string
                  description: Valid APK file
                  format: binary
        required: true
      responses:
        '201':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  application:
                    $ref: '#/components/schemas/Application'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '415':
          description: Unsupported media type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/emm:
    get:
      tags:
        - Application
      summary: List Google enterprises
      description: Returns enterprise instances
      operationId: getEMMInstances
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/GoogleEnterprise'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/emm/{emm_id}:
    get:
      tags:
        - Application
      summary: Get Google enterprise information
      description: Returns enterprise instance
      operationId: getEMMInstance
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: emm_id
          in: path
          description: An integer representing the ID of enterprise.
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleEnterprise'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/emm/{emm_id}/webtoken/:
    get:
      tags:
        - Application
      summary: List webtokens
      description: Returns list of webtokens
      operationId: getWebtokens
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: emm_id
          in: path
          description: An integer representing the ID of enterprise.
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/GoogleWebToken'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    post:
      tags:
        - Application
      summary: Creates a webtoken instance
      description: Returns webtoken instance
      operationId: createWebtoken
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: emm_id
          in: path
          description: An integer representing the ID of enterprise.
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleWebTokenUpdate'
        required: true
      responses:
        '201':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleWebToken'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/emm/{emm_id}/webtoken/{webtoken_id}:
    get:
      tags:
        - Application
      summary: Get webtoken instance
      description: Returns webtoken instance
      operationId: getWebtokenInstance
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: emm_id
          in: path
          description: An integer representing the ID of enterprise.
          required: true
          schema:
            type: integer
        - name: webtoken_id
          in: path
          description: An integer identifying the webtoken.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleWebToken'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    put:
      tags:
        - Application
      summary: Updates webtoken instance
      description: Returns webtoken instance
      operationId: updateWebtokenInstance
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: emm_id
          in: path
          description: An integer representing the ID of enterprise.
          required: true
          schema:
            type: integer
        - name: webtoken_id
          in: path
          description: An integer identifying the webtoken.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleWebTokenUpdate'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleWebToken'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    patch:
      tags:
        - Application
      summary: Patches webtoken instance
      description: Returns webtoken instance
      operationId: patchWebtokenInstance
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: emm_id
          in: path
          description: An integer representing the ID of enterprise.
          required: true
          schema:
            type: integer
        - name: webtoken_id
          in: path
          description: An integer identifying the webtoken.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleWebTokenUpdateNoRequirements'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleWebToken'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    delete:
      tags:
        - Application
      summary: Deletes a webtoken instance
      description: Empty response
      operationId: deleteWebtokenInstance
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: emm_id
          in: path
          description: An integer representing the ID of enterprise.
          required: true
          schema:
            type: integer
        - name: webtoken_id
          in: path
          description: An integer identifying the webtoken.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/emm/{emm_id}/product/:
    get:
      tags:
        - Application
      summary: List Google Play applications
      description: Returns list of Google Play applications
      operationId: getGoogleApps
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: emm_id
          in: path
          description: An integer representing the ID of enterprise.
          required: true
          schema:
            type: integer
        - name: google_product_id
          in: query
          description: filter by Google product id
          schema:
            type: string
        - name: package_name
          in: query
          description: filter by package name
          schema:
            type: string
        - name: created_on
          in: query
          description: filter by date app created
          schema:
            type: string
            format: date-time
        - name: updated_on
          in: query
          description: filter by date app updated
          schema:
            type: string
            format: date-time
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/GoogleProduct'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    post:
      tags:
        - Application
      summary: Post a Google play application
      description: Returns instance of Google application
      operationId: addGoogleApp
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: emm_id
          in: path
          description: An integer representing the ID of enterprise.
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleProduct'
        required: true
      responses:
        '201':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleProduct'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/emm/{emm_id}/product/{product_id}:
    get:
      tags:
        - Application
      summary: Get application information
      description: Returns application instance
      operationId: getAppInfo
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: emm_id
          in: path
          description: An integer representing the ID of enterprise.
          required: true
          schema:
            type: integer
        - name: product_id
          in: path
          description: A string identifying the product.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleProduct'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    put:
      tags:
        - Application
      summary: Update application instance
      description: Returns application instance
      operationId: updateAppInfo
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: emm_id
          in: path
          description: An integer representing the ID of enterprise.
          required: true
          schema:
            type: integer
        - name: product_id
          in: path
          description: A string identifying the product.
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              type: object
              properties:
                icon_url:
                  type: string
                  format: url
                is_active:
                  title: Is Active
                  type: boolean
                updated_on:
                  type: string
                  format: date-time
                min_sdk_version:
                  title: Minimum SDK Version
                  type: integer
                unapproved:
                  type: boolean
                  title: Unapproving an app deletes it
        required: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleProduct'
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    patch:
      tags:
        - Application
      summary: Patch application instance
      description: Returns application instance
      operationId: patchAppInfo
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: emm_id
          in: path
          description: An integer representing the ID of enterprise.
          required: true
          schema:
            type: integer
        - name: product_id
          in: path
          description: A string identifying the product.
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              type: object
              properties:
                icon_url:
                  type: string
                  format: url
                is_active:
                  title: Is Active
                  type: boolean
                updated_on:
                  type: string
                  format: date-time
                min_sdk_version:
                  title: Minimum SDK Version
                  type: integer
        required: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchGoogleProduct'
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    delete:
      tags:
        - Application
      summary: Delete application instance
      description: Empty response
      operationId: deleteAppInstance
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: emm_id
          in: path
          description: An integer representing the ID of enterprise.
          required: true
          schema:
            type: integer
        - name: product_id
          in: path
          description: A string identifying the product.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/emm/{emm_id}/product/{product_id}/install/:
    get:
      tags:
        - Application
      summary: List product installations
      description: Returns list of product installations
      operationId: listProducts
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: emm_id
          in: path
          description: An integer representing the ID of enterprise.
          required: true
          schema:
            type: integer
        - name: product_id
          in: path
          description: A string identifying the product.
          required: true
          schema:
            type: string
        - name: google_product
          in: query
          description: Filter by Google product
          schema:
            type: string
        - name: google_device
          in: query
          description: Filter by Google device
          schema:
            type: string
        - name: install_state
          in: query
          description: Filter by install state
          schema:
            type: string
        - name: version_code
          in: query
          description: Filter by version code
          schema:
            type: string
        - name: created_on_gt
          in: query
          description: filter installations created after a given timestamp
          schema:
            type: string
            format: datetime
        - name: created_on_lt
          in: query
          description: filter installations created before a given timestamp
          schema:
            type: string
            format: datetime
        - name: is_active
          in: query
          description: filter by active installations
          schema:
            type: boolean
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/GoogleProductInstall'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/applications-minimal/:
    get:
      tags:
        - Application
      summary: Gets minimum information regarding application
      description: Returns id and package name of application
      operationId: getMinAppInfo
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      properties:
                        id:
                          type: string
                          format: uuid
                        package_name:
                          type: string
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/{enterprise_id}/device/:
    get:
      tags:
        - AndroidDevice
      summary: Fetch all devices in an enterprise
      description: Returns a list of devices
      operationId: getAllDevices
      parameters:
        - name: enterprise_id
          in: path
          description: ID of the enterprise
          required: true
          schema:
            type: string
            format: uuid
        - name: name
          in: query
          description: filter by device name
          schema:
            type: string
        - name: group
          in: query
          description: >-
            filter by group id. It will list all the devices under this gorup
            including the subgroups
          schema:
            type: string
            format: uuid
        - name: imei
          in: query
          description: filter by imei
          schema:
            type: string
        - name: serial
          in: query
          description: filter by serial number
          schema:
            type: string
        - name: state
          in: query
          schema:
            $ref: '#/components/schemas/DeviceStateEnum'
        - name: brand
          in: query
          description: filter by brand
          schema:
            type: string
        - name: is_gms
          in: query
          description: filter for gms devices
          schema:
            type: boolean
        - name: search
          in: query
          description: A search term. Search by device name, imei or mac address
          schema:
            type: string
        - name: tags
          in: query
          description: A partial text search for device tags
          schema:
            type: string
        - name: assigned_blueprint_id
          in: query
          description: Filter by assigned blueprint id
          schema:
            type: string
            format: uuid
        - name: current_blueprint_id
          in: query
          description: Filter by current blueprint id
          schema:
            type: string
            format: uuid
        - name: current_blueprint_version_id
          in: query
          description: Filter by current blueprint version id
          schema:
            type: string
            format: uuid
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    format: int64
                  next:
                    type: string
                    format: url
                  previous:
                    type: string
                    format: url
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/DeviceInfo'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/{enterprise_id}/device/{device_id}/:
    get:
      tags:
        - AndroidDevice
      summary: Fetch device details by ID
      description: Returns details of a device
      operationId: getDeviceById
      parameters:
        - name: enterprise_id
          in: path
          description: ID of the enterprise
          required: true
          schema:
            type: string
            format: uuid
        - name: device_id
          in: path
          description: ID of the device
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceInfo'
        '400':
          description: Bad request
      security:
        - apiKey: []
  /enterprise/{enterprise_id}/device/{device_id}/app/:
    get:
      tags:
        - AndroidDevice
      summary: List all device apps
      description: Returns DeviceApp list
      operationId: getDeviceApps
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: device_id
          in: path
          description: A UUID string identifying device.
          required: true
          schema:
            type: string
        - name: package_name
          in: query
          description: Filter by Package name
          schema:
            type: string
        - name: whitelisted
          in: query
          description: Whitelist filter
          schema:
            type: string
        - name: search
          in: query
          description: A search term. Search by app_name.
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/DeviceApp'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/{enterprise_id}/device/{device_id}/app/{app_id}/:
    get:
      tags:
        - AndroidDevice
      summary: Get device app details
      description: Returns DeviceApp instance
      operationId: getDeviceAppById
      parameters:
        - name: app_id
          in: path
          description: A UUID string identifying this device app.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying this device.
          required: true
          schema:
            type: string
        - name: device_id
          in: path
          description: A UUID string identifying this enteprise.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceApp'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/{enterprise_id}/device/{device_id}/install/:
    get:
      tags:
        - AndroidDevice
      summary: List installed apps
      description: Returns AppInstall list
      operationId: getAppInstalls
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: device_id
          in: path
          description: A UUID string identifying device.
          required: true
          schema:
            type: string
        - name: device
          in: query
          description: filter by device id
          schema:
            type: string
        - name: package_name
          in: query
          description: filter by package name
          schema:
            type: string
        - name: application_name
          in: query
          description: filter by application name
          schema:
            type: string
        - name: install_state
          in: query
          description: filter by install state
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/AppInstall'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/{enterprise_id}/device/{device_id}/status/:
    get:
      tags:
        - AndroidDevice
      summary: Get latest device event
      description: Returns DeviceStatus instance
      operationId: getDeviceEvent
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: device_id
          in: path
          description: A UUID string identifying device.
          required: true
          schema:
            type: string
        - name: latest_event
          in: query
          description: Returns the latest event. Must be set to 1.
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/DeviceStatus'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/{enterprise_id}/device/{device_id}/download/eventfeed/:
    get:
      tags:
        - AndroidDevice
      summary: Download Event Feed for Device
      description: Download Event Feed for device, ordered by date the event was created on
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: device_id
          in: path
          description: A UUID string identifying the device
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 250
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/EventFeed'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/{enterprise_id}/group/{group_id}/download/eventfeed/:
    get:
      tags:
        - AndroidDevice
      summary: Download Event Feed for Group
      description: Download Event Feed for group, ordered by date the event was created on
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: group_id
          in: path
          description: A UUID string identifying the group
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 250
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/V0CommandRequest'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/device/{device_id}/report/eventfeed/:
    get:
      tags:
        - AndroidDevice
      summary: Lists event feed for device
      description: Returns event feed for device, ordered by date the event was created on
      operationId: getEventFeed
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: device_id
          in: path
          description: A UUID string identifying the device
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/EventFeed'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/{enterprise_id}/devicegroup/:
    get:
      tags:
        - Device Group
      summary: List device groups
      description: Get a list of groups in the Devices & Groups.
      operationId: getAllGroups
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
        - name: name
          in: query
          description: Filter by group name
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: The initial index from which to return the results.
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/DeviceGroup'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    post:
      tags:
        - Device Group
      summary: Create a device group
      description: Create a group in Devices & Groups.
      operationId: createGroup
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/DeviceGroupUpdate'
        required: true
      responses:
        '201':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceGroup'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
      x-codegen-request-body-name: data
  /enterprise/{enterprise_id}/devicegroup/{group_id}/:
    get:
      tags:
        - Device Group
      summary: Get device group information
      description: >-
        Find a group by its ID. Use List groups to find a group’s ID in Devices
        & Groups.
      operationId: getGroupById
      parameters:
        - name: group_id
          in: path
          description: A UUID string identifying this enterprise device group.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceGroup'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    put:
      tags:
        - Device Group
      summary: Update device group
      description: Update a group in Devices & Groups.
      operationId: updateGroup
      parameters:
        - name: group_id
          in: path
          description: A UUID string identifying this enterprise device group.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
        - name: action
          in: query
          description: add / remove / rename / move
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/DeviceGroupUpdate'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceGroup'
        '400':
          description: User update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
      x-codegen-request-body-name: data
    delete:
      tags:
        - Device Group
      summary: Delete a device group
      description: Delete a group from Devices & Groups.
      operationId: deleteGroup
      parameters:
        - name: group_id
          in: path
          description: A UUID string identifying this enterprise device group.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    patch:
      tags:
        - Device Group
      summary: Partially update a device group
      description: Partially update a group in Devices & Groups.
      operationId: partialUpdateGroup
      parameters:
        - name: group_id
          in: path
          description: A UUID string identifying this enterprise device group.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
        - name: action
          in: query
          description: add / remove / rename / move
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/DeviceGroupPartialUpdate'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceGroup'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
      x-codegen-request-body-name: data
  /enterprise/{enterprise_id}/devicegroup/thumbnail/:
    post:
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
      tags:
        - Device Group
      summary: Upload a thumbnail pic
      description: Upload an image to represent the group in Devices & Groups.
      operationId: uploadGroupThumbnail
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                image_file:
                  type: string
                  format: binary
      responses:
        '200':
          description: Thumbnail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupThumbnail'
      security:
        - apiKey: []
      x-codegen-request-body-name: data
    get:
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
      tags:
        - Device Group
      summary: List thumbnail pics
      description: Get a list of group thumbnail image files in Devices & Groups.
      operationId: listGroupThumbnail
      security:
        - apiKey: []
      responses:
        '200':
          description: Thumbnail
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  previous:
                    type: string
                  next:
                    type: string
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/GroupThumbnail'
  /enterprise/{enterprise_id}/devicegroup/thumbnail/{thumbnail_id}/:
    get:
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/GroupThumbnailID'
      tags:
        - Device Group
      summary: Get thumbnail detail
      description: "Get a thumbnail by its ID. Use List thumbnail pics to find thumbnail IDs.\_"
      operationId: getGroupThumbnail
      security:
        - apiKey: []
      responses:
        '200':
          description: Thumbnail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupThumbnail'
    delete:
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/GroupThumbnailID'
      tags:
        - Device Group
      summary: Delete group thumbnail
      description: Delete a thumbnail in Devices & Groups.
      operationId: deleteGroupThumbnail
      security:
        - apiKey: []
      responses:
        '204':
          description: Deleted group thumbnail
        '401':
          description: Group thumbnail delete error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v2/subgroups/:
    get:
      tags:
        - Device Group
      summary: List the subgroups of list of groups
      description: Returns EnterpriseDeviceGroup list
      operationId: getAllSubGroups
      parameters:
        - name: parent_group_ids
          in: query
          description: >-
            Filter by parent group ids. This is a comma separated list of group
            ids.
          schema:
            type: string
        - name: immediate
          in: query
          description: >-
            This is a boolean value. If true, only immediate subgroups are
            returned.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - content
                type: object
                properties:
                  content:
                    items:
                      $ref: '#/components/schemas/DeviceSubGroup'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/{enterprise_id}/policy/:
    get:
      tags:
        - Enterprise Policy
      summary: List all policies in enterprise
      description: Returns Policies list
      operationId: listPolicies
      parameters:
        - name: enterprise_id
          in: path
          description: ID of the enterprise
          required: true
          schema:
            type: string
            format: uuid
        - name: name
          in: query
          description: filter by policy name
          schema:
            type: string
        - name: is_active
          in: query
          description: filter by Active policies
          schema:
            type: boolean
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/EnterprisePolicy'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    post:
      tags:
        - Enterprise Policy
      summary: Create a new Enterprise Policy
      description: API to create a new Enterprise Policy
      operationId: createPolicy
      parameters:
        - name: enterprise_id
          in: path
          description: ID of the enterprise
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The request body to create an Enteprise Policy
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/EnterprisePolicy'
        required: true
      responses:
        '201':
          description: command request successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterprisePolicy'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
      x-codegen-request-body-name: request
  /enterprise/{enterprise_id}/policy/{policy_id}/:
    get:
      tags:
        - Enterprise Policy
      summary: Get Enterprise Policy
      description: Returns EnterprisePolicy instance
      operationId: getPolicyById
      parameters:
        - name: policy_id
          in: path
          description: An integer identifying this enterprise policy.
          required: true
          schema:
            type: integer
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterprisePolicy'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    put:
      tags:
        - Enterprise Policy
      summary: Update Enterprise Policy
      description: Returns Enterprise Policy instance
      operationId: updatePolicy
      parameters:
        - name: policy_id
          in: path
          description: An integer identifying this enterprise policy.
          required: true
          schema:
            type: integer
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/EnterprisePolicy'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterprisePolicy'
        '400':
          description: User update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
      x-codegen-request-body-name: data
    delete:
      tags:
        - Enterprise Policy
      summary: Delete a Enterprise Policy
      description: Emtpy response
      operationId: deleteEnterprisePolicy
      parameters:
        - name: policy_id
          in: path
          description: An integer identifying this enterprise policy.
          required: true
          schema:
            type: integer
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    patch:
      tags:
        - Enterprise Policy
      summary: Partial update EnterprisePolicy
      description: Returns EnterprisePolicy instance
      operationId: partialupdatePolicy
      parameters:
        - name: policy_id
          in: path
          description: An integer identifying this enterprise policy.
          required: true
          schema:
            type: integer
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/EnterprisePolicyPartialUpdate'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterprisePolicy'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
      x-codegen-request-body-name: data
  /v0/enterprise/{enterprise_id}/command/:
    get:
      tags:
        - Commands V2
      summary: List command requests
      description: API to get and filter command requests
      operationId: listCommandRequest
      parameters:
        - name: enterprise_id
          in: path
          description: ID of the enterprise
          required: true
          schema:
            type: string
            format: uuid
        - name: command_type
          in: query
          description: Filter by type of command request i.e device, group etc
          schema:
            type: string
        - name: devices
          in: query
          description: Filter by device IDs. Accepts comma separated values.
          schema:
            type: string
        - name: device_type
          in: query
          description: Filter by device type i.e active, inactive etc
          schema:
            type: string
        - name: command
          in: query
          description: Filter by command name
          schema:
            type: string
        - name: issued_by
          in: query
          description: Filter by user. Accepts user id.
          schema:
            type: string
      responses:
        '200':
          description: on successful request
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    format: int64
                  next:
                    type: string
                    format: url
                  previous:
                    type: string
                    format: url
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/V0CommandRequest'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    post:
      tags:
        - Commands V2
      summary: Create a command request
      description: API to create a command request for the device.
      operationId: createCommand
      parameters:
        - name: enterprise_id
          in: path
          description: ID of the enterprise
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The request body to create a command for set of devices or groups
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/V0CommandRequest'
        required: true
      responses:
        '201':
          description: command request successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V0CommandRequest'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
      x-codegen-request-body-name: request
  /v0/enterprise/{enterprise_id}/command/{request_id}/status/:
    get:
      tags:
        - Commands V2
      summary: get status list for command request
      description: API to get and filter command request status
      operationId: getCommandRequestStatus
      parameters:
        - name: enterprise_id
          in: path
          description: ID of the enterprise
          required: true
          schema:
            type: string
            format: uuid
        - name: request_id
          in: path
          description: ID for the command request
          required: true
          schema:
            type: string
            format: uuid
        - name: device
          in: query
          description: Filter status result by device id.
          schema:
            type: string
        - name: state
          in: query
          description: Filter by command state
          schema:
            type: string
      responses:
        '200':
          description: on successful request
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    format: int64
                  next:
                    type: string
                    format: url
                  previous:
                    type: string
                    format: url
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/V0CommandStatus1'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/content/:
    get:
      tags:
        - Content
      summary: List content
      description: Get all files in a tenant
      operationId: getAllContent
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: search
          in: query
          description: Seach by tags, description
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: The initial index from which to return the results.
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Content'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/content/{content_id}/:
    get:
      tags:
        - Content
      summary: Get content information
      description: Get information about a file
      operationId: getContent
      parameters:
        - name: content_id
          in: path
          description: A UUID string identifying a content instance.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Content'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    delete:
      tags:
        - Content
      summary: Delete Content
      description: Delete content.
      operationId: deleteContent
      parameters:
        - name: content_id
          in: path
          description: A UUID string identifying a content instance.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: The resource was deleted successfully.
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    patch:
      tags:
        - Content
      summary: Patch a content instance
      operationId: patchContent
      parameters:
        - name: content_id
          in: path
          description: A UUID string identifying a content instance.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              type: object
              properties:
                tags:
                  title: Tags
                  type: array
                  description: Tags for the content
                  items:
                    maxLength: 255
                    type: string
                description:
                  title: Description
                  type: string
                  description: Description of the content
        required: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Content'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '415':
          description: Unsupported media type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
      x-codegen-request-body-name: data
  /v0/enterprise/{enterprise_id}/content/upload/:
    post:
      tags:
        - Content
      summary: Upload new content
      description: Uploaded content to Esper
      operationId: postContent
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - key
              properties:
                key:
                  type: string
                  description: Valid file to upload
                  format: binary
        required: true
      responses:
        '200':
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Content'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '415':
          description: Unsupported media type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/content/remote-file/:
    post:
      tags:
        - Content
      summary: Upload file to Remote File Manager
      description: >-
        Upload file through SCAPI server to REMOTE_FILE_MANAGER bucket. Files
        are automatically deleted after 1 day.
      operationId: uploadRemoteFile
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - file
              properties:
                file:
                  type: string
                  description: The file to upload (max 50MB)
                  format: binary
                filename:
                  type: string
                  description: Custom filename (optional, defaults to uploaded file name)
                content_type:
                  type: string
                  description: MIME type of the file (optional, auto-detected)
        required: true
      responses:
        '201':
          description: File uploaded successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  file_key:
                    type: string
                    description: Unique storage key for the file
                    example: 123/files/document_abc123.pdf
                  bucket:
                    type: string
                    description: Storage bucket name
                    example: REMOTE_FILE_MANAGER
                  file_size:
                    type: integer
                    description: Size of uploaded file in bytes
                    example: 1048576
                  content_type:
                    type: string
                    description: Detected/validated MIME type
                    example: application/pdf
                  auto_delete_after_minutes:
                    type: integer
                    description: When file will be auto-deleted
                    example: 1440
                  download_url:
                    type: string
                    description: Pre-signed URL for downloading the file
                    example: >-
                      https://s3.amazonaws.com/REMOTE_FILE_MANAGER/123/files/document_abc123.pdf?AWSAccessKeyId=...
                  download_expires_in:
                    type: integer
                    description: Download URL expiration time in seconds
                    example: 3600
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: No file provided
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: File too large (max 50MB)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: File size exceeds maximum allowed size of 52428800 bytes
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Failed to upload file
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/content/remote-file/generate_download_url/:
    post:
      tags:
        - Content
      summary: Generate download URL for existing file
      description: >-
        Generate a pre-signed download URL for an existing file in
        REMOTE_FILE_MANAGER bucket
      operationId: generateDownloadUrl
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              required:
                - file_key
              properties:
                file_key:
                  type: string
                  description: The storage key of the file to download
                  example: 123/files/document_abc123.pdf
                expires_in:
                  type: integer
                  description: URL expiration time in seconds (optional, default 3600)
                  default: 3600
                  minimum: 60
                  maximum: 86400
        required: true
      responses:
        '200':
          description: Download URL generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  file_key:
                    type: string
                    description: The storage key of the file
                    example: 123/files/document_abc123.pdf
                  download_url:
                    type: string
                    description: Pre-signed URL for downloading the file
                    example: >-
                      https://s3.amazonaws.com/REMOTE_FILE_MANAGER/123/files/document_abc123.pdf?AWSAccessKeyId=...
                  expires_in:
                    type: integer
                    description: URL expiration time in seconds
                    example: 3600
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: file_key is required
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Failed to generate download URL
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/alertchannels/:
    get:
      tags:
        - Alerts
      summary: List alert channels in enterprise
      description: Returns list of alert channels
      operationId: listAlertChannels
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: name
          in: query
          description: Filter alert channels by name.
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/AlertChannelsV1'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    post:
      tags:
        - Alerts
      summary: Creates alert channel
      description: Returns instance of alert channel
      operationId: createAlertChannel
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAlertChannelsV1'
        required: true
      responses:
        '201':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertChannelsV1'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/alertchannels/{alert_id}:
    get:
      tags:
        - Alerts
      summary: Get alert channel
      description: Returns instance of alert channel
      operationId: getAlertChannel
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: alert_id
          in: path
          description: An integer identifying the alert channel.
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertChannelsV1'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    put:
      tags:
        - Alerts
      summary: Update alert channel information
      description: Returns alert channel instance
      operationId: updateAlertChannel
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying the enterprise.
          required: true
          schema:
            type: string
            format: uuid
        - name: alert_id
          in: path
          description: An integer identifying the alert channel.
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAlertChannelsV1'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertChannelsV1'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    patch:
      tags:
        - Alerts
      summary: Partially updates alert channel information
      description: Returns alert channel instance
      operationId: patchAlertChannel
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying the enterprise.
          required: true
          schema:
            type: string
            format: uuid
        - name: alert_id
          in: path
          description: An integer identifying the alert channel.
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAlertChannelsV1'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertChannelsV1'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    delete:
      tags:
        - Alerts
      summary: Delete an alert channel
      description: Empty response
      operationId: deleteAlertChannel
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying the enterprise.
          required: true
          schema:
            type: string
            format: uuid
        - name: alert_id
          in: path
          description: An integer identifying the alert channel.
          required: true
          schema:
            type: integer
      responses:
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/alarmrules/:
    get:
      tags:
        - Alarms
      summary: Get list of alarm rules
      description: Returns list of alarm rules
      operationId: getAlarmRules
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: name
          in: query
          description: Filter alarm rules by name.
          schema:
            type: string
        - name: description
          in: query
          description: Filter alarm rules by description.
          schema:
            type: string
        - name: is_active
          in: query
          description: Filter active alarm rules.
          schema:
            type: boolean
        - name: created_on_gt
          in: query
          description: Filter alarm rules created after a given timestamp.
          schema:
            type: string
        - name: created_on_lt
          in: query
          description: Filter alarm rules created before a given timestamp.
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/AlarmRule'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    post:
      tags:
        - Alarms
      summary: Creates instance of alarm rules
      description: Returns instance of alarm rules
      operationId: addAlarmRule
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAlarmRule'
        required: true
      responses:
        '201':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlarmRule'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/alarmrules/{alarm_id}/:
    get:
      tags:
        - Alarms
      summary: Get instance of alarm rule
      description: Returns instance of alarm rule
      operationId: getAlarmRule
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: alarm_id
          in: path
          description: A UUID string identifying the alarm ruleset.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlarmRule'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    put:
      tags:
        - Alarms
      summary: Update alarm rules
      description: Return instance of alarm rules
      operationId: updateAlarmRule
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: alarm_id
          in: path
          description: A UUID string identifying the alarm ruleset.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAlarmRule'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlarmRule'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    patch:
      tags:
        - Alarms
      summary: Partially updates alarm rules
      description: Returns instance of alarm rules
      operationId: patchAlarmRule
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: alarm_id
          in: path
          description: A UUID string identifying the alarm ruleset.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAlarmRule'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlarmRule'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    delete:
      tags:
        - Alarms
      summary: Deletes alarm rule
      description: Empty response
      operationId: deleteAlarmRule
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: alarm_id
          in: path
          description: A UUID string identifying the alarm ruleset.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/alarmrules/{alarm_id}/alarmhistory/:
    get:
      tags:
        - Alarms
      summary: Get history of alarm rule
      description: Returns instance of alarm rule history
      operationId: getAlarmHistory
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: alarm_id
          in: path
          description: A UUID string identifying the alarm ruleset.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlarmHistory'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/wallpaper/:
    get:
      tags:
        - Wallpapers
      summary: Get list of wallpapers
      description: Returns list of wallpapers
      operationId: getWallpapers
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: created_on_gt
          in: query
          description: Filter applications created after a given timestamp.
          schema:
            type: string
            format: datetime
        - name: created_on_lt
          in: query
          description: Filter applications created before a given timestamp.
          schema:
            type: string
            format: datetime
        - name: updated_on_gt
          in: query
          description: Filter applications updated after a given timestamp.
          schema:
            type: string
            format: datetime
        - name: updated_on_lt
          in: query
          description: Filter applications updated before a given timestamp.
          schema:
            type: string
            format: datetime
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Wallpaper'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    post:
      tags:
        - Wallpapers
      summary: Create wallpaper
      description: Returns instance of created wallpaper
      operationId: addWallpaper
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - image_file
                - orientation
              properties:
                image_file:
                  type: string
                  description: Valid file to upload
                  format: path
                orientation:
                  type: string
                  description: Orientation of image e.g. landscape
        required: true
      responses:
        '201':
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Wallpaper'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '415':
          description: Unsupported media type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/wallpaper/{wallpaper_id}/:
    get:
      tags:
        - Wallpapers
      summary: Get instance of wallpaper
      description: Returns instance of wallpaper
      operationId: getWallpaper
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: wallpaper_id
          in: path
          description: A UUID string identifying the wallpaper.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Wallpaper'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    delete:
      tags:
        - Wallpapers
      summary: Deletes instance of wallpaper
      description: Empty response
      operationId: deleteWallpaper
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: wallpaper_id
          in: path
          description: A UUID string identifying the wallpaper.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/tile-icons/:
    get:
      tags:
        - Tile Icon
      summary: Get List of Device Tile Icons
      description: Returns list of tile icons
      operationId: getTileIcons
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: created_on_gt
          in: query
          description: Filter tile icons created after a given timestamp.
          schema:
            type: string
            format: datetime
        - name: created_on_lt
          in: query
          description: Filter tile icons created before a given timestamp.
          schema:
            type: string
            format: datetime
        - name: updated_on_gt
          in: query
          description: Filter tile icons updated after a given timestamp.
          schema:
            type: string
            format: datetime
        - name: updated_on_lt
          in: query
          description: Filter tile icons updated before a given timestamp.
          schema:
            type: string
            format: datetime
        - name: category
          in: query
          description: Filter tile icons by category.
          schema:
            type: string
        - name: device_model
          in: query
          description: Filter tile icons by device model.
          schema:
            type: string
        - name: custom
          in: query
          description: Filter custom tile icons.
          schema:
            type: boolean
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/TileIcon'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    post:
      tags:
        - Tile Icon
      summary: Create a  tile icon
      description: Create a tile icon.
      operationId: addTileIcon
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - icon_file
                - device_model
                - enterprise
              properties:
                icon_file:
                  type: string
                  description: Valid file to upload
                  format: path
                device_model:
                  type: string
                  description: Device model
                enterprise:
                  type: string
                  format: uuid
                  description: UUID string representing enterprise of tile icon
        required: true
      responses:
        '201':
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TileIcon'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '415':
          description: Unsupported media type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/tile-icons/{tileicons_id}/:
    get:
      tags:
        - Tile Icon
      summary: Get instance of a tile icon
      description: Get a tile icon.
      operationId: getTileIcon
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: tileicons_id
          in: path
          description: A UUID string identifying the tile icon.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TileIcon'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    delete:
      tags:
        - Tile Icon
      summary: Delete a tile icon
      description: Deletes a title icon
      operationId: deleteTileIcon
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: tileicons_id
          in: path
          description: A UUID string identifying the tile icon.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/tile-icon-apply/:
    post:
      tags:
        - Tile Icon
      summary: Set a tile icon for a device
      description: Apply a tile icon to a device.
      operationId: applyTileIcon
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplyTileIcon'
        required: true
      responses:
        '201':
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplyTileIcon'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/tile-icon-unapply/:
    post:
      tags:
        - Tile Icon
      summary: Removes tile icon for device
      description: Returns the model of the device(s)
      operationId: removeTileIcon
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              required:
                - model
              properties:
                model:
                  type: string
                  description: Model of device
        required: true
      responses:
        '201':
          description: Successful Operation
          content:
            application/json:
              schema:
                properties:
                  model:
                    type: string
                    description: Model of device
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/report/location/:
    get:
      tags:
        - Device Telemetry
      summary: Get list of device locations
      description: Returns list of device locations
      operationId: getDeviceLocations
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
        - name: offset
          in: query
          description: The initial index from which to return the results.
          schema:
            type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/DeviceLocations'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/report/location/{location_id}/:
    get:
      tags:
        - Device Telemetry
      summary: Get location of specific device
      description: Returns location information of device
      operationId: getSpecificLocations
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: location_id
          in: path
          description: An integer identifying the location.
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceLocations'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/report/device-tiles/:
    get:
      tags:
        - Device Telemetry
      summary: Get list of device tiles reports
      description: Returns list of device tiles reports
      operationId: getDeviceTileReports
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: state
          in: query
          description: Filter device-tile reports by state.
          schema:
            type: integer
        - name: created_on_gt
          in: query
          description: Filter device-tile reports created after a given timestamp.
          schema:
            type: string
            format: datetime
        - name: created_on_lt
          in: query
          description: Flter device-tile reports created before a given timestamp.
          schema:
            type: string
            format: datetime
        - name: provisioned_on_gt
          in: query
          description: Filter device-tile reports provisioned after a given timestamp.
          schema:
            type: string
            format: datetime
        - name: provisioned_on_lt
          in: query
          description: Filter device-tile reports provisioned before a given timestamp.
          schema:
            type: string
            format: datetime
        - name: updated_on_gt
          in: query
          description: Filter device-tile reports updated after a given timestamp.
          schema:
            type: string
            format: datetime
        - name: updated_on_lt
          in: query
          description: Filter device-tile reports updated before a given timestamp.
          schema:
            type: string
            format: datetime
        - name: last_seen_gt
          in: query
          description: Filter device-tile reports last seen after a given timestamp.
          schema:
            type: string
            format: datetime
        - name: last_seen_lt
          in: query
          description: Filter device-tile reports last seen before a given timestamp.
          schema:
            type: string
            format: datetime
        - name: battery_level_gte
          in: query
          description: >-
            Filter device-tile reports by battery level greater than given
            battery level.
          schema:
            type: number
            format: double
        - name: battery_level_lte
          in: query
          description: >-
            Filter device-tile reports by battery level lower than given battery
            level.
          schema:
            type: number
            format: double
        - name: at_risk
          in: query
          description: Filter device-tile reports by whether they are at risk.
          schema:
            type: boolean
        - name: security_status
          in: query
          schema:
            $ref: '#/components/schemas/SecurityStatesEnum'
        - name: status
          in: query
          description: Filter device-tile reports by status.
          schema:
            type: string
        - name: group
          in: query
          description: Filter device-tile reports by group.
          schema:
            type: string
            format: uuid
        - name: group_name
          in: query
          description: Filter device-tile reports by group name.
          schema:
            type: string
        - name: group_name_multi
          in: query
          description: Filter device-tile reports using multiple group names.
          schema:
            type: string
            description: Add group names to filter by comma separating
        - name: group_multi
          in: query
          description: Filter device-tile reports by using multiple group ID's
          schema:
            type: string
            format: uuid
            description: Add group UUID to filter by comma separating
        - name: group_multi_immediate
          in: query
          description: Filter device-tile reports by immediate groups
          schema:
            type: string
        - name: group_null
          in: query
          description: >-
            Filter device-tile reports by availability of group. True returns
            device-tiles with no group. False returns device-tiles with group.
          schema:
            type: string
            format: boolean
            description: Allowed values are True, False, true, false, 1, 0.
        - name: imei
          in: query
          description: Filter device-tile reports by imei.
          schema:
            type: string
        - name: name
          in: query
          description: Filter device-tile reports by device name.
          schema:
            type: string
        - name: recently_added
          in: query
          description: Filter device-tile reports by recently added.
          schema:
            type: boolean
        - name: is_gms
          in: query
          description: Filter device-tile reports for gms devices.
          schema:
            type: boolean
        - name: tags
          in: query
          description: Filter device-tile reports by tag.
          schema:
            type: string
        - name: is_geofence_applied
          in: query
          description: Filter device-tile reports by geofence application.
          schema:
            type: boolean
        - name: serial
          in: query
          description: Filter device-tile reports by device serial id.
          schema:
            type: string
        - name: android_version
          in: query
          description: Filter device-tile reports by android version.
          schema:
            type: integer
        - name: android_version_multi
          in: query
          description: Filter device-tile reports by multiple android versions.
          schema:
            type: integer
            description: List of android versions- comma separated.
        - name: wifi_ssid
          in: query
          description: Filter device-tile reports by wifi-ssid.
          schema:
            type: string
        - name: network_type
          in: query
          description: Filter device-tile reports by network type.
          schema:
            type: string
        - name: network_type_multi
          in: query
          description: Filter device-tile reports by multiple network types.
          schema:
            type: string
            description: List of network types, comma separated.
        - name: model
          in: query
          description: Filter device-tile reports by device model.
          schema:
            type: string
        - name: template
          in: query
          description: Filter device-tile reports by template.
          schema:
            type: string
        - name: template_multi
          in: query
          description: Filter device-tile reports by multiple templates.
          schema:
            type: string
            description: List of templates, comma separated.
        - name: policy
          in: query
          description: Filter device-tile reports by policy name.
          schema:
            type: string
        - name: policy_multi
          in: query
          description: Filter device-tile reports by multiple policies.
          schema:
            type: string
            description: List of policy names, comma separated.
        - name: policy_null
          in: query
          description: Filter device-tile reports by null-value policy.
          schema:
            type: boolean
        - name: dpc_version
          in: query
          description: Filter device-tile reports by DPC version.
          schema:
            type: string
        - name: location
          in: query
          description: Filter device-tile reports by location.
          schema:
            type: string
            description: City or state can be used to filter location.
        - name: active_connection
          in: query
          description: Filter device-tile reports by active connection status.
          schema:
            type: boolean
        - name: device_type
          in: query
          description: Filter device-tile reports by device type.
          schema:
            type: string
        - name: has_seamlessInfo
          in: query
          description: Filter device-tile reports by seamless information.
          schema:
            type: boolean
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/DeviceTiles'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/report/device-tiles/{device_tiles_id}/:
    get:
      tags:
        - Device Telemetry
      summary: Get instance of device tiles report
      description: Returns instance of device tiles report
      operationId: getDeviceTileReport
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: device_tiles_id
          in: path
          description: An integer representing the device tile report.
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceTiles'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/report/status-metrics/:
    get:
      tags:
        - Device Telemetry
      summary: Get status metrics report for enterprise
      description: Returns status metrics report for enterprise
      operationId: getStatusMetrics
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusMetrics'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/report/info/:
    get:
      tags:
        - Daily and Custom Reports
      summary: Get report information
      description: Returns report information
      operationId: getReportInfo
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  reportAvailabilityFrom:
                    type: string
                    format: date-time
                  enableReportsWorkflow:
                    type: boolean
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/report/device-report/:
    get:
      tags:
        - Daily and Custom Reports
      summary: Get device status reports within specified date-time range
      description: Returns device status reports within specified date-time range
      operationId: getDeviceReport
      parameters:
        - name: start_date
          in: query
          required: true
          description: Start date of range in which to retrieve device status reports
          schema:
            type: string
            format: date-time
        - name: end_date
          in: query
          required: true
          description: End date of range in which to retrieve device status reports
          schema:
            type: string
            format: date-time
        - name: sync
          in: query
          required: false
          description: Sync device status report to specified field
          schema:
            type: boolean
            default: true
        - name: fields
          in: query
          required: false
          description: List of fields to add to device status report, comma separated
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  properties:
                    group_id:
                      type: string
                      format: uuid
                    group_name:
                      type: string
                    group_path:
                      type: string
                    active_devices:
                      type: integer
                    inactive_devices:
                      type: integer
                    registered_devices:
                      type: integer
                    new_devices:
                      type: integer
                    disabled_devices:
                      type: integer
                    device_status_reports:
                      type: array
                      items:
                        $ref: '#/components/schemas/DeviceStatusReport'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/report/enterprise-report/:
    get:
      tags:
        - Daily and Custom Reports
      summary: Get enterprise report
      description: Returns enterprise report of devices within specified date-time range
      operationId: getEnterpriseReport
      parameters:
        - name: start_date
          in: query
          required: true
          description: Start date of range in which to retrieve enterprise report.
          schema:
            type: string
            format: date-time
        - name: end_date
          in: query
          required: true
          description: End date of range in which to retrieve enterprise report.
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  peak_active_devices:
                    type: integer
                  provisioned_devices:
                    type: integer
                  registered_devices:
                    type: integer
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/report/group-report/:
    get:
      tags:
        - Daily and Custom Reports
      summary: Get group report
      description: Returns group report of devices within specified date-time range
      operationId: getGroupReport
      parameters:
        - name: start_date
          in: query
          required: true
          description: Start date of range in which to retrieve group report.
          schema:
            type: string
            format: date-time
        - name: end_date
          in: query
          required: true
          description: End date of range in which to retrieve group report.
          schema:
            type: string
            format: date-time
        - name: sync
          in: query
          required: false
          description: Sync device status report to specified field
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GroupReport'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/report/subscription/:
    get:
      tags:
        - Daily and Custom Reports
      summary: Get list of subscription reports
      description: Returns list of subscription reports
      operationId: getSubscriptionReports
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Subscription'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    post:
      tags:
        - Daily and Custom Reports
      summary: Post subscription to enterprise
      description: Returns instance of created subscription
      operationId: addSubscription
      requestBody:
        content:
          application/json:
            schema:
              required:
                - email_ids
              properties:
                email_ids:
                  type: array
                  items:
                    type: string
                    format: email
        required: true
      responses:
        '201':
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /enterprise/report/subscription/{subscription_id}/:
    get:
      tags:
        - Daily and Custom Reports
      summary: Get instance of subscription
      description: Returns instance of subscription
      operationId: getSubscriptionReport
      parameters:
        - name: subscription_id
          in: path
          description: A integer value identifying the subscription
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    put:
      tags:
        - Daily and Custom Reports
      summary: Update subscription
      description: Returns instance of updated subscription
      operationId: updateSubscriptionReport
      parameters:
        - name: subscription_id
          in: path
          description: A integer value identifying the subscription.
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              required:
                - email_ids
              properties:
                email_ids:
                  type: array
                  items:
                    type: string
                    format: email
                is_subscribed:
                  type: boolean
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    patch:
      tags:
        - Daily and Custom Reports
      summary: Partially update subscription
      description: Returns instance of updated subscription
      operationId: patchSubscriptionReport
      parameters:
        - name: subscription_id
          in: path
          description: A integer value identifying the subscription.
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              properties:
                email_ids:
                  type: array
                  items:
                    type: string
                    format: email
                is_subscribed:
                  type: boolean
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    delete:
      tags:
        - Daily and Custom Reports
      summary: Deletes instance of subscription
      description: Empty response
      operationId: deleteSubscriptionReport
      parameters:
        - name: subscription_id
          in: path
          description: A integer value identifying the subscription.
          required: true
          schema:
            type: integer
      responses:
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v2/enterprise/{enterprise_id}/report/status-metrics:
    get:
      tags:
        - Device Telemetry
      summary: Get status metrics report for enterprise v2
      description: Returns status metrics report for enterprise
      operationId: getStatusMetricsV2
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusMetricsV2'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/developerapp/{developerapp_id}/renew-token/:
    post:
      tags:
        - Token (Deprecated)
      summary: Renew Token
      description: API to renew your token
      operationId: renewToken
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
            format: uuid
        - name: developerapp_id
          in: path
          description: A UUID string identifying the developerapp
          required: true
          schema:
            type: string
            format: uuid
        - name: access_token
          in: query
          description: Token to be renewed
          required: true
          schema:
            type: string
      responses:
        '201':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenRenewV0'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/device/{device_id}/command-history/:
    get:
      tags:
        - Commands V2
      summary: get command history for device
      description: API to get and filter deivce command history
      operationId: getDeviceCommandHistory
      parameters:
        - name: enterprise_id
          in: path
          description: Id of the enterprise
          required: true
          schema:
            type: string
            format: uuid
        - name: device_id
          in: path
          description: Id for the command request
          required: true
          schema:
            type: string
            format: uuid
        - name: state
          in: query
          description: Filter by command state
          schema:
            type: string
      responses:
        '200':
          description: on successful request
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    format: int64
                  next:
                    type: string
                    format: url
                  previous:
                    type: string
                    format: url
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/V0CommandStatus'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/geofence/:
    get:
      tags:
        - Geofence
      summary: List Geofences in Enterprise
      description: API to view all the geofences in an enterprise
      operationId: getAllGeofences
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying the enterprise.
          required: true
          schema:
            type: string
            format: uuid
        - name: search
          in: query
          description: A search term.
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
        - name: offset
          in: query
          description: The initial index from which to return the results.
          schema:
            type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Geofence'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/geofence/{geofence_id}/:
    get:
      tags:
        - Geofence
      summary: Get geofence information
      description: Returns geofence instance
      operationId: getGeofence
      parameters:
        - name: geofence_id
          in: path
          description: A UUID string identifying the geofence.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying the enterprise.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Geofence'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    put:
      tags:
        - Geofence
      summary: Update geofence information
      description: Returns geofence instance
      operationId: updateGeofence
      parameters:
        - name: geofence_id
          in: path
          description: A UUID string identifying the geofence.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying the enterprise.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Geofence'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Geofence'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
      x-codegen-request-body-name: data
    delete:
      tags:
        - Geofence
      summary: Delete a geofence
      description: Empty response
      operationId: deleteGeofence
      parameters:
        - name: geofence_id
          in: path
          description: A UUID string identifying the geofence.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying the enterprise.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    patch:
      tags:
        - Geofence
      summary: Partially updates geofence information
      description: Returns geofence instance
      operationId: partialUpdateGeofence
      parameters:
        - name: geofence_id
          in: path
          description: A UUID string identifying the geofence.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying the enterprise.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/GeofenceUpdate'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Geofence'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
      x-codegen-request-body-name: data
  /v0/enterprise/{enterprise_id}/create-apply-geo-fence/:
    post:
      tags:
        - Geofence
      summary: Create a geofence
      description: Returns Geofence instance
      operationId: createGeofence
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying the enterprise.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/GeofenceCreate'
        required: true
      responses:
        '201':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Geofence'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
      x-codegen-request-body-name: data
    get:
      tags:
        - Geofence
      summary: List Geofences in Enterprise
      description: API to view all the geofences in an enterprise
      operationId: getGeofenceList
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying the enterprise.
          required: true
          schema:
            type: string
            format: uuid
        - name: search
          in: query
          description: A search term.
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
        - name: offset
          in: query
          description: The initial index from which to return the results.
          schema:
            type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Geofence'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v0/enterprise/{enterprise_id}/create-apply-geofence/{geofence_id}/:
    get:
      tags:
        - Geofence
      summary: Get geofence information
      description: Returns geofence instance
      operationId: getTheGeofence
      parameters:
        - name: geofence_id
          in: path
          description: A UUID string identifying the geofence.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying the enterprise.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Geofence'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    delete:
      tags:
        - Geofence
      summary: Delete a geofence
      description: Empty response
      operationId: deleteTheGeofence
      parameters:
        - name: geofence_id
          in: path
          description: A UUID string identifying the geofence.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying the enterprise.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/:
    get:
      tags:
        - Company Settings
      summary: Get your company settings
      description: >
        Returns company settings. Formerly known as get your enterprise
        information.
      operationId: getEnterprise
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterpriseV1'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    patch:
      tags:
        - Company Settings
      summary: Partially update company settings
      description: |
        Returns updated company settings.
        Formerly known as partial update enterprise information.
      operationId: partialUpdateEnterprise
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/EnterpriseUpdateV1'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterpriseV1'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
      x-codegen-request-body-name: data
  /v1/enterprise/{enterprise_id}/application/:
    get:
      tags:
        - Application V1
      summary: List apps in enterprise
      description: Returns Application list
      operationId: getAllApplicationsV1
      parameters:
        - name: enterprise_id
          in: path
          description: A UUID string identifying this enterprise.
          required: true
          schema:
            type: string
        - name: application_name
          in: query
          description: filter by application name
          schema:
            type: string
        - name: package_name
          in: query
          description: filter by package name
          schema:
            type: string
        - name: package_name_exact
          in: query
          description: filter by package name (exact match)
          schema:
            type: string
        - name: has_uploaded_version
          in: query
          description: Returns applications having atleast one version uploaded
          schema:
            type: boolean
        - name: category
          in: query
          description: filter by category
          schema:
            type: string
        - name: supported_sdk
          in: query
          description: filter by supported sdk versions
          schema:
            type: integer
        - name: is_active
          in: query
          description: filter by active applications
          schema:
            type: boolean
        - name: is_hidden
          in: query
          description: filter default esper apps
          schema:
            type: boolean
            default: false
        - name: created_on_gt
          in: query
          description: filter applications created after a given timestamp
          schema:
            type: string
            format: datetime
        - name: created_on_lt
          in: query
          description: filter applications created before a given timestamp
          schema:
            type: string
            format: datetime
        - name: updated_on_gt
          in: query
          description: filter applications updated after a given timestamp
          schema:
            type: string
            format: datetime
        - name: updated_on_lt
          in: query
          description: filter applications updated before a given timestamp
          schema:
            type: string
            format: datetime
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
            default: 0
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/ApplicationV1'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/application/{application_id}/:
    get:
      tags:
        - Application V1
      summary: Get application information
      description: Returns Application instance
      operationId: getApplicationv1
      parameters:
        - name: application_id
          in: path
          description: A UUID string identifying this application.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationV1'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    delete:
      tags:
        - Application V1
      summary: Delete an application
      description: Empty response
      operationId: deleteApplicationV1
      parameters:
        - name: application_id
          in: path
          description: A UUID string identifying this application.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: The resource was deleted successfully.
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/application/{application_id}/version/:
    get:
      tags:
        - Application V1
      summary: List App versions
      description: Returns AppVersion list
      operationId: getAppVersionsV1
      parameters:
        - name: application_id
          in: path
          description: A UUID string identifying this application.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
        - name: version_code
          in: query
          description: filter by version code
          schema:
            type: string
        - name: build_number
          in: query
          description: filter by build number
          schema:
            type: string
        - name: is_g_play
          in: query
          description: filter google play applications
          schema:
            type: boolean
        - name: approval_status
          in: query
          description: filter by approval status
          schema:
            type: string
            enum:
              - AVAILABLE
              - ACCEPTED
              - APPROVED
              - REJECTED
        - name: is_enabled
          in: query
          description: filter by enabled versions
          schema:
            type: boolean
        - name: is_default
          in: query
          description: filter by default versions
          schema:
            type: boolean
        - name: created_on_gt
          in: query
          description: filter applications created after a given timestamp
          schema:
            type: string
            format: datetime
        - name: created_on_lt
          in: query
          description: filter applications created before a given timestamp
          schema:
            type: string
            format: datetime
        - name: updated_on_gt
          in: query
          description: filter applications updated after a given timestamp
          schema:
            type: string
            format: datetime
        - name: updated_on_lt
          in: query
          description: filter applications updated before a given timestamp
          schema:
            type: string
            format: datetime
        - name: limit
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
        - name: offset
          in: query
          description: Return results from this index.
          schema:
            type: integer
            default: 0
        - name: ordering
          in: query
          schema:
            type: string
          description: |
            Order result set by field name.
            * installed_count: order by asc
            * -installed_count: order by desc
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/AppVersionV1'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/:
    get:
      tags:
        - Application V1
      summary: Get app version information
      description: Returns AppVersion instance
      operationId: getAppVersionV1
      parameters:
        - name: version_id
          in: path
          description: A UUID string identifying this app version.
          required: true
          schema:
            type: string
            format: uuid
        - name: application_id
          in: path
          description: A UUID string identifying this application.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppVersionV1'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    delete:
      tags:
        - Application V1
      summary: Delete app version
      description: Empty response
      operationId: deleteAppVersionV1
      parameters:
        - name: version_id
          in: path
          description: A UUID string identifying this app version.
          required: true
          schema:
            type: string
            format: uuid
        - name: application_id
          in: path
          description: A UUID string identifying this application.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
        - name: request_id
          in: query
          description: >-
            If this value exists in cache, delete the application and cache
            entry.
          schema:
            type: string
      responses:
        '200':
          description: >-
            No request id is provided and the application is linked to one or
            more templates. Returns a request_id. Call with this request id to
            delete the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppVersionDelete'
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
    patch:
      tags:
        - Application V1
      summary: Patch an App version instance
      operationId: patchAppVersionV1
      parameters:
        - name: version_id
          in: path
          description: A UUID string identifying this app version.
          required: true
          schema:
            type: string
            format: uuid
        - name: application_id
          in: path
          description: A UUID string identifying this application.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              type: object
              properties:
                release_name:
                  title: Release name
                  type: string
                  description: Name of the Release
                is_default:
                  title: Is Default
                  type: boolean
                  description: Is the app version the deafult
                min_sdk_version:
                  title: Minimum SDK version
                  type: string
                  description: >-
                    Version number of minimum SDK version that supports this app
                    version
                build_number:
                  title: Build Number
                  type: string
                  description: Build number of this app version
                version_code:
                  title: Version Code
                  type: string
                  description: Verion code of this app version
                approval_status:
                  title: Approval Status
                  type: string
                  description: Approval status of this app version
                  enum:
                    - AVAILABLE
                    - ACCEPTED
                    - APPROVED
                    - REJECTED
        required: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppVersionV1'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
      x-codegen-request-body-name: data
  /v1/enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/installdevices:
    get:
      tags:
        - Application V1
      summary: List install devices
      description: Returns list of devices with the specified app version installed
      operationId: getInstallDevicesV1
      parameters:
        - name: version_id
          in: path
          description: A UUID string identifying this app version.
          required: true
          schema:
            type: string
            format: uuid
        - name: application_id
          in: path
          description: A UUID string identifying this application.
          required: true
          schema:
            type: string
            format: uuid
        - name: enterprise_id
          in: path
          description: A UUID string identifying enterprise.
          required: true
          schema:
            type: string
        - name: search
          in: query
          description: >-
            A search term, search based on device name, device alias_name, group
            name
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results to return per page
          schema:
            type: integer
        - name: offset
          in: query
          description: The initial index from which to return the results
          schema:
            type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: url
                    nullable: true
                  previous:
                    type: string
                    format: url
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/InstallDevices'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /v1/token-info/:
    get:
      tags:
        - Token (Deprecated)
      summary: Token Information
      description: >-
        API to get resource information associated with your token like your
        enterprise, user etc
      operationId: getTokenInfo
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenInfoV1'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
  /user_info/:
    get:
      tags:
        - User
      summary: User information
      description: User information
      operationId: userInfo
      security:
        - apiKey: []
      responses:
        '200':
          description: User Info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /authn2/v0/tenant/{enterprise_id}/invite:
    post:
      tags:
        - User
      summary: Invite a user
      description: Invite a user to a tenant
      operationId: tenantUserInvite
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantUserInviteRequest'
      responses:
        '201':
          description: Invite sent to user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantUserInviteCreateResponse'
        '400':
          description: tenant user invite create error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
    get:
      tags:
        - User
      summary: List user invites
      description: List user invites in a tenant
      operationId: getTenantUserInvites
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
      responses:
        '201':
          description: Tenant user invites
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  userinvites:
                    type: array
                    items:
                      $ref: '#/components/schemas/TenantUserInviteResponse'
        '400':
          description: List tenant user invites error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
  /authn2/v0/tenant/{enterprise_id}/invite/{invite_id}:
    delete:
      tags:
        - User
      summary: Delete a invite
      description: Delete a invite
      operationId: deleteTenantUserInvite
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/InviteID'
      responses:
        '204':
          description: Deleted tenant user invite
        '400':
          description: Tenant user invite delete error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
  /user/:
    get:
      tags:
        - User
      summary: Get Users
      description: Get a list of users in the tenant
      operationId: getUsers
      security:
        - apiKey: []
      responses:
        '200':
          description: Users List
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  previous:
                    type: string
                  next:
                    type: string
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/UserList'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - User (Deprecated)
      summary: Create a new User
      description: Create a new User
      operationId: createUser
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreate'
      responses:
        '201':
          description: User Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /user/{user_id}/:
    get:
      tags:
        - User
      summary: Get User Information
      description: Get User Information
      operationId: getUser
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/UserID'
      responses:
        '200':
          description: User Details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - User (Deprecated)
      summary: Update a User
      description: Update a User
      operationId: updateUser
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/UserID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreate'
      responses:
        '200':
          description: Updated User
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    patch:
      tags:
        - User (Deprecated)
      summary: Partial update a User
      description: Partial update a User
      operationId: partialUpdateUser
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/UserID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdate'
      responses:
        '200':
          description: Partial updated User
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - User (Deprecated)
      summary: Delete a user
      operationId: userDelete
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/UserID'
      responses:
        '204':
          description: Deleted User
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /authz2/v1/users/{user_id}:
    put:
      tags:
        - User
      summary: Update user role
      description: Update user's role
      operationId: updateDifferentUser
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/AuthNUserID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDifferentUserRequest'
      responses:
        '200':
          description: User Updated Successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
  /authn2/v0/user/{user_id}:
    put:
      tags:
        - User
      summary: Update user profile
      description: Update user's profile
      operationId: updateOwnUser
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/AuthNUserID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOwnUserRequest'
      responses:
        '200':
          description: User Updated Successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
  /authz2/v1/users/{user_id}/groups:
    get:
      tags:
        - User
      summary: Get user groups
      description: Get user's groups
      operationId: getUserGroups
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/AuthNUserID'
        - in: query
          name: sub_groups
          description: >-
            Set to true to get a list of the user’s subgroup access. Users have
            access to their group’s subgroups.
          schema:
            type: boolean
      responses:
        '200':
          description: User Groups
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserGroups'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
  /authn2/v0/tenant/{enterprise_id}/user/{user_id}/:
    delete:
      tags:
        - User
      summary: Delete a user from Enterprise
      description: Delete a user from Enterprise
      operationId: deleteTenantUser
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/AuthNUserID'
      responses:
        '204':
          description: Deleted enterprise user
        '400':
          description: Enterprise user delete error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
  /enterprise/{enterprise_id}/devicegroup/{group_id}/blueprint/:
    get:
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/GroupID'
        - in: query
          name: without_details
          schema:
            type: boolean
      tags:
        - Blueprint (Deprecated)
      summary: Get list of Blueprints for the group
      description: >
        Return list of Blueprint instances for the group.


        ⚠️ **Deprecation Notice:** This endpoint will soon be deprecated. Use
        [Blueprints API](https://api.esper.io/tag/Blueprints-API) instead.
      operationId: listBlueprint
      security:
        - apiKey: []
      responses:
        '200':
          description: Blueprint detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                  previous:
                    type: string
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Blueprint'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/GroupID'
        - in: query
          name: without_details
          schema:
            type: boolean
      tags:
        - Blueprint (Deprecated)
      summary: Create a Blueprint
      description: >
        Returns the created Blueprint instance.


        ⚠️ **Deprecation Notice:** This endpoint will soon be deprecated. Use
        [Blueprints API](https://api.esper.io/tag/Blueprints-API) instead.
      operationId: createBlueprint
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Blueprint'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blueprint'
        '400':
          description: Blueprint create error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Blueprint create error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /enterprise/{enterprise_id}/devicegroup/{group_id}/blueprint/{blueprint_id}/:
    get:
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/GroupID'
        - $ref: '#/components/parameters/BlueprintID'
        - in: query
          name: without_details
          schema:
            type: boolean
      tags:
        - Blueprint (Deprecated)
      summary: Get Blueprint detail
      description: >
        Returns the details of a Blueprint instance.


        ⚠️ **Deprecation Notice:** This endpoint will soon be deprecated. Use
        [Blueprints API](https://api.esper.io/tag/Blueprints-API) instead.
      operationId: getBlueprint
      security:
        - apiKey: []
      responses:
        '200':
          description: Blueprint detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blueprint'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    patch:
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/GroupID'
        - $ref: '#/components/parameters/BlueprintID'
        - in: query
          name: without_details
          schema:
            type: boolean
      tags:
        - Blueprint (Deprecated)
      summary: Partial update a Blueprint
      description: >
        Returns the details of the updated Blueprint instance.


        ⚠️ **Deprecation Notice:** This endpoint will soon be deprecated. Use
        [Blueprints API](https://api.esper.io/tag/Blueprints-API) instead.
      operationId: partialUpdateBlueprint
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Blueprint'
      responses:
        '200':
          description: Partially updated Blueprint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blueprint'
        '400':
          description: Blueprint update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Blueprint update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/GroupID'
        - $ref: '#/components/parameters/BlueprintID'
        - in: query
          name: without_details
          schema:
            type: boolean
      tags:
        - Blueprint (Deprecated)
      summary: Delete a Blueprint
      description: >
        Deletes the requested Blueprint instance.


        ⚠️ **Deprecation Notice:** This endpoint will soon be deprecated. Use
        [Blueprints API](https://api.esper.io/tag/Blueprints-API) instead.
      operationId: deleteBlueprint
      security:
        - apiKey: []
      responses:
        '204':
          description: Deleted Blueprint
        '401':
          description: Blueprint delete error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /enterprise/{enterprise_id}/devicegroup/{group_id}/blueprint/{blueprint_id}/revisions/:
    get:
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/GroupID'
        - $ref: '#/components/parameters/BlueprintID'
        - in: query
          name: without_details
          schema:
            type: boolean
      tags:
        - Blueprint (Deprecated)
      summary: Get list of Blueprint Revisions
      description: >
        Returns a list of Blueprint Revisions instances for the given Blueprint.


        ⚠️ **Deprecation Notice:** This endpoint will soon be deprecated. Use
        [Blueprints API](https://api.esper.io/tag/Blueprints-API) instead.
      operationId: listBlueprintRevisions
      security:
        - apiKey: []
      responses:
        '200':
          description: Blueprint revision list
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                  previous:
                    type: string
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/BlueprintRevision'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /enterprise/{enterprise_id}/devicegroup/{group_id}/blueprint/{blueprint_id}/revisions/{revision_id}/:
    get:
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/GroupID'
        - $ref: '#/components/parameters/BlueprintID'
        - $ref: '#/components/parameters/BlueprintRevisionID'
        - in: query
          name: without_details
          schema:
            type: boolean
      tags:
        - Blueprint (Deprecated)
      summary: Get Blueprint Revision detail
      description: >
        Returns the detail of Blueprint Revision instance.


        ⚠️ **Deprecation Notice:** This endpoint will soon be deprecated. Use
        [Blueprints API](https://api.esper.io/tag/Blueprints-API) instead.
      operationId: getBlueprintRevision
      security:
        - apiKey: []
      responses:
        '200':
          description: Blueprint revision detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlueprintRevision'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /enterprise/{enterprise_id}/devicegroup/{group_id}/blueprint/restore/:
    post:
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/GroupID'
      tags:
        - Blueprint (Deprecated)
      summary: Restore a Blueprint
      description: >
        Returns the Blueprint instance restored to the requested Blueprint
        Revision.


        ⚠️ **Deprecation Notice:** This endpoint will soon be deprecated. Use
        [Blueprints API](https://api.esper.io/tag/Blueprints-API) instead.
      operationId: restoreBlueprintRevision
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                revision_id:
                  type: string
                  format: uuid
      responses:
        '201':
          description: Restored
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blueprint'
        '400':
          description: Blueprint restore error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Blueprint restore error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /enterprise/{enterprise_id}/devicegroup/{group_id}/blueprint/upload/:
    post:
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/GroupID'
      tags:
        - Blueprint (Deprecated)
      summary: Upload a Blueprint
      description: >
        Create a Blueprint by uploading a json file.


        ⚠️ **Deprecation Notice:** This endpoint will soon be deprecated. Use
        [Blueprints API](https://api.esper.io/tag/Blueprints-API) instead.
      operationId: uploadBlueprint
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '201':
          description: Uploaded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blueprint'
        '400':
          description: Blueprint upload error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Blueprint upload error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/enterprise/{enterprise_id}/directory_record/:
    get:
      tags:
        - Directory Record
      summary: Get all Directory Records
      description: Returns a list of all Directory Record instances
      operationId: getDirectoryRecords
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
      responses:
        '200':
          description: Directory records
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  previous:
                    type: string
                  next:
                    type: string
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/DirectoryRecord'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - Directory Record
      summary: Create a new Directory Record
      description: Returns the created Directory Record intance
      operationId: createDirectoryRecord
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DirectoryRecordCreate'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectoryRecord'
        '400':
          description: Directory record create error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Directory record create error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/enterprise/{enterprise_id}/directory_record/{directory_record_id}/:
    get:
      tags:
        - Directory Record
      summary: Get details about a Directory Record
      description: Returns detail of the Directory Record instance
      operationId: getDirectoryRecord
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/DirectoryRecordID'
      responses:
        '200':
          description: Directory record information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectoryRecord'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - Directory Record
      summary: Update a Directory Record
      description: Returns the updated Directory Record instance
      operationId: updateDirectoryRecord
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/DirectoryRecordID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DirectoryRecordUpdate'
      responses:
        '200':
          description: Updated Directory Record Information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectoryRecord'
        '400':
          description: Directory record update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Directory record update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - Directory Record
      summary: Delete a Directory Record
      description: Deletes the requested Directory Record instance
      operationId: deleteDirectoryRecord
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/DirectoryRecordID'
      responses:
        '204':
          description: Deleted Directory Record
        '401':
          description: Directory record delete error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /authn2/v0/tenant/{enterprise_id}/connection:
    get:
      tags:
        - SSO Connections
      summary: List SSO connections
      description: >
        List SSO connections of a tenant. Learn more about <a target="_blank"
        href="https://help.esper.io/hc/en-us/articles/14266541959569-Introduction-to-User-Authentication">SSO
        Connections</a>.
      operationId: getConnections
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/IsDefault'
      responses:
        '200':
          description: Tenant connections
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  connections:
                    type: array
                    items:
                      $ref: '#/components/schemas/CustomConnectionsListResponse'
        '400':
          description: List custom connections error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
  /authn2/v0/tenant/{enterprise_id}/connection/{connection_id}:
    put:
      tags:
        - SSO Connections
      summary: Edit SSO connections
      description: Edit SSO connections
      operationId: editCustomConnection
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/EnterpriseID'
        - $ref: '#/components/parameters/ConnectionID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomConnectionRequest'
      responses:
        '200':
          description: Updated connection
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomConnectionResponse'
        '400':
          description: custom connection update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /authz2/v1/roles/:
    get:
      tags:
        - Roles
      summary: List Roles API
      description: API to retrieve all the roles for the tenant
      operationId: GetRoleURL
      security:
        - apiKey: []
      responses:
        '200':
          description: Request Succeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  roles:
                    type: array
                    items:
                      $ref: '#/components/schemas/RoleResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
    post:
      tags:
        - Roles
      summary: >-
        Create a new role. Then optionally add scopes by using the Update Role
        Scopes API. No scopes are added by default.
      description: >
        Learn more about <a target="_blank"
        href="https://help.esper.io/hc/en-us/articles/13714316325393-Creating-Custom-Roles">Creating
        Custom Roles</a>.
      operationId: PostRoleURL
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Role'
      responses:
        '200':
          description: Request Succeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
  /authz2/v1/roles/{role_id}:
    get:
      tags:
        - Roles
      summary: Get Role API
      description: API to retrieve the role for the tenant
      operationId: GetRoleIdURL
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/RoleID'
      responses:
        '200':
          description: Request Succeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
    patch:
      tags:
        - Roles
      summary: Patch Role API
      description: API to update role details
      operationId: UpdateRoleIdURL
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/RoleID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Role'
      responses:
        '200':
          description: Request Succeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
    delete:
      tags:
        - Roles
      summary: Delete Role API
      description: API to delete the role for the tenant
      operationId: DeleteRoleIdURL
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/RoleID'
      responses:
        '204':
          description: Deleted succesfully
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
  /authz2/v1/roles/{role_id}/scopes:
    put:
      tags:
        - Roles
      summary: Update Role Scopes API
      description: API to update scopes of an roles for the tenant
      operationId: PutRoleScopeURL
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                scope_ids:
                  type: array
                  items:
                    type: string
                scope_names:
                  type: array
                  items:
                    type: string
                    enum:
                      - read:device
                      - read:group
                      - read:blueprint
                      - read:directory_record
                      - create:device_command:SET_DEVICE_LOCKDOWN_STATE
                      - create:device_command:REBOOT
                      - create:device_command:BEEP_DEVICE
                      - create:device_command:WIPE
                      - create:device_command:UPDATE_HEARTBEAT
                      - create:device_command:NOTIFY_DEVICE
                      - create:device_command:LOCK
                      - create:device_command:SET_KIOSK_APP
                      - update:device:group
                      - create:device:tag
                      - update:device:tag
                      - delete:device:tag
                      - update:device:alias
                      - create:template_upgrade
                      - create:device_command:SET_STREAM_VOLUME
                      - create:device_command:SET_BRIGHTNESS_SCALE
                      - create:device_command:SET_ROTATION_STATE
                      - create:device_command:SET_SCREEN_OFF_TIMEOUT
                      - create:device_command:SET_WALLPAPER
                      - create:device_command:SET_WIFI_STATE
                      - create:device_command:ADD_WIFI_AP
                      - create:device_command:REMOVE_WIFI_AP
                      - create:device_command:SET_STATIC_IP
                      - create:device_command:SET_ETHERNET_SETTINGS
                      - create:device_command:SET_GPS_STATE
                      - create:device_command:SET_BLUETOOTH_STATE
                      - create:device_command:SET_TIMEZONE
                      - create:device_command:SET_ADB_STATE
                      - create:device_command:UPDATE_DEVICE_CONFIG
                      - create:device_command:UPDATE_BLUEPRINT
                      - create:device_command:SHUT_DOWN
                      - create:device_command:CLEAR_PASSCODE
                      - create:device_command:LOST_MODE
                      - read:device_app
                      - create:device_command:REFRESH_APPLIST
                      - create:device_command:INSTALL
                      - create:device_command:INSTALL_APP
                      - create:device_command:UNINSTALL
                      - create:device_command:UNINSTALL_APP
                      - create:device_command:SET_APP_STATE
                      - create:device_command:CLEAR_APP_DATA
                      - create:device_command:SET_APP_PERMISSION
                      - create:device_command:REQUEST_BUGREPORT
                      - create:device_command:SET_NEW_POLICY
                      - create:group_command:SET_NEW_POLICY
                      - create:group
                      - create:group_command:REBOOT
                      - create:group_command:LOCK
                      - create:group_command:UPDATE_HEARTBEAT
                      - create:group_command:WIPE
                      - create:group_command:NOTIFY_DEVICE
                      - create:group_command:SET_KIOSK_APP
                      - create:group_command:SET_STREAM_VOLUME
                      - create:group_command:SET_BRIGHTNESS_SCALE
                      - create:group_command:SET_ROTATION_STATE
                      - create:group_command:SET_SCREEN_OFF_TIMEOUT
                      - create:group_command:SET_WALLPAPER
                      - create:group_command:SET_WIFI_STATE
                      - create:group_command:ADD_WIFI_AP
                      - create:group_command:REMOVE_WIFI_AP
                      - create:group_command:SET_STATIC_IP
                      - create:group_command:SET_ETHERNET_SETTINGS
                      - create:group_command:SET_GPS_STATE
                      - create:group_command:SET_BLUETOOTH_STATE
                      - create:group_command:SET_TIMEZONE
                      - create:group_command:SET_ADB_STATE
                      - create:group_command:UPDATE_DEVICE_CONFIG
                      - create:group_command:UPDATE_BLUEPRINT
                      - create:group_command:INSTALL
                      - create:group_command:INSTALL_APP
                      - create:group_command:UNINSTALL
                      - create:group_command:UNINSTALL_APP
                      - create:group_command:SET_APP_STATE
                      - create:device_command:INITIATE_OFFER
                      - read:device_screenshot
                      - create:device_command:CAPTURE_SCREENSHOT
                      - create:device_screenshot
                      - read:device_graph
                      - read:event_feed
                      - create:blueprint
                      - update:blueprint
                      - delete:blueprint
                      - create:device_command:CONVERGE
                      - update:device:blueprint
                      - update:group:blueprint
                      - provision:device
                      - read:compliance_policy
                      - create:compliance_policy
                      - update:compliance_policy
                      - delete:compliance_policy
                      - read:provisioning_template
                      - create:provisioning_template
                      - update:provisioning_template
                      - delete:provisioning_template
                      - create:provisioning_template:imei_serial
                      - update:provisioning_template:imei_serial
                      - delete:provisioning_template:imei_serial
                      - update:provisioning_template:wifi_management
                      - read:app
                      - read:emm
                      - create:emm
                      - update:emm
                      - create:app:esper_android
                      - update:app:esper_android
                      - delete:app:esper_android
                      - read:alert
                      - read:pipeline
                      - read:geofence
                      - read:report
                      - create:report
                      - read:personal_access_token
                      - create:personal_access_token
                      - update:personal_access_token
                      - delete:personal_access_token
                      - read:foundation_build
                      - read:foundation_device_model
                      - update:foundation_build
                      - update:foundation_device_model
                      - read:foundry_event
                      - update:command
                      - read:user:group
                      - create:app:esper_ios
                      - update:app:esper_ios
                      - delete:app:esper_ios
                      - create:operation:CONVERGE
                      - create:operation:REBOOT
                      - create:operation:INSTALL
                      - create:operation:UNINSTALL
                      - create:operation:APP_INSTALL
                      - create:operation:APP_UNINSTALL
                      - read:operation
                      - update:operation
                      - read:operation:devices
                      - read:device:operations
                      - update:operation:devices
                      - create:device_command:RUN_SHELL_SCRIPT
                      - create:remote_terminal
                      - read:report:query
                      - create:report:query
                      - read:report:saved_query
                      - create:report:saved_query
                      - update:report:saved_query
                      - delete:report:saved_query
                      - create:device_command:REMOVE_DEVICE
                      - read:report:ingest
                      - create:report:ingest
                      - read:esper_apps
                      - create:device_command:RUN_CUSTOM_ACTION
                      - create:device_command:LIST_RESTRICTED_PROFILES
                      - create:device_command:LIST_PROVISIONING_PROFILES
                      - create:group_command:SYNC_CONTENT
                      - create:device_command:SYNC_CONTENT
      parameters:
        - $ref: '#/components/parameters/RoleID'
      responses:
        '200':
          description: Request Succeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  scopes:
                    type: array
                    items:
                      $ref: '#/components/schemas/ScopeResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
    get:
      tags:
        - Roles
      summary: List Role Scopes API
      description: API to retrieve scopes of an roles for the tenant
      operationId: GetRoleScopeURL
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/RoleID'
      responses:
        '200':
          description: Request Succeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  scopes:
                    type: array
                    items:
                      $ref: '#/components/schemas/ScopeResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
  /authn2/v0/personal-access-token/:
    post:
      tags:
        - Personal Access Token
      summary: Generate a new personal access token
      description: >
        This endpoint allows clients to generate a new personal access token for
        a specific user and tenant.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: name for the token.
                description:
                  type: string
                  description: description for the token.
                expiry_at:
                  type: integer
                  description: exipy date for token.
              required:
                - name
                - description
                - expiry_at
      responses:
        '200':
          description: Token successfully generated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonalAccessTokenCreateResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
    get:
      tags:
        - Personal Access Token
      summary: Get tokens for corresponding user and tenant
      description: Get all tokens associated with the given user and tenant.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonalAccessTokenGetResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
  /authn2/v0/personal-access-token/{personal_access_token_id}:
    put:
      tags:
        - Personal Access Token
      summary: Renew personal access token
      description: Renew token associated with the given token_id.
      parameters:
        - $ref: '#/components/parameters/PersonalAccessTokenID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                expiry_at:
                  type: integer
                  description: exipy date for token.
              required:
                - expiry_at
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonalAccessTokenUpdateResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
    delete:
      tags:
        - Personal Access Token
      summary: Delete personal access token
      description: Delete token.
      parameters:
        - $ref: '#/components/parameters/PersonalAccessTokenID'
      responses:
        '204':
          description: OK
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
  /authn2/v1/users/:
    get:
      tags:
        - User
      summary: Get Users details
      description: |
        This endpoint allows to fetch user list of a tenant
      parameters:
        - $ref: '#/components/parameters/LegacyUserID'
      responses:
        '200':
          description: Users fetched successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersListResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
  /v2/blueprints/:
    get:
      tags:
        - Blueprints API
      description: Retrieve all blueprints
      parameters:
        - in: query
          name: ordering
          schema:
            type: string
          description: >
            Order the results by a specific field (-field for descending order),
            Combine Multiple with , like -created_at,-updated_at.
        - in: query
          name: name
          schema:
            type: string
          description: |
            Filter the results by name, case insensitive
        - in: query
          name: name_exact
          schema:
            type: string
          description: |
            Filter the results by name, case sensitive and matches exact name
        - in: query
          name: settings__android__app_id
          schema:
            type: string
            format: uuid
          description: >
            List the blueprints which have given app_id in any of the versions
            for android apps.
        - in: query
          name: settings__android__app_version_id
          schema:
            type: string
            format: uuid
          description: >
            List the blueprints which have given app_version_id in any of the
            versions for android apps.
        - in: query
          name: settings__ios__app_id
          schema:
            type: string
            format: uuid
          description: >
            List the blueprints which have given app_id in any of the versions
            for ios apps.
        - in: query
          name: settings__ios__app_version_id
          schema:
            type: string
            format: uuid
          description: >
            List the blueprints which have given app_version_id in any of the
            versions for ios apps.
        - in: query
          name: settings__windows__app_id
          schema:
            type: string
            format: uuid
          description: >
            List the blueprints which have given app_id in any of the versions
            for windows apps.
        - in: query
          name: settings__windows__app_version_id
          schema:
            type: string
            format: uuid
          description: >
            List the blueprints which have given app_version_id in any of the
            versions for windows apps.
        - in: query
          name: settings__android__file_id
          schema:
            type: string
            format: uuid
          description: |
            List the blueprints which have given file_id in any of the versions.
        - in: query
          name: settings__android__wifi_network_id
          schema:
            type: string
            format: uuid
          description: >
            List the blueprints which have given wifi_network_id in any of the
            versions.
        - in: query
          name: settings__ios__provisioning_profile_id
          schema:
            type: string
            format: uuid
          description: >
            Filter blueprints that have the given provisioning profile ID in any
            version.
        - in: query
          name: settings__ios__provisioning_profile_version_id
          schema:
            type: string
            format: uuid
          description: >
            Filter blueprints that have the given provisioning profile version
            ID in any version.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                        format: int64
                        description: The number of objects in the result set
                      next:
                        type: string
                        description: >-
                          The link to retrieve the next set of objects in the
                          result set
                      previous:
                        type: string
                        description: >-
                          The link to retrieve the previous set of objects in
                          the result set
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/BlueprintV2'
                      message:
                        type: string
                      code:
                        type: integer
    post:
      tags:
        - Blueprints API
      description: Create a new blueprint
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlueprintV2'
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/BlueprintV2'
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 201
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: string
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 400
  /v2/blueprints/{blueprint_id}/:
    get:
      tags:
        - Blueprints API
      description: Retrieve a blueprint by ID
      parameters:
        - in: path
          name: blueprint_id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/BlueprintV2'
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 201
        '404':
          description: Content not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 404
    put:
      tags:
        - Blueprints API
      description: Update a blueprint by ID
      parameters:
        - in: path
          name: blueprint_id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlueprintV2Put'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/BlueprintV2'
                  message:
                    type: string
                  code:
                    type: string
                    enum:
                      - 201
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: string
                  message:
                    type: string
                  code:
                    type: string
                    enum:
                      - 3456
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                  message:
                    type: string
                  code:
                    type: string
                    enum:
                      - 3456
    delete:
      tags:
        - Blueprints API
      description: Delete a blueprint by ID
      parameters:
        - in: path
          name: blueprint_id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/BlueprintV2'
                  message:
                    type: string
                  code:
                    type: string
                    enum:
                      - 201
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                  message:
                    type: string
                  code:
                    type: string
                    enum:
                      - 201
  /v2/blueprints/{blueprint_id}/versions/:
    get:
      tags:
        - Blueprints API
      description: Retrieve all versions of a blueprint
      parameters:
        - in: path
          name: blueprint_id
          required: true
          schema:
            type: string
            format: uuid
        - in: query
          name: ordering
          schema:
            type: string
          description: >
            Order the results by a specific field (-field for descending order),
            Combine Multiple with , like -version_number,-minor_version_number.
        - in: query
          name: version_number
          schema:
            type: string
          description: |
            Filter the results by version_number
        - in: query
          name: publish
          schema:
            type: string
          description: |
            Filter the results by publish
        - in: query
          name: settings__android__app_id
          schema:
            type: string
            format: uuid
          description: |
            List the versions which have given app_id.
        - in: query
          name: settings__android__app_version_id
          schema:
            type: string
            format: uuid
          description: |
            List the versions which have given app_version_id.
        - in: query
          name: settings__android__file_id
          schema:
            type: string
            format: uuid
          description: |
            List the blueprints which have given file_id.
        - in: query
          name: settings__android__wifi_network_id
          schema:
            type: string
            format: uuid
          description: |
            List the blueprints which have given wifi_network_id. 
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                        format: int64
                        description: The number of objects in the result set
                      next:
                        type: string
                        description: >-
                          The link to retrieve the next set of objects in the
                          result set
                      previous:
                        type: string
                        description: >-
                          The link to retrieve the previous set of objects in
                          the result set
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/BlueprintV2'
                      message:
                        type: string
                      code:
                        type: integer
  /v2/blueprints/{blueprint_id}/versions/{version_id}/:
    get:
      tags:
        - Blueprints API
      description: Retrieve a specific version of the blueprint
      parameters:
        - in: path
          name: blueprint_id
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: version_id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/BlueprintV2'
                  message:
                    type: string
                  code:
                    type: string
                    enum:
                      - 201
        '404':
          description: Resouce not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                  message:
                    type: string
                  code:
                    type: string
                    enum:
                      - 201
  /v2/custom-actions/:
    get:
      tags:
        - Custom Actions API
      description: Retrieve all custom actions for the tenant
      parameters:
        - in: query
          name: ordering
          schema:
            type: string
          description: >
            Order the results by a specific field (-field for descending order).
            Valid fields are 'name', 'created_at', 'updated_at', 'created_by',
            'updated_by'.
        - in: query
          name: name
          schema:
            type: string
          description: |
            Filter the results by name (partial match, case insensitive).
        - in: query
          name: type
          schema:
            type: string
          description: >
            Filter by action type. Comma-separated list. Valid values: button,
            toggle, radio, dropdown.
        - in: query
          name: state
          schema:
            type: string
          description: >
            Filter by action state. Comma-separated list. Valid values: draft,
            active, inactive.
        - in: query
          name: position_in_blueprints
          schema:
            type: string
          description: >
            Filter by blueprint position. Comma-separated list. Valid values:
            none, blueprints_apps_and_configuration, blueprints_connectivity,
            blueprints_device_security, blueprints_display_and_branding,
            blueprints_esper_settings, blueprints_scripts, blueprints_files,
            blueprints_platform_services, blueprints_hardware_settings,
            blueprints_sound, blueprints_system_updates,
            blueprints_time_and_date.
        - in: query
          name: position_in_device_settings
          schema:
            type: string
          description: >
            Filter by device settings position. Comma-separated list. Valid
            values: none, device_quick_settings.
        - in: query
          name: created_by
          schema:
            type: integer
          description: |
            Filter by user ID who created the action.
        - in: query
          name: updated_by
          schema:
            type: integer
          description: |
            Filter by user ID who last updated the action.
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
          description: |
            Number of results to return per page.
        - in: query
          name: offset
          schema:
            type: integer
            minimum: 0
            default: 0
          description: |
            The initial index from which to return the results.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                        format: int64
                        description: The total number of custom actions
                      next:
                        type: string
                        nullable: true
                        description: >-
                          The link to retrieve the next set of objects in the
                          result set
                      previous:
                        type: string
                        nullable: true
                        description: >-
                          The link to retrieve the previous set of objects in
                          the result set
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/CustomActionRead'
                  message:
                    type: string
                  code:
                    type: integer
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 400
    post:
      tags:
        - Custom Actions API
      description: Create a new custom action
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomActionCreate'
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/CustomActionRead'
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 201
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 400
        '409':
          description: Conflict - Custom Action name already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 409
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 500
  /v2/custom-actions/{custom_action_id}/:
    get:
      tags:
        - Custom Actions API
      description: Retrieve a custom action by ID
      parameters:
        - in: path
          name: custom_action_id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/CustomActionRead'
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 200
        '404':
          description: Custom Action not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 404
    put:
      tags:
        - Custom Actions API
      description: Update a custom action by ID
      parameters:
        - in: path
          name: custom_action_id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomActionUpdate'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/CustomActionRead'
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 200
        '400':
          description: Bad Request (validation error or invalid state transition)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 400
        '404':
          description: Custom Action not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 404
        '409':
          description: Conflict - Custom Action name already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 409
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 500
    delete:
      tags:
        - Custom Actions API
      description: Delete a custom action by ID
      parameters:
        - in: path
          name: custom_action_id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 200
        '400':
          description: Bad Request - Cannot delete active custom action
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 400
        '404':
          description: Custom Action not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 404
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 500
  /v2/scripts/{script_id}/:
    get:
      tags:
        - Custom Actions API
      description: Retrieve script content by ID
      parameters:
        - in: path
          name: script_id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/platformScript'
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 200
        '403':
          description: Permission denied
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 403
        '404':
          description: Script not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 404
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  code:
                    type: integer
                    enum:
                      - 500
  /pipelines/v0/pipelines/:
    get:
      summary: Get all Pipelines for the Enterprise
      description: Returns all the Pipelines that are not deleted
      operationId: getPipelines
      tags:
        - Pipelines
      parameters:
        - in: query
          name: default
          schema:
            type: boolean
            enum:
              - true
              - false
        - in: query
          name: name
          description: Filter by name
          schema:
            type: string
        - in: query
          name: ordering
          description: Sorting pipelines based on the field name
          schema:
            type: string
            enum:
              - name
              - '-name'
      security:
        - SCAPIAuthToken: []
      responses:
        '200':
          description: Pipelines list for the Enterprise
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/Pipeline'
    post:
      summary: Create a new Pipeline
      description: Create a Pipeline for the enterprise using logged in user token
      operationId: createPipeline
      tags:
        - Pipelines
      security:
        - SCAPIAuthToken: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pipeline_POST'
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Pipeline'
        '400':
          description: Pipelines create error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Pipelines create error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/pipelines/{pipeline_id}/:
    get:
      summary: Get a Pipeline
      operationId: getPipeline
      tags:
        - Pipelines
      security:
        - SCAPIAuthToken: []
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Pipeline information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Pipeline'
    put:
      summary: Update a Pipeline
      operationId: updatePipeline
      tags:
        - Pipelines
      security:
        - SCAPIAuthToken: []
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pipeline_PUT'
      responses:
        '200':
          description: Updated Pipeline Information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Pipeline'
        '400':
          description: Pipelines update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Pipelines update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    delete:
      summary: Delete a Pipeline
      operationId: deletePipeline
      tags:
        - Pipelines
      security:
        - SCAPIAuthToken: []
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Deleted Pipeline Information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Pipeline'
        '401':
          description: Pipelines delete error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/pipelines/{pipeline_id}/stages/:
    get:
      summary: Get all Pipeline stages
      security:
        - SCAPIAuthToken: []
      operationId: getPipelineStages
      tags:
        - Stages
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Pipelines stages response
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/Stage'
    post:
      summary: Create a Pipeline stage
      security:
        - SCAPIAuthToken: []
      operationId: createPipelineStage
      tags:
        - Stages
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Stage_POST'
      responses:
        '200':
          description: Pipelines stages create response
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Stage'
        '400':
          description: Stage create error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
  /pipelines/v0/pipelines/{pipeline_id}/stages/{stage_id}/:
    get:
      summary: Get a Pipeline Stage
      security:
        - SCAPIAuthToken: []
      operationId: getPipelineStage
      tags:
        - Stages
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
        - name: stage_id
          in: path
          description: ID of the Stage
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Pipelines stage get response
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Stage'
    put:
      summary: Update a Pipeline Stage
      security:
        - SCAPIAuthToken: []
      operationId: updatePipelineStage
      tags:
        - Stages
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
        - name: stage_id
          in: path
          description: ID of the Stage
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Stage_PUT'
      responses:
        '200':
          description: Updated Stage Information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Stage'
        '400':
          description: Stage update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Stage update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    delete:
      summary: Delete a pipeline stage
      security:
        - SCAPIAuthToken: []
      operationId: deletePipelineStage
      tags:
        - Stages
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
        - name: stage_id
          in: path
          description: ID of the Stage
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Deleted Stage Information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Stage'
        '401':
          description: Stage delete error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/stages/{stage_id}/targetlists/:
    get:
      summary: Get all Target Lists attached to the Stage
      security:
        - SCAPIAuthToken: []
      operationId: getStageTargetLists
      tags:
        - Stages
      parameters:
        - name: stage_id
          in: path
          description: ID of the Stage
          required: true
          schema:
            type: string
            format: uuid
        - in: query
          name: type
          schema:
            type: string
            enum:
              - groups
              - devices
              - collections
      responses:
        '200':
          description: All Targets Lists attached to the Stage
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/TargetList'
        '401':
          description: Target List get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    post:
      summary: Attach the Target List to the Stage
      security:
        - SCAPIAuthToken: []
      operationId: addStageTargetList
      tags:
        - Stages
      parameters:
        - name: stage_id
          in: path
          description: ID of the Stage
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StageTargetList_POST'
      responses:
        '200':
          description: Attach target list to a Stage
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/TargetList'
        '401':
          description: Target list attach error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/stages/{stage_id}/targetlists/{targetlist_id}/:
    delete:
      summary: Detach the Target List from the Stage
      security:
        - SCAPIAuthToken: []
      operationId: deleteStageTargetList
      tags:
        - Stages
      parameters:
        - name: stage_id
          in: path
          description: ID of the Stage
          required: true
          schema:
            type: string
        - name: targetlist_id
          in: path
          description: ID of the Target List
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Detach target list from stage
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/TargetList'
        '401':
          description: Target list attach error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/stages/{stage_id}/operationlists/:
    get:
      summary: Get all Operation Lists attached to the Stage
      security:
        - SCAPIAuthToken: []
      operationId: getStageOperationLists
      tags:
        - Operation Lists
      parameters:
        - name: stage_id
          in: path
          description: ID of the Stage
          required: true
          schema:
            type: string
      responses:
        '200':
          description: All Operation Lists attached to the Stage
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/OperationList'
        '401':
          description: Operation List get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    post:
      summary: Create an Operation list for the Stage
      security:
        - SCAPIAuthToken: []
      operationId: addStageOperationList
      tags:
        - Operation Lists
      parameters:
        - name: stage_id
          in: path
          description: ID of the Stage
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OperationList_POST'
      responses:
        '200':
          description: Attach Operation list to a Stage
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/OperationList'
        '401':
          description: Operation list attach error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/stages/{stage_id}/operationlists/{operationlist_id}/:
    put:
      summary: Update an Operation List
      operationId: updatePipelineOperationList
      tags:
        - Operation Lists
      security:
        - SCAPIAuthToken: []
      parameters:
        - name: stage_id
          in: path
          description: ID of the Stage
          required: true
          schema:
            type: string
        - name: operationlist_id
          in: path
          description: ID of the Operation List
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OperationList'
      responses:
        '200':
          description: Updated Operation List Information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/OperationList'
        '400':
          description: Operation List update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Operation List update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    delete:
      summary: Delete stage operation list
      security:
        - SCAPIAuthToken: []
      operationId: deleteStageOperationList
      tags:
        - Operation Lists
      parameters:
        - name: stage_id
          in: path
          description: ID of the Stage
          required: true
          schema:
            type: string
        - name: operationlist_id
          in: path
          description: ID of the Operation List
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Delete operation list from stage
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/OperationList'
        '401':
          description: Operation list detach error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/pipelines/{pipeline_id}/targetlists/:
    get:
      summary: Get all Target Lists in Pipeline
      security:
        - SCAPIAuthToken: []
      operationId: getPipelineTargetLists
      tags:
        - Target Lists
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
      responses:
        '200':
          description: All Target Lists in Pipeline
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/TargetList'
        '401':
          description: Target List get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    post:
      summary: Create a Target List
      security:
        - SCAPIAuthToken: []
      operationId: addPipelineTargetList
      tags:
        - Target Lists
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TargetList_POST'
      responses:
        '200':
          description: All Targets in Target List
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/TargetList'
        '401':
          description: Target List get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/pipelines/{pipeline_id}/targetlists/{targetlist_id}/:
    get:
      summary: Get a Pipeline Target list
      security:
        - SCAPIAuthToken: []
      operationId: getPipelineTargetList
      tags:
        - Target Lists
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
        - name: targetlist_id
          in: path
          description: ID of the Target list
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Get target list
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/TargetList'
        '401':
          description: Target list attach error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    put:
      summary: Update a Pipeline Target List
      operationId: updatePipelineTargetList
      tags:
        - Target Lists
      security:
        - SCAPIAuthToken: []
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
        - name: targetlist_id
          in: path
          description: ID of the Target List
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TargetList'
      responses:
        '200':
          description: Updated Target List Information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/TargetList'
        '400':
          description: Target List update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Target List update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    delete:
      summary: Delete a Pipeline Target list
      security:
        - SCAPIAuthToken: []
      operationId: deletePipelineTargetList
      tags:
        - Target Lists
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
        - name: targetlist_id
          in: path
          description: ID of the Target List
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Delete target list
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/TargetList'
        '401':
          description: Target list delete error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/pipelines/{pipeline_id}/targetlists/{targetlist_id}/targets/:
    get:
      summary: Get all Targets in the Target List
      security:
        - SCAPIAuthToken: []
      operationId: getTargetListTargets
      tags:
        - Targets
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
        - name: targetlist_id
          in: path
          description: ID of the Target List
          required: true
          schema:
            type: string
      responses:
        '200':
          description: All Targets in Target List
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/Target'
        '401':
          description: Target List get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    post:
      summary: Create a target for the target list
      security:
        - SCAPIAuthToken: []
      operationId: createTargetListTargets
      tags:
        - Targets
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
        - name: targetlist_id
          in: path
          description: ID of the Target List
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Target_POST'
      responses:
        '200':
          description: All Targets in Target List
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Target'
        '401':
          description: Target List get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/pipelines/{pipeline_id}/targetlists/{targetlist_id}/targets/{target_id}/:
    get:
      summary: Get one target from target list
      security:
        - SCAPIAuthToken: []
      operationId: getTargetListTarget
      tags:
        - Targets
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
            format: uuid
        - name: targetlist_id
          in: path
          description: ID of the Target List
          required: true
          schema:
            type: string
            format: uuid
        - name: target_id
          in: path
          description: ID of the Target
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Target from Target List
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Target'
        '401':
          description: Target List device delete error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    put:
      summary: Update a target in the target list
      security:
        - SCAPIAuthToken: []
      operationId: updateTargetListTarget
      tags:
        - Targets
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
            format: uuid
        - name: targetlist_id
          in: path
          description: ID of the Target List
          required: true
          schema:
            type: string
            format: uuid
        - name: target_id
          in: path
          description: ID of the Target
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Target_PUT'
      responses:
        '200':
          description: Updated Target from Target List
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Target'
        '401':
          description: Target List device delete error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    delete:
      summary: Delete a Target or Device from a Target List
      security:
        - SCAPIAuthToken: []
      operationId: deleteTargetListTarget
      tags:
        - Targets
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
            format: uuid
        - name: targetlist_id
          in: path
          description: ID of the Target List
          required: true
          schema:
            type: string
            format: uuid
        - name: target_id
          in: path
          description: ID of the Target
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Deleted Target from Target List
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Target'
        '401':
          description: Target List device delete error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/pipelines/{pipeline_id}/targetlists/{targetlist_id}/targets-bulk/:
    post:
      summary: Bulk add targets to a target list
      description: >-
        Adds multiple targets to a target list. Creates target records if they
        don't exist, then links them to the target list. Existing targets in the
        list are left unchanged (skipped). Behaves the same as legacy /targets/
        API. device_name should be provided for proper target run creation.
        device_alias can be provided as a direct property and will be stored in
        device_meta.
      security:
        - SCAPIAuthToken: []
      operationId: bulkAddTargetListTargets
      tags:
        - Targets
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
            format: uuid
        - name: targetlist_id
          in: path
          description: ID of the Target List
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        description: Array of device IDs (strings) or device objects with metadata
        content:
          application/json:
            schema:
              oneOf:
                - type: array
                  items:
                    type: string
                    description: Device ID
                  example:
                    - device_id: 18d21907-a3b3-491b-9237-d835de82a3ef
                      device_name: ESPR-LAB-AAA03
                      device_alias: Actineon Edge 10A
                    - device_id: 550e8400-e29b-41d4-a716-446655440002
                      device_name: ESPR-LAB-AAA04
                      device_alias: Actineon Edge 10B
                - type: array
                  items:
                    type: object
                    required:
                      - device_id
                    properties:
                      device_id:
                        type: string
                        description: Device ID (UUID)
                      device_name:
                        type: string
                        description: >-
                          Device name (should be provided for proper target run
                          creation)
                      device_alias:
                        type: string
                        description: Device alias (optional, stored in device_meta)
                      device_meta:
                        type: object
                        description: Device metadata (optional)
                      args:
                        type: object
                        description: Custom arguments (optional)
                      is_active:
                        type: boolean
                        description: Active status (optional, defaults to true)
      responses:
        '200':
          description: Bulk add completed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: >-
                      Bulk add completed. 2 target(s) created, 5 target(s) added
                      to list, 1 target(s) skipped.
                  content:
                    type: object
                    properties:
                      created_count:
                        type: integer
                        description: Number of new target records created
                        example: 2
                      added_count:
                        type: integer
                        description: Number of targets successfully added to the list
                        example: 5
                      skipped_count:
                        type: integer
                        description: Number of targets that were already in the list
                        example: 1
                      errors:
                        type: array
                        items:
                          type: object
                        description: List of any errors encountered
                        example: []
        '400':
          description: Bad request - invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /pipelines/v0/pipelines/{pipeline_id}/targetlists/{targetlist_id}/devicegroups/:
    get:
      summary: Get all Device Groups in the Target List
      security:
        - SCAPIAuthToken: []
      operationId: getTargetListDeviceGroups
      tags:
        - Device Groups
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
        - name: targetlist_id
          in: path
          description: ID of the Target List
          required: true
          schema:
            type: string
      responses:
        '200':
          description: All Device Groups in Target List
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/TargetListDeviceGroup'
        '401':
          description: Target List device group get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    post:
      summary: Add a Device Group to the Target List
      security:
        - SCAPIAuthToken: []
      operationId: addTargetListDeviceGroups
      tags:
        - Device Groups
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
        - name: targetlist_id
          in: path
          description: ID of the Target List
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TargetListDeviceGroups_POST'
      responses:
        '200':
          description: Added Device group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TargetListDeviceGroup'
        '401':
          description: Target List Device Group add error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/pipelines/{pipeline_id}/targetlists/{targetlist_id}/devicegroups/{devicegroup_id}/:
    delete:
      summary: Delete Device Group from a Target List
      security:
        - SCAPIAuthToken: []
      operationId: deleteTargetListDeviceGroup
      tags:
        - Device Groups
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
            format: uuid
        - name: targetlist_id
          in: path
          description: ID of the Target List
          required: true
          schema:
            type: string
            format: uuid
        - name: devicegroup_id
          in: path
          description: ID of the Device Group
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Deleted Device Group from Target List
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: array
                    items:
                      type: string
                      format: uuid
        '401':
          description: Target List device delete error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/pipelines/{pipeline_id}/targetlists/{targetlist_id}/devicegroups/{device_group_id}/devices/:
    get:
      summary: Get all Devices in the device group
      security:
        - SCAPIAuthToken: []
      operationId: getDeviceGroupDevices
      tags:
        - Device Groups
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
            format: uuid
        - name: targetlist_id
          in: path
          description: ID of the Target List
          required: true
          schema:
            type: string
            format: uuid
        - name: device_group_id
          in: path
          description: ID of the Device Group
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: All Devices in Device group
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/Device'
        '401':
          description: Operation List get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/operationlists/{operationlist_id}/operations/:
    get:
      summary: Get all Operations in the Operation List
      security:
        - SCAPIAuthToken: []
      operationId: getOperationListOperations
      tags:
        - Operations
      parameters:
        - name: operationlist_id
          in: path
          description: ID of the Operation List
          required: true
          schema:
            type: string
        - name: operation_type
          in: query
          description: Operation Type to filter on as defined in Operation_POST model
          required: false
          schema:
            type: string
      responses:
        '200':
          description: All Operations in Operation List
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/Operation'
        '401':
          description: Operation List get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    post:
      summary: Create an Operation for Operation List
      security:
        - SCAPIAuthToken: []
      operationId: addOperationListOperations
      tags:
        - Operations
      parameters:
        - name: operationlist_id
          in: path
          description: ID of the Operation List
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Operation_POST'
      responses:
        '200':
          description: Created operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Operation'
        '401':
          description: Operation create error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/operationlists/{operationlist_id}/operations/{operation_id}/:
    get:
      summary: Get an Operation from the operation list
      security:
        - SCAPIAuthToken: []
      operationId: getOperationListOperation
      tags:
        - Operations
      parameters:
        - name: operationlist_id
          in: path
          description: ID of the Operation list
          required: true
          schema:
            type: string
        - name: operation_id
          in: path
          description: ID of the Operation
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Get operation from operation list
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Operation'
        '401':
          description: Operation get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    put:
      summary: Update an Operation
      operationId: updateOperationListOperation
      tags:
        - Operations
      security:
        - SCAPIAuthToken: []
      parameters:
        - name: operationlist_id
          in: path
          description: ID of the Operation List
          required: true
          schema:
            type: string
        - name: operation_id
          in: path
          description: ID of the Operation
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Operation'
      responses:
        '200':
          description: Updated Operation Information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Operation'
        '400':
          description: Operation update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Operation update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    delete:
      summary: Delete an Operation list operation
      security:
        - SCAPIAuthToken: []
      operationId: deleteOperationListOperation
      tags:
        - Operations
      parameters:
        - name: operationlist_id
          in: path
          description: ID of the Operation List
          required: true
          schema:
            type: string
        - name: operation_id
          in: path
          description: ID of the Operation
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Delete operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/Operation'
        '401':
          description: Operation delete error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/runs/:
    get:
      summary: Get all Runs for the Pipelines in the Enterprise
      security:
        - SCAPIAuthToken: []
      operationId: getAllPipelineRuns
      tags:
        - Pipeline Runs
      parameters:
        - in: query
          name: status
          description: Filter by pipeline run status
          schema:
            type: string
            enum:
              - pending
              - queued
              - processing
              - running
              - waiting
              - complete
              - success
              - failure
              - cancelled
              - invalid
              - timeout
        - in: query
          name: pipeline_name
          description: Filter by pipeline name
          schema:
            type: string
        - in: query
          name: ordering
          description: Sorting pipelines runs based on the field name
          schema:
            type: string
            enum:
              - run_number
              - '-run_number'
              - status
              - '-status'
              - pipeline__name
              - '-pipeline__name'
              - started_at
              - '-started_at'
              - ended_at
              - '-ended_at'
      responses:
        '200':
          description: All Runs for the Pipelines in the Enterprise
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/PipelineRun'
        '401':
          description: Pipeline run get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/pipelines/{pipeline_id}/runs/:
    get:
      summary: Get all Runs for the Pipeline
      security:
        - SCAPIAuthToken: []
      operationId: getPipelineRuns
      tags:
        - Pipeline Runs
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
        - in: query
          name: status
          description: Filter by pipeline run status
          schema:
            type: string
            enum:
              - pending
              - queued
              - processing
              - running
              - waiting
              - complete
              - success
              - failure
              - cancelled
              - invalid
              - timeout
        - in: query
          name: ordering
          description: Sorting pipelines runs based on the field name
          schema:
            type: string
            enum:
              - run_number
              - '-run_number'
              - status
              - '-status'
              - started_at
              - '-started_at'
              - ended_at
              - '-ended_at'
      responses:
        '200':
          description: All Runs for the Pipeline
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/PipelineRun'
        '401':
          description: Pipeline run get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    post:
      summary: Create a Pipeline Run
      security:
        - SCAPIAuthToken: []
      operationId: createPipelineRun
      tags:
        - Pipeline Runs
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PipelineRun_POST'
      responses:
        '200':
          description: Created Pipeline Run
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/PipelineRun'
        '401':
          description: Pipeline run create error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/pipelines/{pipeline_id}/runs/{pipeline_run_id}/:
    get:
      summary: Get Pipeline run by pipeline run id
      security:
        - SCAPIAuthToken: []
      operationId: getPipelineRun
      tags:
        - Pipeline Runs
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
        - name: pipeline_run_id
          in: path
          description: Run Id of pipeline run
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Get Pipeline run
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/PipelineRun'
        '401':
          description: Operation get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    put:
      summary: Update a Pipeline Run
      operationId: updatePipelineRun
      tags:
        - Pipeline Runs
      security:
        - SCAPIAuthToken: []
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
        - name: pipeline_run_id
          in: path
          description: Run id of pipeline run
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              $ref: '#/components/schemas/PipelineRun_PUT'
      responses:
        '200':
          description: Updated Pipeline run information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/PipelineRun'
        '400':
          description: Pipeline Run update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Pipeline Run update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    delete:
      summary: Delete a Pipeline Run
      operationId: deletePipelineRun
      tags:
        - Pipeline Runs
      security:
        - SCAPIAuthToken: []
      parameters:
        - name: pipeline_id
          in: path
          description: ID of the Pipeline
          required: true
          schema:
            type: string
        - name: pipeline_run_id
          in: path
          description: Run id of pipeline run
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Deleted Pipeline run information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/PipelineRun'
        '400':
          description: Pipeline Run update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Pipeline Run update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/runs/{pipeline_run_id}/stageruns/:
    get:
      summary: Get all Stage Runs for the Pipeline Run
      security:
        - SCAPIAuthToken: []
      operationId: getPipelineRunStageRuns
      tags:
        - Stage Runs
      parameters:
        - name: pipeline_run_id
          in: path
          description: ID of the Pipeline Run
          required: true
          schema:
            type: string
        - name: status
          in: query
          description: Status of stage run
          required: false
          schema:
            type: string
            enum:
              - pending
              - queued
              - processing
              - running
              - complete
              - success
              - failure
              - cancelled
              - invalid
              - timeout
      responses:
        '200':
          description: All Stage Runs for the Pipeline Run
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/StageRun'
        '401':
          description: Stage run get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/runs/{pipeline_run_id}/stageruns/{stage_run_id}/:
    get:
      summary: Get Pipeline Stage run by stage run Id
      security:
        - SCAPIAuthToken: []
      operationId: getPipelineRunStageRun
      tags:
        - Stage Runs
      parameters:
        - name: pipeline_run_id
          in: path
          description: ID of the Pipeline Run
          required: true
          schema:
            type: string
        - name: stage_run_id
          in: path
          description: ID of pipeline stage run
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Get pipeline run stage run
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/StageRun'
        '401':
          description: Operation get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    put:
      summary: Update a Pipeline Stage Run
      operationId: updatePipelineRunStageRun
      tags:
        - Stage Runs
      security:
        - SCAPIAuthToken: []
      parameters:
        - name: pipeline_run_id
          in: path
          description: ID of the Pipeline Run
          required: true
          schema:
            type: string
        - name: stage_run_id
          in: path
          description: id of pipeline stage run
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - pending
                    - queued
                    - processing
                    - running
                    - complete
                    - success
                    - failure
                    - cancelled
                    - invalid
                    - timeout
      responses:
        '200':
          description: Updated Pipeline Stage run information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/StageRun'
        '400':
          description: Pipeline Stage Run update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Pipeline Stage Run update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/stageruns/{stage_run_id}/operations/:
    get:
      summary: Get all Operations for the Stage Run
      security:
        - SCAPIAuthToken: []
      operationId: getPipelineStageRunOperations
      tags:
        - Stage Runs
      parameters:
        - name: stage_run_id
          in: path
          description: Stage run Id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: All Operations for the Stage Run
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/StageRunOperation'
        '401':
          description: Stage run operation get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/stageruns/{stage_run_id}/operations/{stage_run_operation_id}/:
    get:
      summary: Get single Operation for the Stage Run
      security:
        - SCAPIAuthToken: []
      operationId: getPipelineStageRunOperation
      tags:
        - Stage Runs
      parameters:
        - name: stage_run_id
          in: path
          description: Stage run Id
          required: true
          schema:
            type: string
        - name: stage_run_operation_id
          in: path
          description: Stage run operation Id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Operation for the Stage Run
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/StageRunOperation'
        '401':
          description: Stage run operation get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/stageruns/{stage_run_id}/targetruns/:
    get:
      summary: Get all Target Runs for the Stage Run
      security:
        - SCAPIAuthToken: []
      operationId: getPipelineStageTargetRuns
      tags:
        - Target Runs
      parameters:
        - name: stage_run_id
          in: path
          description: Stage run Id
          required: true
          schema:
            type: string
        - name: status
          in: query
          description: Status of target run
          schema:
            type: string
            enum:
              - pending
              - queued
              - processing
              - dispatched
              - running
              - complete
              - success
              - failure
              - cancelled
              - invalid
              - timeout
        - name: stage_run_operation_id
          in: query
          description: Stage run Operation Id to filter on
          schema:
            type: string
            format: uuid
        - name: ordering
          in: query
          description: Sorting target runs based on status field
          schema:
            type: string
            enum:
              - status
              - '-status'
      responses:
        '200':
          description: All Target runs for the Stage Run
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/TargetRun'
        '401':
          description: Target run get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    post:
      summary: Create a Target Runs for Stage Run
      security:
        - SCAPIAuthToken: []
      operationId: createPipelineStageTargetRuns
      tags:
        - Target Runs
      parameters:
        - name: stage_run_id
          in: path
          description: Stage run Id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TargetRun_POST'
      responses:
        '200':
          description: Created Target Runs
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: array
                    items:
                      $ref: '#/components/schemas/TargetRun'
        '401':
          description: Target Run create error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/stageruns/{stage_run_id}/targetruns/{target_run_id}/:
    get:
      summary: Get Target Run by Target Run ID
      security:
        - SCAPIAuthToken: []
      operationId: getPipelineStageTargetRun
      tags:
        - Target Runs
      parameters:
        - name: stage_run_id
          in: path
          description: Stage run Id
          required: true
          schema:
            type: string
        - name: target_run_id
          in: path
          description: Id of the Target Run
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Get target run
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/TargetRun'
        '401':
          description: Operation get error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    put:
      summary: Update a Target Run
      operationId: updatePipelineStageTargetRun
      tags:
        - Target Runs
      security:
        - SCAPIAuthToken: []
      parameters:
        - name: stage_run_id
          in: path
          description: Stage run Id
          required: true
          schema:
            type: string
        - name: target_run_id
          in: path
          description: Id of the target run
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TargetRun_PUT'
      responses:
        '200':
          description: Updated Target Run run information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/TargetRun'
        '400':
          description: Target Run update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Target Run update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/stageruns/{stage_run_id}/targetruns/{target_run_id}/command/:
    get:
      summary: Get status of the command running for Target run
      security:
        - SCAPIAuthToken: []
      operationId: getTargetRunCommandStatus
      tags:
        - Target Runs
      parameters:
        - name: stage_run_id
          in: path
          description: ID of the stage run
          required: true
          schema:
            type: string
        - name: target_run_id
          in: path
          description: Id of the target run
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Command processor request status
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/CommandResponse'
        '401':
          description: Command request create error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
    post:
      summary: Create an command processor request for Target Run
      security:
        - SCAPIAuthToken: []
      operationId: createTargetRunCommand
      tags:
        - Target Runs
      parameters:
        - name: stage_run_id
          in: path
          description: ID of the stage run
          required: true
          schema:
            type: string
        - name: target_run_id
          in: path
          description: Id of the target run
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AndroidCommandRequest'
      responses:
        '200':
          description: Created command processor request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/CommandResponse'
        '401':
          description: Command request create error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
  /pipelines/v0/stageruns/{stage_run_id}/targetruns/{target_run_id}/command/{command_id}/:
    put:
      summary: Update target run command information.
      security:
        - SCAPIAuthToken: []
      operationId: putTargetRunCommandStatus
      tags:
        - Target Runs
      parameters:
        - name: stage_run_id
          in: path
          description: ID of the stage run
          required: true
          schema:
            type: string
        - name: target_run_id
          in: path
          description: Id of the target run
          required: true
          schema:
            type: string
        - name: command_id
          in: path
          description: Id of the command
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommandRequest_PUT'
      responses:
        '200':
          description: Command processor request status
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/CommandResponse'
        '400':
          description: Target run command update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
  /sys/health:
    get:
      summary: Health check endpoint
      security:
        - SCAPIAuthToken: []
      operationId: getServiceHealth
      tags:
        - System
      responses:
        '200':
          description: Pipelines health service response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Health'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /device/v0/devices/:
    get:
      security:
        - apiKey: []
      summary: Get all devices in the tenant
      description: Returns all the devices in the tenant
      operationId: getDeviceList
      tags:
        - Device
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: offset
          schema:
            type: integer
        - in: query
          name: ordering
          description: Field to order the results by. Prefix with '-' to reverse the order.
          schema:
            type: string
            enum:
              - alias
              - created_at
              - last_seen
              - model
              - os_version
              - name
              - onboarded_on
              - serial
              - provisioned_on
              - battery_level
              - dpc_version
              - eea_version
              - is_gms
              - security_state
              - wifi_ssid
              - platform
              - template_name
        - in: query
          name: serial
          schema:
            type: string
        - in: query
          name: udid
          schema:
            type: string
        - in: query
          name: android_version
          schema:
            type: string
        - in: query
          name: ios_version
          schema:
            type: string
        - in: query
          name: ipados_version
          schema:
            type: string
        - in: query
          name: windows_version
          schema:
            type: string
        - in: query
          name: state
          schema:
            type: integer
        - in: query
          name: battery_level_gte
          schema:
            type: string
        - in: query
          name: battery_level_lte
          schema:
            type: string
        - in: query
          name: is_gms
          schema:
            type: boolean
        - in: query
          name: active_connection
          schema:
            type: string
        - in: query
          name: group_multi
          description: >-
            Filter by multiple group ID. Fetch the devices from groups matching
            with the IDs and it's subgroup.
          schema:
            type: string
            format: uuid
        - in: query
          name: group_multi_immediate
          description: >-
            Filter by multiple group IDs. Fetch the devices from groups matching
            with the IDs.
          schema:
            type: string
            format: uuid
        - in: query
          name: assigned_blueprint_id
          schema:
            type: string
            format: uuid
        - in: query
          name: current_blueprint_id
          schema:
            type: string
            format: uuid
        - in: query
          name: current_blueprint_version_id
          schema:
            type: string
            format: uuid
        - in: query
          name: current_blueprint_version_id_net
          schema:
            type: string
            format: uuid
        - in: query
          name: platform
          schema:
            type: string
            enum:
              - ANDROID
              - APPLE
              - LINUX
              - WINDOWS
        - in: query
          name: os
          schema:
            type: string
            enum:
              - iOS
              - iPadOS
              - Android
              - Linux
              - Windows
        - in: query
          name: device_source
          description: a csv list of device sources [ABM, NON_ABM]
          schema:
            type: string
        - in: query
          name: tags
          description: a csv list of tag UUID's
          schema:
            type: string
        - in: query
          description: >-
            Search devices by multiOS -> name, serial, imei, model. Apple ->
            udid. Android -> iccid, phone number, brand, wifi, manufacturer,
            hardware
          name: search
          schema:
            type: string
        - in: query
          name: foundation_device_model_id
          schema:
            type: string
            format: uuid
        - in: query
          name: android_version_exact
          schema:
            type: string
        - in: query
          name: foundation_major_version
          schema:
            type: integer
        - in: query
          name: foundation_minor_version
          schema:
            type: integer
        - in: query
          name: foundation_build_number
          schema:
            type: integer
        - in: query
          name: airwave_tenant_model_id
          schema:
            type: string
        - in: query
          name: airwave_build_id
          schema:
            type: string
        - in: query
          name: airwave_build_number
          schema:
            type: integer
        - in: query
          name: is_seamless
          schema:
            type: boolean
        - in: query
          name: global_device_id
          schema:
            type: string
      responses:
        '200':
          description: Device information for the Tenant
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          oneOf:
                            - $ref: '#/components/schemas/AndroidDevice'
                            - $ref: '#/components/schemas/AppleDevice'
                            - $ref: '#/components/schemas/LinuxDevice'
                            - $ref: '#/components/schemas/WindowsDevice'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /device/v0/devices/{id}/:
    get:
      security:
        - apiKey: []
      parameters:
        - name: id
          in: path
          description: ID of the device
          required: true
          schema:
            type: string
            format: uuid
      summary: Get details of a Device
      operationId: getDeviceRequest
      tags:
        - Device
      responses:
        '200':
          description: Details of the device
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    oneOf:
                      - $ref: '#/components/schemas/AppleDevice'
                      - $ref: '#/components/schemas/AndroidDevice'
                      - $ref: '#/components/schemas/LinuxDevice'
                      - $ref: '#/components/schemas/WindowsDevice'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    delete:
      summary: Delete a device. Currently supported by iOS, Linux and Windows devices.
      operationId: deleteDeviceRequest
      tags:
        - Device
      security:
        - apiKey: []
      parameters:
        - name: id
          in: path
          description: ID of the device
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Details of the device
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    oneOf:
                      - $ref: '#/components/schemas/AppleDevice'
                      - $ref: '#/components/schemas/LinuxDevice'
                      - $ref: '#/components/schemas/WindowsDevice'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Device not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /device/v0/devices/{id}/devicestate:
    get:
      summary: Get details of Current Device State
      operationId: getDeviceStateRequest
      tags:
        - Device
      security:
        - apiKey: []
      parameters:
        - name: id
          in: path
          description: ID of the device
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Details of the current device state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceSettings'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/devices/:
    get:
      security:
        - apiKey: []
      summary: Get all devices in the tenant
      description: Returns all the devices in the tenant
      tags:
        - Device V2
      parameters:
        - in: header
          required: true
          name: X-Tenant-Id
          schema:
            type: string
            format: uuid
        - in: header
          required: true
          name: X-Caller-Id
          schema:
            type: string
        - in: header
          required: true
          name: X-SCAPI-Private-URL
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: offset
          schema:
            type: integer
        - in: query
          name: ordering
          description: Field to order the results by. Prefix with '-' to reverse the order.
          schema:
            type: string
            enum:
              - alias
              - created_at
              - last_seen
              - model
              - os_version
              - name
              - serial
              - provisioned_on
              - battery_level
              - dpc_version
              - eea_version
              - is_gms
              - security_state
              - wifi_ssid
              - platform
              - template_name
              - policy_name
              - state
        - in: query
          name: serial
          schema:
            type: string
        - in: query
          name: udid
          schema:
            type: string
        - in: query
          name: android_version
          schema:
            type: string
        - in: query
          name: ios_version
          schema:
            type: string
        - in: query
          name: ipados_version
          schema:
            type: string
        - in: query
          name: windows_version
          schema:
            type: string
        - in: query
          name: state
          schema:
            type: string
        - in: query
          name: battery_level_gte
          schema:
            type: string
        - in: query
          name: battery_level_lte
          schema:
            type: string
        - in: query
          name: is_gms
          schema:
            type: boolean
        - in: query
          name: active_connection
          schema:
            type: string
        - in: query
          name: group_multi
          description: >-
            Filter by multiple group ID. Fetch the devices from groups matching
            with the IDs and it's subgroup.
          schema:
            type: string
            format: uuid
        - in: query
          name: group_multi_immediate
          description: >-
            Filter by multiple group IDs. Fetch the devices from groups matching
            with the IDs.
          schema:
            type: string
            format: uuid
        - in: query
          name: assigned_blueprint_id
          schema:
            type: string
            format: uuid
        - in: query
          name: current_blueprint_id
          schema:
            type: string
            format: uuid
        - in: query
          name: current_blueprint_version_id
          schema:
            type: string
            format: uuid
        - in: query
          name: current_blueprint_version_id_net
          schema:
            type: string
            format: uuid
        - in: query
          name: platform
          description: a csv list of platforms [ANDROID, APPLE, LINUX, WINDOWS]
          schema:
            type: string
        - in: query
          name: os
          schema:
            type: string
            enum:
              - iOS
              - iPadOS
              - Android
              - Linux
              - Windows
        - in: query
          name: device_source
          description: a csv list of device sources [ABM, NON_ABM]
          schema:
            type: string
        - in: query
          name: managed_by
          schema:
            type: string
            enum:
              - BLUEPRINT
              - TEMPLATE
        - in: query
          name: template_multi
          description: a csv list of template names
          schema:
            type: string
        - in: query
          name: policy_multi
          description: a csv list of policy names
          schema:
            type: string
        - in: query
          description: >-
            Search devices by multiOS -> name, serial, imei, model. Apple ->
            udid. Android -> iccid, phone number, brand, wifi, manufacturer,
            hardware, wifi mac address, sim operator, network operator, ip
            address
          name: search
          schema:
            type: string
        - in: query
          name: foundation_device_model_id
          schema:
            type: string
            format: uuid
        - in: query
          name: android_version_exact
          schema:
            type: string
        - in: query
          name: foundation_major_version
          schema:
            type: integer
        - in: query
          name: foundation_minor_version
          schema:
            type: integer
        - in: query
          name: foundation_build_number
          schema:
            type: integer
        - in: query
          name: airwave_tenant_model_id
          schema:
            type: string
        - in: query
          name: airwave_build_id
          schema:
            type: string
        - in: query
          name: airwave_build_number
          schema:
            type: integer
        - in: query
          name: foundation_version
          description: >-
            Full foundation version string (either os_version.major.minor.build
            or eea_version)
          schema:
            type: string
        - in: query
          name: esper_agent_version_name
          description: Filter devices by Esper agent version name (DPC version)
          schema:
            type: string
        - in: query
          name: tags
          description: a csv list of tag ids
          schema:
            type: string
        - in: query
          name: is_locked_down
          schema:
            type: boolean
        - in: query
          name: global_device_id
          schema:
            type: string
      responses:
        '200':
          description: Device information for the Tenant
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          oneOf:
                            - $ref: '#/components/schemas/AndroidDeviceV2'
                            - $ref: '#/components/schemas/AppleDeviceV2'
                            - $ref: '#/components/schemas/LinuxDeviceV2'
                            - $ref: '#/components/schemas/WindowsDeviceV2'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/devices/{id}:
    get:
      security:
        - apiKey: []
      summary: Retrieve detailed device information.
      description: Get device details for particular device id
      tags:
        - Device V2
      parameters:
        - in: header
          required: true
          name: X-Tenant-Id
          schema:
            type: string
            format: uuid
        - in: header
          required: true
          name: X-Caller-Id
          schema:
            type: string
        - in: header
          required: true
          name: X-SCAPI-Private-URL
          schema:
            type: string
        - name: id
          in: path
          description: ID of the device
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Detailed information of the device
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    oneOf:
                      - $ref: '#/components/schemas/AppleDeviceV2'
                      - $ref: '#/components/schemas/AndroidDeviceV2'
                      - $ref: '#/components/schemas/LinuxDeviceV2'
                      - $ref: '#/components/schemas/WindowsDeviceV2'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Device not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /device/v0/heartbeat/{id}/:
    get:
      summary: Get heartbeat of a device which contains last seen information
      operationId: getDeviceHeartbeat
      tags:
        - Device Heartbeat
      security:
        - apiKey: []
      parameters:
        - name: id
          in: path
          description: ID of the device
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Last seen details of the device
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/EsperDeviceHeartbeat'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/heartbeat/:
    get:
      summary: Get list of heartbeat for all devices
      operationId: getDeviceHeartbeatList
      tags:
        - Device Heartbeat
      security:
        - apiKey: []
      parameters:
        - name: last_seen_gt
          in: query
          description: >-
            Specify the starting date and time for device lookup in the format
            (2023-08-29T00:00:00Z).
          required: true
          schema:
            type: string
            format: date-time
            example: '2023-08-29T00:00:00Z'
        - name: last_seen_lt
          in: query
          description: >-
            Specify the end date and time for device lookup in the format
            (2023-08-30T00:00:00Z).
          required: true
          schema:
            type: string
            format: date-time
            example: '2023-08-30T00:00:00Z'
        - name: platform
          in: query
          description: platform of the device
          schema:
            type: string
            enum:
              - ANDROID
              - APPLE
              - LINUX
              - WINDOWS
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: offset
          schema:
            type: integer
      responses:
        '200':
          description: Last seen details of the device
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/DeviceLastSeen'
        '400':
          description: Device create error - Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/devices/{deviceId}/device-apps/:
    get:
      security:
        - apiKey: []
      summary: Get all apps for a device in the tenant
      description: Returns all the apps for a device
      tags:
        - Device Apps
      parameters:
        - name: deviceId
          in: path
          description: ID of the device
          required: true
          schema:
            type: string
        - name: app type
          in: query
          description: >-
            App Type to filter list by, supports multiple values separated by
            comma
          schema:
            type: string
            enum:
              - VPP
              - TENANT_IOS
              - ESPER_IOS
              - WEBCLIP
              - ESPER_WINDOWS
              - TENANT_WINDOWS
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: offset
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/DeviceAppsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/device-apps:
    get:
      security:
        - apiKey: []
      summary: Get list of devices with an app by app_id or app_version_id.
      tags:
        - Device Apps
      parameters:
        - in: query
          name: app_id
          required: true
          schema:
            type: integer
            format: uuid
        - in: query
          name: app_version_id
          required: true
          schema:
            type: integer
            format: uuid
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  prev:
                    type: string
                  next:
                    type: string
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        device_id:
                          type: string
                          format: uuid
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/devices/{deviceId}/google-accounts/policy/:
    get:
      summary: Get the Google EMM Policy details for a specific device.
      tags:
        - Device Enrollment in EMM
      parameters:
        - name: deviceId
          in: path
          description: ID of the device for which to retrieve the Google EMM policy
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleEMMDevice'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    put:
      summary: Update the Google EMM Policy details for a specific device.
      tags:
        - Device Enrollment in EMM
      parameters:
        - name: deviceId
          in: path
          description: >-
            The unique identifier of the device for which Google account details
            need to be updated.
          required: true
          schema:
            type: string
            format: uuid
        - name: is_provisioning
          in: query
          description: >-
            Flag indicating if provisioning is enabled (true or false). Default
            is false.
          required: false
          schema:
            type: string
            default: 'false'
        - name: is_converging
          in: query
          description: >-
            Flag indicating if convergence is enabled (true or false). Default
            is false.
          required: false
          schema:
            type: string
            default: 'false'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleEMMDevicePolicyRequest'
      responses:
        '200':
          description: >-
            Successfully updated the Google EMM policy details for the specified
            device.
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/GoogleEMMDevice'
        '400':
          description: Bad request due to invalid input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Device not found for the provided deviceId.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal server error occurred while processing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /api/v2/devices/{deviceId}/google-accounts/emm-managed/:
    get:
      summary: Get the List of Google EMM Managed Devices for a user's devices.
      tags:
        - Device Enrollment in EMM
      parameters:
        - name: deviceId
          in: path
          description: ID of the device for which to retrieve the Google EMM policy
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevicesListResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/devices/{deviceId}/google-accounts/:
    get:
      summary: >-
        Return the Google account details of the EMM enrollment stored in the
        database for the specified device.
      tags:
        - Device Enrollment in EMM
      parameters:
        - name: deviceId
          in: path
          description: ID of the device for which to retrieve the EMM enrollment status
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/GoogleAccount'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    put:
      summary: >-
        Update the Google account details of the EMM enrollment stored in the
        database for a specific device.
      tags:
        - Device Enrollment in EMM
      parameters:
        - name: deviceId
          in: path
          description: >-
            The unique identifier of the device for which Google account details
            need to be updated.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAccountUpdateRequestBody'
      responses:
        '200':
          description: Successfully updated the Google account details.
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/GoogleAccountUpdateResponseBody'
        '400':
          description: Bad request due to invalid input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Device not found for the provided deviceId.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal server error occurred while processing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    post:
      summary: >-
        Create a Google user and, if request body is not provided, generate a
        Google auth token for a specific device on the Google EMM side.
      tags:
        - Device Enrollment in EMM
      parameters:
        - name: deviceId
          in: path
          description: >-
            The unique identifier of the device for which Google account details
            need to be updated.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleAccount'
      responses:
        '200':
          description: Successfully updated the Google account details.
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/GoogleAccount'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Device not found for the provided deviceId.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_409_Conflict'
        '500':
          description: Internal server error occurred while processing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    delete:
      summary: Unenrolls device from Google EMM and deletes the Google account details.
      tags:
        - Device Enrollment in EMM
      parameters:
        - name: deviceId
          in: path
          description: >-
            The unique identifier of the device for which Google account details
            need to be updated.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully unenrolled and deleted the Google account details.
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/GoogleAccount'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Device not found for the provided deviceId.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal server error occurred while processing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v0/operations/:
    get:
      summary: Get all Operations in the Tenant
      operationId: getOperationsList
      tags:
        - Operations
      security:
        - apiKey: []
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: offset
          schema:
            type: integer
        - in: query
          name: state
          schema:
            type: integer
          description: >
            Following are the Operation States and their corresponding integer
            values

            ```

            OPERATION_CREATED      = 10

            OPERATION_RESOLVING    = 20

            OPERATION_RESOLVED     = 30

            OPERATION_DISPATCHING  = 40

            OPERATION_DISPATCHED   = 50

            OPERATION_PROCESSING   = 60

            OPERATION_COMPLETED    = 70

            OPERATION_SUCCESS      = 80

            OPERATION_FAILURE      = 90

            OPERATION_SCHEDULED    = 100

            OPERATION_CANCELLED    = 110

            OPERATION_TIMEOUT      = 120

            ```
        - in: query
          name: ordering
          description: Field to order the results by. Prefix with '-' to reverse the order.
          schema:
            type: string
            enum:
              - created_at
              - state
              - updated_at
        - in: query
          name: operation_type
          description: >-
            Filter operations by type (e.g., INSTALL, UNINSTALL, CONVERGE,
            INSTALL_APP, UNINSTALL_APP, REBOOT)
          schema:
            type: string
        - in: query
          name: group_multi
          description: >-
            Filter by multiple group ID. Fetch the devices from groups matching
            with the IDs and it's subgroup.
          schema:
            type: string
            format: uuid
      x-scope:
        - read:operation
      responses:
        '200':
          description: Operations information for the Tenant
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/OperationWithStats'
    post:
      summary: Create a new Operation
      operationId: createOperation
      tags:
        - Operations
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Operations_POST'
            examples:
              devices:
                $ref: '#/components/examples/example_devices'
              filters:
                $ref: '#/components/examples/example_filters'
      x-scope:
        - create:operation:CONVERGE
      responses:
        '201':
          description: Operation information for the Tenant
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/OperationWithStats'
  /v0/operations/{operationId}/:
    get:
      summary: Get specific Operation details (Operation Status)
      operationId: getOperation
      security:
        - apiKey: []
      tags:
        - Operations
      parameters:
        - name: operationId
          in: path
          description: ID of the Operation
          required: true
          schema:
            type: string
            format: uuid
      x-scope:
        - read:operation
      responses:
        '200':
          description: Operation information for the Tenant
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/OperationWithStats'
    put:
      summary: Update the operation (Support status update as of now)
      description: >-
        This API allows updating the status of a specific operation by providing
        the operation ID.
      tags:
        - Operations
      security:
        - apiKey: []
      parameters:
        - name: operationId
          in: path
          required: true
          description: The ID of the operation to update (Put created operationId here)
          schema:
            type: string
            example: 5743470f-7dcc-4a92-8a4b-f41b1cea69ed
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                state:
                  type: string
                  enum:
                    - FAILED
                    - CANCELLED
                    - TIMEOUT
                    - SCHEDULED
                  description: The new status of the operation
              required:
                - status
            examples:
              example-1:
                summary: Update status to CANCELLED
                value:
                  state: CANCELLED
                  reason: User requested
      x-scope:
        - update:operation
      responses:
        '200':
          description: Operation status updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  operationId:
                    type: string
                    description: The ID of the updated operation
                  status:
                    type: string
                    description: The updated status of the operation
              example:
                operationId: '12345'
                status: SUCCEEDED
  /v0/operations/{operationsId}/devices/:
    get:
      summary: Get all DeviceOperations for a specific Operation
      operationId: getDeviceOperations
      tags:
        - DeviceOperations
      security:
        - apiKey: []
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: offset
          schema:
            type: integer
        - name: operationsId
          in: path
          description: ID of the Operation
          required: true
          schema:
            type: string
            format: uuid
          example: 5743470f-7dcc-4a92-8a4b-f41b1cea69ed
        - in: query
          name: state
          schema:
            type: integer
          description: >
            Following are the Device Operation States and their corresponding
            integer values

            ```

            DEVICE_OPERATION_CREATED     = 10

            DEVICE_OPERATION_INITIATED   = 20

            DEVICE_OPERATION_DISPATCHED  = 30

            DEVICE_OPERATION_PROCESSING  = 40

            DEVICE_OPERATION_SUCCESS     = 50

            DEVICE_OPERATION_FAILURE     = 60

            DEVICE_OPERATION_CANCELLED   = 70

            DEVICE_OPERATION_TIMEOUT     = 80

            DEVICE_OPERATION_COMPLETED   = 90

            ```
        - in: query
          name: ordering
          description: Field to order the results by. Prefix with '-' to reverse the order.
          schema:
            type: string
            enum:
              - created_at
              - state
              - updated_at
      x-scope:
        - read:operation:devices
      responses:
        '200':
          description: Device Operation information for the Operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/DeviceOperationWithStats'
  /v0/devices/{deviceId}/operations/:
    get:
      summary: Get a Operations for a device
      tags:
        - DeviceOperations
      security:
        - apiKey: []
      parameters:
        - name: deviceId
          in: path
          description: ID of the Device
          required: true
          schema:
            type: string
            format: uuid
          example: 17d384d3-29bd-4dd4-af64-d02b9d6d54ee
      x-scope:
        - read:device:operations
      responses:
        '200':
          description: Operations information for the Device
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  previous:
                    type: string
                  next:
                    type: string
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/OperationWithStats'
  /v0/operations/{operationsId}/devices/{deviceId}/:
    get:
      summary: >-
        Get a specific DeviceOperations for a specific Operation (Device
        Operation Status)
      operationId: getDeviceOperation
      tags:
        - DeviceOperations
      security:
        - apiKey: []
      parameters:
        - name: operationsId
          in: path
          description: ID of the Operation
          required: true
          schema:
            type: string
            format: uuid
            example: 5743470f-7dcc-4a92-8a4b-f41b1cea69ed
        - name: deviceId
          in: path
          description: ID of the Device
          required: true
          schema:
            type: string
            format: uuid
            example: 17d384d3-29bd-4dd4-af64-d02b9d6d54ee
      x-scope:
        - read:operation:devices
      responses:
        '200':
          description: Device Operation information for the Operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/DeviceOperationWithStats'
    put:
      summary: Update a specific DeviceOperation for a specific Operation
      operationId: updateDeviceOperation
      tags:
        - DeviceOperations
      security:
        - apiKey: []
      parameters:
        - name: operationsId
          in: path
          description: ID of the Operation
          required: true
          schema:
            type: string
            format: uuid
            example: 0aae03d2-32b4-4cab-b733-6919b84bb2ac
        - name: deviceId
          in: path
          description: ID of the Device
          required: true
          schema:
            type: string
            format: uuid
            example: 550e8400-e29b-41d4-a716-446655440000
      x-scope:
        - update:operation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                operation_type:
                  type: string
                  example: CONVERGE
                state:
                  type: string
                  example: SUCCESS
                service_id:
                  type: string
                  example: drift-service
                reason:
                  type: string
                  example: test
      responses:
        '200':
          description: Device Operation updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/DeviceOperationWithStats'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /api/v2/foundationversions:
    get:
      summary: Get all distinct foundation versions
      description: >-
        Returns a list of distinct foundation versions present in the tenant's
        devices
      operationId: getFoundationVersionsList
      x-scope:
        - read:foundationversions
      tags:
        - Device
      parameters:
        - in: header
          required: true
          name: X-Tenant-Id
          schema:
            type: string
            format: uuid
        - in: header
          required: true
          name: X-Caller-Id
          schema:
            type: string
        - in: header
          required: true
          name: X-SCAPI-Private-URL
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
            default: 10
          description: Number of results to return per page
        - in: query
          name: offset
          schema:
            type: integer
            default: 0
          description: The initial index from which to return the results
        - in: query
          name: search
          schema:
            type: string
          description: >-
            Filter foundation versions by partial string match
            (case-insensitive)
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    description: Total number of distinct foundation versions
                  prev:
                    type: string
                    description: URL to the previous page of results
                  next:
                    type: string
                    description: URL to the next page of results
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        foundation_version:
                          type: string
                          description: The foundation version string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /api/v2/rv-activity-feed/:
    get:
      summary: Get RemoteViewer Activity Feed for the tenant
      tags:
        - MultiOS Remote Viewer
      parameters:
        - in: header
          required: true
          name: X-Tenant-Id
          schema:
            type: string
            format: uuid
        - in: header
          required: true
          name: X-Caller-Id
          schema:
            type: string
        - in: header
          required: true
          name: X-SCAPI-Private-URL
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: offset
          schema:
            type: integer
        - in: query
          name: states
          schema:
            type: string
            enum:
              - INITIATED
              - ACKNOWLEDGED
              - ACTIVE
              - TERMINATED
              - FAILED
            description: List API supports comma separated states.
        - in: query
          name: video_qualities
          schema:
            type: string
            enum:
              - STANDARD
              - DATA_SAVER
            description: >-
              To allow filtering sessions list by comma separated video
              qualities
        - in: query
          name: reason
          schema:
            type: string
            description: To allow searching sessions list by reason
        - in: query
          name: created_by
          schema:
            type: string
            description: To allow filtering sessions list by created by
        - in: query
          name: device_name
          schema:
            type: string
            description: To allow searching sessions list by device name
        - in: query
          name: ordering
          schema:
            type: string
            default: '-created_at'
            enum:
              - created_at
              - updated_at
              - device_name
              - duration
              - state
              - reason
              - video_quality
              - created_by
            description: >-
              To allow ordering sessions list by created_at, updated_at,
              device_name, duration, state, reason, video_quality and
              created_by.
        - in: query
          name: duration_lt
          schema:
            type: string
            format: duration
            description: >-
              Duration less than filter. The time duration (in ISO 8601 duration
              format) of only a valid elapsed session, i.e., sessions that have
              moved from ACTIVE state (where session start-time can be captured)
              to TERMINATED or FAILED state (where the session end-time can be
              captured).
            example: duration_lt=PT10M30S
        - in: query
          name: duration_lte
          schema:
            type: string
            format: duration
            description: >-
              Duration less than or equal to filter. The time duration (in ISO
              8601 duration format) of only a valid elapsed session, i.e.,
              sessions that have moved from ACTIVE state (where session
              start-time can be captured) to TERMINATED or FAILED state (where
              the session end-time can be captured).
            example: duration_lte=PT10M30S
        - in: query
          name: duration_gt
          schema:
            type: string
            format: duration
            description: >-
              Duration greater than filter. The time duration (in ISO 8601
              duration format) of only a valid elapsed session, i.e., sessions
              that have moved from ACTIVE state (where session start-time can be
              captured) to TERMINATED or FAILED state (where the session
              end-time can be captured).
            example: duration_gt=PT10M30S
        - in: query
          name: duration_gte
          schema:
            type: string
            format: duration
            description: >-
              Duration greater than or equal to filter. The time duration (in
              ISO 8601 duration format) of only a valid elapsed session, i.e.,
              sessions that have moved from ACTIVE state (where session
              start-time can be captured) to TERMINATED or FAILED state (where
              the session end-time can be captured).
            example: duration_gte=PT10M30S
        - in: query
          name: created_at_lt
          schema:
            type: string
            format: date-time
            description: >-
              Created at less than filter. Datetime format must be in
              "YY-MM-DDTHH:mm:ss.fffffffffZ".
            example: created_at_lt=2023-10-01T12:00:00Z
        - in: query
          name: created_at_gt
          schema:
            type: string
            format: date-time
            description: >-
              Created at greater than filter. Datetime format must be in
              "YY-MM-DDTHH:mm:ss.fffffffffZ".
            example: created_at_gt=2023-10-01T12:00:00Z
        - in: query
          name: created_at_lte
          schema:
            type: string
            format: date-time
            description: >-
              Created at less than or equal to filter. Datetime format must be
              in "YY-MM-DDTHH:mm:ss.fffffffffZ".
            example: created_at_lte=2023-10-01T12:00:00Z
        - in: query
          name: created_at_gte
          schema:
            type: string
            format: date-time
            description: >-
              Created at greater than or equal to filter. Datetime format must
              be in "YY-MM-DDTHH:mm:ss.fffffffffZ".
            example: created_at_gte=2023-10-01T12:00:00Z
        - in: query
          name: updated_at_lt
          schema:
            type: string
            format: date-time
            description: >-
              Updated at less than filter. Datetime format must be in
              "YY-MM-DDTHH:mm:ss.fffffffffZ".
            example: updated_at_lt=2023-10-01T12:00:00Z
        - in: query
          name: updated_at_gt
          schema:
            type: string
            format: date-time
            description: >-
              Updated at greater than filter. Datetime format must be in
              "YY-MM-DDTHH:mm:ss.fffffffffZ".
            example: updated_at_gt=2023-10-01T12:00:00Z
        - in: query
          name: updated_at_lte
          schema:
            type: string
            format: date-time
            description: >-
              Updated at less than or equal to filter. Datetime format must be
              in "YY-MM-DDTHH:mm:ss.fffffffffZ".
            example: updated_at_lte=2023-10-01T12:00:00Z
        - in: query
          name: updated_at_gte
          schema:
            type: string
            format: date-time
            description: >-
              Updated at greater than or equal to filter. Datetime format must
              be in "YY-MM-DDTHH:mm:ss.fffffffffZ".
            example: updated_at_gte=2023-10-01T12:00:00Z
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/RemoteViewerSessionsListForTenantResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /apps/v0/vpp:
    get:
      security:
        - apiKey: []
      summary: Get VPP License List
      description: API to get a list of VPP licenses with the given VPP token
      tags:
        - VPP License Management
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: response code
                    default: 200
                  message:
                    type: string
                    description: response message
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: number of results returned
                      prev:
                        type: string
                        description: URL for previous page of results
                      next:
                        type: string
                        description: URL for next page of results
                      results:
                        type: array
                        items:
                          oneOf:
                            - $ref: '#/components/schemas/VPPLicense'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /apps/v0/vpp/{appId}:
    get:
      security:
        - apiKey: []
      parameters:
        - in: path
          name: appId
          schema:
            type: integer
          required: true
      summary: Get VPP License Info about an App
      description: API to get information about the VPP license for a given app
      tags:
        - VPP License Management
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: response code
                    default: 200
                  message:
                    type: string
                    description: response message
                  content:
                    $ref: '#/components/schemas/VPPLicense'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/itunesapps:
    get:
      security:
        - apiKey: []
      parameters:
        - name: app_id
          in: query
          schema:
            type: string
            format: uuid
        - name: version_id
          in: query
          schema:
            type: string
            format: uuid
        - name: apple_app_id
          in: query
          schema:
            type: string
        - name: country_code
          in: query
          description: >-
            ISO country code for App Store region (e.g., "us", "gb", "de").
            Defaults to "us".
          schema:
            type: string
            pattern: ^[a-zA-Z]{2}$
            example: us
      summary: Get iOS App Info (v2)
      description: >-
        API to get information about iOS apps based on their app IDs or Apple
        app IDs.
      tags:
        - VPP App Management
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: number of results returned
                      prev:
                        type: string
                        description: URL for previous page of results
                      next:
                        type: string
                        description: URL for next page of results
                      results:
                        type: array
                        items:
                          oneOf:
                            - $ref: '#/components/schemas/ItunesAppInfoV2'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/tenant-apps:
    post:
      security:
        - apiKey: []
      summary: Upload tenant app for a tenant
      tags:
        - Tenant Apps
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AppUploadRequestBody'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/TenantAppUploadResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_403_Forbidden'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    get:
      security:
        - apiKey: []
      parameters:
        - in: query
          name: limit
          schema:
            type: number
        - in: query
          name: offset
          schema:
            type: number
        - in: query
          name: platform
          schema:
            type: string
            enum:
              - APPLE
              - WINDOWS
        - in: query
          name: package_name
          schema:
            type: string
        - in: query
          name: app_name
          schema:
            type: string
      summary: Get tenant apps for a tenant
      tags:
        - Tenant Apps
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: number of results returned
                      prev:
                        type: string
                        description: URL for previous page of results
                      next:
                        type: string
                        description: URL for next page of results
                      results:
                        type: array
                        items:
                          oneOf:
                            - $ref: '#/components/schemas/TenantAppResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/tenant-apps/{appId}:
    get:
      security:
        - apiKey: []
      parameters:
        - in: path
          required: true
          name: appId
          schema:
            type: string
            format: uuid
      summary: Get tenant app by ID
      tags:
        - Tenant Apps
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/TenantAppResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/tenant-apps/{appId}/versions:
    get:
      security:
        - apiKey: []
      parameters:
        - in: path
          required: true
          name: appId
          schema:
            type: string
            format: uuid
        - in: query
          name: limit
          schema:
            type: number
        - in: query
          name: offset
          schema:
            type: number
        - in: query
          name: app_name
          schema:
            type: string
        - in: query
          name: legacy_format
          schema:
            type: boolean
            default: true
          description: >-
            If false, returns version_code instead of build_number. Defaults to
            true for backward compatibility.
      summary: Get tenant app versions by app ID
      tags:
        - Tenant Apps
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: number of results returned
                      prev:
                        type: string
                        description: URL for previous page of results
                      next:
                        type: string
                        description: URL for next page of results
                      results:
                        type: array
                        items:
                          oneOf:
                            - $ref: '#/components/schemas/TenantAppVersionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/tenant-apps/{appId}/versions/{versionId}:
    get:
      security:
        - apiKey: []
      parameters:
        - in: path
          required: true
          name: appId
          schema:
            type: string
            format: uuid
        - in: path
          required: true
          name: versionId
          schema:
            type: string
            format: uuid
        - in: query
          name: legacy_format
          schema:
            type: boolean
            default: true
          description: >-
            If false, returns version_code instead of build_number. Defaults to
            true for backward compatibility.
      summary: Get tenant app version by ID
      tags:
        - Tenant Apps
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/TenantAppVersionDetailResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    put:
      security:
        - apiKey: []
      parameters:
        - in: path
          required: true
          name: appId
          schema:
            type: string
        - in: path
          required: true
          name: versionId
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
      summary: Update tenant app version by ID
      tags:
        - Tenant Apps
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/TenantAppVersionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_403_Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    delete:
      security:
        - apiKey: []
      parameters:
        - in: path
          required: true
          name: appId
          schema:
            type: string
            format: uuid
        - in: path
          required: true
          name: versionId
          schema:
            type: string
            format: uuid
      summary: Delete tenant app version by ID
      tags:
        - Tenant Apps
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/TenantAppVersionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_403_Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/appleappstore/:
    get:
      security:
        - apiKey: []
      parameters:
        - name: title
          in: query
          required: true
          schema:
            type: string
      summary: Search Apple App Store
      tags:
        - Apple App Store
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: number of results returned
                      prev:
                        type: string
                        description: URL for previous page of results
                      next:
                        type: string
                        description: URL for next page of results
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/AppleAppStoreApp'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/apps:
    get:
      security:
        - apiKey: []
      parameters:
        - in: query
          name: limit
          schema:
            type: number
        - in: query
          name: offset
          schema:
            type: number
        - in: query
          name: search
          schema:
            type: string
        - in: query
          name: ordering
          schema:
            type: string
            enum:
              - name
              - created_at
              - updated_at
        - in: query
          name: app_type
          schema:
            type: string
        - in: query
          name: legacy_format
          schema:
            type: boolean
            default: true
          description: >-
            If false, returns version_code instead of build_number. Defaults to
            true for backward compatibility.
      summary: Get unified list of iOS apps (IPAs and Webclips) for a tenant
      tags:
        - App List
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: number of results returned
                      prev:
                        type: string
                        description: URL for previous page of results
                      next:
                        type: string
                        description: URL for next page of results
                      results:
                        type: array
                        items:
                          oneOf:
                            - $ref: '#/components/schemas/AppInfo'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/webclips:
    post:
      security:
        - apiKey: []
      summary: Create webclip for a tenant
      tags:
        - Webclips
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/WebclipCreateRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/Webclip'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_409_Conflict'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    get:
      security:
        - apiKey: []
      parameters:
        - in: query
          name: limit
          schema:
            type: number
        - in: query
          name: offset
          schema:
            type: number
        - in: query
          name: label
          schema:
            type: string
        - in: query
          name: exact_esper_name
          schema:
            type: string
      summary: Get webclips for a tenant
      tags:
        - Webclips
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: number of results returned
                      prev:
                        type: string
                        description: URL for previous page of results
                      next:
                        type: string
                        description: URL for next page of results
                      results:
                        type: array
                        items:
                          oneOf:
                            - $ref: '#/components/schemas/Webclip'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/webclips/{webclipId}:
    get:
      security:
        - apiKey: []
      parameters:
        - in: path
          required: true
          name: webclipId
          schema:
            type: string
            format: uuid
      summary: Get webclip by id for a tenant
      tags:
        - Webclips
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/Webclip'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    delete:
      security:
        - apiKey: []
      parameters:
        - in: path
          required: true
          name: webclipId
          schema:
            type: string
            format: uuid
      summary: Delete webclip for a tenant
      tags:
        - Webclips
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/Webclip'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_409_Conflict'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/provisioning-profiles:
    post:
      security:
        - apiKey: []
      summary: Upload provisioning profile for a tenant
      description: >-
        API to upload and validate iOS provisioning profiles for app
        distribution
      tags:
        - Provisioning Profiles
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ProvisioningProfileUploadRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/ProvisioningProfileUploadResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    get:
      security:
        - apiKey: []
      parameters:
        - in: query
          name: limit
          schema:
            type: number
            description: Maximum number of provisioning profiles to return
            default: 10
        - in: query
          name: offset
          schema:
            type: number
            description: Number of provisioning profiles to skip
            default: 0
        - in: query
          name: app_identifier
          schema:
            type: string
            description: Filter by bundle identifier of the associated app
        - in: query
          name: profile_type
          schema:
            type: string
            description: Filter by profile type
            enum:
              - development
              - ad-hoc
              - app-store
              - enterprise
        - in: query
          name: team_id
          schema:
            type: string
            description: Filter by Apple Developer Team identifier
        - in: query
          name: search
          schema:
            type: string
            description: Search in provisioning profile names and identifiers
      summary: Get provisioning profiles for a tenant
      description: >-
        API to retrieve a list of iOS provisioning profiles with download URLs
        and pagination
      tags:
        - Provisioning Profiles
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: Total number of provisioning profiles
                      prev:
                        type: string
                        description: URL for previous page of results
                      next:
                        type: string
                        description: URL for next page of results
                      results:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/ProvisioningProfileWithDownloadResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/provisioning-profiles/{id}:
    get:
      security:
        - apiKey: []
      parameters:
        - in: path
          required: true
          name: id
          schema:
            type: string
            format: uuid
            description: Unique identifier for the provisioning profile
      summary: Get provisioning profile by ID
      description: >-
        API to retrieve a specific iOS provisioning profile by its ID with
        download URL
      tags:
        - Provisioning Profiles
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: >-
                      #/components/schemas/ProvisioningProfileWithDownloadResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/provisioning-profiles/{id}/versions:
    get:
      security:
        - apiKey: []
      parameters:
        - in: path
          required: true
          name: id
          schema:
            type: string
            format: uuid
            description: Unique identifier for the provisioning profile
        - in: query
          name: limit
          schema:
            type: number
            description: Maximum number of provisioning profile versions to return
            default: 10
        - in: query
          name: offset
          schema:
            type: number
            description: Number of provisioning profile versions to skip
            default: 0
        - in: query
          name: search
          schema:
            type: string
            description: Search in provisioning profile version names
      summary: Get provisioning profile versions list
      description: >-
        API to retrieve all versions of a specific iOS provisioning profile
        ordered by expiration date descending, with pagination and search
        capabilities
      tags:
        - Provisioning Profiles
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: Total number of provisioning profile versions
                      prev:
                        type: string
                        description: URL for previous page of results
                      next:
                        type: string
                        description: URL for next page of results
                      results:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/ProvisioningProfileVersionWithDownloadResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/provisioning-profiles/{id}/versions/{versionId}:
    get:
      security:
        - apiKey: []
      parameters:
        - in: path
          required: true
          name: id
          schema:
            type: string
            format: uuid
            description: Unique identifier for the provisioning profile
        - in: path
          required: true
          name: versionId
          schema:
            type: string
            format: uuid
            description: >-
              Unique identifier for the specific version of the provisioning
              profile
      summary: Get provisioning profile version by ID
      description: >-
        API to retrieve a specific version of an iOS provisioning profile by
        profile ID and version ID with download URL
      tags:
        - Provisioning Profiles
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: >-
                      #/components/schemas/ProvisioningProfileVersionWithDownloadResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    delete:
      security:
        - apiKey: []
      parameters:
        - in: path
          required: true
          name: id
          schema:
            type: string
            format: uuid
            description: Unique identifier for the provisioning profile
        - in: path
          required: true
          name: versionId
          schema:
            type: string
            format: uuid
            description: >-
              Unique identifier for the specific version of the provisioning
              profile to delete
      summary: Delete provisioning profile version by ID
      description: >-
        API to delete a specific version of an iOS provisioning profile by
        profile ID and version ID. Returns the deleted version information.
      tags:
        - Provisioning Profiles
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: >-
                      #/components/schemas/ProvisioningProfileVersionWithDownloadResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /api/v2/esper-apps/{appId}/versions/{versionId}:
    get:
      security:
        - apiKey: []
      parameters:
        - in: header
          required: true
          name: X-Caller-Id
          schema:
            type: string
        - in: path
          required: true
          name: appId
          schema:
            type: string
            format: uuid
        - in: path
          required: true
          name: versionId
          schema:
            type: string
            format: uuid
      summary: Get esper app version details by ID
      tags:
        - Esper Apps
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/EsperAppVersionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /api/v2/tenant-esper-apps:
    get:
      security:
        - apiKey: []
      parameters:
        - in: header
          required: true
          name: X-Tenant-Id
          schema:
            type: string
            format: uuid
        - in: header
          required: true
          name: X-Caller-Id
          schema:
            type: string
        - in: header
          required: true
          name: X-SCAPI-Private-URL
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: number
        - in: query
          name: offset
          schema:
            type: number
        - in: query
          name: package_name
          schema:
            type: string
        - in: query
          name: ordering
          schema:
            type: string
            enum:
              - created_at (ascending)
              - '-created_at (descending)'
              - version_code (ascending)
              - '-version_code (descending)'
        - in: query
          name: architecture
          schema:
            type: string
            enum:
              - x86
              - x86_64
              - armeabi
              - arm64_v8a
              - armeabi_v7a
              - universal
        - in: query
          name: version_code
          schema:
            type: string
            description: Filter by version code
      summary: Get esper apps for a tenant
      tags:
        - Tenant Esper Apps
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: number of results returned
                      prev:
                        type: string
                        description: URL for previous page of results
                      next:
                        type: string
                        description: URL for next page of results
                      results:
                        type: array
                        items:
                          oneOf:
                            - $ref: '#/components/schemas/TenantEsperAppsItem'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /commands/v0/commands/:
    get:
      summary: List command requests
      description: API to get and filter command requests
      operationId: listCommandRequests
      tags:
        - Command Request
      parameters:
        - in: query
          name: devices
          description: Filter by device IDs. Accepts comma separated values.
          schema:
            type: string
        - in: query
          name: groups
          description: Filter by group IDs. Accepts comma separated values.
          schema:
            type: string
        - in: query
          name: command
          description: Filter by command name
          schema:
            type: string
        - in: query
          name: schedule
          description: Filter by schedule type
          schema:
            type: string
            enum:
              - IMMEDIATE
              - WINDOW
              - RECURRING
        - in: query
          name: exclude_internal_commands
          description: Filter to exclude internal commands
          schema:
            type: boolean
            default: false
        - in: query
          name: limit
          schema:
            type: number
        - in: query
          name: offset
          schema:
            type: number
      security:
        - apiKey: []
      responses:
        '200':
          description: Command request list for the Tenant
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/CommandRequest'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    post:
      summary: Create a command request
      description: >-
        API to create a command request for a set of devices or groups. Works
        for mixed-fleet devices (Android, iOS, etc.) if the command is
        supported.


        You can send the command immediately or [schedule
        command](https://help.esper.io/hc/en-us/articles/16693582666769-Scheduling-API-Commands)
        for supported devices.


        Scheduled commands are currently compatible with Android devices.
      operationId: createCommandRequest
      tags:
        - Command Request
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommandRequest_POST'
      responses:
        '201':
          description: Command request successfully created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/CommandRequest'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /commands/v0/commands/{id}/:
    get:
      summary: Get a command request
      description: API to get a command request
      operationId: getCommandRequest
      tags:
        - Command Request
      security:
        - apiKey: []
      parameters:
        - name: id
          in: path
          description: ID of the command request object
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Command request information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/CommandRequest'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /commands/v0/commands/{id}/stats/:
    get:
      summary: Get stats of a command request
      description: API to get a aggregrated status for a command request
      operationId: getCommandRequestStats
      tags:
        - Command Request
      security:
        - apiKey: []
      parameters:
        - name: id
          in: path
          description: ID of the command request object
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Aggregrated status information for a command request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/CommandRequestStats'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /commands/v0/status/:
    get:
      summary: Get status list for command request
      description: API to get and filter command request status
      operationId: getCommandRequestStatuses
      tags:
        - Command Status
      security:
        - apiKey: []
      parameters:
        - in: query
          name: request
          description: >-
            Filter status result by command request IDs. Accepts comma separated
            values.
          schema:
            type: string
        - in: query
          name: device
          description: Filter status result by device IDs. Accepts comma separated values.
          schema:
            type: string
        - in: query
          name: state
          description: Filter by command state
          schema:
            type: string
            enum:
              - Command Queued
              - Command Initiated
              - Command Acknowledged
              - Command In Progress
              - Command TimeOut
              - Command Success
              - Command Failure
              - Command Scheduled
              - Command Cancelled
        - in: query
          name: exclude_internal_commands
          description: Filter to exclude internal commands
          schema:
            type: boolean
            default: false
        - in: query
          name: limit
          schema:
            type: number
        - in: query
          name: offset
          schema:
            type: number
      responses:
        '200':
          description: Status list for a command request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/CommandStatus'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /commands/v0/status/{id}/:
    get:
      summary: Get a command status
      description: API to get a command status
      operationId: getCommandStatus
      tags:
        - Command Status
      security:
        - apiKey: []
      parameters:
        - name: id
          in: path
          description: ID of the command status object
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Command status information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/CommandStatus'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    put:
      summary: Update command status
      description: API to update a command status state
      operationId: updateCommandStatus
      tags:
        - Command Status
      parameters:
        - name: id
          in: path
          description: ID of the command status object
          required: true
          schema:
            type: string
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommandStatus_PUT'
      responses:
        '200':
          description: Command status successfully updated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/CommandStatus'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/command-inbox/:
    get:
      summary: Get queued commands to be executed by the physical device.
      description: API to get queued commands for a device
      operationId: getCommandInbox
      tags:
        - Command Status
      parameters:
        - in: query
          name: device_id
          description: Filter status result by device IDs.
          required: true
          schema:
            type: string
      security:
        - apiKey: []
      responses:
        '200':
          description: List of Queued Command Status
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/CommandInbox'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/converge:
    get:
      summary: List converge action
      description: API to get and filter converge action
      operationId: listConverges
      tags:
        - Converge
      parameters:
        - in: query
          name: device_ids
          description: Filter by device IDs. Accepts comma separated values.
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: number
        - in: query
          name: offset
          schema:
            type: number
      security:
        - apiKey: []
      responses:
        '200':
          description: Converge action list for the Tenant
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/Converge'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    post:
      summary: Create a converge action
      description: API to create a converge action for a device.
      operationId: createConverge
      tags:
        - Converge
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Converge_POST'
      responses:
        '201':
          description: Converge action successfully created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/Converge'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/converge/{id}:
    get:
      summary: Get converge action
      description: API to get a converge action
      operationId: getConverge
      tags:
        - Converge
      security:
        - apiKey: []
      parameters:
        - name: id
          in: path
          description: ID of the converge object
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Converge information
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/Converge'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/converge/{id}/commands:
    get:
      summary: List commands fires for converge action
      description: API to get and filter commands fired for converge action
      operationId: listConvergeCommands
      tags:
        - Converge Command
      parameters:
        - name: id
          in: path
          description: ID of the converge object
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: number
        - in: query
          name: offset
          schema:
            type: number
      security:
        - apiKey: []
      responses:
        '200':
          description: List of commands fired for converge action for the tenant
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/ConvergeCommand'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/seamless/upload:
    post:
      summary: Create a ABM provisioning request by uploading file
      tags:
        - ABM Provisioning
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                csv_file:
                  type: string
                  format: binary
      responses:
        '200':
          description: ABM provisioning request successfully created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/SeamlessRequest'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/seamless:
    post:
      summary: Create a ABM provisioning request using device serial number
      tags:
        - ABM Provisioning
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SeamlessRequestBody'
      responses:
        '200':
          description: Seamless request successfully created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/SeamlessRequest'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /onboarding/v0/depsyncs/:
    get:
      summary: List all DEP sync requests for the tenant
      description: Returns all the DEP sync requests for the tenant
      operationId: listDEPSyncRequest
      tags:
        - DEP Sync Request
      security:
        - apiKey: []
      responses:
        '200':
          description: DEP sync request list for the Tenant
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/DEPSyncRequestForGetResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    post:
      summary: Create a DEP sync request
      description: API to create a DEP sync request.
      operationId: createDEPSyncRequest
      tags:
        - DEP Sync Request
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: DEP sync request successfully created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/DEPSyncRequest'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /onboarding/v0/depsyncs/{id}/:
    get:
      summary: Get a DEP sync request
      description: API to get a DEP sync request
      operationId: getDEPSyncRequest
      tags:
        - DEP Sync Request
      security:
        - apiKey: []
      parameters:
        - name: id
          in: path
          description: ID of the DEP sync request object
          required: true
          schema:
            type: string
      responses:
        '200':
          description: DEP sync request information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/DEPSyncRequestForGetResponse'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /tenant/v0/apnscertificates/:
    get:
      summary: Get all APNs certificate meta data for the Tenant
      description: Returns all the APNs certificate meta information
      operationId: listAPNsCerts
      tags:
        - APNs certificate
      security:
        - apiKey: []
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
            default: 10
          description: Number of records to return
        - in: query
          name: offset
          schema:
            type: integer
            default: 0
          description: Number of records to skip
        - in: query
          name: state
          schema:
            type: string
            enum:
              - CSR_GENERATED
              - COMPLETED
      responses:
        '200':
          description: APNs certificate meta data list for the Tenant
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/APNSCertInfo'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    post:
      summary: Get the CSR file to upload to the apple identity console
      operationId: getAPNsCSR
      tags:
        - APNs certificate
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Created
          content:
            application/x-plist:
              schema:
                type: string
                format: binary
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /tenant/v0/apnscertificates/{id}/:
    get:
      summary: Get APNs certificate meta information
      operationId: getAPNsCert
      tags:
        - APNs certificate
      security:
        - apiKey: []
      parameters:
        - name: id
          in: path
          description: ID of the APNs certificate meta object
          required: true
          schema:
            type: string
      responses:
        '200':
          description: APNs certificate meta information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/APNSCertInfo'
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    put:
      summary: Upload APNs certificate
      description: >-
        Upload the signed APNs certificate obtained from the apple identity
        console.
      operationId: uploadAPNsCert
      tags:
        - APNs certificate
      security:
        - apiKey: []
      parameters:
        - name: id
          in: path
          description: ID of the APNs certificate meta object
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/APNSCert_PUT'
      responses:
        '200':
          description: Uploaded APNs certificate meta Information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/APNSCertInfo'
        '400':
          description: APNs certificate update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: APNs certificate update error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    delete:
      summary: Delete a APNs certificate
      operationId: deleteAPNsCert
      tags:
        - APNs certificate
      security:
        - apiKey: []
      parameters:
        - name: id
          in: path
          description: ID of the APNs certificate meta object
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Deleted APNs certificate
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
        '401':
          description: APNs certificate delete error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /tenant/v0/vpptokens/:
    get:
      security:
        - apiKey: []
      summary: Get all VPP tokens for the tenant
      description: Returns all the VPP tokens for the tenant
      tags:
        - VPP Token Management
      responses:
        '200':
          description: VPP tokens for the Tenant
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    default: 200
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/VPPToken'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    post:
      security:
        - apiKey: []
      summary: Store a VPP token
      description: Uploads a VPP token
      tags:
        - VPP Token Management
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                filename:
                  type: string
                  format: binary
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    default: 201
                  message:
                    type: string
                  content:
                    $ref: '#/components/schemas/VPPToken'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /tenant/v0/vpptokens/{id}:
    delete:
      security:
        - apiKey: []
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      summary: Delete VPP Token
      description: API to delete vpp token for a tenant
      tags:
        - VPP Token Management
      responses:
        '204':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: response code
                    default: 204
                  message:
                    type: string
                    description: response message
                  content:
                    type: object
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /tenant/v0/deptokens/:
    post:
      summary: Generate the public key file
      description: >-
        Generate the public key file which is uploaded to Apple Business
        Manager(ABM) console to generate the DEP token.
      operationId: DEPToken
      tags:
        - DEP Tokens
      security:
        - apiKey: []
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DEP_Token_POST'
      responses:
        '200':
          description: Public key generation for ABM
          headers:
            Content-Disposition:
              schema:
                type: string
                example: attachment; filename="Esper_Public_Key.pem"
          content:
            text/plain; charset=utf-8:
              schema:
                type: string
                properties:
                  content:
                    type: string
                example: >-
                  -----BEGIN PUBLIC KEY-----
                  MIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgE7FsxhVgAauNzV2S+B2O2TVpcKc
                  /aPylhD8Abq0/5swcu3XFseP/GVttTH7JzSLLKdpyculA/DWfc73OP+r4LeswbAc
                  pyvI8uDVCexU7YsND00Vs/L1i9RZXpCBk0oNECjIKQ6ex7ccI6VzZaTH6DallGkY
                  eUcBApaAiL5QILTlAgMBAAE= -----END PUBLIC KEY-----
        '400':
          description: Public key generation error - Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Public key generation error - Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Public key generation error - Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    get:
      summary: Get all DEP tokens
      description: Get the list of all DEP tokens available in the tenant
      operationId: ListDEPTokens
      tags:
        - DEP Tokens
      security:
        - apiKey: []
      parameters:
        - in: query
          name: state
          schema:
            type: string
            enum:
              - CSR_GENERATED
              - COMPLETED
      responses:
        '200':
          description: Lists all dep tokens for a tenant
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      next:
                        type: string
                      prev:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/DEP_Token_GET'
        '401':
          description: Get DEP tokens error - Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Get DEP tokens error - Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /tenant/v0/deptokens/{id}/:
    get:
      summary: Get dep token by id
      description: Retrive information of a DEP token by ID
      operationId: DEPTokenBasedOnID
      parameters:
        - name: id
          in: path
          description: ID of the token object
          required: true
          schema:
            type: string
            format: UUID
      tags:
        - DEP Tokens
      security:
        - apiKey: []
      responses:
        '200':
          description: Get DEP token by id
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      schema:
                        $ref: '#/components/schemas/DEP_Token_GET'
        '401':
          description: Get DEP token by id error - Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Get DEP token by id error - Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    put:
      summary: Upload dep token to a tenant
      description: >-
        Upload dep token for a public key for a tenant based on ID of DEP public
        key
      operationId: DEPTokenUpload
      parameters:
        - name: id
          in: path
          description: ID of the token object
          required: true
          schema:
            type: string
            format: UUID
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: .p7m file from abm console
                token_name:
                  type: string
              required:
                - file
                - token_name
      tags:
        - DEP Tokens
      security:
        - apiKey: []
      responses:
        '200':
          description: Upload dep token for a public key by id
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  content:
                    type: object
                    properties:
                      schema:
                        $ref: '#/components/schemas/DEP_Token_GET'
        '400':
          description: Upload DEP token by id error - Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Upload DEP token by id error - Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Upload DEP token by id error - Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/emm/enrollment/begin/:
    post:
      summary: Generate sign-up URL
      tags:
        - Google Enterprise
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BeginGoogleEMMEnrollmentRequest'
      parameters:
        - name: Authorization
          in: header
          description: Bearer token for authorization
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Successfully generated sign-up URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BeginGoogleEMMEnrollmentResponse'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '409':
          description: >-
            Conflict: Google Enterprise already exists and is enrolled to Google
            EMM
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_409_Conflict'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/emm/details/:
    get:
      summary: Return the enrollment status of the Enterprise
      tags:
        - Google Enterprise
      parameters:
        - name: Authorization
          in: header
          description: Bearer token for authorization
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved enrollment status
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/GoogleEnterpriseDetails'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    post:
      summary: Creates a new Google Enterprise with the provided details
      tags:
        - Google Enterprise
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleEnterpriseDetails'
      parameters:
        - name: Authorization
          in: header
          description: Bearer token for authorization
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleEnterpriseDetails'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '409':
          description: 'Conflict: Google Enterprise already exists'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_409_Conflict'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/emm/web-token/:
    post:
      summary: Create a Google Web Token
      tags:
        - Google Enterprise
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebTokenRequest'
      parameters:
        - name: Authorization
          in: header
          description: Bearer token for authorization
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWebTokenResponse'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/emm/enrollment/complete/:
    post:
      summary: Complete EMM enrollment for a Google Enterprise
      tags:
        - Google Enterprise
      parameters:
        - name: Authorization
          in: header
          description: Bearer token for authorization
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                completion_token:
                  type: string
                enterprise_token:
                  type: string
              required:
                - completion_token
                - enterprise_token
      responses:
        '200':
          description: Successfully completed EMM enrollment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleEnterpriseDetails'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v2/emm/accounts/:
    get:
      summary: Return the Google Service Account of the Enterprise
      tags:
        - Google Enterprise
      parameters:
        - name: Authorization
          in: header
          description: Bearer token for authorization
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved Google Service Account
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      count:
                        type: integer
                      previous:
                        type: string
                      next:
                        type: string
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/GoogleServiceAccountDetails'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    post:
      summary: Creates a new Google Service Account with the provided details
      tags:
        - Google Enterprise
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleServiceAccountDetails'
      parameters:
        - name: Authorization
          in: header
          description: Bearer token for authorization
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleServiceAccountDetails'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '409':
          description: 'Conflict: Google Service Account already exists'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_409_Conflict'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v1/foundry/builds/:
    get:
      summary: Get Foundry builds
      description: Returns a list of all specified builds.
      security:
        - AuthToken: []
      operationId: getFoundryBuilds
      tags:
        - FoundryBuilds
      parameters:
        - in: query
          name: foundation_major_number
          description: >-
            Filter by Esper Foundation Major Number, Foundation Numbers are
            integers starting at 1.
          schema:
            type: string
        - in: query
          name: build_arch
          description: >-
            Filter by build architecture name, build architectures {arm, arm64,
            x86_64, x86}
          schema:
            type: string
        - in: query
          name: android_major_version
          description: >-
            Filter by Android Major Version, Android Major Versions are integers
            starting at 1 and going to Current Android Release
          schema:
            type: integer
        - in: query
          name: device_model_id
          description: Device model id
          schema:
            type: string
            format: uuid
        - in: query
          name: approved
          description: Filter builds which have been approved for OTA update
          schema:
            type: boolean
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: offset
          schema:
            type: integer
        - in: query
          name: ordering
          schema:
            type: string
        - in: query
          name: locked
          description: >-
            Filter the locked builds. To be used with build_fingerprint_hash and
            device_model_id
          schema:
            type: boolean
        - in: query
          name: build_fingerprint_hash
          description: hash of the build fingerprint of the existing build
          schema:
            type: string
      responses:
        '200':
          description: List of Foundry builds
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: returned response code
                  content:
                    properties:
                      count:
                        type: integer
                        description: counter of number of builds retrieved
                      next:
                        type: string
                        format: url
                        description: url of the next ten builds
                      previous:
                        type: string
                        format: url
                        description: url of the previous ten builds
                      results:
                        items:
                          $ref: '#/components/schemas/Build_V1'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v1/foundry/builds/{build_id}/:
    get:
      summary: Get Foundry Build
      description: Get a Foundry Build by unique ID
      security:
        - AuthToken: []
      tags:
        - FoundryBuilds
      parameters:
        - name: build_id
          in: path
          description: A build UUID specifying the Foundry Build
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Specified Foundry build
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/Build_V1'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Build not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
    put:
      summary: Update Foundry build
      description: Update a Foundry build based on given parameters
      security:
        - AuthToken: []
      operationId: updateFoundryBuild
      tags:
        - FoundryBuilds
      parameters:
        - name: build_id
          in: path
          description: A build UUID specifying the Foundry Build
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Foundry_Build_PUT_Request_V1'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Build_V1'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '404':
          description: Builds not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
  /v1/foundry/device-models/:
    get:
      summary: Get device models
      description: Get a list of device models
      security:
        - AuthToken: []
      tags:
        - FoundryDeviceModels
      parameters:
        - in: query
          name: limit
          schema:
            type: string
        - in: query
          name: offset
          schema:
            type: string
        - in: query
          name: manufacturer
          schema:
            type: string
        - in: query
          name: model
          schema:
            type: string
        - in: query
          name: profile_name
          schema:
            type: string
        - in: query
          name: profile_variant
          schema:
            type: string
        - in: query
          name: update_compatible_android_api_level_begin
          schema:
            type: string
        - in: query
          name: update_compatible_android_api_level_end
          schema:
            type: string
      responses:
        '200':
          description: >-
            List of DeviceModels associated with the TenantId coming from the
            header
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: returned response code
                  content:
                    properties:
                      count:
                        type: integer
                        description: counter of number of device models retrieved
                      next:
                        type: string
                        format: url
                        description: url of the next ten device models
                      previous:
                        type: string
                        format: url
                        description: url of the previous ten device models
                      results:
                        items:
                          $ref: '#/components/schemas/Device_Model_V1'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /v1/foundry/device-models/{device_model_id}/:
    put:
      summary: Update Tenant Device Model
      description: Update a Tenant Device Model based on given parameters
      security:
        - AuthToken: []
      tags:
        - FoundryDeviceModels
      parameters:
        - name: device_model_id
          in: path
          description: An UUID specifying the Device Model
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Device_Model_PUT_Request_V1'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Build_V1'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '403':
          description: locked_build_id not approved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_403_Forbidden'
        '404':
          description: DeviceModel not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_404_Not_Found'
  /v1/foundry/events/:
    get:
      summary: Get Foundry events
      description: Get a list of Foundry events
      security:
        - AuthToken: []
      tags:
        - FoundryEvents
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: offset
          schema:
            type: integer
      responses:
        '200':
          description: List of Foundry events in reverse chronological order
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    properties:
                      count:
                        type: integer
                        description: counter of number of events retrieved
                      next:
                        type: string
                        format: url
                        description: url of the next ten events
                      previous:
                        type: string
                        format: url
                        description: url of the previous ten events
                      results:
                        items:
                          $ref: '#/components/schemas/Foundry_Event_V1'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_400_Bad_Data'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_401_Unauthorized'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_500_Internal_Server_Error'
  /report/v0/report-types:
    get:
      tags:
        - Reports API
      summary: Get report types
      description: Get report types
      operationId: getReportTypes
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Report types
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetReportTypesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
  /report/v0/reports:
    post:
      tags:
        - Reports API
      summary: Create Report
      description: >-
        This API will return a report ID. Use this ID to call the "Get Report
        Status" API to check the report generation status and retrieve the
        results. [Learn
        more](https://help.esper.io/hc/en-us/articles/27379366650257).
      operationId: createReportStatus
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Report'
      responses:
        '200':
          description: Create Report
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateReportResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
  /report/v0/reports/{report_id}:
    get:
      tags:
        - Reports API
      summary: Get report status
      description: >-
        Call this API with report ID generated from "Create Report" API to check
        the report generation status and retrieve the results. [Learn
        more](https://help.esper.io/hc/en-us/articles/27379366650257).
      operationId: getReportStatus
      parameters:
        - $ref: '#/components/parameters/ReportID'
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Report status
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/CreateReportResponse'
                  - $ref: '#/components/schemas/GetReportResponsePreview'
                  - $ref: '#/components/schemas/GetReportResponseDownload'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
  /data-tap/v0/queries:
    post:
      tags:
        - Query API
      summary: Create Query
      description: >-
        Creates a new SQL query for execution. Returns a query ID that can be
        used to check its execution status.
      operationId: createQuery
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryRequest'
      responses:
        '201':
          description: Query Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateQueryResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
  /data-tap/v0/queries/{id}:
    get:
      tags:
        - Query API
      summary: Get Query Status
      description: Returns the current status of a query and its results if available.
      operationId: getQueryStatus
      parameters:
        - $ref: '#/components/parameters/QueryID'
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Query Status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryStatusResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '404':
          description: Query not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
  /data-tap/v0/ingests:
    post:
      tags:
        - Ingest API
      summary: Refresh data
      description: Creates a new job to refresh data.
      operationId: createIngest
      security:
        - bearerAuth: []
      responses:
        '201':
          description: Refresh job created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestCreateResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
    get:
      tags:
        - Ingest API
      summary: List All Ingest Jobs
      description: Returns a list of all ingest jobs created by the tenant.
      operationId: listIngest
      security:
        - bearerAuth: []
      responses:
        '200':
          description: List of ingest jobs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestsListResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
  /data-tap/v0/ingests/{id}:
    get:
      tags:
        - Ingest API
      summary: Get Ingest Job Status
      description: Retrieves the current status of a specific ingest job.
      operationId: getIngestStatus
      parameters:
        - $ref: '#/components/parameters/IngestID'
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Ingest job status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestStatusResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '404':
          description: Ingest job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsErrorResponse'
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >
        #### API KEY - Access Token

        Access token for API is passed as authorization header in calls. You
        need to generate this from your Esper Console at
        `<domain>-api.esper.cloud` where foo is the sub-domain name you gave for
        your Esper Dev environment when you signed up for your Esper account.
        Please follow the instructions [in this Help
        article](https://help.esper.io/hc/en-us/articles/12656959508497) to
        generate an access token.

        Once you have the access token, you need to send an authorization header
        as below


        ```bash

            curl -X GET \
              https://<domain>-api.esper.cloud/api/enterprise/<enterprise_id>/device/ \
              -H 'Authorization: Bearer <ACCESS_TOKEN>' \
              -H 'Content-Type: application/json' \
        ```


        > Please note the use of keyword **Bearer** before the token value.



        You can read more about api key authentication
        [here](https://help.esper.io/hc/en-us/articles/12656959508497).
    SCAPIAuthToken:
      type: http
      scheme: bearer
    AuthToken:
      type: apiKey
      in: header
      name: Authorization
    bearerAuth:
      type: http
      scheme: bearer
  schemas:
    ApplicationVersion:
      title: Version
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        version_code:
          title: Version code
          maxLength: 50
          minLength: 1
          type: string
        build_number:
          title: Build number
          maxLength: 100
          minLength: 1
          type: string
          nullable: true
        hash_string:
          title: Hash string
          type: string
        min_sdk_version:
          title: Min sdk version
          maxLength: 10
          minLength: 1
          type: string
          nullable: true
        target_sdk_version:
          title: Target sdk version
          maxLength: 10
          minLength: 1
          type: string
          nullable: true
        download_url:
          title: Url
          type: string
          format: url
        icon_url:
          title: Url for the icon
          type: string
          format: url
        release_name:
          title: Name of the release
          type: string
        release_comments:
          title: comments about the release
          type: string
    Application:
      required:
        - application_name
        - enterprise
        - package_name
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        versions:
          type: array
          items:
            $ref: '#/components/schemas/ApplicationVersion'
        application_name:
          title: Application name
          maxLength: 255
          minLength: 1
          type: string
        package_name:
          title: Package name
          maxLength: 255
          minLength: 1
          type: string
        developer:
          title: Developer
          maxLength: 255
          minLength: 1
          type: string
          nullable: true
        category:
          title: Category
          maxLength: 255
          minLength: 1
          type: string
          nullable: true
        content_rating:
          title: Content rating
          type: string
          format: decimal
        compatibility:
          title: Compatibility
          minLength: 1
          type: string
          nullable: true
        created_on:
          title: Created on
          type: string
          format: date-time
          readOnly: true
        updated_on:
          title: Updated on
          type: string
          format: date-time
          readOnly: true
        is_active:
          title: Is active
          type: boolean
        is_hidden:
          title: Is hidden
          type: boolean
        enterprise:
          title: Enterprise
          type: string
          format: url
    ErrorResponse:
      type: object
      properties:
        errors:
          title: Messages describing the error
          type: array
          items:
            type: string
        message:
          title: Message describing the error
          type: string
        status:
          title: alias name
          type: integer
    AppPermission:
      required:
        - enterprise
        - permission
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        permission:
          title: Permission
          maxLength: 255
          minLength: 1
          type: string
        grant_state:
          title: Grant state
          type: string
          enum:
            - Default
            - Denied
            - Granted
        created_on:
          title: Created on
          type: string
          format: date-time
          readOnly: true
        updated_on:
          title: Updated on
          type: string
          format: date-time
          readOnly: true
        is_active:
          title: Is active
          type: boolean
        enterprise:
          title: Enterprise
          type: string
          format: url
        app_version:
          title: App version
          type: string
          format: url
    AppVersion:
      title: Application Version
      required:
        - enterprise
        - permissions
        - version_code
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        installed_count:
          title: Installed count
          type: integer
          readOnly: true
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/AppPermission'
        app_file:
          title: App file
          type: string
          format: url
          readOnly: true
        app_icon:
          title: App icon
          type: string
          format: url
          nullable: true
          readOnly: true
        version_code:
          title: Version code
          maxLength: 50
          minLength: 1
          type: string
        build_number:
          title: Build number
          maxLength: 100
          minLength: 1
          type: string
          nullable: true
        size_in_mb:
          title: Size in mb
          type: number
        hash_string:
          title: Hash string
          type: string
        release_name:
          title: Release name
          maxLength: 255
          minLength: 1
          type: string
          nullable: true
        release_comments:
          title: Release comments
          minLength: 1
          type: string
          nullable: true
        release_track:
          title: Release track
          type: string
          nullable: true
          enum:
            - Alpha
            - Beta
            - Production
        created_on:
          title: Created on
          type: string
          format: date-time
          readOnly: true
        updated_on:
          title: Updated on
          type: string
          format: date-time
          readOnly: true
        min_sdk_version:
          title: Min sdk version
          maxLength: 10
          minLength: 1
          type: string
          nullable: true
        target_sdk_version:
          title: Target sdk version
          maxLength: 10
          minLength: 1
          type: string
          nullable: true
        is_enabled:
          title: Is enabled
          type: boolean
        is_default:
          title: Is Default
          type: boolean
        enterprise:
          title: Enterprise
          type: string
          format: url
        application:
          title: Application
          type: string
          format: url
        approval_status:
          title: Application status
          type: string
          enum:
            - AVAILABLE
            - ACCEPTED
            - APPROVED
            - REJECTED
    AppVersionDelete:
      type: object
      properties:
        request_id:
          title: Request id
          type: string
          format: uuid
        templates:
          type: array
          description: List of linked templates to an app version
          items:
            type: object
            properties:
              id:
                title: Id
                type: integer
                description: Id of the linked template
              name:
                title: Name
                type: string
                description: Name of the linked template
    InstallDevices:
      required:
        - id
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        device_name:
          title: Device name
          type: string
        alias_name:
          title: alias name
          type: string
          nullable: true
        group_name:
          title: Group name
          maxLength: 255
          minLength: 1
          type: string
    GoogleEnterprise:
      type: object
      required:
        - name
      properties:
        id:
          title: Id
          type: integer
        google_enterprise_id:
          title: Google Enterprise Id
          type: string
        name:
          title: Name of Google Enterprise
          type: string
        state:
          type: integer
        callback_url:
          type: string
          format: url
        signup_url:
          type: string
          format: url
        completion_token:
          type: string
        enterprise_token:
          type: string
        is_active:
          type: boolean
        created_on:
          type: string
          format: date-time
        updated_on:
          type: string
          format: date-time
        enterprise:
          type: string
    GoogleWebToken:
      type: object
      properties:
        id:
          title: Id
          type: integer
        emm:
          title: emm Id
          type: integer
        token:
          title: Webtoken
          type: string
        parent_url:
          type: string
          format: url
        is_active:
          type: boolean
        created_on:
          type: string
          format: date-time
    GoogleWebTokenUpdate:
      type: object
      required:
        - emm
        - parent_url
      properties:
        id:
          title: Id
          type: integer
        emm:
          title: emm Id
          type: integer
        token:
          title: Webtoken
          type: string
        parent_url:
          type: string
          format: url
        is_active:
          type: boolean
    GoogleWebTokenUpdateNoRequirements:
      type: object
      properties:
        id:
          title: Id
          type: integer
        emm:
          title: emm Id
          type: integer
        token:
          title: Webtoken
          type: string
        parent_url:
          type: string
          format: url
        is_active:
          type: boolean
    GoogleProduct:
      type: object
      properties:
        id:
          type: string
          format: uuid
        icon_url:
          type: string
          format: url
        is_active:
          type: boolean
        title:
          type: string
        unapproved:
          type: boolean
        created_on:
          type: string
          format: date-time
        updated_on:
          type: string
          format: date-time
        min_sdk_version:
          type: string
        google_product_id:
          type: string
        package_name:
          type: string
          minLength: 1
          maxLength: 255
        google_enterprise:
          type: integer
    PatchGoogleProduct:
      type: object
      properties:
        id:
          type: string
          format: uuid
        icon_url:
          type: string
          format: url
        is_active:
          type: boolean
        title:
          type: string
        created_on:
          type: string
          format: date-time
        updated_on:
          type: string
          format: date-time
        min_sdk_version:
          type: string
        google_product_id:
          type: string
        package_name:
          type: string
          minLength: 1
          maxLength: 255
        google_enterprise:
          type: integer
    GoogleProductInstall:
      type: object
      properties:
        id:
          type: string
          format: uuid
        enterprise:
          type: string
        device:
          type: string
        install_state:
          type: string
        version_code:
          type: string
        install_type:
          type: integer
          title: install type- default 0, EMM 1
        is_force_install:
          type: boolean
        reason_details:
          type: string
        created_on:
          type: string
          format: date-time
        updated_on:
          type: string
          format: date-time
        is_active:
          type: boolean
        objects:
          type: object
    DeviceStateEnum:
      type: integer
      format: int32
      description: >
        Following are the Device States and their description


        ```

        * 0 = Device State is Unspecified

        * 1 = Online

        * 20 = Disabled (device has been factory reset or removed from the Esper
        Dashboard)

        * 30 = Beginning Provisioning

        * 40 = Configuring Google Play (still provisioning)

        * 50 = Applying Policies and Installing Applications (still
        provisioning)

        * 60 = Offline

        * 70 = Device is undergoing a Factory Reset (reset started from
        Dashboard)

        * 80 = Device Onboarding in Progress

        * 90 = Device Onboarding Failed

        * 100 = Device Onboarded in Esper

        * 110 = Android For Work Account added

        * 120 = Apps installed

        * 130 = Branding Processed

        * 140 = Permission Policy Processed

        * 150 = Device Policy Processed

        * 160 = Device Settings Processed

        * 170 = Security Policy Processed

        * 180 = Phone Policy Processed

        * 190 = Custom Settings Processed

        * 200 = Registered

        ```
      enum:
        - 0
        - 1
        - 20
        - 30
        - 40
        - 50
        - 60
        - 70
        - 80
        - 90
        - 100
        - 110
        - 120
        - 130
        - 140
        - 150
        - 160
        - 170
        - 180
        - 190
        - 200
    EmmDevice:
      type: object
      properties:
        id:
          type: integer
          format: int64
        google_device_id:
          type: string
        managementType:
          type: string
        device:
          type: string
          format: uuid
        google_user:
          type: integer
          format: int64
        policy:
          type: integer
          format: int64
        created_on:
          type: string
          format: date-time
        updated_on:
          type: string
          format: date-time
        is_active:
          type: boolean
          default: true
    DeviceInfo:
      type: object
      properties:
        id:
          type: string
          format: uuid
        url:
          type: string
          format: url
        device_name:
          type: string
        alias_name:
          type: string
          description: Device friendly name
        policy_name:
          type: string
        status:
          type: integer
          description: Current status of device
          format: int32
        state:
          $ref: '#/components/schemas/DeviceStateEnum'
        current_command:
          type: string
          description: Current command associated with device
          format: uuid
        suid:
          type: string
          description: Device generated unique id
        directory_record_id:
          type: string
          format: uuid
          description: ID of Directory Record associated with the device (if available)
        fcm_id:
          type: string
        enterprise:
          type: string
          format: url
        policy:
          type: string
          format: url
        user:
          type: string
          format: url
        groups:
          type: array
          items:
            type: string
            format: url
        tags:
          type: array
          items:
            type: string
        api_level:
          type: integer
          format: int32
        template_name:
          type: string
        mqtt_id:
          type: string
        softwareInfo:
          type: object
          properties: {}
        hardwareInfo:
          type: object
          properties: {}
        displays:
          type: object
          properties: {}
        networkInfo:
          type: object
          properties: {}
        memoryInfo:
          type: object
          properties: {}
        esper_cient:
          type: string
        device_type:
          type: string
        audioConstraints:
          type: object
          properties: {}
        provisioned_on:
          type: string
          format: date-time
        created_on:
          type: string
          format: date-time
        current_app_mode:
          type: integer
        kiosk_app_name:
          type: string
        lockdown_state:
          type: integer
        timezone_string:
          type: string
        initialtemplate:
          type: string
        updated_on:
          type: string
          format: date-time
        emm_device:
          $ref: '#/components/schemas/EmmDevice'
        is_gms:
          type: boolean
          default: true
        is_active:
          type: boolean
          default: true
        has_seamlessInfo:
          type: boolean
          readOnly: true
    DeviceApp:
      required:
        - app_name
        - device
        - package_name
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        app_name:
          title: App name
          minLength: 1
          type: string
        state:
          type: string
        app_type:
          type: string
        package_name:
          title: Package name
          maxLength: 255
          minLength: 1
          type: string
        whitelisted:
          title: Whitelisted
          type: boolean
        is_data_clearable:
          title: Data clearable
          type: boolean
        is_uninstallable:
          title: Uninstallable
          type: boolean
        product_id:
          title: Product id
          maxLength: 255
          minLength: 1
          type: string
          nullable: true
        version_code:
          title: Version code
          maxLength: 128
          minLength: 1
          type: string
          nullable: true
        version_name:
          title: Version name
          maxLength: 128
          minLength: 1
          type: string
          nullable: true
        created_on:
          title: Created on
          type: string
          format: date-time
          readOnly: true
        updated_on:
          title: Updated on
          type: string
          format: date-time
          readOnly: true
        is_active:
          title: Is active
          type: boolean
        is_kiosk_app:
          type: boolean
        is_esper_controlled:
          type: boolean
        device:
          title: AndroidDevice
          type: string
          format: uuid
    AppInstallVersion:
      title: Version
      type: object
      properties:
        app_version_id:
          title: App version id
          type: string
          format: uuid
        version_code:
          title: Version code
          type: string
        build_number:
          title: Build number
          type: string
        hash_string:
          title: Hash string
          type: string
    AppInstallApplication:
      title: Application
      type: object
      properties:
        application_name:
          title: Application name
          type: string
        package_name:
          title: Package name
          type: string
        version:
          $ref: '#/components/schemas/AppInstallVersion'
        is_enabled:
          title: Is enabled
          type: boolean
    AppInstallStateEnum:
      title: Install state
      type: string
      description: |
        Device App Install State

        ``` * NOT_INSTALLED = "Not Installed"
        * INSTALL_IN_PROGRESS = "Installation In-Progress"
        * UNINSTALL_IN_PROGRESS = "Uninstallation In-Progress"
        * INSTALL_SUCCESS = "Install Success"
        * INSTALL_FAILED = "Install Failed"
        * UNINSTALL_SUCCESS = "Uninstall Success"
        * UNINSTALL_FAILED = "Uninstall Failed"
        ```
      enum:
        - NOT_INSTALLED
        - INSTALL_IN_PROGRESS
        - UNINSTALL_IN_PROGRESS
        - INSTALL_SUCCESS
        - INSTALL_FAILED
        - UNINSTALL_SUCCESS
        - UNINSTALL_FAILED
    AppInstall:
      required:
        - application
        - device
        - enterprise
        - install_state
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        application:
          $ref: '#/components/schemas/AppInstallApplication'
        install_state:
          $ref: '#/components/schemas/AppInstallStateEnum'
        reason_details:
          title: Reason details
          minLength: 1
          type: string
          nullable: true
        created_on:
          title: Created on
          type: string
          format: date-time
          readOnly: true
        updated_on:
          title: Updated on
          type: string
          format: date-time
          readOnly: true
        is_active:
          title: Is active
          type: boolean
        enterprise:
          title: Enterprise
          type: string
          format: url
        device:
          title: AndroidDevice
          type: string
          format: url
    DeviceStatus:
      required:
        - data
        - device
        - enterprise
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        data:
          title: Data
          type: string
        created_on:
          title: Created on
          type: string
          format: date-time
          readOnly: true
        device:
          title: AndroidDevice
          type: string
          format: url
        enterprise:
          title: Enterprise
          type: string
          format: url
    EventFeed:
      type: object
      properties:
        id:
          type: integer
          description: Integer representing the event ID
        message_id:
          type: string
          format: UUID
          description: UUID string representing message ID
        device_status_id:
          type: string
          format: UUID
          description: UUID string representing device status ID
        created_on:
          type: string
          format: date-time
        message:
          type: string
          description: >-
            Message describing the command, who issued it, and from which state
            it was issued.
        device:
          type: string
          format: url
          description: URL to device instance
          example: >-
            https://{example}-api.esper.cloud/api/enterprise/{enterprise_id}/device/{device_id}/
        enterprise:
          type: string
          format: url
          description: URL to enterprise instance
          example: https://{example}-api.esper.cloud/api/enterprise/{enterprise_id}/
    V0DeviceCommandEnum:
      type: string
      description: >
        Following commands are supported


        ```

        * ADD_TO_WHITELIST: Whitelist an installed sytem app. Requires
        `package_name` in command arguments where `package_name` is the app
        package uploaded on Esper

        * ADD_WIFI_AP : Add wifi access points for device. Requires
        `wifi_access_points` in command arguments where `wifi_access_points` is
        the data with access points

        * CLEAR_APP_DATA : Clear data for an installed app. Requires
        `package_name` in command arguments where `package_name` is the app
        package uploaded on Esper

        * INSTALL: Install an app on a device. Requires `app_version` in command
        arguments where `app_version` is the version id of app uploaded on Esper

        * LOCK: Lock device screen

        * REBOOT: Reboot a device

        * REMOVE_FROM_WHITELIST : Remove an installed system app from whitelist.
        Requires `package_name` in command arguments where `package_name` is the
        app package uploaded on Esper

        * REMOVE_WIFI_AP : Remove Wifi access points for device. Requires
        `wifi_access_points` in command arguments where `wifi_access_points` is
        the data with access points

        * SET_APP_PERMISSION : Set permission for an installed app. Requires
        `package_name`, `grant_state`, `permission` in command arguments where
        `package_name` is the app package uploaded on Esper, `grant_state`
        should be "PERMISSION_GRANT_STATE_DEFAULT",
        "PERMISSION_GRANT_STATE_DENIED", "PERMISSION_GRANT_STATE_GRANTED" and
        `permission` is a valid permission

        * SET_APP_STATE : Set the state of an app -
        SHOW/HIDE/DISABLE/LAUNCHABLE_BUT_HIDDEN. Requries `app_state` and
        `package_name` in command arguments where `app_state` is the state of
        app and `package_name` is the app package uploaded on Esper

        * SET_BLUETOOTH_STATE : Set bluetooth state (ON/OFF) for device.
        Requires `bluetooth_state` in command arguments where `bluetooth_state`
        is a boolean.

        * SET_BRIGHTNESS_SCALE : Set brightness for device. Requires
        `brightness_value` in command arguments where `brightness_value` is an
        integer (1-100).

        * SET_DEVICE_LOCKDOWN_STATE : Set lockdown state for a device. Requires
        `state` and `message` in command arguments where `state` is
        LOCKED/UNLOCKED and `message` is the message to be added with command

        * SET_GPS_STATE :Set the GPS state for a device. Requires `gps_state` in
        command arguments where `gps_state` should be either 0, 1, 2, 3 or 4
        (LOCATION_MODE_HIGH_ACCURACY = 0, LOCATION_MODE_SENSORS_ONLY = 1,
        LOCATION_MODE_BATTERY_SAVING = 2, LOCATION_MODE_OFF = 3,
        LOCATION_MODE_ON = 4)

        * SET_KIOSK_APP : Command to set the Kiosk app for a device. Requires
        `package_name` in command arguments where `package_name` is the app
        package uploaded on Esper

        * SET_NEW_POLICY : Apply policy on device. Requires `policy_url` in
        command arguments where `policy_url` is the URL to the policy

        * SET_ROTATION_STATE : Set screen orientation. Requires `rotate_state`
        in command arguments where `rotate_state` should be either 0, 1 or 2 (0
        = AUTO, 1 = PORTRAIT_ONLY, 2 = LANDSCAPE_ONLY)

        * SET_SCREEN_OFF_TIMEOUT: Set screen off timeout for a device. Requires
        `screen_off_timeout` in command arguments where `screen_off_timeout`
        should be either -1 or between 5000 and 1800000

        * SET_STREAM_VOLUME : Set stream volume for a device. Requires `stream`
        and `volume_level` in command arguments where `stream` should be either
        0(Ring), 1(Notification), 2(Alarm) or 3(Music) and `volume_level` should
        be a value from 0 to 100

        * SET_TIMEZONE : Set the timezone for a device. Requires
        `timezone_string` in command arguments where `timezone_string` is a
        valid string representing the timezone

        * SET_WIFI_STATE : Set the wifi state (ON/OFF) for a device. Requires
        `wifi_state` in command arguments where `wifi_state` is a boolean.

        * UNINSTALL: Uninstall an app from device. Requires `package_name` in
        command arguments where `package_name` is the app package uploaded on
        Esper

        * UPDATE_DEVICE_CONFIG: Push additional configurations to the Device

        * UPDATE_HEARTBEAT: Ping a device

        * UPDATE_LATEST_DPC : Prompt device to update the DPC app to the latest
        versions.

        * WIPE : Wipes the device.

        * RESET_LOCKSCREEN_PASSWORD: Change the lockscreen password of the
        device. Requires `new_lockscreen_password` in command arguments where
        `new_lockscreen_password` is a valid string.

        * CAPTURE_SCREENSHOT: Allows you to take a screenshot of the device's
        current screen. The "tag" is an optional param that can be set to
        corresponding screenshot.

        * UPDATE_BLUEPRINT: Pushes or reapplies the most current Blueprint
        version to the device or group.

        * NOTIFY_DEVICE: Allows you to  broadcast message to the device.
        Requires 'title', 'message' and 'url' (optional) as string in command
        arguments. For scheduled message command requires 'name', 'time_type' as
        string and 'start_datetime' and 'end_datetime' as date-time.

        * SET_DEVICE_LANGUAGE: Set language for a device. Requires locale value
        in xx[_Zzzz]_yy where xx is language code, Zzzz is script (optional) and
        yy is country code.

        * SET_ETHERNET_SETTINGS: Set ethernet settings on supported Device

        * SET_STATIC_IP: Set static ip on the deivce. Requires interface,
        dhcp_dnabled, static_ip, primary_dns, subnet_mask, gateway,
        secondary_dns (optional)

        * BEEP_DEVICE: Allows you to make the device beep for a specified
        duration

        * SET_APP_NOTIFICATIONS: Enable/disable app notifications. Requries
        `app_notifications_state` and `package_name` in command arguments where
        `app_notifications_state` is a string that has the value `ENABLED` or
        `DISABLED` and `package_name` is the app package uploaded on Esper.

        * USE_ONLY_SAVED_WIFI_AP: Allow/disallow device to connect to
        unregistered WiFi APs. Requires boolean `use_only_saved_ap`.

        * CONVERGE: Allows you to converge the device to the latest version of
        its assigned blueprint.

        * SYNC_CONTENT: Allows you to sync content to the device. Requires
        `content_id` in command arguments where `content_id` is the id of the
        content to be synced. ```
      enum:
        - ADD_TO_WHITELIST
        - ADD_WIFI_AP
        - CLEAR_APP_DATA
        - INSTALL
        - LOCK
        - REBOOT
        - REMOVE_FROM_WHITELIST
        - REMOVE_WIFI_AP
        - SET_APP_PERMISSION
        - SET_APP_STATE
        - SET_BLUETOOTH_STATE
        - SET_BRIGHTNESS_SCALE
        - SET_DEVICE_LOCKDOWN_STATE
        - SET_GPS_STATE
        - SET_KIOSK_APP
        - SET_NEW_POLICY
        - SET_ROTATION_STATE
        - SET_SCREEN_OFF_TIMEOUT
        - SET_STREAM_VOLUME
        - SET_TIMEZONE
        - SET_WIFI_STATE
        - UNINSTALL
        - UPDATE_DEVICE_CONFIG
        - UPDATE_HEARTBEAT
        - UPDATE_LATEST_DPC
        - WIPE
        - RESET_LOCKSCREEN_PASSWORD
        - UPDATE_BLUEPRINT
        - CAPTURE_SCREENSHOT
        - NOTIFY_DEVICE
        - SET_DEVICE_LANGUAGE
        - SET_ETHERNET_SETTINGS
        - SET_STATIC_IP
        - BEEP_DEVICE
        - SET_APP_NOTIFICATIONS
        - USE_ONLY_SAVED_WIFI_AP
        - CONVERGE
        - SYNC_CONTENT
    V0CommandArgs:
      title: Command args
      type: object
      properties:
        device_alias_name:
          type: string
          description: Alternate human-readable name for your Device
        custom_settings_config:
          type: object
          properties: {}
          description: Managed configurations for your device (passed as JSON object)
        app_version:
          type: string
          description: The version id of app uploaded on Esper
        package_name:
          type: string
          description: The app package name uploaded on Esper
        policy_url:
          type: string
          description: The URL to the policy
        wifi_access_points:
          type: object
          properties: {}
          description: Wifi access points for the device (passed as JSON object)
        state:
          type: string
          description: LOCKED/UNLOCKED
        message:
          type: string
          description: Message to be added with command to notify device.
        title:
          type: string
          description: Message title  to be added with command to notify device.
        url:
          type: string
          description: (Optional) Link to notify device.
        app_state:
          type: string
          description: The state of app - SHOW/HIDE/DISABLE/LAUNCHABLE_BUT_HIDDEN
        bluetooth_state:
          type: boolean
          description: The state of bluetooth - ON/OFF
        brightness_value:
          type: integer
          description: The brightness value of a device(1-100)
        gps_state:
          type: integer
          description: >-
            The GPS state of a device. Should be either 0, 1, 2, 3 or 4
            (LOCATION_MODE_HIGH_ACCURACY = 0, LOCATION_MODE_SENSORS_ONLY = 1,
            LOCATION_MODE_BATTERY_SAVING = 2, LOCATION_MODE_OFF = 3,
            LOCATION_MODE_ON = 4)
        rotate_state:
          type: integer
          description: >-
            The screen orientation of a device. Should be either 0, 1 or 2 (0 =
            AUTO, 1 = PORTRAIT_ONLY, 2 = LANDSCAPE_ONLY)
        screen_off_timeout:
          type: integer
          description: >-
            The value for screen timeout of a device. Should be either -1 or
            between 5000 and 1800000
        stream:
          type: integer
          description: >-
            The value of the volume stream. Should be either 0(Ring),
            1(Notification), 2(Alarm) or 3(Music)
        volume_level:
          type: integer
          description: The level of volume. Should be a value from 0 to 100
        timezone_string:
          type: integer
          description: The timezone of a device. Should be a valid timezone string
        wifi_state:
          type: boolean
          description: The state of WIFI - ON/OFF
        wifi_revert_timeout:
          type: integer
          description: The WIFI revert timeout. Should be greater than or equal to 1
        locale:
          type: string
          description: >-
            Language and country code in xx[_Zzzz]_yy where xx is language code,
            Zzzz is script (optional) and yy is country code.
        ethernet_auth_mode:
          type: string
          description: Chosen mode of authentication
          enum:
            - NONE
            - EAP_TLS
        ethernet_ca_cert_alias:
          type: string
          description: CA certificate alias. It is mandatory with Auth Mode EAP_TLS
        ethernet_client_cert_alias:
          type: string
          description: Client certificate alias. It is mandatory with Auth Mode EAP_TLS
        ethernet_eap_identity:
          type: string
          description: EAP identity
        interface:
          type: string
          description: The network interface of the device - wlan/eth
        dhcp_enabled:
          type: string
          description: The dhcp state on the device - true/false
        static_ip:
          type: string
          description: The static ip to set on the device. Should be a valid ipv4
        primary_dns:
          type: string
          description: The primary dns to set on the device. Should be a valid ipv4
        subnet_mask:
          type: string
          description: >-
            The subnet mask set on the device. Should between 1-32 both
            inclusive
        secondary_dns:
          type: string
          description: The secondary dns to set on the device. Should be a valid ipv4
        gateway:
          type: string
          description: The gateway to set on the device. Should be a valid ipv4
        duration:
          type: string
          description: >-
            The beep duration specified in seconds. Value must be between 10 and
            300, both inclusive.
        tag:
          type: string
          description: >-
            The tag is an optional param that can be set to corresponding
            screenshot. Options are "tag".
        video_quality:
          type: string
          description: >-
            The video quality of the respective Remote Viewer session. Options
            are "STANDARD" and "DATA_SAVER".
        enable_debug_mode:
          type: boolean
          default: false
          description: >-
            The flag to determine whether device must go into Debug Mode, in
            order to retreive bug report when the device is already in Kiosk
            Mode.
        converge_with_provision_option:
          type: boolean
          default: false
          description: >-
            The flag to determine whether device should be converged with
            provision only or not.
        auto_update_mode:
          type: string
          enum:
            - autoUpdateDefault
            - autoUpdateHighPriority
            - autoUpdatePostponed
          default: autoUpdateHighPriority
          description: (Optional) Auto update mode for google play application
        content_id:
          type: string
          description: The id of the content to be synced.
    V0CommandScheduleEnum:
      type: string
      description: >
        Following Schedule types are supported


        ```

        * IMMEDIATE: Schedule the command to execcute Immediately

        * WINDOW: Schedule the command to execute within the given window

        * RECURRING: Schedule the command to execute during the scheduled time
        until it succeeds or expires. After executing successfully, it will not
        fire again.

        ```
      enum:
        - IMMEDIATE
        - WINDOW
        - RECURRING
    V0CommandScheduleArgsTimeTypeEnum:
      type: string
      description: >
        The Time-Type argument, in Schedule args, is to indicate which timezone
        the Command Framework should utilize when scheduling the command.

        Following Schedule Args for Time-Type are supported:


        ```

        * CONSOLE: Use the local timezone of the user creating the schedule.

        * DEVICE: Use the local timezone of the device, to which the command is
        issued, wherever it may be.

        ```
      enum:
        - console
        - device
    V0CommandScheduleArgs:
      title: Command Schedule Arguments
      type: object
      properties:
        name:
          type: string
        start_datetime:
          type: string
          format: date-time
        end_datetime:
          type: string
          format: date-time
        time_type:
          $ref: '#/components/schemas/V0CommandScheduleArgsTimeTypeEnum'
        window_start_time:
          type: string
          description: >-
            It is automatically populated by the time field from the request's
            start_datetime and cannot be injected via the API request body.
        window_end_time:
          type: string
          description: >-
            It is automatically populated by the time field from the request's
            end_datetime and cannot be injected via the API request body.
        days:
          type: array
          items:
            type: string
    V0CommandRequestStatus:
      type: object
      properties:
        state:
          title: Command State
          type: string
          description: Current State of command
          format: uuid
        total:
          title: Count
          type: integer
          description: No of commands currently in this state
          format: int64
    V0CommandRequest:
      type: object
      properties:
        id:
          title: Id
          type: string
          description: Unique command request identifier
          format: uuid
          readOnly: true
        enterprise:
          title: Enterperise ID
          type: string
          description: Esper account identifier
          format: uuid
          readOnly: true
        command_type:
          type: string
          description: |
            Identifies the type of command

            ```
            * DEVICE: command request is meant for devices
            * GROUP: command request is meant for groups
            * DYNAMIC: command request is meant for dynamic set of devices
              i.e subset of devices from different groups or otherwise.
            ```
          enum:
            - DEVICE
            - GROUP
            - DYNAMIC
        devices:
          maxItems: 1000
          minItems: 0
          type: array
          description: list of devices to run commands
          items:
            type: string
            format: uuid
        groups:
          maxItems: 500
          minItems: 0
          type: array
          description: list of groups to run commands
          items:
            type: string
            format: uuid
        command:
          $ref: '#/components/schemas/V0DeviceCommandEnum'
        command_args:
          $ref: '#/components/schemas/V0CommandArgs'
        schedule:
          $ref: '#/components/schemas/V0CommandScheduleEnum'
        schedule_args:
          $ref: '#/components/schemas/V0CommandScheduleArgs'
        issued_by:
          type: string
          description: command is issued by this user
          format: url
          readOnly: true
        created_on:
          title: Created on
          type: string
          description: Timestamp of command request
          format: date-time
          readOnly: true
        status:
          title: Current Status
          type: array
          description: Show current status of commands issued during this request
          readOnly: true
          items:
            $ref: '#/components/schemas/V0CommandRequestStatus'
    DeviceGroup:
      required:
        - name
      type: object
      properties:
        id:
          title: Id
          type: string
          description: Group id
          format: uuid
          readOnly: true
        name:
          title: Name
          type: string
          description: Group name
        created_on:
          title: Created on
          type: string
          description: Date and time of when the group was created
          format: date-time
          readOnly: true
        enterprise:
          title: Enterprise
          type: string
          description: Enterprise url
          format: url
          readOnly: true
        parent:
          title: Parent
          type: string
          description: Parent group url
          format: url
        device_count:
          title: Device count
          type: integer
          description: Count of devices in the group
          readOnly: true
        path:
          title: Path
          type: string
          description: Path of the group
          readOnly: true
        children_count:
          title: Children count
          type: integer
          description: Count of child groups
          readOnly: true
        thumbnail:
          title: thumbnail
          description: thumbnail associated with the group
          type: string
          format: uuid
        blueprint:
          title: Blueprint
          description: Blueprint associated with the group.
          type: string
          format: uuid
          readOnly: true
    DeviceGroupUpdate:
      required:
        - name
      type: object
      properties:
        id:
          title: Id
          type: string
          description: Group id
          format: uuid
          readOnly: true
        name:
          title: Name
          type: string
          description: Group name
        created_on:
          title: Created on
          type: string
          description: Date and time of when the group was created
          format: date-time
          readOnly: true
        enterprise:
          title: Enterprise
          type: string
          description: Enterprise url
          format: url
          readOnly: true
        parent:
          title: Parent
          type: string
          description: Parent group id
          format: uuid
        device_ids:
          title: Device ids
          uniqueItems: true
          type: array
          description: Devices ids
          items:
            type: string
            format: uuid
        device_count:
          title: Device count
          type: integer
          readOnly: true
        path:
          title: Path
          type: string
          description: Path of the group
          readOnly: true
        children_count:
          title: Children Count
          type: integer
          description: Count of child groups
          readOnly: true
    DeviceGroupPartialUpdate:
      type: object
      properties:
        id:
          title: Id
          type: string
          description: Group id
          format: uuid
          readOnly: true
        name:
          title: Name
          type: string
          description: Group name
        created_on:
          title: Created on
          type: string
          description: Date and time of when the group was created
          format: date-time
          readOnly: true
        enterprise:
          title: Enterprise
          type: string
          description: Enterprise url
          format: url
          readOnly: true
        parent:
          title: Parent
          type: string
          description: Parent group id
          format: uuid
        device_ids:
          title: Device ids
          uniqueItems: true
          type: array
          description: Device ids
          items:
            type: string
            format: uuid
        device_count:
          title: Device count
          type: integer
          description: Count of devices in the group
          readOnly: true
        path:
          title: Path
          type: string
          description: Path of the group
          readOnly: true
        children_count:
          title: Children Count
          type: integer
          description: Count of child groups
          readOnly: true
    GroupThumbnail:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        image_file:
          type: string
          readOnly: true
        thumbnail_url:
          type: string
          readOnly: true
        created_on:
          type: string
          format: date-time
          readOnly: true
    DeviceSubGroup:
      type: object
      properties:
        subgroups:
          type: array
          items:
            type: string
            format: uuid
    EnterprisePolicyData:
      title: Policy Data
      type: object
      properties:
        keyguardDisabled:
          type: boolean
          description: Should KeyGuard be disabled?
        safeBootDisabled:
          type: boolean
          description: Should SafeBoot be disabled?
        statusBarDisabled:
          type: boolean
          description: Should Status Bar be disabled?
        factoryResetDisabled:
          type: boolean
          description: Should Factory Reset be disabled?
        screenshotDisabled:
          type: boolean
          description: Should Screenshot capability be disabled?
        usbConnectivityDisabled:
          type: boolean
          description: Should USB connectivity be disabled?
        smsDisabled:
          type: boolean
          description: Should SMS functionality be disabled?
        outgoingCallsDisabled:
          type: boolean
          description: Should Outgoing Calls be disabled?
        cameraDisabled:
          type: boolean
          description: Should Camera be disabled?
        nfcBeamDisabled:
          type: boolean
          description: Should NFC capability be disabled?
        disablePlayStore:
          type: boolean
          description: Should Google Play Store be disabled on the device?
        usbFileTransferDisabled:
          type: boolean
          description: Should USB File transfer capability be disabled?
        tetheringDisabled:
          type: boolean
          description: Should USB Tethering capability be enabled?
        dateTimeConfigDisabled:
          type: boolean
          description: Should Date/Time configuration capability be disabled?
        appUninstallDisabled:
          type: boolean
          description: Should App uninstall capability be disabled?
        googleAssistantDisabled:
          type: boolean
          description: Should Google Assistant feature be disabled?
        disableLocalAppInstall:
          type: boolean
          description: Should Side-loading of Applications be disabled?
        adbDisabled:
          type: boolean
          description: Should Android Debugger be disabled?
        phonePolicy:
          type: object
          properties:
            incomingNumbers:
              type: array
              description: List of permitted incoming phone numbers to recieve calls from
              items:
                maxLength: 15
                type: string
            outgoingNumbers:
              type: array
              description: List of permitted outgoing phone numbers to make calls to
              items:
                maxLength: 15
                type: string
            dialer:
              type: string
              description: Pick a dialer - System default or Esper Dialer
              enum:
                - DEFAULT
                - SHOONYA
            allowUssdCodes:
              type: boolean
              default: false
              description: Allow USSD codes to be dialed. Default is false
          description: Rules regarding restricting calls from/to phone-numbers
        frpGoogles:
          type: array
          description: >-
            Details regarding Factory Reset Protection capability. List of
            permitted Google People IDs, emails and such
          items:
            type: object
            properties:
              type:
                type: string
                description: Type of User account provided - USER or ADMIN
                enum:
                  - USER
                  - ADMIN
              email:
                type: string
                description: >-
                  Email id to be used for Factory protection. This will be asked
                  on the Device's UI
                format: email
              googleId:
                type: string
                description: >-
                  Google People ID associated with the above email
                  (https://developers.google.com/people/api/rest/v1/people/get)
        googleAccountPermission:
          type: object
          properties:
            maxAccount:
              type: integer
              description: >-
                Maximum number of Google accounts to be associated with this
                device. (Max = 10)
            emails:
              type: array
              description: List of emails to be associated
              items:
                type: string
                format: email
            domains:
              type: array
              description: List of domains that can be associated
              items:
                type: string
          description: Details regarding Google accounts to be associated with the device
        devicePasswordPolicy:
          type: object
          properties:
            passwordQuality:
              type: string
              description: What is the type of password quality to apply to the device?
              enum:
                - PASSWORD_QUALITY_ALPHABETIC
                - PASSWORD_QUALITY_ALPHANUMERIC
                - PASSWORD_QUALITY_BIOMETRIC_WEAK
                - PASSWORD_QUALITY_COMPLEX
                - PASSWORD_QUALITY_NUMERIC
                - PASSWORD_QUALITY_NUMERIC_COMPLEX
                - PASSWORD_QUALITY_SOMETHING
                - PASSWORD_QUALITY_UNSPECIFIED
          description: Define the Password Policy for the device
        minimumPasswordLength:
          minimum: 4
          type: integer
          description: What is the minimum length for your device's password
        permissionPolicy:
          type: string
          description: >-
            What permission should be applied by default for all apps,
            henceforth?
          enum:
            - PERMISSION_POLICY_PROMPT
            - PERMISSION_POLICY_AUTO_GRANT
            - PERMISSION_POLICY_AUTO_DENY
        deviceUpdatePolicy:
          type: object
          properties:
            type:
              type: string
              description: What type of installation is preferred?
              enum:
                - TYPE_INSTALL_AUTOMATIC
                - TYPE_POSTPONE
                - TYPE_INSTALL_WINDOWED
                - TYPE_INSTALL_DISABLED
            maintenanceStart:
              type: integer
              description: >-
                If the `type` is `TYPE_INSTALL_WINDOWED`, when should the
                maintenance start?
            maintenanceEnd:
              type: integer
              description: >-
                If the `type` is `TYPE_INSTALL_WINDOWED`, when should the
                maintenance end?
          description: Configuration regarding Device OS Updates
        settingsAccessLevel:
          type: string
          description: >-
            Type of Android settings app to be applied? Default System Settings
            or ESPER Settings App?
          enum:
            - SYSTEM
            - SHOONYA
            - NONE
        settingsAppPassword:
          type: string
          description: Lock Password (optional) for the ESPER Settings app
          format: password
    EnterprisePolicy:
      required:
        - enterprise
        - name
        - policy
      type: object
      properties:
        uuid:
          title: UUID
          type: string
          description: Unique Policy identifier
          format: uuid
          readOnly: true
        enterprise:
          title: Enterprise url
          type: string
          description: Url of the enterprise resource
          format: url
        url:
          title: Policy URL
          type: string
          description: URL link to policy
          format: url
          readOnly: true
        name:
          title: Policy Name
          type: string
          description: Name of the Policy
        description:
          title: Policy Description
          type: string
          description: Details regarding the Policy
        device_count:
          title: Number of Devices with this policy applied
          type: integer
          description: Count of Devices with this policy applied
          readOnly: true
        google_policy_id:
          title: Google policy id
          type: string
          description: Id of the Google policy
          readOnly: true
        policy:
          $ref: '#/components/schemas/EnterprisePolicyData'
        updated_on:
          title: Updated On
          type: string
          description: Last-Updated Timestamp of Policy
          format: date-time
          readOnly: true
        created_on:
          title: Created on
          type: string
          description: Creation Timestamp of Policy
          format: date-time
          readOnly: true
        is_active:
          title: Policy Active status
          type: boolean
          description: Is this policy currently active
    EnterprisePolicyPartialUpdate:
      type: object
      properties:
        uuid:
          title: UUID
          type: string
          description: Unique Policy identifier
          format: uuid
          readOnly: true
        enterprise:
          title: Enterprise url
          type: string
          description: Url of the enterprise resource
          format: url
        url:
          title: Policy URL
          type: string
          description: URL link to policy
          format: url
          readOnly: true
        name:
          title: Policy Name
          type: string
          description: Name of the Policy
        description:
          title: Policy Description
          type: string
          description: Details regarding the Policy
        device_count:
          title: Number of Devices with this policy applied
          type: integer
          description: Count of Devices with this policy applied
          readOnly: true
        policy:
          $ref: '#/components/schemas/EnterprisePolicyData'
        updated_on:
          title: Updated On
          type: string
          description: Last-Updated Timestamp of Policy
          format: date-time
          readOnly: true
        created_on:
          title: Created on
          type: string
          description: Creation Timestamp of Policy
          format: date-time
          readOnly: true
        is_active:
          title: Policy Active status
          type: boolean
          description: Is this policy currently active
        google_policy_id:
          title: Google policy id
          type: string
          description: Id of the Google policy
          readOnly: true
    V0CommandStatus1:
      type: object
      properties:
        id:
          title: Id
          type: string
          description: Unique command identifier
          format: uuid
          readOnly: true
        request:
          title: Request Id
          type: string
          description: Request Id associated with this command
          format: uuid
          readOnly: true
        device:
          title: AndroidDevice
          type: string
          description: Device associated with this command
          format: url
          readOnly: true
        state:
          type: string
          description: Current state of the command
          enum:
            - Command Queued
            - Command Initiated
            - Command Acknowledged
            - Command In Progress
            - Command TimeOut
            - Command Success
            - Command Failure
            - Command Scheduled
            - Command Cancelled
        reason:
          type: string
          description: details briefing the reason for current command state
        created_on:
          title: Created on
          type: string
          description: Timestamp of command creation
          format: date-time
          readOnly: true
        updated_on:
          title: Updated on
          type: string
          description: Last updated timestamp of command
          format: date-time
          readOnly: true
        meta:
          type: object
          properties:
            device:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                device_name:
                  type: string
                alias_name:
                  type: string
                  nullable: true
                timezone_string:
                  type: string
                  nullable: true
                tags:
                  type: array
                  items:
                    type: string
                  nullable: true
                  description: Tags associated with the device
                managed_by:
                  type: string
                  enum:
                    - BLUEPRINT
                    - TEMPLATE
                  description: >-
                    Indicates whether the device is managed by a Blueprint or
                    Template
    Content:
      required:
        - id
      type: object
      properties:
        id:
          title: Id
          type: integer
          description: Unique content Identifier
          readOnly: true
        download_url:
          title: Content download URL
          type: string
          description: URL to download the content
          format: url
        name:
          title: Name
          type: string
          description: Name of the content
        key:
          title: Key
          maxLength: 255
          minLength: 1
          type: string
        is_dir:
          title: Is Directory
          type: boolean
          default: false
        kind:
          title: Content kind
          maxLength: 255
          type: string
          description: The mime type of the content
          nullable: true
        hash:
          title: Content Hash
          type: string
          description: Hash string of the content
        size:
          title: Content Size
          maxLength: 255
          type: string
          description: Size of the content in bytes
        path:
          title: Path
          type: string
          description: Path to the content
        permissions:
          title: Permissions
          type: string
          description: The permssion string for the content
        tags:
          title: Content tags
          type: array
          description: Tags for the content
          items:
            maxLength: 255
            type: string
        description:
          title: Content description
          type: string
          description: Description for the content
          nullable: true
        created:
          title: Created on
          type: string
          format: date-time
          readOnly: true
        modified:
          title: Modified on
          type: string
          format: date-time
          readOnly: true
        enterprise:
          title: Enterprise
          type: string
          description: URL of the enterprise resource
          format: url
        owner:
          title: Owner
          type: object
          properties:
            id:
              type: integer
            username:
              type: string
          description: Owner of the content
    AlertChannelsV1:
      type: object
      properties:
        id:
          type: integer
        properties:
          type: object
          properties:
            to_address:
              type: string
              format: email
        name:
          type: string
        type:
          type: string
          description: format of alert. e.g. email
        created_on:
          type: string
          format: date-time
        updated_on:
          type: string
          format: date-time
        enterprise:
          type: string
          format: uuid
        linked_alerts:
          type: array
          items:
            type: string
    UpdateAlertChannelsV1:
      type: object
      properties:
        id:
          type: integer
        properties:
          type: object
          properties:
            to_address:
              type: string
              format: email
        name:
          type: string
        type:
          type: string
          description: format of alert. e.g. email
        created_on:
          type: string
          format: date-time
        updated_on:
          type: string
          format: date-time
        enterprise:
          type: string
          format: uuid
    AlarmRule:
      type: object
      properties:
        id:
          type: string
          format: uuid
        enterprise:
          type: string
          format: uuid
        devices:
          properties:
            id:
              type: string
              format: uuid
            device_name:
              type: string
            alias_name:
              type: string
              nullable: true
        groups:
          type: array
          items:
            type: string
        name:
          type: string
        description:
          type: string
        metric:
          type: string
        conditions:
          properties:
            value:
              type: number
              format: double
            unit:
              type: string
            comparator:
              type: string
            toggle_state:
              type: boolean
        action_emails:
          type: array
          items:
            type: string
            format: email
        actions:
          type: array
          items:
            type: string
        alert_channels:
          type: array
          items:
            type: string
        created_on:
          type: string
          format: date-time
        updated_on:
          type: string
          format: date-time
        is_active:
          type: boolean
        realert_interval:
          type: integer
        repeat_times:
          type: integer
        trigger_count:
          type: integer
        daily_trigger_count:
          type: integer
    UpdateAlarmRule:
      type: object
      required:
        - enterprise
        - name
        - metric
        - conditions
        - realert_interval
      properties:
        id:
          type: string
          format: uuid
        enterprise:
          type: string
          format: uuid
        devices:
          type: array
          items:
            format: string
        groups:
          type: array
          items:
            type: string
        name:
          type: string
        description:
          type: string
        metric:
          type: string
        conditions:
          properties:
            value:
              type: number
              format: double
            unit:
              type: string
            comparator:
              type: string
            toggle_state:
              type: boolean
        action_emails:
          type: array
          items:
            type: string
            format: email
        actions:
          type: array
          items:
            type: string
        alert_channels:
          type: array
          items:
            type: string
        created_on:
          type: string
          format: date-time
        updated_on:
          type: string
          format: date-time
        is_active:
          type: boolean
        realert_interval:
          type: integer
        repeat_times:
          type: integer
        trigger_count:
          type: integer
        daily_trigger_count:
          type: integer
    AlarmHistory:
      type: object
      properties:
        device_name:
          type: string
        device_id:
          type: string
          format: uuid
        group_id:
          type: array
          items:
            format: string
          description: lists group id's in uuid format
        group_name:
          type: string
        alert_time:
          type: string
          format: date-time
        latest_seen:
          type: string
          format: date-time
    Wallpaper:
      type: object
      properties:
        id:
          type: string
          format: uuid
        enterprise:
          type: string
          format: uuid
        image_file:
          type: string
          format: url
        thumbnail:
          type: string
          format: url
        orientation:
          type: string
        is_active:
          type: boolean
        created_on:
          type: string
          format: date-time
        updated_on:
          type: string
          format: date-time
    TileIcon:
      type: object
      properties:
        id:
          type: string
          format: uuid
        category:
          type: string
        icon_file:
          type: string
          format: url
        device_model:
          type: string
        custom:
          type: boolean
        created_on:
          type: string
          format: date-time
        updated_on:
          type: string
          format: date-time
    ApplyTileIcon:
      type: object
      properties:
        icon:
          type: string
          format: uuid
          nullable: true
        apply_mode:
          type: string
          enum:
            - devices
            - all_devices
            - groups
            - device_model
          default: devices
        device_model:
          type: string
          nullable: true
        devices:
          type: array
          items:
            format: string
        groups:
          type: array
          items:
            type: string
    DeviceLocations:
      type: object
      properties:
        id:
          type: integer
        latitude:
          type: number
          format: double
        longitude:
          type: number
          format: double
        altitude:
          type: number
          format: double
        city:
          type: string
        status:
          type: string
        country:
          type: string
        zipcode:
          type: integer
        last_updated_on:
          type: string
          format: date-time
        device:
          type: string
          format: url
        enterprise:
          type: string
          format: url
    SecurityStatesEnum:
      type: integer
      format: int32
      description: |
        Following are the Security States and their description

        ```
          * 1 = SECURE
          * 10 = LOW_RISK
          * 20 = MEDIUM_RISK
          * 30 = HIGH_RISK
          * 100 = DEVICE_STATE_UNSPECIFIED
        ```
      enum:
        - 1
        - 10
        - 20
        - 30
        - 100
    DeviceTiles:
      type: object
      properties:
        id:
          type: integer
        device:
          type: object
          properties:
            id:
              type: string
              format: uuid
            groups:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type: string
                  url:
                    type: string
                    format: url
            device_name:
              type: string
            state:
              type: integer
            tags:
              type: string
              nullable: true
            device_type:
              type: string
            serial:
              type: string
            imeis:
              type: object
            android_version:
              type: integer
            eea_version:
              type: string
            manufacturer:
              type: string
            api_level:
              type: integer
            template_name:
              type: string
            dpc_version:
              type: string
            alias_name:
              type: string
            provisioned_on:
              type: string
              format: date-time
            geofence_id:
              type: string
              format: uuid
        network_info:
          type: object
          properties:
            __faust:
              type: object
              properties:
                ns:
                  type: string
            mobileIPv4:
              type: string
              nullable: true
            mobileIPv6:
              type: string
              nullable: true
            networkType:
              type: string
              nullable: true
            numberOfSim:
              type: integer
            simOperator:
              type: array
              items:
                type: string
            signalStrength:
              type: string
              nullable: true
            networkOperator:
              type: array
              items:
                type: string
            mobileNetworkStatus:
              type: string
            currentActiveConnection:
              type: string
        model:
          type: string
        location:
          type: object
          nullable: true
        battery_level:
          type: number
          format: double
        security_state:
          type: string
        security_reason:
          type: string
        security_advise:
          type: string
        wifi_ssid:
          type: string
          nullable: true
        updated_on:
          type: string
          format: date-time
        created_on:
          type: string
          format: date-time
        is_active:
          type: boolean
        is_gms:
          type: boolean
        status_id:
          type: integer
          nullable: true
        serial_no:
          type: string
        android_version:
          type: integer
        eea_version:
          type: string
        dpc_version:
          type: string
        location_city:
          type: string
        network_type:
          type: string
        enterprise:
          type: string
          format: url
        icon:
          type: string
          nullable: true
    StatusMetrics:
      type: object
      properties:
        active:
          type: integer
        in_active:
          type: integer
        low_risk:
          type: integer
        high_risk:
          type: integer
        medium_risk:
          type: integer
        secure:
          type: integer
        low_battery:
          type: integer
        under_provisioning:
          type: integer
        recently_added:
          type: integer
        unspecified:
          type: integer
        total_devices_under_risk:
          type: integer
    DeviceStatusReport:
      type: object
      properties:
        device_id:
          type: string
          format: uuid
        device_name:
          type: string
        alias_name:
          type: string
          nullable: true
        device_model:
          type: string
        device_brand:
          type: string
        android_version:
          type: string
        serial_number:
          type: string
        is_new:
          type: boolean
        last_known_location:
          type: string
        days_active:
          type: integer
        status:
          type: string
          description: choices- ACTIVE / INACTIVE / DISABLED
        inactive_since_three_days:
          type: boolean
    GroupReport:
      type: object
      properties:
        group_id:
          type: string
          format: uuid
        group_name:
          type: string
        group_path:
          type: string
        active_devices:
          type: integer
        inactive_devices:
          type: integer
        registered_devices:
          type: integer
        new_devices:
          type: integer
        disabled_devices:
          type: integer
    Subscription:
      type: object
      properties:
        id:
          type: integer
        email_ids:
          type: array
          items:
            type: string
            format: email
        is_subscribed:
          type: boolean
        created_on:
          type: string
          format: date-time
        updated_on:
          type: string
          format: date-time
    StatusMetricsV2:
      type: object
      properties:
        last_seen:
          type: object
          properties:
            less_than_30_minutes:
              type: integer
            less_than_1_day:
              type: integer
            greater_than_1_day:
              type: integer
        low_risk:
          type: integer
        high_risk:
          type: integer
        medium_risk:
          type: integer
        secure:
          type: integer
        low_battery:
          type: integer
        under_provisioning:
          type: integer
        recently_added:
          type: integer
        unspecified:
          type: integer
        total_devices_under_risk:
          type: integer
    TokenRenewV0:
      type: object
      properties:
        id:
          title: Token id
          type: string
          description: Id of the token
          format: integer
          readOnly: true
        user:
          title: User id
          type: string
          description: Id of the user resource
          readOnly: true
        enterprise:
          title: Enterprise id
          type: string
          description: Id of the enterprise resource
          format: uuid
          readOnly: true
        token:
          title: API Token
          type: string
          description: API token for accessing esper APIs
          readOnly: true
        expires_at:
          title: API token expiry
          type: string
          description: Date and time of when your API token will get expired
          format: date-time
          readOnly: true
        developerapp:
          title: Developer app id
          type: string
          description: >-
            Id of the developer app resource that you created using the esper
            dev console
          format: uuid
          readOnly: true
        scope:
          title: Scope of API token
          type: string
          description: This defines what access scopes your API token has
          readOnly: true
        created_on:
          title: Created on
          type: string
          description: Date and time of when this resource was created
          format: date-time
          readOnly: true
        updated_on:
          title: Updated on
          type: string
          description: Date and time of when this resource was updated
          format: date-time
          readOnly: true
    V0CommandStatus:
      type: object
      properties:
        id:
          title: Id
          type: string
          description: Unique command identifier
          format: uuid
          readOnly: true
        request:
          title: Request Id
          type: string
          description: Request Id associated with this command
          format: uuid
          readOnly: true
        command:
          title: info about the command
          type: string
        command_args:
          type: object
          description: arguments in command
        issued_by:
          type: object
          properties:
            id:
              type: integer
            username:
              type: string
        device:
          title: AndroidDevice
          type: string
          description: Device associated with this command
          format: url
          readOnly: true
        state:
          type: string
          description: Current state of the command
          enum:
            - Command Queued
            - Command Initiated
            - Command Acknowledged
            - Command In Progress
            - Command TimeOut
            - Command Success
            - Command Failure
            - Command Scheduled
            - Command Cancelled
        reason:
          type: string
          description: details briefing the reason for current command state
        requeue_value:
          type: integer
          description: >-
            indicates the command's requeue count for the device, which is
            limited to a maximum of 3 retries.
        created_on:
          title: Created on
          type: string
          description: Timestamp of command creation
          format: date-time
          readOnly: true
        updated_on:
          title: Updated on
          type: string
          description: Last updated timestamp of command
          format: date-time
          readOnly: true
    Geofence:
      required:
        - latitude
        - longitude
        - name
      type: object
      properties:
        id:
          title: Geofence id
          type: string
          description: id of the geofence
          format: uuid
          readOnly: true
        name:
          title: Geofence name
          type: string
          description: Name of the geofence
        description:
          title: Geofence description
          type: string
          description: A description about the geofence
        enterprise:
          title: Enterprise id
          type: string
          description: id of the enterprise resource
          format: uuid
          readOnly: true
        latitude:
          title: Geofence latitude
          type: string
          description: Latitude corresponding to the geofence
          format: decimal
        longitude:
          title: Geofence longitude
          type: string
          description: Longitude corresponding to the geofence
          format: decimal
        radius:
          title: Geofence radius
          type: integer
          description: The radius within which the geofence should be applied
        radius_unit:
          title: Unit of radius
          type: string
          description: The unit in which the radius is taken, eg - kilometers, meters etc
          enum:
            - KILOMETERS
            - METERS
            - MILES
        device_actions:
          title: Device Actions
          type: array
          description: The actions to be performed on the device
          items:
            type: string
            enum:
              - LOCK_DOWN
              - BEEP
        device_count:
          title: Device count
          type: integer
          description: Number of devices
          readOnly: true
        created_by:
          title: Created by
          type: string
          description: The user who created the geofence
          readOnly: true
        created_on:
          title: Creation date and time
          type: string
          description: Date and time of when the geofence was created
          format: date-time
          readOnly: true
        updated_on:
          title: Updation date and time
          type: string
          description: Date and time of when the geofence was updated
          format: date-time
          readOnly: true
    GeofenceUpdate:
      type: object
      properties:
        name:
          title: Geofence name
          type: string
          description: Name of the geofence
        description:
          title: Geofence description
          type: string
          description: A description about the geofence
        latitude:
          title: Geofence latitude
          type: string
          description: Latitude corresponding to the geofence
          format: decimal
        longitude:
          title: Geofence longitude
          type: string
          description: Longitude corresponding to the geofence
          format: decimal
        radius:
          title: Geofence radius
          type: integer
          description: The radius within which the geofence should be applied
        radius_unit:
          title: Unit of radius
          type: string
          description: The unit in which the radius is taken, eg - kilometers, meters etc
          enum:
            - KILOMETERS
            - METERS
            - MILES
        device_actions:
          title: Device Actions
          type: array
          description: The actions to be performed on the device
          items:
            type: string
            enum:
              - LOCK_DOWN
              - BEEP
    GeofenceCreate:
      type: object
      properties:
        name:
          title: Geofence name
          type: string
          description: Name of the geofence
        description:
          title: Geofence description
          type: string
          description: A description about the geofence
        latitude:
          title: Geofence latitude
          type: string
          description: Latitude corresponding to the geofence
          format: decimal
        longitude:
          title: Geofence longitude
          type: string
          description: Longitude corresponding to the geofence
          format: decimal
        radius:
          title: Geofence radius
          type: integer
          description: The radius within which the geofence should be applied
        radius_unit:
          title: Unit of radius
          type: string
          description: The unit in which the radius is taken, eg - kilometers, meters etc
          enum:
            - KILOMETERS
            - METERS
            - MILES
        device_actions:
          title: Device Actions
          type: array
          description: The actions to be performed on the device
          items:
            type: string
            enum:
              - LOCK_DOWN
              - BEEP
        devices:
          title: List of device ids
          type: array
          description: List of ids of devices on which the geofence is to be applied
          items:
            type: string
    EnterpriseV1:
      required:
        - id
        - name
        - short_code
      type: object
      properties:
        id:
          title: Id
          type: string
          description: Id of the enterprise
          format: uuid
          readOnly: true
        name:
          title: Name
          maxLength: 255
          minLength: 1
          type: string
          description: Name of the enterprise
        short_code:
          title: Short code
          maxLength: 10
          minLength: 1
          type: string
          description: >-
            A short 10-char representation of the enterprise, separated by
            hyphens. Field is optional, as system will auto-generate a value if
            none is provided.
          readOnly: true
        registered_name:
          title: Registered name of the enterprise
          maxLength: 255
          minLength: 1
          type: string
          description: Registered Name of the enterprise
        registered_address:
          title: Registered address
          maxLength: 255
          minLength: 1
          type: string
          description: Registered address of the enterprise.
        location:
          title: Enterprise location
          maxLength: 255
          minLength: 1
          type: string
          description: City, State, Country location of the enterprise
        zipcode:
          title: Enterprise zipcode
          maxLength: 8
          minLength: 1
          type: string
          description: Zip code of enterprise location
        contact_person:
          title: Contact person
          maxLength: 255
          minLength: 1
          type: string
          description: Person who is the point of contact for the enterprise
          nullable: true
        contact_number:
          title: Contact number
          maxLength: 20
          minLength: 1
          type: string
          description: Contact number of the enterprise
          nullable: true
        contact_email:
          title: Contact email
          maxLength: 254
          minLength: 1
          type: string
          description: Contact email address of the enterprise
          format: email
        wifi_lte_toggle_flag:
          title: Enable data saver mode
          type: boolean
          description: Will only be available if feature is enabled
        emm:
          title: Google EMM
          type: object
          properties:
            google_enterprise_id:
              type: string
          description: >-
            This field will have details about emm enrollment if the enterprise
            is emm enrolled
          nullable: true
          readOnly: true
        created_on:
          title: Created on
          type: string
          description: Date and time of when this resource was created
          format: date-time
          readOnly: true
        updated_on:
          title: Updated on
          type: string
          description: Date and time of when this resource was updated
          format: date-time
          readOnly: true
    EnterpriseUpdateV1:
      type: object
      properties:
        id:
          title: Id
          type: string
          description: Id of the enterprise
          format: uuid
          readOnly: true
        name:
          title: Enterprise Name
          maxLength: 255
          minLength: 1
          type: string
          description: Name of the enterprise
        registered_name:
          title: Registered name
          maxLength: 255
          minLength: 1
          type: string
          description: Registered Name of the enterprise
        registered_address:
          title: Registered address
          maxLength: 255
          minLength: 1
          type: string
          description: Registered address of the enterprise.
        location:
          title: Enterprise location
          maxLength: 255
          minLength: 1
          type: string
          description: City, State, Country location of the enterprise
        zipcode:
          title: Enterprise zipcode
          maxLength: 8
          minLength: 1
          type: string
          description: Description of the enterprise
        contact_person:
          title: Contact person
          maxLength: 255
          minLength: 1
          type: string
          description: Person who is the point of contact for the enterprise
          nullable: true
        contact_number:
          title: Contact number
          maxLength: 20
          minLength: 1
          type: string
          description: Contact number of the enterprise
          nullable: true
        contact_email:
          title: Contact email
          maxLength: 254
          minLength: 1
          type: string
          description: Contact email address of the enterprise
          format: email
        wifi_lte_toggle_flag:
          title: Enable data saver mode
          type: boolean
          description: Will only be available if feature is enabled
    ApplicationVersionV1:
      title: Application Version V1
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        version_code:
          title: Version code
          maxLength: 50
          minLength: 1
          type: string
        build_number:
          title: Build number
          maxLength: 100
          minLength: 1
          type: string
          nullable: true
        hash_string:
          title: Hash string
          type: string
        min_sdk_version:
          title: Min sdk version
          maxLength: 10
          minLength: 1
          type: string
          nullable: true
        target_sdk_version:
          title: Target sdk version
          maxLength: 10
          minLength: 1
          type: string
          nullable: true
        icon_url:
          title: Url for the icon
          type: string
          format: url
        release_name:
          title: Name of the release
          type: string
    ApplicationV1:
      required:
        - application_name
        - enterprise
        - package_name
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        latest_version:
          $ref: '#/components/schemas/ApplicationVersionV1'
        application_name:
          title: Application name
          maxLength: 255
          minLength: 1
          type: string
        package_name:
          title: Package name
          maxLength: 255
          minLength: 1
          type: string
          readOnly: true
        is_hidden:
          title: Is hidden
          type: boolean
        enterprise:
          title: Enterprise
          type: string
          format: url
    AppVersionV1:
      title: Application Version V1
      required:
        - enterprise
        - version_code
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        installed_count:
          title: Installed count
          type: integer
          readOnly: true
        is_g_play:
          title: Is google play
          type: boolean
        app_file:
          title: App file url
          type: string
          format: url
          nullable: true
        app_icon:
          title: App icon url
          type: string
          format: url
          nullable: true
        version_code:
          title: Version code
          maxLength: 50
          minLength: 1
          type: string
          nullable: true
        build_number:
          title: Build number
          maxLength: 100
          minLength: 1
          type: string
          nullable: true
        min_sdk_version:
          title: Minimum sdk version
          maxLength: 10
          minLength: 1
          type: string
          nullable: true
        enterprise:
          title: Enterprise URL
          type: string
          format: url
        application:
          title: Application URL
          type: string
          format: url
        release_name:
          title: Name of the release
          maxLength: 255
          type: string
          nullable: true
        release_comments:
          title: Release comments
          type: string
          nullable: true
        approval_status:
          title: Approval Status
          maxLength: 50
          type: string
          default: APPROVED
          enum:
            - AVAILABLE
            - ACCEPTED
            - APPROVED
            - REJECTED
        release_date:
          title: Release date
          type: string
          format: date-time
        size_in_mb:
          title: Size in mb
          type: number
        is_default:
          title: Is default
          type: boolean
          default: false
        created_on:
          title: Created on
          type: string
          format: date-time
          readOnly: true
    TokenInfoV1:
      required:
        - enterprise
        - id
      type: object
      properties:
        id:
          title: Id
          type: string
          description: Token id
          format: integer
          readOnly: true
        enterprise:
          title: Enterprise id
          type: string
          description: Id of the enterprise resource
          format: uuid
          readOnly: true
        user:
          title: User id
          type: string
          description: Id of the user resource
          readOnly: true
        developer_app:
          title: Developer app id
          type: string
          description: >-
            Id of the developer app resource that you created using the esper
            dev console
          format: uuid
          readOnly: true
        source_refresh_token:
          title: Refresh token
          type: string
          description: The refresh token is used to refresh your expired API token
          readOnly: true
        token:
          title: API Token
          type: string
          description: API token for accessing esper APIs
          readOnly: true
        expires_on:
          title: API token expiry
          type: string
          description: Date and time of when your API token will get expired
          format: date-time
          readOnly: true
        scope:
          title: Scope of API token
          type: array
          description: This defines what access scopes does your API token has
          readOnly: true
          items:
            type: string
        created_on:
          title: Created on
          type: string
          description: Date and time of when this resource was created
          format: date-time
          readOnly: true
        updated_on:
          title: Updated on
          type: string
          description: Date and time of when this resource was updated
          format: date-time
          readOnly: true
    Group:
      type: object
      properties:
        id:
          title: ID
          type: string
          format: uuid
        name:
          title: Group Name
          type: string
        path:
          title: Group Path
          type: string
        device_count:
          type: integer
    UserProfile:
      title: UserProfileInfo
      type: object
      properties:
        id:
          title: ID
          type: integer
        enterprise_user_id:
          title: Enterprise User ID
          type: string
        authn_user_id:
          title: AuthN User ID
          type: string
          format: uuid
        authn_connection_id:
          title: AuthN Connection ID
          type: string
          format: uuid
        authz_role_id:
          title: AuthZ Role ID
          type: string
          format: uuid
        role:
          title: Role
          type: string
          enum:
            - Shoonya Admin
            - Enterprise Admin
            - Enterprise User
            - Viewer
            - Group Admin
            - Group Viewer
        enterprise:
          title: Enterprise ID
          type: string
          format: uuid
        is_customer:
          title: Is Customer
          type: boolean
        is_endpoint_creator:
          title: Is Endpoint Creator
          type: boolean
        created_on:
          title: Created On
          type: string
          format: date-time
        updated_on:
          title: Updated On
          type: string
          format: date-time
        setup_wizard_complete:
          title: Setup Wizard Complete
          type: boolean
        default_password_changed:
          title: Default Password Changed
          type: boolean
        is_developer:
          title: Is Developer
          type: boolean
        can_factory_reset:
          title: Can Factory Reset
          type: boolean
        groups:
          title: Groups
          type: array
          items:
            type: object
            $ref: '#/components/schemas/Group'
    AuthenticationToken:
      title: AuthenticationToken
      type: object
      properties:
        id:
          title: ID
          type: integer
        token:
          title: Token
          type: string
        is_active:
          title: Is Active
          type: boolean
        updated_on:
          title: Updated On
          type: string
          format: date-time
    EMM:
      title: UserEMM
      type: object
      properties:
        id:
          title: ID
          type: integer
        user:
          title: User ID
          type: integer
        account_identifier:
          title: Account Identifier
          type: string
        account_type:
          title: Account Type
          type: string
        display_name:
          title: Display Name
          type: string
        google_user_id:
          title: Google User ID
          type: string
        google_enterprise:
          title: Google Enterprise
          type: integer
        is_active:
          title: Is Active
          type: boolean
        created_on:
          title: Created On
          type: string
          format: date-time
        updated_on:
          title: Updated On
          type: string
          format: date-time
        authentication_token:
          title: Authentication Token
          type: object
          $ref: '#/components/schemas/AuthenticationToken'
          readOnly: true
    User:
      title: UserInfo
      type: object
      properties:
        id:
          title: ID
          type: integer
        username:
          title: User name
          type: string
        email:
          title: Email
          type: string
          format: email
        first_name:
          title: First name
          type: string
        last_name:
          title: Last name
          type: string
        full_name:
          title: Last name
          type: string
        is_staff:
          type: boolean
          readOnly: true
        is_superuser:
          type: boolean
          readOnly: true
        is_active:
          title: Is user active
          type: boolean
        profile:
          title: User Profile
          type: object
          $ref: '#/components/schemas/UserProfile'
        emm:
          title: EMM details
          type: object
          $ref: '#/components/schemas/EMM'
          readOnly: true
        last_login:
          title: Last login
          type: string
        token:
          title: Token
          type: string
        has_emm:
          title: Has EMM
          type: boolean
        is_email_verified:
          title: Is Email Verified
          type: boolean
    TenantUserInviteResponse:
      title: TenantUserInviteResponse
      type: object
      properties:
        id:
          title: id
          type: string
        email:
          title: email
          type: string
          format: email
        tenant_id:
          title: id of the tenant
          type: string
        idp_invite_id:
          title: id of the idp invitation
          type: string
        meta:
          title: meta data of user
          type: object
        connection_id:
          title: connection id
          type: string
        send_invitation_email:
          title: send invitation email
          type: boolean
        created_at:
          title: created at
          type: string
          format: date-time
        updated_at:
          title: updated at
          type: string
          format: date-time
    GenericErrorResponse:
      type: object
      properties:
        status:
          type: integer
          format: int32
          description: Either 'status' or 'code' will be present, but not both.
        code:
          type: integer
          format: int32
          description: Either 'status' or 'code' will be present, but not both.
        error:
          type: string
          description: Either 'error' or 'errors' will be present, but not both.
        errors:
          type: array
          items:
            type: string
          description: Either 'error' or 'errors' will be present, but not both.
        message:
          title: Message describing the error
          type: string
    TenantUserInviteMeta:
      title: TenantUserInviteMeta
      type: object
      properties:
        email:
          title: email
          type: string
          format: email
        profile:
          title: profile details
          type: object
          properties:
            role:
              title: role
              type: string
              enum:
                - Enterprise Admin
                - Viewer
                - Group Admin
                - Group Viewer
                - Support
                - AuthZ Role User
            enterprise:
              title: tenant id
              type: string
              format: uuid
            groups:
              title: >-
                groups associated. required only if role is Group Admin or Group
                Viewer or AuthZ User Role
              type: array
              items:
                type: string
                format: uuid
            authz_role_id:
              title: custom role id. required only if role is AuthZ Role User
              type: string
              format: uuid
          required:
            - role
            - enterprise
      required:
        - email
        - profile
    TenantUserInviteRequest:
      title: TenantUserInviteRequest
      type: object
      properties:
        email:
          title: email
          type: string
          format: email
        meta:
          title: meta data of user
          type: object
          $ref: '#/components/schemas/TenantUserInviteMeta'
        connection_id:
          title: connection id
          type: string
      required:
        - email
        - meta
    TenantUserInviteCreateResponse:
      title: TenantUserInviteResponse
      type: object
      properties:
        id:
          title: id
          type: string
        email:
          title: email
          type: string
          format: email
        tenant_id:
          title: id of the tenant
          type: string
        idp_invite_id:
          title: id of the idp invitation
          type: string
        meta:
          title: meta data of user
          type: object
        connection_id:
          title: connection id
          type: string
        send_invitation_email:
          title: send invitation email
          type: boolean
        invitation_url:
          title: invitation URL
          type: string
        created_at:
          title: created at
          type: string
          format: date-time
        updated_at:
          title: updated at
          type: string
          format: date-time
    UserList:
      title: User
      type: object
      properties:
        id:
          title: ID
          type: integer
        username:
          title: User name
          type: string
        email:
          title: Email
          type: string
          format: email
        first_name:
          title: First name
          type: string
        last_name:
          title: Last name
          type: string
        full_name:
          title: Last name
          type: string
        is_staff:
          type: boolean
          readOnly: true
        is_superuser:
          type: boolean
          readOnly: true
        is_active:
          title: Is user active
          type: boolean
        profile:
          title: User Profile
          type: object
          $ref: '#/components/schemas/UserProfile'
        emm:
          title: EMM details
          type: object
          $ref: '#/components/schemas/EMM'
          readOnly: true
        last_login:
          title: Last login
          type: string
        token:
          title: Token
          type: string
        has_emm:
          title: Has EMM
          type: boolean
    UserProfileCreate:
      title: UserProfile
      type: object
      properties:
        role:
          title: Role
          type: string
          enum:
            - Shoonya Admin
            - Enterprise Admin
            - Enterprise User
            - Viewer
            - Group Admin
            - Group Viewer
        groups:
          title: Groups
          type: array
          items:
            type: string
        enterprise:
          title: Enterprise ID
          type: string
          format: uuid
        is_customer:
          title: Is Customer
          type: boolean
        is_endpoint_creator:
          title: Is Endpoint Creator
          type: boolean
        setup_wizard_complete:
          title: Setup Wizard Complete
          type: boolean
        default_password_changed:
          title: Default Password Changed
          type: boolean
        is_developer:
          title: Is Developer
          type: boolean
        can_factory_reset:
          title: Can Factory Reset
          type: boolean
    UserCreate:
      required:
        - username
        - profile
      title: UserCreate
      type: object
      properties:
        username:
          title: User name
          type: string
        password:
          title: Password
          type: string
        first_name:
          title: First name
          type: string
        last_name:
          title: Last name
          type: string
        is_active:
          title: Is user active
          type: boolean
        email:
          title: Email
          type: string
          format: email
        profile:
          title: User Profile
          type: object
          $ref: '#/components/schemas/UserProfileCreate'
    UserUpdate:
      title: UserUpdation
      type: object
      properties:
        username:
          title: User name
          type: string
        password:
          title: Password
          type: string
        first_name:
          title: First name
          type: string
        last_name:
          title: Last name
          type: string
        is_active:
          title: Is user active
          type: boolean
        email:
          title: Email
          type: string
          format: email
        profile:
          title: User Profile
          type: object
          $ref: '#/components/schemas/UserProfileCreate'
    UpdateDifferentUserRequest:
      type: object
      properties:
        authz_role_id:
          title: Custom role id. Required only if role is AuthZ Role User
          type: string
          format: uuid
        can_factory_reset:
          title: If user should be able to factory reset or not
          type: boolean
        has_all_group_access:
          title: >-
            If user has access to all groups or not. Required only if role is
            AuthZ Role User
          type: boolean
        groups:
          title: >-
            List of group IDs. Can be empty if has_all_group_access is True or
            if the user role is not Group Admin/Group Viewer
          type: array
          items:
            type: string
        role:
          title: Role. Role should be AuthZ Role User for custom role
          type: string
          enum:
            - Shoonya Admin
            - Enterprise Admin
            - Enterprise User
            - Viewer
            - Group Admin
            - Group Viewer
            - AuthZ Role User
      required:
        - role
        - groups
    UpdateOwnUserRequest:
      type: object
      properties:
        first_name:
          title: first name
          type: string
      required:
        - first_name
    UserGroups:
      type: object
      properties:
        group_ids:
          type: array
          items:
            type: string
            format: uuid
        has_all_group_access:
          type: boolean
    ConnectivitySection:
      title: Connectivity
      type: object
      properties:
        sms_disabled:
          type: boolean
        enable_bluetooth:
          type: boolean
        wifi_state:
          type: boolean
        nfc_beam_disabled:
          type: boolean
        ethernet_settings:
          type: object
          description: Ethernet settings to configure ethernet certificate
          required:
            - ethernet_auth_mode
          properties:
            ethernet_auth_mode:
              type: string
              description: |
                Auth Mode options
                ```
                * EAP_TLS: Ethernet auth mode is EAP_TLS
                * NONE: Default Value, if NONE then other fields are option
                ```
              enum:
                - EAP_TLS
                - NONE
            ethernet_ca_cert_alias:
              type: string
              description: It is mandatory field if Auth Mode is “EAP_TLS”.
            ethernet_client_cert_alias:
              type: string
              description: It is mandatory field if Auth Mode is “EAP_TLS”.
            ethernet_eap_identity:
              type: string
              description: It is mandatory field if Auth Mode is “EAP_TLS”.
        wifi_settings:
          type: array
          items:
            type: object
            properties:
              wifi_ssid:
                type: string
              wifi_password:
                type: string
              wifi_security_type:
                type: string
                enum:
                  - NONE
                  - WAP
                  - WEP
                  - EAP
                  - WPA2
                  - SAE
              wifi_phase2_auth:
                type: string
                enum:
                  - NONE
                  - PAP
                  - MSCHAP
                  - MSCHAPV2
                  - GTC
                  - SIM
                  - AKA
                  - AKA_PRIME
              wifi_eap_method:
                type: string
                enum:
                  - PEAP
                  - TLS
                  - TTLS
                  - PWD
                  - NONE
                  - SIM
                  - AKA
                  - AKA_PRIME
              identity:
                type: string
              anonymous_identity:
                type: string
              domain:
                type: string
              hidden:
                type: boolean
        incoming_numbers_with_tags:
          type: array
          items:
            type: object
            properties:
              number:
                type: string
              tags:
                type: array
                items:
                  type: string
        outgoing_numbers_with_tags:
          type: array
          items:
            type: object
            properties:
              number:
                type: string
              tags:
                type: array
                items:
                  type: string
        section_type:
          title: Type
          type: string
          enum:
            - Inherited
            - Independent
        locked:
          title: Locked
          description: Locked
          type: boolean
    SoundSection:
      title: Sound
      type: object
      properties:
        alarm_volume:
          type: integer
        notification_volume:
          type: integer
        music_volume:
          type: integer
        ring_volume:
          type: integer
        section_type:
          title: Type
          type: string
          enum:
            - Inherited
            - Independent
        locked:
          title: Locked
          description: Locked
          type: boolean
    DisplayBrandingSection:
      title: Display
      type: object
      properties:
        screenshot_disabled:
          type: boolean
        status_bar_disabled:
          type: boolean
        rotation_state:
          type: string
          enum:
            - AUTO
            - LANDSCAPE_ONLY
            - POTRAIT_ONLY
            - INVERTED_PORTRAIT_ONLY
            - INVERTED_LANDSCAPE_ONLY
        brightness_scale:
          type: integer
        wallpapers:
          type: array
          items:
            type: object
            properties:
              wallpaper:
                type: string
                format: uuid
              wallpaper_url:
                type: string
                readOnly: true
              thumbnail_url:
                type: string
                readOnly: true
              orientation:
                type: string
              screen_types:
                type: array
                items:
                  type: string
                  enum:
                    - LOCKSCREEN
                    - HOMESCREEN
              orientations:
                type: array
                items:
                  type: string
                  enum:
                    - PORTRAIT
                    - LANDSCAPE
        section_type:
          title: Type
          type: string
          enum:
            - Inherited
            - Independent
        locked:
          title: Locked
          description: Locked
          type: boolean
    HardwareSettingsSection:
      title: Hardware
      type: object
      properties:
        gps_state:
          type: string
          enum:
            - LOCATION_MODE_HIGH_ACCURACY
            - LOCATION_MODE_SENSORS_ONLY
            - LOCATION_MODE_BATTERY_SAVING
            - LOCATION_MODE_OFF
            - LOCATION_MODE_ON
        usb_file_transfer_disabled:
          type: boolean
        tethering_disabled:
          type: boolean
        camera_disabled:
          type: boolean
        usb_connectivity_disabled:
          type: boolean
        section_type:
          title: Type
          type: string
          enum:
            - Inherited
            - Independent
        locked:
          title: Locked
          description: Locked
          type: boolean
    DateTimeSection:
      title: Date Time
      type: object
      properties:
        timezone_string:
          type: string
        device_locale:
          type: string
        date_time_config_disabled:
          type: boolean
        section_type:
          title: Type
          type: string
          enum:
            - Inherited
            - Independent
        locked:
          title: Locked
          description: Locked
          type: boolean
    SettingsAppSection:
      title: Settings App
      type: object
      properties:
        enable_android_settings_app:
          type: boolean
        settings_access_level:
          type: string
          enum:
            - NONE
            - SHOONYA
            - SYSTEM
        esper_settings_app:
          type: object
          properties:
            only_dock_accessible:
              type: boolean
            admin_mode_password:
              type: string
            esper_settings_app_policy:
              type: object
              properties:
                flashlight:
                  type: string
                wifi:
                  type: string
                auto_rotation:
                  type: string
                reboot:
                  type: string
                kiosk_app_selection:
                  type: string
                esper_branding:
                  type: string
                factory_reset:
                  type: string
                about:
                  type: string
                display:
                  type: string
                sound:
                  type: string
                keyboard:
                  type: string
                input_selection:
                  type: string
                accessibility:
                  type: string
                mobile_data:
                  type: string
                bluetooth:
                  type: string
                language:
                  type: string
                time_and_date:
                  type: string
                clear_app_data:
                  type: string
                storage:
                  type: string
                data_roaming:
                  type: string
                wifi_tethering:
                  type: string
                airplane_mode:
                  type: string
                accessibility_reset_to_default:
                  type: string
                accessibility_high_contrast_text:
                  type: string
                accessibility_cc_deuteranomaly:
                  type: string
                accessibility_cc_protanomaly:
                  type: string
                accessibility_cc_tritanomaly:
                  type: string
                accessibility_mono_audio:
                  type: string
                accessibility_display_size:
                  type: string
                accessibility_talkback:
                  type: string
                accessibility_text_to_speech:
                  type: string
        config_json:
          type: object
        section_type:
          title: Type
          type: string
          enum:
            - Inherited
            - Independent
        locked:
          title: Locked
          description: Locked
          type: boolean
    SystemUpdatesSection:
      title: System Updates
      type: object
      properties:
        locked:
          title: Locked
          description: Locked
          type: boolean
        section_type:
          title: Type
          type: string
          enum:
            - Inherited
            - Independent
        type:
          title: Type
          description: Type
          type: string
          enum:
            - TYPE_POSTPONE
            - TYPE_INSTALL_AUTOMATIC
            - TYPE_INSTALL_WINDOWED
            - TYPE_INSTALL_DISABLED
        maintenance_start:
          type: integer
        maintenance_end:
          type: integer
    GoogleServicesSection:
      title: Google Services
      type: object
      properties:
        disable_play_store:
          type: boolean
        google_assistant_disabled:
          type: boolean
        managed_google_play_disabled:
          type: boolean
        max_account:
          type: integer
        emails:
          type: array
          items:
            type: string
        domains:
          type: array
          items:
            type: string
        frp_googles:
          type: array
          items:
            type: object
            properties:
              google_id:
                type: string
              email:
                type: string
              type:
                type: string
                enum:
                  - USER
                  - ADMIN
        section_type:
          title: Type
          type: string
          enum:
            - Inherited
            - Independent
        locked:
          title: Locked
          description: Locked
          type: boolean
    SecuritySection:
      title: Security
      type: object
      properties:
        password_quality:
          type: string
          enum:
            - PASSWORD_QUALITY_ALPHABETIC
            - PASSWORD_QUALITY_ALPHANUMERIC
            - PASSWORD_QUALITY_UNSPECIFIED
            - PASSWORD_QUALITY_COMPLEX
            - PASSWORD_QUALITY_BIOMETRIC_WEAK
            - PASSWORD_QUALITY_NUMERIC
        minimum_password_length:
          type: integer
        adb_disabled:
          type: boolean
        safe_boot_disabled:
          type: boolean
        screen_off_timeout:
          type: integer
        factory_reset_disabled:
          type: boolean
        keyguard_disabled:
          type: boolean
        section_type:
          title: Type
          type: string
          enum:
            - Inherited
            - Independent
        locked:
          title: Locked
          description: Locked
          type: boolean
    ApplicationSection:
      title: Application
      type: object
      properties:
        app_mode:
          type: string
          enum:
            - KIOSK
            - MULTI_APP
        launch_on_start:
          type: string
        start_on_boot:
          type: string
          nullable: true
        launcher_less_dpc:
          type: boolean
        disable_local_app_install:
          type: boolean
        app_uninstall_disabled:
          type: boolean
        permission_policy:
          type: string
          enum:
            - PERMISSION_POLICY_AUTO_GRANT
            - PERMISSION_POLICY_PROMPT
            - PERMISSION_POLICY_AUTO_DENY
        locked:
          title: Locked
          description: Locked
          type: boolean
        preload_apps:
          type: array
          items:
            type: object
            properties:
              package_name:
                type: string
              state:
                type: string
                enum:
                  - SHOW
                  - HIDE
                  - DISABLED
                  - LAUNCHABLE_BUT_HIDDEN
        apps:
          type: array
          items:
            type: object
            properties:
              version_codes:
                type: array
                items:
                  type: string
                readOnly: true
              is_g_play:
                type: boolean
                readOnly: true
              app_version:
                type: string
                format: uuid
              app_version_url:
                type: string
                readOnly: true
              hash_string:
                type: string
                readOnly: true
              package_name:
                type: string
                readOnly: true
              download_url:
                type: string
                readOnly: true
              installation_rule:
                type: string
                enum:
                  - DURING
                  - POST
              state:
                type: string
                enum:
                  - SHOW
                  - HIDE
                  - DISABLED
                  - LAUNCHABLE_BUT_HIDDEN
              managed_config:
                type: object
        section_type:
          title: Type
          type: string
          enum:
            - Inherited
            - Independent
    ContentSection:
      title: Content
      type: object
      properties:
        files:
          type: array
          items:
            type: object
            properties:
              file:
                type: integer
              file_url:
                type: string
                readOnly: true
              hash:
                type: string
                readOnly: true
              url:
                type: string
                readOnly: true
              destination_path:
                type: string
        section_type:
          title: Type
          type: string
          enum:
            - Inherited
            - Independent
        locked:
          type: boolean
    BlueprintRevision:
      title: Blueprint
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        revision:
          type: string
          readOnly: true
        created_by:
          type: string
          readOnly: true
        current:
          type: boolean
          readOnly: true
        type:
          type: string
          enum:
            - Independent
            - Inherited
        comments:
          type: string
        locked:
          type: boolean
        connectivity:
          $ref: '#/components/schemas/ConnectivitySection'
        sound:
          $ref: '#/components/schemas/SoundSection'
        display_branding:
          $ref: '#/components/schemas/DisplayBrandingSection'
        hardware_settings:
          $ref: '#/components/schemas/HardwareSettingsSection'
        date_time:
          $ref: '#/components/schemas/DateTimeSection'
        settings_app:
          $ref: '#/components/schemas/SettingsAppSection'
        system_updates:
          $ref: '#/components/schemas/SystemUpdatesSection'
        google_services:
          $ref: '#/components/schemas/GoogleServicesSection'
        security:
          $ref: '#/components/schemas/SecuritySection'
        application:
          $ref: '#/components/schemas/ApplicationSection'
        content:
          $ref: '#/components/schemas/ContentSection'
        created_on:
          title: Created on
          description: Date and time of when the group was created
          type: string
          format: date-time
          readOnly: true
    Blueprint:
      title: Blueprint
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
        description:
          type: string
        locked:
          type: boolean
        group:
          type: string
          format: uuid
        latest_revision:
          $ref: '#/components/schemas/BlueprintRevision'
        created_on:
          type: string
          format: date-time
          readOnly: true
        updated_on:
          type: string
          format: date-time
          readOnly: true
    UniqueIdentifier:
      title: UniqueIdentifier
      type: object
      properties:
        unique_id:
          title: Unique identifier
          type: string
        type:
          title: Unique identifier type
          type: string
          enum:
            - IMEI1
            - IMEI2
            - SERIAL
            - MEI
            - WIFI_MAC_ID
            - ETHERNET_MAC_ID
    DirectoryRecord:
      title: DirectoryRecord
      type: object
      properties:
        id:
          title: Directory Record ID
          type: string
        name:
          title: Device name
          type: string
        online_status:
          type: string
          enum:
            - ONLINE
            - OFFLINE
            - NONE
        alias:
          title: Alias name
          type: string
        tags:
          title: Tags
          type: array
          items:
            type: string
        group_id:
          title: Group ID
          type: string
          format: uuid
        device_id:
          title: Device ID
          type: string
          format: uuid
        approval_status:
          title: Approval Status
          type: string
          enum:
            - WAITING_FOR_APPROVAL
            - APPROVED
            - REJECTED
            - BLOCKED
        provisioned_on:
          title: Provisioned on
          type: string
          format: date-time
          readOnly: true
        unique_identifiers:
          title: Unique Identifiers
          type: array
          items:
            type: object
            allOf:
              - $ref: '#/components/schemas/UniqueIdentifier'
    UniqueIdentifierCreate:
      title: UniqueIdentifierCreate
      type: object
      properties:
        unique_id:
          title: Unique identifier
          type: string
        type:
          title: Unique identifier type
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
          description: |
            Following are the valid Unique Identifier Types:

            ```
            IMEI1 = 0
            IMEI2 = 1
            SERIAL = 2
            MEI = 3
            WIFI_MAC_ID = 4
            ETHERNET_MAC_ID = 5
            ```
    DirectoryRecordCreate:
      title: DirectoryRecordCreate
      type: object
      properties:
        unique_identifiers:
          title: Unique Identifiers
          type: array
          items:
            type: object
            allOf:
              - $ref: '#/components/schemas/UniqueIdentifierCreate'
        group_id:
          title: Group ID
          type: string
          format: uuid
        alias:
          title: Alias name
          type: string
        tags:
          title: Tags
          type: array
          items:
            type: string
    DirectoryRecordUpdate:
      title: DirectoryRecordUpdate
      type: object
      properties:
        unique_identifiers:
          title: Unique Identifiers
          type: array
          items:
            type: object
            allOf:
              - $ref: '#/components/schemas/UniqueIdentifierCreate'
        group_id:
          title: Group ID
          type: string
          format: uuid
        alias:
          title: Alias name
          type: string
        tags:
          title: Tags
          type: array
          items:
            type: string
    CustomConnectionList:
      title: CustomConnectionList
      type: object
      properties:
        name:
          title: name
          type: string
        strategy:
          title: strategy
          enum:
            - samlp
            - oidc
          description: |
            Strategy:
             * `samlp` - SAML connection
             * `oidc` - OIDC connection
        is_default:
          title: is default
          type: boolean
    CustomConnectionsListResponse:
      title: CustomConnectionsListResponse
      type: object
      properties:
        connection_id:
          title: connection id
          type: string
        connection:
          type: object
          $ref: '#/components/schemas/CustomConnectionList'
    CustomConnectionConfigResponse:
      title: CustomConnectionConfigResponse
      type: object
      properties:
        sign_in_url:
          title: Sign in url
          type: string
          format: url
          description: Required for SAML connection
        disable_sign_out:
          title: Disable sign out
          type: boolean
        sign_out_url:
          title: Sign out url
          type: string
          format: url
        x509_certificate:
          title: x509 certificate
          type: string
          description: Required for SAML connection
        issuer_url:
          title: Issuer url
          type: string
          format: url
          description: Required for OIDC connection
        client_id:
          title: client id
          type: string
          description: Required for OIDC connection
    CustomConnectionRequest:
      title: CustomConnectionRequest
      type: object
      properties:
        display_name:
          title: display name
          type: string
        strategy:
          title: strategy
          enum:
            - samlp
            - oidc
          description: |
            Strategy:
             * `samlp` - SAML connection
             * `oidc` - OIDC connection
        config:
          type: object
          $ref: '#/components/schemas/CustomConnectionConfigResponse'
    CustomConnectionResponse:
      title: CustomConnectionResponse
      type: object
      properties:
        id:
          title: id
          type: string
        name:
          title: name
          type: string
        display_name:
          title: display name
          type: string
        strategy:
          title: strategy
          enum:
            - samlp
            - oidc
          description: |
            Strategy:
             * `samlp` - SAML connection
             * `oidc` - OIDC connection
        service_provider_acs_url:
          title: service provider ACS url
          type: string
          format: url
        service_provider_entity_id:
          title: service provider entity id
          type: string
        service_provider_logout_url:
          title: service provider logout url
          type: string
        signing_certificate_link:
          title: signing certificate link
          type: string
        callback_url:
          title: callback url
          type: string
          format: url
        config:
          type: object
          $ref: '#/components/schemas/CustomConnectionConfigResponse'
    RoleResponse:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        role_type:
          type: integer
    Role:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
    ScopeResponse:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        scope_type:
          type: integer
    PersonalAccessTokenGetResponse:
      title: PersonalAccessTokenGetResponse
      type: object
      properties:
        count:
          type: integer
        personal_access_tokens:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: The unique identifier of the token.
              name:
                type: string
                description: The name of the token.
              description:
                type: string
                description: A description of the token.
              created_at:
                type: string
                format: timestamp
                description: Timestamp indicating when the token was created.
              updated_at:
                type: string
                format: timestamp
                description: Timestamp indicating when the token was updated.
              prefix:
                type: string
                description: The token prefix.
              token:
                type: string
                description: The token value.
              expiry_at:
                type: integer
                description: exipy date for token, -1 indicates no expiry.
              legacy_token_id:
                type: integer
                description: token id corresponding to legacy system
              legacy_developer_app_id:
                type: string
                description: developer app id corresponding to legacy system
    PersonalAccessTokenCreateResponse:
      title: PersonalAccessTokenCreateResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique ID for the generated token.
        name:
          type: string
          description: Name for the token.
        description:
          type: string
          description: Description for the token.
        created_at:
          type: string
          format: timestamp
          description: Timestamp indicating when the token was created.
        updated_at:
          type: string
          format: timestamp
          description: Timestamp indicating when the token was last updated.
        token:
          type: string
          description: The generated access token value.
        prefix:
          type: string
          description: Prefix for the generated token value.
        expiry_at:
          type: integer
          description: exipy date for token.
    PersonalAccessTokenUpdateResponse:
      title: PersonalAccessTokenUpdateResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique ID for the generated token.
        name:
          type: string
          description: Name for the token.
        description:
          type: string
          description: Description for the token.
        created_at:
          type: string
          format: timestamp
          description: Timestamp indicating when the token was created.
        updated_at:
          type: string
          format: timestamp
          description: Timestamp indicating when the token was last updated.
        token:
          type: string
          description: The generated access token value.
        prefix:
          type: string
          description: Prefix for the generated token value.
        expiry_at:
          type: integer
          description: exipy date for token.
        legacy_token_id:
          type: integer
          description: token id corresponding to legacy system
        legacy_developer_app_id:
          type: string
          description: developer app id corresponding to legacy system
    UsersListResponse:
      title: UsersListResponse
      type: object
      properties:
        user_id:
          title: user id
          type: string
        tenant_id:
          title: tenant id
          type: string
          format: uuid
        partner_id:
          title: partner id
          type: string
          format: uuid
        email:
          title: email
          type: string
        name:
          title: name
          type: string
        connection_id:
          title: connection id
          type: string
        created_at:
          title: created_at
          type: string
          format: timestamp
        updated_at:
          title: updated_at
          type: string
          format: timestamp
    apply_policy:
      type: string
      enum:
        - ALWAYS APPLY
        - IGNORE
        - PROVISION ONLY
    device_mode_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        device_mode:
          type: string
          enum:
            - KIOSK
            - MULTI APP
    launcher_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        launcher:
          type: string
          enum:
            - ESPER
            - DEFAULT
      required:
        - apply_policy
        - launcher
    local_app_install_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_local_app_install:
          type: boolean
      required:
        - apply_policy
        - allow_local_app_install
    app_uninstall_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_app_uninstallation:
          type: boolean
      required:
        - apply_policy
        - allow_app_uninstallation
    app_permission_policy_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        permission_policy:
          type: string
          enum:
            - ALLOW AUTOMATICALLY
            - DENY
            - ASK USER
      required:
        - apply_policy
        - permission_policy
    wifi_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_wifi:
          type: boolean
        wifi_state:
          type: string
          enum:
            - ENABLE
            - DISABLE
      required:
        - apply_policy
        - allow_wifi
        - wifi_state
    drift_policy:
      type: string
      enum:
        - IGNORE
        - LOG ONLY
        - MINOR
        - MAJOR
        - CRITICAL
      default: IGNORE
      description: 'Allowed values: IGNORE, LOG ONLY, MINOR, MAJOR, CRITICAL'
    bluetooth_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_bluetooth:
          type: boolean
        bluetooth_state:
          type: string
          enum:
            - ENABLE
            - DISABLE
        drift_policy:
          $ref: '#/components/schemas/drift_policy'
      required:
        - apply_policy
        - allow_bluetooth
    sms_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_sms:
          type: boolean
      required:
        - apply_policy
        - allow_sms
    nfc_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_nfc:
          type: boolean
      required:
        - apply_policy
        - allow_nfc
    incoming_numbers_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_all_numbers:
          type: boolean
        allowed_numbers:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
      required:
        - apply_policy
        - allow_all_numbers
    outgoing_numbers_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_all_numbers:
          type: boolean
        allow_ussd_codes:
          type: boolean
          default: false
        allowed_numbers:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
      required:
        - apply_policy
        - allow_all_numbers
    ethernet_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        auth_mode:
          type: string
          enum:
            - NONE
            - EAP-TLS
        ca_cert_alias:
          type: string
        client_cert_alias:
          type: string
        eap_identity:
          type: string
      required:
        - apply_policy
    adb_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_adb:
          type: boolean
      required:
        - apply_policy
        - allow_adb
    safe_boot_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_safe_boot:
          type: boolean
      required:
        - apply_policy
        - allow_safe_boot
    factory_reset_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_factory_reset:
          type: boolean
      required:
        - apply_policy
        - allow_factory_reset
    screen_timeout_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        screentimeout_value:
          type: integer
      required:
        - apply_policy
        - screentimeout_value
    lock_screen_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        password_quality:
          type: string
          enum:
            - NONE
            - ALPHABETIC
            - NUMERIC
            - ALPHANUMERIC
            - COMPLEX
            - BIOMETRIC_WEAK
        minimum_password_length:
          type: integer
          nullable: true
        allow_keyguard:
          type: boolean
      required:
        - apply_policy
        - password_quality
        - allow_keyguard
    brightness_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        brightness_value:
          type: string
    screen_orientation_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        orientation_type:
          type: string
          enum:
            - PORTRAIT
            - LANDSCAPE
            - INVERTED PORTRAIT
            - INVERTED LANDSCAPE
            - AUTO
    screenshot_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_screenshot:
          type: boolean
    notification_bar_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_notification_bar:
          type: boolean
    wallpaper_settings:
      type: object
      properties:
        homescreen:
          type: object
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            portrait:
              type: object
              properties:
                wallpaper_id:
                  type: string
            landscape:
              type: object
              properties:
                wallpaper_id:
                  type: string
        lockscreen:
          type: object
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            portrait:
              type: object
              properties:
                wallpaper_id:
                  type: string
    esper_settings_apps_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_dock:
          type: boolean
        admin_mode_password:
          type: string
        allow_esper_settings_app:
          type: boolean
        settings:
          type: object
          properties:
            flashlight:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            wifi:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            auto_rotation:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            reboot:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            clear_app_data:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            kiosk_app_selection:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            esper_branding:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            factory_reset:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            about:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            display:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            sound:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            keyboard:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            input_selection:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            accessibility:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            accessibility_reset_to_default:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            accessibility_high_contrast_text:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            accessibility_cc_deuteranomaly:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            accessibility_cc_protanomaly:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            accessibility_cc_tritanomaly:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            accessibility_mono_audio:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            accessibility_display_size:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            accessibility_font_scale:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            accessibility_talkback:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            accessibility_text_to_speech:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            mobile_data:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            bluetooth:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            language:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            time_and_date:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            storage:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            data_roaming:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            wifi_tethering:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
            airplane_mode:
              type: string
              enum:
                - NONE
                - USER
                - ADMIN
                - BOTH
      required:
        - dock_accessibitly_settings
        - admin_mode_password_settings
        - settings
    android_settings_app_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_android_settings_app:
          type: boolean
      required:
        - allow_android_settings_app
    customized_device_level_json_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        customized_json:
          type: object
      required:
        - customized_json
    google_services_settings:
      type: object
      properties:
        afw_account_settings:
          type: object
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            allow_afw_account_addition:
              type: boolean
          required:
            - apply_policy
            - allow_afw_account_addition
        personal_accounts_settings:
          type: object
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            personal_accounts_limit_value:
              type: integer
          required:
            - apply_policy
            - personal_accounts_limit_value
        play_store_settings:
          type: object
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            allow_playstore:
              type: boolean
          required:
            - apply_policy
            - allow_playstore
        google_assitant_settings:
          type: object
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            allow_google_assistant:
              type: boolean
          required:
            - apply_policy
            - allow_google_assistant
        factory_reset_protection_settings:
          type: object
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            google_id:
              type: string
            email:
              type: string
          required:
            - apply_policy
            - google_id
            - email
      required:
        - afw_account_settings
        - personal_accounts_settings
        - play_store_settings
        - google_assitant_settings
        - factory_reset_protection_settings
    external_device_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_external_device_mount:
          type: boolean
    usb_tethering_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_usb_tethering:
          type: boolean
    file_transfer_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_file_transfer:
          type: boolean
    camera_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_camera_access:
          type: boolean
    location_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_location:
          type: boolean
    sound_settings:
      type: object
      properties:
        alarm_settings:
          type: object
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            alarm_volume:
              type: integer
        music_settings:
          type: object
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            music_volume:
              type: integer
        ringtone_settings:
          type: object
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            ringtone_volume:
              type: integer
        notification_settings:
          type: object
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            notification_volume:
              type: integer
        voice_call_settings:
          type: object
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            voice_call_volume:
              type: integer
    system_updates_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        system_update_policy_type:
          type: string
          enum:
            - UPDATE AUTOMATICALLY
            - POSTPONE INSTALLATION
            - WINDOWED INSTALLATION
            - DISABLE UPDATE
            - DEFAULT UPDATE
        maintenance_start:
          type: string
        maintenance_end:
          type: string
    time_date_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_edit_time_date:
          type: boolean
    timezone_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        timezone:
          type: string
    language_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        device_locale:
          type: string
    strict_wifi_synchronization_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_strict_wifi_synchronization:
          type: boolean
    strict_app_synchronization_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_strict_app_synchronization:
          type: boolean
    app:
      type: object
      properties:
        app_id:
          type: string
        app_version_id:
          type: string
        package_name:
          type: string
        installation_rule:
          type: string
          enum:
            - POST PROVISIONING
            - DURING PROVISIONING
        state:
          type: string
          enum:
            - SHOW
            - HIDE
            - DISABLE
            - LAUNCHABLE_BUT_HIDDEN
        managed_config:
          type: object
        type:
          type: string
          enum:
            - PRELOADED
            - ENTERPRISE
            - PLAYSTORE
        auto_update_mode:
          type: string
          enum:
            - autoUpdateDefault
            - autoUpdateHighPriority
            - autoUpdatePostponed
      required:
        - app_id
        - app_version_id
        - package_name
        - installation_rule
        - state
        - type
        - auto_update_mode
    apps:
      type: array
      items:
        $ref: '#/components/schemas/app'
    file:
      type: object
      properties:
        file_id:
          type: string
        destination_path:
          type: string
      required:
        - file_id
        - destination_path
        - tags
    files:
      type: array
      items:
        $ref: '#/components/schemas/file'
    wifi_network:
      type: object
      properties:
        wifi_network_id:
          type: string
        certificate_file_path:
          type: string
          example: /storage/emulated/0/Documents
        certificate_file_password:
          type: string
          example: abc
      required:
        - wifi_network_id
    wifi_networks:
      type: array
      items:
        $ref: '#/components/schemas/wifi_network'
    saved_ap_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        use_only_saved_ap:
          type: boolean
      required:
        - apply_policy
        - use_only_saved_ap
    mac_address_randomization_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_mac_address_randomization:
          type: boolean
    esper_edgebox_settings:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_esper_edgebox:
          type: boolean
    app_layout_setting:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        brand_logo_position:
          type: string
          enum:
            - BOTTOM_LEFT
            - BOTTOM_RIGHT
            - TOP_LEFT
            - TOP_RIGHT
        device_name_position:
          type: string
          enum:
            - BOTTOM_LEFT
            - BOTTOM_RIGHT
            - TOP_LEFT
            - TOP_RIGHT
        app_icon_size:
          type: string
          enum:
            - SMALL_ICON
            - MEDIUM_ICON
            - LARGE_ICON
            - DEFAULT_ICON
            - CUSTOM_ICON
        app_name_size:
          type: string
          enum:
            - SMALL_TEXT
            - MEDIUM_TEXT
            - LARGE_TEXT
            - DEFAULT_TEXT
            - CUSTOM_TEXT
        device_name_and_id_display_policy:
          type: string
          enum:
            - NONE
            - DEFAULT
            - DEVICE_ID_ONLY
            - ALIAS_NAME_ONLY
            - DEVICE_ID_AND_ALIAS_NAME
        device_name_size:
          type: string
          enum:
            - SMALL_TEXT
            - MEDIUM_TEXT
            - LARGE_TEXT
            - DEFAULT_TEXT
            - CUSTOM_TEXT
        device_alias_size:
          type: string
          enum:
            - SMALL_TEXT
            - MEDIUM_TEXT
            - LARGE_TEXT
            - DEFAULT_TEXT
            - CUSTOM_TEXT
        custom_app_icon_size:
          type: integer
          minimum: 20
          maximum: 100
        custom_device_name_size:
          type: integer
          minimum: 20
          maximum: 100
        custom_device_alias_size:
          type: integer
          minimum: 20
          maximum: 100
        custom_app_name_size:
          type: integer
          minimum: 20
          maximum: 100
    app_icon:
      type: object
      properties:
        type:
          type: string
          enum:
            - SINGLE_APP
        name:
          type: string
    app_order_setting:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        app_order_list:
          type: array
          items:
            $ref: '#/components/schemas/app_icon'
    settings:
      type: object
      properties:
        device_mode_settings:
          $ref: '#/components/schemas/device_mode_settings'
        launcher_settings:
          $ref: '#/components/schemas/launcher_settings'
        local_app_install_settings:
          $ref: '#/components/schemas/local_app_install_settings'
        app_uninstall_settings:
          $ref: '#/components/schemas/app_uninstall_settings'
        app_permission_policy_settings:
          $ref: '#/components/schemas/app_permission_policy_settings'
        wifi_settings:
          $ref: '#/components/schemas/wifi_settings'
        bluetooth_settings:
          $ref: '#/components/schemas/bluetooth_settings'
        sms_settings:
          $ref: '#/components/schemas/sms_settings'
        nfc_settings:
          $ref: '#/components/schemas/nfc_settings'
        incoming_numbers_settings:
          $ref: '#/components/schemas/incoming_numbers_settings'
        outgoing_numbers_settings:
          $ref: '#/components/schemas/outgoing_numbers_settings'
        ethernet_settings:
          $ref: '#/components/schemas/ethernet_settings'
        adb_settings:
          $ref: '#/components/schemas/adb_settings'
        safe_boot_settings:
          $ref: '#/components/schemas/safe_boot_settings'
        factory_reset_settings:
          $ref: '#/components/schemas/factory_reset_settings'
        screen_timeout_settings:
          $ref: '#/components/schemas/screen_timeout_settings'
        lock_screen_settings:
          $ref: '#/components/schemas/lock_screen_settings'
        brightness_settings:
          $ref: '#/components/schemas/brightness_settings'
        screen_orientation_settings:
          $ref: '#/components/schemas/screen_orientation_settings'
        screenshot_settings:
          $ref: '#/components/schemas/screenshot_settings'
        notification_bar_settings:
          $ref: '#/components/schemas/notification_bar_settings'
        wallpaper_settings:
          $ref: '#/components/schemas/wallpaper_settings'
        esper_settings_apps_settings:
          $ref: '#/components/schemas/esper_settings_apps_settings'
        android_settings_app_settings:
          $ref: '#/components/schemas/android_settings_app_settings'
        customized_device_level_json_settings:
          $ref: '#/components/schemas/customized_device_level_json_settings'
        google_services_settings:
          $ref: '#/components/schemas/google_services_settings'
        external_device_settings:
          $ref: '#/components/schemas/external_device_settings'
        usb_tethering_settings:
          $ref: '#/components/schemas/usb_tethering_settings'
        file_transfer_settings:
          $ref: '#/components/schemas/file_transfer_settings'
        camera_settings:
          $ref: '#/components/schemas/camera_settings'
        location_settings:
          $ref: '#/components/schemas/location_settings'
        sound_settings:
          $ref: '#/components/schemas/sound_settings'
        system_updates_settings:
          $ref: '#/components/schemas/system_updates_settings'
        time_date_settings:
          $ref: '#/components/schemas/time_date_settings'
        timezone_settings:
          $ref: '#/components/schemas/timezone_settings'
        language_settings:
          $ref: '#/components/schemas/language_settings'
        strict_wifi_synchronization_settings:
          $ref: '#/components/schemas/strict_wifi_synchronization_settings'
        strict_app_synchronization_settings:
          $ref: '#/components/schemas/strict_app_synchronization_settings'
        apps:
          $ref: '#/components/schemas/apps'
        files:
          $ref: '#/components/schemas/files'
        wifi_networks:
          $ref: '#/components/schemas/wifi_networks'
        saved_ap_settings:
          $ref: '#/components/schemas/saved_ap_settings'
        mac_address_randomization_settings:
          $ref: '#/components/schemas/mac_address_randomization_settings'
        esper_edgebox_settings:
          $ref: '#/components/schemas/esper_edgebox_settings'
        app_layout_setting:
          $ref: '#/components/schemas/app_layout_setting'
        app_order_setting:
          $ref: '#/components/schemas/app_order_setting'
    kiosk_mode_settings:
      type: object
      properties:
        app_id:
          type: string
        app_type:
          type: string
          enum:
            - VPP
            - TENANT_IOS
            - ESPER_IOS
            - WEBCLIP
            - PRELOADED
    local_app_install_settings_ios:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_local_app_install:
          type: boolean
          default: true
      required:
        - apply_policy
        - allow_local_app_install
    app_uninstall_settings_ios:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_app_uninstallation:
          type: boolean
          default: true
      required:
        - apply_policy
        - allow_app_uninstallation
    bluetooth_settings_ios:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        edit_bluetooth:
          type: boolean
          default: true
      required:
        - apply_policy
        - edit_bluetooth
    nfc_settings_ios:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_nfc:
          type: boolean
          default: true
      required:
        - apply_policy
        - allow_nfc
    factory_reset_settings_ios:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_factory_reset:
          type: boolean
          default: true
      required:
        - apply_policy
        - allow_factory_reset
    screenshot_settings_ios:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_screenshot:
          type: boolean
          default: true
    custom_device_level_profile_settings_ios:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        custom_profile:
          type: string
          nullable: true
      required:
        - customized_profile
    siri_settings_ios:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_siri:
          type: boolean
          default: true
      required:
        - apply_policy
        - allow_siri
    tethering_settings_ios:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        edit_hotspot:
          type: boolean
          default: true
    camera_settings_ios:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_camera_access:
          type: boolean
          default: true
    hide_preloaded_apps_settings_ios:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        hide_preloaded_apps:
          type: boolean
          default: true
    time_date_settings_ios:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        force_automatic_time_date:
          type: boolean
          default: false
    wifi_network_ios:
      type: object
      properties:
        wifi_network_id:
          type: string
      required:
        - wifi_network_id
    wifi_networks_ios:
      type: array
      items:
        $ref: '#/components/schemas/wifi_network_ios'
    ios_app:
      type: object
      properties:
        app_id:
          type: string
        app_version_id:
          type: string
        state:
          type: string
          enum:
            - SHOW
        app_type:
          type: string
          enum:
            - VPP
            - TENANT_IOS
            - ESPER_IOS
            - WEBCLIP
            - PRELOADED
        base64_app_config:
          type: string
      required:
        - app_id
        - app_version_id
        - state
        - app_type
    ios_apps:
      type: array
      items:
        $ref: '#/components/schemas/ios_app'
    provisioning_profile_ios:
      type: object
      properties:
        profile_id:
          type: string
          format: uuid
        profile_version_id:
          type: string
          format: uuid
      required:
        - profile_id
        - profile_version_id
    provisioning_profiles_ios:
      type: array
      items:
        $ref: '#/components/schemas/provisioning_profile_ios'
    ios_wallpaper_settings:
      type: object
      properties:
        homescreen:
          type: object
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            portrait:
              type: object
              properties:
                wallpaper_id:
                  type: string
        lockscreen:
          type: object
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            portrait:
              type: object
              properties:
                wallpaper_id:
                  type: string
    web_content_setting_ios:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        url_blocklist:
          type: array
          items:
            type: string
        url_allowlist:
          type: array
          items:
            type: string
    defer_os_updates:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        defer_os_updates_delay:
          type: integer
          minimum: 0
          maximum: 90
    iosSettings:
      type: object
      properties:
        kiosk_app:
          $ref: '#/components/schemas/kiosk_mode_settings'
        device_mode_settings:
          $ref: '#/components/schemas/device_mode_settings'
        local_app_install_settings:
          $ref: '#/components/schemas/local_app_install_settings_ios'
        app_uninstall_settings:
          $ref: '#/components/schemas/app_uninstall_settings_ios'
        bluetooth_settings:
          $ref: '#/components/schemas/bluetooth_settings_ios'
        nfc_settings:
          $ref: '#/components/schemas/nfc_settings_ios'
        factory_reset_settings:
          $ref: '#/components/schemas/factory_reset_settings_ios'
        screenshot_settings:
          $ref: '#/components/schemas/screenshot_settings_ios'
        custom_device_level_profile_settings:
          $ref: '#/components/schemas/custom_device_level_profile_settings_ios'
        siri_settings:
          $ref: '#/components/schemas/siri_settings_ios'
        tethering_settings:
          $ref: '#/components/schemas/tethering_settings_ios'
        camera_settings:
          $ref: '#/components/schemas/camera_settings_ios'
        hide_preloaded_apps_settings:
          $ref: '#/components/schemas/hide_preloaded_apps_settings_ios'
        time_date_settings:
          $ref: '#/components/schemas/time_date_settings_ios'
        wifi_networks:
          $ref: '#/components/schemas/wifi_networks_ios'
        apps:
          $ref: '#/components/schemas/ios_apps'
        provisioning_profiles:
          $ref: '#/components/schemas/provisioning_profiles_ios'
        wallpaper_settings:
          $ref: '#/components/schemas/ios_wallpaper_settings'
        web_content_settings:
          $ref: '#/components/schemas/web_content_setting_ios'
        defer_os_updates:
          $ref: '#/components/schemas/defer_os_updates'
    shellScriptLinux:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        script:
          type: string
          description: The shell script to be executed.
        interpreter:
          type: string
          description: The interpreter to use for the script (e.g., bash).
        alias:
          type: string
          description: A user-friendly name or alias for the script.
        description:
          type: string
          description: A description of what the script does.
      required:
        - apply_policy
        - script
        - interpreter
        - alias
    customShellScriptsMultiple:
      type: object
      properties:
        shell_scripts:
          type: array
          items:
            $ref: '#/components/schemas/shellScriptLinux'
    customActionLinux:
      type: object
      description: >-
        Reference to a custom action to be applied on Linux devices within a
        blueprint.
      properties:
        id:
          type: string
          format: uuid
          description: The UUID of the custom action to apply.
        options_key:
          type: string
          format: uuid
          description: The UUID of the specific option key within the Custom Action to use.
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
      required:
        - id
        - options_key
        - apply_policy
    customActionsMultipleLinux:
      type: object
      description: Collection of custom actions to be applied on Linux devices.
      properties:
        custom_actions:
          type: array
          description: List of custom actions to apply to Linux devices.
          items:
            $ref: '#/components/schemas/customActionLinux'
    linuxFile:
      type: object
      properties:
        file_id:
          type: integer
        destination_path:
          type: string
          example: /tmp
      required:
        - file_id
        - destination_path
    linuxFiles:
      type: array
      items:
        $ref: '#/components/schemas/linuxFile'
    linuxSettings:
      type: object
      description: Configuration settings specific to Linux devices in a blueprint
      properties:
        custom_shell_scripts_multiple:
          $ref: '#/components/schemas/customShellScriptsMultiple'
        custom_actions_multiple:
          $ref: '#/components/schemas/customActionsMultipleLinux'
        files:
          $ref: '#/components/schemas/linuxFiles'
    active_hours_settings_windows:
      type: object
      description: >-
        Windows active hours configuration for controlling update installation
        timing
      properties:
        active_hours_start:
          type: object
          description: Start time for active hours
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            time:
              type: integer
              minimum: 0
              maximum: 23
              default: 8
              description: Start hour in 24-hour format (0-23)
          required:
            - apply_policy
            - time
        active_hours_end:
          type: object
          description: End time for active hours
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            time:
              type: integer
              minimum: 0
              maximum: 23
              default: 17
              description: End hour in 24-hour format (0-23)
          required:
            - apply_policy
            - time
      required:
        - active_hours_start
        - active_hours_end
    windows_app:
      type: object
      properties:
        app_id:
          type: string
        app_version_id:
          type: string
        state:
          type: string
          enum:
            - SHOW
        app_type:
          type: string
          enum:
            - TENANT_WINDOWS
            - ESPER_WINDOWS
        base64_app_config:
          type: string
      required:
        - app_id
        - app_version_id
        - state
        - app_type
    windows_apps:
      type: array
      items:
        $ref: '#/components/schemas/windows_app'
    auto_update_settings_windows:
      type: object
      description: Windows automatic updates configuration
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        auto_update_type:
          type: string
          enum:
            - DEFAULT
            - 'OFF'
          default: DEFAULT
          description: >-
            Type of automatic update behavior - DEFAULT allows system default
            behavior, OFF disables automatic updates
      required:
        - apply_policy
        - auto_update_type
    powerShellScriptWindows:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        script:
          type: string
          description: The PowerShell script to be executed.
        interpreter:
          type: string
          maxLength: 255
          description: The interpreter to use for the script (e.g., powershell).
        alias:
          type: string
          maxLength: 100
          description: A user-friendly name or alias for the script.
        description:
          type: string
          maxLength: 300
          description: A description of what the script does.
      required:
        - apply_policy
        - script
        - interpreter
        - alias
    customShellScriptsMultipleWindows:
      type: object
      properties:
        shell_scripts:
          type: array
          maxItems: 10
          items:
            $ref: '#/components/schemas/powerShellScriptWindows'
    defer_os_updates_windows:
      type: object
      description: >-
        Windows OS updates deferral configuration with separate quality and
        feature update controls
      properties:
        quality_updates:
          type: object
          description: Quality updates deferral settings
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            defer_days:
              type: integer
              minimum: 0
              maximum: 30
              default: 0
              description: Number of days to defer quality updates
          required:
            - apply_policy
            - defer_days
        feature_updates:
          type: object
          description: Feature updates deferral settings
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            defer_days:
              type: integer
              minimum: 0
              maximum: 365
              default: 0
              description: Number of days to defer feature updates
          required:
            - apply_policy
            - defer_days
      required:
        - quality_updates
        - feature_updates
    windows_kiosk_win32_single_app_config:
      type: object
      description: Win32 single-app kiosk configuration. Defaults applied if not provided.
      properties:
        name:
          type: string
          description: Name of the kiosk profile
        desktop_app_path:
          type: string
          description: Absolute path to the kiosk desktop app executable (required)
        auto_launch:
          type: boolean
          default: true
          description: Automatically launch the app
        auto_launch_arguments:
          type: string
          default: ''
          description: Arguments passed to the app on launch
        hide_taskbar:
          type: boolean
          default: true
          description: Hide Windows taskbar
        hide_start_recommended_section:
          type: boolean
          default: true
          description: Hide Recommended section from Start menu
        hide_power_button:
          type: boolean
          default: false
          description: Hide power button in Start menu
    windows_kiosk_settings:
      type: object
      description: >-
        Windows kiosk configuration settings for single-app Win32 assigned
        access.
      properties:
        win32_single_app_config:
          $ref: '#/components/schemas/windows_kiosk_win32_single_app_config'
    pause_os_updates_windows:
      type: object
      description: Windows pause OS updates configuration
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        pause_os_updates:
          type: boolean
          default: false
          description: Whether to pause OS updates
      required:
        - apply_policy
        - pause_os_updates
    unenrollment_settings_windows:
      type: object
      properties:
        apply_policy:
          $ref: '#/components/schemas/apply_policy'
        allow_unenrollment_from_device:
          type: boolean
      required:
        - apply_policy
        - allow_unenrollment_from_device
    windows_wallpaper_settings:
      type: object
      description: >-
        Configuration for Windows desktop wallpaper settings including
        homescreen and lockscreen backgrounds. Uses landscape orientation only.
      properties:
        homescreen:
          type: object
          description: Wallpaper settings for the Windows desktop homescreen
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            landscape:
              type: object
              description: Landscape wallpaper configuration
              properties:
                wallpaper_id:
                  type: string
                  format: uuid
                  nullable: true
                  description: Unique identifier for the wallpaper resource
        lockscreen:
          type: object
          description: Wallpaper settings for the Windows lock screen
          properties:
            apply_policy:
              $ref: '#/components/schemas/apply_policy'
            landscape:
              type: object
              description: Landscape wallpaper configuration
              properties:
                wallpaper_id:
                  type: string
                  format: uuid
                  nullable: true
                  description: Unique identifier for the wallpaper resource
    wifi_network_windows:
      type: object
      properties:
        wifi_network_id:
          type: string
      required:
        - wifi_network_id
    wifi_networks_windows:
      type: array
      items:
        $ref: '#/components/schemas/wifi_network_windows'
    windowsSettings:
      type: object
      properties:
        active_hours_settings:
          $ref: '#/components/schemas/active_hours_settings_windows'
        apps:
          $ref: '#/components/schemas/windows_apps'
        auto_update_settings:
          $ref: '#/components/schemas/auto_update_settings_windows'
        bluetooth_settings:
          $ref: '#/components/schemas/bluetooth_settings'
        camera_settings:
          $ref: '#/components/schemas/camera_settings'
        custom_shell_scripts_multiple:
          $ref: '#/components/schemas/customShellScriptsMultipleWindows'
        device_mode_settings:
          $ref: '#/components/schemas/device_mode_settings'
        defer_os_updates:
          $ref: '#/components/schemas/defer_os_updates_windows'
        factory_reset_settings:
          $ref: '#/components/schemas/factory_reset_settings'
        kiosk_settings:
          $ref: '#/components/schemas/windows_kiosk_settings'
        pause_os_updates:
          $ref: '#/components/schemas/pause_os_updates_windows'
        timezone_settings:
          $ref: '#/components/schemas/timezone_settings'
        unenrollment_settings:
          $ref: '#/components/schemas/unenrollment_settings_windows'
        wallpaper_settings:
          $ref: '#/components/schemas/windows_wallpaper_settings'
        wifi_networks:
          $ref: '#/components/schemas/wifi_networks_windows'
    settingsV2:
      type: object
      properties:
        android:
          $ref: '#/components/schemas/settings'
        ios:
          $ref: '#/components/schemas/iosSettings'
        linux:
          $ref: '#/components/schemas/linuxSettings'
        windows:
          $ref: '#/components/schemas/windowsSettings'
    BlueprintV2:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: Name of the blueprint
        description:
          type: string
          description: Description of the blueprint
        comments:
          type: string
          description: Comments on the blueprint
        version_number:
          type: integer
          readOnly: true
        version_id:
          type: string
          format: uuid
          readOnly: true
        minor_version_number:
          type: integer
          readOnly: true
        publish:
          type: boolean
          readOnly: true
        settings:
          $ref: '#/components/schemas/settingsV2'
        created_by:
          type: string
          description: ID of the user who created the blueprint
          readOnly: true
        updated_by:
          type: string
          description: ID of the user who updated the blueprint
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
    BlueprintV2Put:
      allOf:
        - $ref: '#/components/schemas/BlueprintV2'
        - type: object
          properties:
            publish:
              type: boolean
              description: |
                Field to indicate whether to publish the blueprint
              readOnly: false
    customActionBase:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 50
          description: Custom Action name
        type:
          type: string
          enum:
            - button
            - toggle
            - radio
            - dropdown
          description: The UI component type for this custom action
        state:
          type: string
          enum:
            - draft
            - active
            - inactive
          description: >-
            The current operational state of the custom action. Only active
            custom actions can be deployed to Linux devices.
        position_in_blueprints:
          type: string
          enum:
            - none
            - blueprints_apps_and_configuration
            - blueprints_connectivity
            - blueprints_device_security
            - blueprints_display_and_branding
            - blueprints_esper_settings
            - blueprints_scripts
            - blueprints_files
            - blueprints_platform_services
            - blueprints_hardware_settings
            - blueprints_sound
            - blueprints_system_updates
            - blueprints_time_and_date
          description: The location in the blueprint where the custom action will be added
        position_in_device_settings:
          type: string
          enum:
            - none
            - device_quick_settings
          description: >-
            The location in the device's Quick Actions where the custom action
            will be added
        properties:
          type: object
          description: Object for the description, info_message, and tooltip_message.
      required:
        - name
        - type
        - state
        - position_in_blueprints
        - position_in_device_settings
        - properties
    platformScriptResponse:
      type: object
      properties:
        script_id:
          type: string
          format: uuid
          description: Script identifier stored in external storage
      required:
        - script_id
    options_response:
      type: object
      properties:
        label:
          type: string
          description: Label shown on the UI
        key:
          type: string
          format: uuid
          description: Unique key identifier for the option
        scripts:
          type: object
          description: >-
            Platform-specific script references. Currently only Linux platform
            is supported. Platform key must be lowercase "linux".
          properties:
            linux:
              $ref: '#/components/schemas/platformScriptResponse'
          required:
            - linux
          additionalProperties: false
      required:
        - label
        - key
        - scripts
    CustomActionRead:
      allOf:
        - $ref: '#/components/schemas/customActionBase'
        - type: object
          properties:
            id:
              type: string
              format: uuid
              description: Unique identifier for the custom action
            options:
              type: array
              items:
                $ref: '#/components/schemas/options_response'
              description: List of options for the custom action
            created_at:
              type: string
              format: date-time
              description: When the custom action was created
            updated_at:
              type: string
              format: date-time
              description: When the custom action was last updated
            created_by:
              type: integer
              description: User ID who created the custom action
            updated_by:
              type: integer
              description: User ID who last updated the custom action
          required:
            - id
            - options
            - created_at
            - updated_at
            - created_by
            - updated_by
    platformScriptRequest:
      type: object
      properties:
        script:
          type: string
          description: The script content to be executed on Linux devices
        interpreter:
          type: string
          maxLength: 255
          description: >-
            Interpreter used to run the script. Default is "bash" if not
            specified. Common values include "bash", "sh", "python", "python3"
          default: bash
      required:
        - script
        - interpreter
    optionsRequest:
      type: object
      properties:
        label:
          type: string
          description: Label shown on the UI
        key:
          type: string
          format: uuid
          description: Unique key identifier for the option
        scripts:
          type: object
          description: >-
            Platform-specific scripts. Currently only Linux platform is
            supported. Platform key must be lowercase "linux".
          properties:
            linux:
              $ref: '#/components/schemas/platformScriptRequest'
          required:
            - linux
          additionalProperties: false
      required:
        - label
        - key
        - scripts
    CustomActionCreate:
      allOf:
        - $ref: '#/components/schemas/customActionBase'
        - type: object
          properties:
            options:
              type: array
              items:
                $ref: '#/components/schemas/optionsRequest'
              description: List of options for the custom action
          required:
            - options
    CustomActionUpdate:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 50
          description: Custom action name
        type:
          type: string
          enum:
            - button
            - toggle
            - radio
            - dropdown
          description: The UI component type for this custom action
        state:
          type: string
          enum:
            - draft
            - active
            - inactive
          description: The current operational state of the custom action
        position_in_blueprints:
          type: string
          enum:
            - none
            - blueprints_apps_and_configuration
            - blueprints_connectivity
            - blueprints_device_security
            - blueprints_display_and_branding
            - blueprints_esper_settings
            - blueprints_scripts
            - blueprints_files
            - blueprints_platform_services
            - blueprints_hardware_settings
            - blueprints_sound
            - blueprints_system_updates
            - blueprints_time_and_date
          description: The location in the blueprint where the custom action will be added
        position_in_device_settings:
          type: string
          enum:
            - none
            - device_quick_settings
          description: >-
            The location in the device's Quick Actions where the custom action
            will be added
        properties:
          type: object
          description: >-
            Object for the description, info_message, and tooltip_message.
            Replaces the existing properties.
        options:
          type: array
          items:
            $ref: '#/components/schemas/optionsRequest'
          description: A new list of options to replace the existing ones
      description: Update a custom action. All fields are optional.
    platformScript:
      type: object
      properties:
        script:
          type: string
          description: The script content
        interpreter:
          type: string
          description: Interpreter used to run the script
      required:
        - script
        - interpreter
    Pipeline:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        enterprise_id:
          type: string
          readOnly: true
        name:
          type: string
        description:
          type: string
        is_active:
          type: boolean
        is_valid:
          type: boolean
        is_visible:
          type: boolean
        is_archived:
          type: boolean
        is_default:
          type: boolean
        timeout_seconds:
          type: number
          format: int32
        created_by:
          type: number
          format: int32
        updated_by:
          type: number
          format: int32
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - name
        - created_by
        - updated_by
    Pipeline_POST:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        is_default:
          type: boolean
          default: false
        is_active:
          type: boolean
          default: true
        timeout_seconds:
          type: number
          format: int32
          default: 86400
      required:
        - name
    Error_400_Bad_Data:
      type: object
      properties:
        code:
          type: integer
          format: int32
          default: 400
        message:
          type: string
        content:
          type: object
      required:
        - code
        - message
    Error_401_Unauthorized:
      type: object
      properties:
        code:
          type: integer
          format: int32
          default: 401
        message:
          type: string
        content:
          type: object
      required:
        - code
        - message
    Pipeline_PUT:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        is_active:
          type: boolean
        is_default:
          type: boolean
        timeout_seconds:
          type: number
          format: int32
    Stage:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        enterprise_id:
          type: string
          readOnly: true
        pipeline_id:
          type: string
        description:
          type: string
        name:
          type: string
        timeout_seconds:
          type: number
          format: int32
        created_by:
          type: number
          format: int32
        updated_by:
          type: number
          format: int32
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Stage_POST:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        timeout_seconds:
          type: number
          format: int32
      required:
        - name
    Stage_PUT:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        timeout_seconds:
          type: number
          format: int32
    TargetList:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        pipeline_id:
          type: string
        name:
          type: string
        target_list_type:
          type: string
        created_by:
          type: number
          format: int32
        updated_by:
          type: number
          format: int32
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    StageTargetList_POST:
      type: object
      properties:
        target_list_id:
          type: string
          format: uuid
      required:
        - target_list_id
    OperationList:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        pipeline_id:
          type: string
        stage_id:
          type: string
        name:
          type: string
        description:
          type: string
        created_by:
          type: number
          format: int32
        updated_by:
          type: number
          format: int32
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    OperationList_POST:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        pipeline_id:
          type: string
          format: uuid
      required:
        - name
    TargetList_POST:
      type: object
      properties:
        name:
          type: string
        target_list_type:
          type: string
          enum:
            - DEVICES
            - GROUPS
            - COLLECTIONS
      required:
        - name
        - target_list_type
    Target:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        pipeline_id:
          type: string
          format: uuid
        device_id:
          type: string
          format: uuid
        device_name:
          type: string
        device_alias:
          type: string
        is_active:
          type: boolean
        created_by:
          type: number
          format: int32
        updated_by:
          type: number
          format: int32
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Target_POST:
      type: object
      properties:
        device_id:
          type: string
          format: uuid
        device_alias:
          type: string
        device_name:
          type: string
        is_active:
          type: boolean
      required:
        - device_id
        - device_name
    Target_PUT:
      type: object
      properties:
        device_name:
          type: string
        is_active:
          type: boolean
    Error_500_Internal_Server_Error:
      type: object
      properties:
        code:
          type: integer
          format: int32
          default: 500
        message:
          type: string
        content:
          type: object
      required:
        - code
        - message
    TargetListDeviceGroup:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        device_group_id:
          type: string
        target_list_id:
          type: string
        created_by:
          type: number
          format: int32
        updated_by:
          type: number
          format: int32
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    TargetListDeviceGroups_POST:
      type: object
      properties:
        device_group_id:
          type: string
          format: uuid
          description: UUID of the Device Group
    Device:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: UUID of the Device
        device_name:
          type: string
          description: Name of the device
        serial:
          type: string
          description: Device serial number
        template_name:
          type: string
          description: Device template name
        manufacturer:
          type: string
          description: Manufacturer of the Device
        android_version:
          type: string
          description: Version number of android
        api_level:
          type: string
          description: Device api level
        is_gms:
          type: boolean
          description: Is this a gms device
        is_active:
          type: boolean
        model:
          type: string
          description: Device model number
        alias_name:
          type: string
          description: Device alias
        esper_client:
          type: string
    Operation:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        operation_list_id:
          type: string
        pipeline_id:
          type: string
        operation_type:
          type: string
        args:
          type: string
        created_by:
          type: number
          format: int32
        updated_by:
          type: number
          format: int32
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Operation_POST:
      type: object
      properties:
        args:
          type: object
          description: Arguments for the operation
        operation_type:
          type: string
          enum:
            - LOCK
            - REBOOT
            - SET_NEW_POLICY
            - UPDATE_HEARTBEAT
            - REQUEST_BUGREPORT
            - REQUEST_DPCLOG
            - ADD_TO_WHITELIST
            - REMOVE_FROM_WHITELIST
            - SET_APP_PERMISSION
            - WIPE
            - CAPTURE_SCREENSHOT
            - SET_WIFI_STATE
            - SET_BLUETOOTH_STATE
            - SET_ROTATION_STATE
            - SET_GPS_STATE
            - SET_BRIGHTNESS_SCALE
            - SET_STREAM_VOLUME
            - SET_SCREEN_OFF_TIMEOUT
            - SET_ADB_STATE
            - INITIATE_OFFER
            - INSTALL
            - SIMPLE_INSTALL
            - UNINSTALL
            - REFRESH_APPLIST
            - UPDATE_LATEST_DPC
            - NOTIFY_OTA
            - CLEAR_APP_DATA
            - SET_GEO_FENCE
            - SET_KIOSK_APP
            - SET_DEVICE_LOCKDOWN_STATE
            - SET_TIMEZONE
            - SET_APP_STATE
            - ADD_WIFI_AP
            - REMOVE_WIFI_AP
            - UPDATE_DEVICE_CONFIG
            - INITIATE_CONFERENCE_CALL
            - ADD_OVERRIDE_APN
            - SYNC_CONTENT
            - SET_WALLPAPER
    PipelineRun:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        enterprise_id:
          type: string
          readOnly: true
        run_number:
          type: integer
          format: int32
          readOnly: true
        pipeline_id:
          type: string
        pipeline_name:
          type: string
        status:
          type: string
          enum:
            - pending
            - queued
            - processing
            - running
            - waiting
            - complete
            - success
            - failure
            - cancelled
            - invalid
            - timeout
        status_meta:
          type: object
        created_by:
          type: number
          format: int32
        updated_by:
          type: number
          format: int32
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        started_at:
          type: string
          format: date-time
        ended_at:
          type: string
          format: date-time
    PipelineRun_POST:
      type: object
    PipelineRun_PUT:
      type: object
      properties:
        status:
          type: string
          enum:
            - pending
            - queued
            - processing
            - running
            - waiting
            - complete
            - success
            - failure
            - cancelled
            - invalid
            - timeout
    StageRun:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        enterprise_id:
          type: string
          readOnly: true
        pipeline_id:
          type: string
        pipeline_run_id:
          type: string
        stage_id:
          type: string
        stage_meta:
          type: object
          properties:
            name:
              type: string
            description:
              type: string
            created_by:
              type: number
              format: int32
        status:
          type: string
          enum:
            - pending
            - queued
            - processing
            - running
            - complete
            - success
            - failure
            - cancelled
            - invalid
            - timeout
        created_by:
          type: number
          format: int32
        updated_by:
          type: number
          format: int32
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        started_at:
          type: string
          format: date-time
        ended_at:
          type: string
          format: date-time
    StageRunOperation:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        operation_type:
          type: string
        args:
          type: string
        created_by:
          type: number
          format: int32
        updated_by:
          type: number
          format: int32
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    TargetRun:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        target_id:
          type: string
          format: uuid
        device_id:
          type: string
          format: uuid
        device_alias:
          type: string
          format: uuid
        stage_run_id:
          type: string
          format: uuid
        stage_run_operation_id:
          type: string
          format: uuid
        command_id:
          type: string
        command_status:
          type: string
        command_meta:
          type: object
        status:
          type: string
          enum:
            - pending
            - queued
            - processing
            - dispatched
            - running
            - complete
            - success
            - failure
            - cancelled
            - timeout
            - invalid
        created_by:
          type: number
          format: int32
        updated_by:
          type: number
          format: int32
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        started_at:
          type: string
          format: date-time
        ended_at:
          type: string
          format: date-time
    TargetRun_POST:
      type: object
      properties:
        target_id:
          type: string
          format: uuid
        device_name:
          type: string
        device_alias:
          type: string
      required:
        - target_id
    TargetRun_PUT:
      type: object
      properties:
        status:
          type: string
          enum:
            - pending
            - queued
            - processing
            - dispatched
            - running
            - complete
            - success
            - failure
            - cancelled
            - invalid
        device_name:
          type: string
    CommandResponse:
      type: object
      properties:
        target_run_id:
          type: string
          format: uuid
        operation_id:
          type: string
          format: uuid
        enterprise_id:
          type: string
          format: uuid
        command:
          type: string
        command_type:
          type: string
          default: DEVICE
        device_type:
          type: string
          default: all
        device_id:
          type: string
          format: uuid
        schedule:
          type: string
          default: IMMEDIATE
        args:
          type: object
        request_id:
          type: string
          format: uuid
        request_status:
          type: string
        request_status_reason:
          type: string
    AndroidCommandRequest:
      type: object
    CommandRequest_PUT:
      type: object
      properties:
        request_status:
          type: string
          enum:
            - cancelled
    Error:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        content:
          type: object
      required:
        - code
        - message
    Health:
      type: object
      properties:
        service:
          type: string
        component:
          type: string
        hostname:
          type: string
      required:
        - service
        - component
        - hostname
    DeviceStateEnumAndroid:
      type: integer
      format: int32
      description: >
        The following are the device states and their descriptions:

        ```

        * 0 = Device State is Unspecified

        * 1 = Online

        * 20 = Disabled (device has been factory reset or removed from the Esper
        Dashboard)

        * 30 = Beginning Provisioning

        * 40 = Configuring Google Play (still provisioning)

        * 50 = Applying Policies and Installing Applications (still
        provisioning)

        * 60 = Offline

        * 70 = Device is undergoing a Factory Reset (reset started from
        Dashboard)

        * 80 = Device Onboarding in Progress

        * 90 = Device Onboarding Failed

        * 100 = Device Onboarded in Esper

        * 110 = Android For Work Account added

        * 120 = Apps installed

        * 130 = Branding Processed

        * 140 = Permission Policy Processed

        * 150 = Device Policy Processed

        * 160 = Device Settings Processed

        * 170 = Security Policy Processed

        * 180 = Phone Policy Processed

        * 190 = Custom Settings Processed

        * 200 = Device is Registered

        ```
      enum:
        - 0
        - 1
        - 20
        - 30
        - 40
        - 50
        - 60
        - 70
        - 80
        - 90
        - 100
        - 110
        - 120
        - 130
        - 140
        - 150
        - 160
        - 170
        - 180
        - 190
        - 200
    HardwareInfo:
      type: object
      properties:
        brand:
          type: string
          description: The brand of the device
        model:
          type: string
          description: The model of the device
        model_number:
          type: string
          description: The model number of the device
        serial:
          type: string
          description: The serial number of the device
        manufacturer:
          type: string
          description: The manufacturer number of the device
        hardware:
          type: string
          description: The hardware information of the device
        device_baseband_version:
          type: string
          description: The device baseband version of the device
    FoundationInfo:
      type: object
      properties:
        major_version:
          type: string
          description: The foundation OS build major version of the device
        minor_version:
          type: string
          description: The foundation OS build minor version of the device
        build_number:
          type: string
          description: The foundation OS build number of the device
        project_name:
          type: string
          description: The foundation project name of the device
        build_flavor:
          type: string
          description: The foundation OS build flavor of the device
        variant:
          type: string
          description: The foundation variant of the device
        foundation_device_model_id:
          type: string
          description: The foundation device model id of the device
    AirwaveInfo:
      type: object
      properties:
        build_number:
          type: integer
          description: The airwave OS build number of the device
        tenant_model_id:
          type: string
          description: The airwave tenant model id of the device
        build_id:
          type: string
          description: The airwave build id of the device
        esper_ota_manager_version_code:
          type: integer
          description: The Esper OTA Manager version code
        esper_ota_manager_version_name:
          type: string
          description: The Esper OTA Manager version name
    SoftwareInfo:
      type: object
      properties:
        os_version:
          type: string
          description: The OS version number of the device
        os_build_number:
          type: string
          description: The OS build number of the device
        bootloader_version:
          type: string
          description: The bootloader version of the device
        security_path_level:
          type: string
          description: The security path level of the device
        device_kernel_version:
          type: string
          description: The kernel version of the device
        eea_version:
          type: string
          description: EEA (Esper Enterprise Android) version
        esper_agent_info:
          type: object
          properties:
            version_code:
              type: string
              description: Esper agent version code
            version_name:
              type: string
              description: Esper agent version name
        foundation_info:
          $ref: '#/components/schemas/FoundationInfo'
        airwave_info:
          $ref: '#/components/schemas/AirwaveInfo'
    NetworkInfo:
      type: object
      properties:
        imei1:
          type: string
          description: The IMEI number of the device
        imei2:
          type: string
          description: The IMEI number of the device
        wifi_mac_address:
          type: string
          description: The wifi mac address of the device
        ethernet_mac_address:
          type: string
          description: The ethernet mac address of the device
        iccid1:
          type: string
          description: The ICCID number of the device
        iccid2:
          type: string
          description: The ICCID number of the device
        phone_number_1:
          type: string
          description: The phone number of the device
        phone_number_2:
          type: string
          description: The phone number of the device
        network_type:
          type: string
          description: The network type of the device
          enum:
            - CELLULAR
            - ETHERNET
            - WI-FI
            - OTHER
    MemoryInfo:
      type: object
      properties:
        total_ram:
          type: string
          description: Total ram capacity for the device
        total_internal_storage:
          type: string
          description: The total internal storage capacity of the device
        units:
          type: string
          description: The units used for the storage capacity
        internal_storage_binary_prefix:
          type: string
          description: (Specific to Android devices)
    NetworkStats:
      type: object
      properties:
        current_active_connection:
          type: string
          description: The current active connection type
        wifi_network_info:
          type: object
          properties:
            wifi_ssid:
              type: string
              description: The SSID of the WiFi network
        cellular_network_info:
          type: object
          properties:
            network_type:
              type: string
              description: The network type of the cellular network - null, 2G, 3G, 4G LTE
    LocationStats:
      type: object
      properties:
        altitude:
          type: string
          description: The altitude value
        latitude:
          type: string
          description: The latitude value
        longitude:
          type: string
          description: The longitude value
    BlueprintInfo:
      type: object
      properties:
        assigned_blueprint_id:
          type: string
          description: Assigned blueprint id of the device
        current_blueprint_id:
          type: string
          description: Current blueprint id of the blueprint assigned to the device
        current_blueprint_version_id:
          type: string
          description: Current Version id of the blueprint assigned to the device
        blueprint_upgrade_status:
          type: string
          description: The status of the blueprint upgrade on the device
          enum:
            - UPGRADABLE
            - UPGRADE_INITIATED
            - UPGRADE_FAILED
            - UPGRADED
            - NOT_UPGRADABLE
            - NOT_APPLICABLE
    AndroidDevice:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: Esper generated name for the device
        alias:
          type: string
          description: Alias/alternate name for the device
        os:
          type: string
          description: Operating system for the device
          enum:
            - Android
        state:
          $ref: '#/components/schemas/DeviceStateEnumAndroid'
        platform:
          type: string
          description: Platform for the device
          enum:
            - ANDROID
        serial:
          type: string
          description: Serial number the device
        os_version:
          type: string
          description: OS version the device
        global_device_id:
          type: string
          description: Esper generated unique id for the device
        tenant_id:
          type: string
          format: uuid
          readOnly: true
        group_id:
          type: string
          format: uuid
          readOnly: true
        onboarded_on:
          type: string
          format: date-time
        provisioned_on:
          type: string
          format: date-time
        hardware_info:
          $ref: '#/components/schemas/HardwareInfo'
        software_info:
          $ref: '#/components/schemas/SoftwareInfo'
        network_info:
          $ref: '#/components/schemas/NetworkInfo'
        memory_info:
          $ref: '#/components/schemas/MemoryInfo'
        network_stats:
          $ref: '#/components/schemas/NetworkStats'
        'location_stats:':
          $ref: '#/components/schemas/LocationStats'
        blueprint_info:
          $ref: '#/components/schemas/BlueprintInfo'
        battery_stats:
          type: object
          properties:
            battery_level:
              type: number
              description: Current battey level of the device
        mqtt_topic:
          type: string
          description: MQTT topic
        fcm_id:
          type: string
        is_gms:
          type: boolean
        policy:
          nullable: true
          description: Policy associated with the device
          type: object
          properties:
            policy_id:
              type: integer
            policy_name:
              type: string
        managed_by:
          type: string
          description: Whether the device is managed by blueprint or template
          enum:
            - BLUEPRINT
            - TEMPLATE
        template_name:
          nullable: true
          type: string
          description: Name of the template the device is managed by
        is_seamless:
          type: boolean
        is_esper_managed:
          type: boolean
          nullable: true
          readOnly: true
          description: Indicates if the device is Esper managed
        created_by:
          type: string
        updated_by:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    DeviceStateEnumApple:
      type: integer
      format: int32
      description: >
        The following are the device states and their descriptions:

        ```

        * 0 = Device State is Unspecified

        * 1 = Online/Active

        * 20 = Disabled (device has been factory reset or removed from the Esper
        Dashboard)

        * 70 = Device is undergoing a Factory Reset (reset started from
        Dashboard)

        * 80 = Device Onboarding in Progress

        * 90 = Device Onboarding Failed

        * 100 = Device Onboarded in Esper

        * 200 = Device is Registered

        ```
      enum:
        - 0
        - 1
        - 20
        - 70
        - 80
        - 90
        - 100
        - 200
    AppleDevice:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: Esper generated name for the device
        alias:
          type: string
          description: Alias/alternate name for the device
        os:
          type: string
          description: Operating system for the device
          enum:
            - iOS
            - iPadOS
        state:
          $ref: '#/components/schemas/DeviceStateEnumApple'
        platform:
          type: string
          description: Platform for the device
          enum:
            - APPLE
        serial:
          type: string
          description: Serial number the device
        os_version:
          type: string
          description: OS version the device
        global_device_id:
          type: string
          description: Esper generated unique id for the device
        tenant_id:
          type: string
          format: uuid
          readOnly: true
        group_id:
          type: string
          format: uuid
          readOnly: true
        hardware_info:
          $ref: '#/components/schemas/HardwareInfo'
        software_info:
          $ref: '#/components/schemas/SoftwareInfo'
        network_info:
          $ref: '#/components/schemas/NetworkInfo'
        memory_info:
          $ref: '#/components/schemas/MemoryInfo'
        blueprint_info:
          $ref: '#/components/schemas/BlueprintInfo'
        udid:
          type: string
          description: UDID as provided by apple
        dep_profile:
          type: string
          description: DEP profile applied to device
        dep_profile_push_time:
          type: string
          format: date-time
        dep_profile_assign_time:
          type: string
          format: date-time
        dep_profile_status:
          type: string
          description: DEP profile applied to device
          enum:
            - empty
            - assigned
            - pushed
            - removed
        enrolment_info:
          type: object
          properties:
            enrolment_id:
              type: string
              description: The per-enrollment identifier for the device
            enrolment_user_id:
              type: string
              description: The per-enrollment identifier for the user
        last_seen:
          type: string
          format: date-time
        tokens:
          type: object
          properties:
            push_magic:
              type: string
            push_token:
              type: string
            device_token:
              type: string
        device_source:
          type: string
          description: Source of device onboarding
          enum:
            - ABM
            - NON_ABM
        is_supervised:
          type: boolean
        managed_by:
          type: string
          description: Whether the device is managed by blueprint or template
          enum:
            - BLUEPRINT
        onboarded_on:
          type: string
          format: date-time
        provisioned_on:
          type: string
          format: date-time
        is_seamless:
          type: boolean
        created_by:
          type: string
        updated_by:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    DeviceStateEnumLinux:
      type: integer
      format: int32
      description: >
        The following are the device states and their descriptions:

        ```

        * 0 = Device State is Unspecified

        * 1 = Online/Active

        * 20 = Disabled (device has been factory reset or removed from the Esper
        Dashboard)

        * 70 = Device Wipe in Progress

        * 80 = Device Onboarding in Progress

        * 90 = Device Onboarding Failed

        * 100 = Device Onboarded in Esper

        * 200 = Device is Registered

        ```
      enum:
        - 0
        - 1
        - 20
        - 70
        - 80
        - 90
        - 100
        - 200
    LinuxBlueprintInfo:
      type: object
      properties:
        assigned_blueprint_id:
          type: string
          description: Assigned blueprint id of the device
        current_blueprint_id:
          type: string
          description: Current blueprint id of the blueprint assigned to the device
        current_blueprint_version_id:
          type: string
          description: Current Version id of the blueprint assigned to the device
        blueprint_upgrade_status:
          type: string
          description: The status of the blueprint upgrade on the device
          enum:
            - NOT_APPLICABLE
    LinuxDevice:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: Esper generated name for the device
        os:
          type: string
          description: Operating system for the device
          enum:
            - Ubuntu
        state:
          $ref: '#/components/schemas/DeviceStateEnumLinux'
        platform:
          type: string
          description: Operating system for the device
          enum:
            - LINUX
        serial:
          type: string
          description: Serial number the device
        os_version:
          type: string
          description: OS version the device
        global_device_id:
          type: string
          description: Esper generated unique id for the device
        tenant_id:
          type: string
          format: uuid
          readOnly: true
        group_id:
          type: string
          format: uuid
          readOnly: true
        onboarded_on:
          type: string
          format: date-time
        provisioned_on:
          type: string
          format: date-time
        blueprint_info:
          $ref: '#/components/schemas/LinuxBlueprintInfo'
        managed_by:
          type: string
          description: Whether the device is managed by blueprint or template
          enum:
            - BLUEPRINT
        is_seamless:
          type: boolean
        created_by:
          type: string
        updated_by:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    DeviceStateEnumWindows:
      type: integer
      format: int32
      description: >
        The following are the device states and their descriptions:

        ```

        * 0 = Device State is Unspecified

        * 1 = Online/Active

        * 20 = Disabled (device has been factory reset or removed from the Esper
        Dashboard)

        * 70 = Device Wipe in Progress

        * 80 = Device Onboarding in Progress

        * 90 = Device Onboarding Failed

        * 100 = Device Onboarded in Esper

        * 200 = Device is Registered

        ```
      enum:
        - 0
        - 1
        - 20
        - 70
        - 80
        - 90
        - 100
        - 200
    WindowsDevice:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: Esper generated name for the device
        os:
          type: string
          description: Operating system of the device
          enum:
            - Windows
        state:
          $ref: '#/components/schemas/DeviceStateEnumWindows'
        platform:
          type: string
          description: Operating system of the device
          enum:
            - WINDOWS
        serial:
          type: string
          description: Serial number of the device
        os_version:
          type: string
          description: OS version of the device
        global_device_id:
          type: string
          description: Windows generated unique id for the device
        tenant_id:
          type: string
          format: uuid
          readOnly: true
        group_id:
          type: string
          format: uuid
          readOnly: true
        onboarded_on:
          type: string
          format: date-time
        provisioned_on:
          type: string
          format: date-time
        blueprint_info:
          $ref: '#/components/schemas/BlueprintInfo'
        managed_by:
          type: string
          description: Whether the device is managed by blueprint or template
          enum:
            - BLUEPRINT
        is_seamless:
          type: boolean
        windows_config:
          type: object
          properties:
            channel_uri:
              type: string
              description: Channel URI for the device
            channel_updated_at:
              type: string
              format: date-time
              description: Last updated time of the channel URI
        created_by:
          type: string
        updated_by:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error_404_Not_Found:
      type: object
      properties:
        code:
          type: integer
          format: int32
          default: 404
        message:
          type: string
        content:
          type: object
      required:
        - code
        - message
    DeviceSettings:
      type: object
      properties:
        gps_state:
          type: string
          description: GPS state of the device
          enum:
            - LOCATION_MODE_HIGH_ACCURACY
            - LOCATION_MODE_SENSORS_ONLY
            - LOCATION_MODE_BATTERY_SAVING
            - LOCATION_MODE_OFF
            - LOCATION_MODE_ON
        wifi_state:
          type: boolean
          description: WiFi state of the device
        adb_enabled:
          type: boolean
          description: ADB state of the device
        adb_timeout:
          type: integer
          description: ADB timeout value for the device
        remote_adb_enabled:
          type: boolean
          description: Remote ADB state for the device
        remote_adb_ip:
          type: string
          description: Remote ADB IP for the device
        remote_adb_port:
          type: integer
          description: Remote ADB port for the device
        audio_settings:
          type: object
          description: Different Audio types and respective values
        rotation_state:
          type: string
          description: Display rotation of the device
          enum:
            - AUTO
            - PORTRAIT_ONLY
            - LANDSCAPE_ONLY
            - INVERTED_PORTRAIT_ONLY
            - INVERTED_LANDSCAPE_ONLY
        bluetooth_state:
          type: boolean
          description: Bluetooth state of device
        brightness_scale:
          type: integer
          description: Brightess value for the device it will be in range 0 to 100
        screen_off_timeout:
          type: integer
          description: Device screen off timeout
        use_only_saved_ap:
          type: boolean
          description: Whether device is allowed to connect to only saved Wifi APs
    NetworkStatsV2:
      type: object
      properties:
        current_active_connection:
          type: string
          description: The current active connection type
        wifi_network_info:
          type: object
          properties:
            wifi_ssid:
              type: string
              description: The SSID of the WiFi network
            wifi_signal_strength:
              type: integer
              description: The signal strength of the WiFi network on a scale of 0 to 5
        cellular_network_info:
          type: object
          properties:
            network_type:
              type: string
              description: The network type of the cellular network - null, 2G, 3G, 4G LTE
        ip_address:
          type: array
          items:
            type: string
          description: The IP address of the device
    MemoryStats:
      type: object
      properties:
        available_ram:
          type: integer
          description: The available memory value
        available_internal_storage:
          type: integer
          description: The available internal storage value
        os_occupied_storage:
          type: integer
          description: The OS occupied storage value
    AndroidDeviceV2:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: Esper generated name for the device
        alias:
          type: string
          description: Alias/alternate name for the device
        os:
          type: string
          description: Operating system for the device
          enum:
            - Android
        state:
          $ref: '#/components/schemas/DeviceStateEnumAndroid'
        platform:
          type: string
          description: Platform for the device
          enum:
            - ANDROID
        serial:
          type: string
          description: Serial number the device
        os_version:
          type: string
          description: OS version the device
        global_device_id:
          type: string
          description: Esper generated unique id for the device
        tenant_id:
          type: string
          format: uuid
          readOnly: true
        group_id:
          type: string
          format: uuid
          readOnly: true
        provisioned_on:
          type: string
          format: date-time
        tags:
          type: array
          items:
            type: string
            format: uuid
          description: Array of UUIDs representing tags associated with the device
        hardware_info:
          $ref: '#/components/schemas/HardwareInfo'
        software_info:
          $ref: '#/components/schemas/SoftwareInfo'
        network_info:
          $ref: '#/components/schemas/NetworkInfo'
        memory_info:
          $ref: '#/components/schemas/MemoryInfo'
        network_stats:
          $ref: '#/components/schemas/NetworkStatsV2'
        location_stats:
          $ref: '#/components/schemas/LocationStats'
        memory_stats:
          $ref: '#/components/schemas/MemoryStats'
        blueprint_info:
          $ref: '#/components/schemas/BlueprintInfo'
        battery_stats:
          type: object
          properties:
            battery_level:
              type: number
              description: Current battey level of the device
        mqtt_topic:
          type: string
          description: MQTT topic
        fcm_id:
          type: string
        is_gms:
          type: boolean
        dpc_version:
          nullable: true
          type: string
          description: DPC (Device Policy Controller) version / Esper agent version name
        eea_version:
          nullable: true
          type: string
          description: EEA (Esper Enterprise Android) version
        policy:
          nullable: true
          description: Policy associated with the device
          type: object
          properties:
            policy_id:
              type: integer
            policy_name:
              type: string
        managed_by:
          type: string
          description: Whether the device is managed by blueprint or template
          enum:
            - BLUEPRINT
            - TEMPLATE
        provisioned_with:
          type: string
          description: Whether the device was provisioned with blueprint or template
          enum:
            - BLUEPRINT
            - TEMPLATE
        template_name:
          nullable: true
          type: string
          description: Name of the template the device is managed by
        is_seamless:
          type: boolean
        is_esper_managed:
          type: boolean
          nullable: true
          readOnly: true
          description: Indicates if the device is Esper managed
        created_by:
          type: string
        updated_by:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    AppleDeviceV2:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: Esper generated name for the device
        alias:
          type: string
          description: Alias/alternate name for the device
        os:
          type: string
          description: Operating system for the device
          enum:
            - iOS
            - iPadOS
        state:
          $ref: '#/components/schemas/DeviceStateEnumApple'
        platform:
          type: string
          description: Platform for the device
          enum:
            - APPLE
        serial:
          type: string
          description: Serial number the device
        os_version:
          type: string
          description: OS version the device
        global_device_id:
          type: string
          description: Esper generated unique id for the device
        tenant_id:
          type: string
          format: uuid
          readOnly: true
        group_id:
          type: string
          format: uuid
          readOnly: true
        tags:
          type: array
          items:
            type: string
            format: uuid
          description: Array of UUIDs representing tags associated with the device
        hardware_info:
          $ref: '#/components/schemas/HardwareInfo'
        software_info:
          $ref: '#/components/schemas/SoftwareInfo'
        network_info:
          $ref: '#/components/schemas/NetworkInfo'
        memory_info:
          $ref: '#/components/schemas/MemoryInfo'
        blueprint_info:
          $ref: '#/components/schemas/BlueprintInfo'
        udid:
          type: string
          description: UDID as provided by apple
        dep_profile:
          type: string
          description: DEP profile applied to device
        dep_profile_push_time:
          type: string
          format: date-time
        dep_profile_assign_time:
          type: string
          format: date-time
        dep_profile_status:
          type: string
          description: DEP profile applied to device
          enum:
            - empty
            - assigned
            - pushed
            - removed
        enrolment_info:
          type: object
          properties:
            enrolment_id:
              type: string
              description: The per-enrollment identifier for the device
            enrolment_user_id:
              type: string
              description: The per-enrollment identifier for the user
        last_seen:
          type: string
          format: date-time
        tokens:
          type: object
          properties:
            push_magic:
              type: string
            push_token:
              type: string
            device_token:
              type: string
        is_supervised:
          type: boolean
        device_source:
          type: string
          description: Source of device onboarding
          enum:
            - ABM
            - NON_ABM
        managed_by:
          type: string
          description: Whether the device is managed by blueprint or template
          enum:
            - BLUEPRINT
        provisioned_with:
          type: string
          description: Whether the device was provisioned with blueprint or template
          enum:
            - BLUEPRINT
        provisioned_on:
          type: string
          format: date-time
        is_seamless:
          type: boolean
        is_locked_down:
          type: boolean
        created_by:
          type: string
        updated_by:
          type: string
        created_at:
          type: string
          format: date-time
        memory_stats:
          type: object
          properties:
            total_memory:
              type: integer
              format: int64
              description: Total memory in bytes
            total_internal_storage:
              type: integer
              format: int64
              description: Total internal storage in bytes
            available_ram:
              type: integer
              format: int64
              description: Available RAM in bytes
            available_internal_storage:
              type: integer
              format: int64
              description: Available internal storage in bytes
        battery_stats:
          type: object
          properties:
            battery_level:
              type: number
              description: Current battery level of the device
        updated_at:
          type: string
          format: date-time
    LinuxDeviceV2:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: Esper generated name for the device
        alias:
          type: string
          description: Alias/alternate name for the device
        os:
          type: string
          description: Operating system for the device
          enum:
            - ubuntu
            - Ubuntu
            - Linux
        state:
          $ref: '#/components/schemas/DeviceStateEnumLinux'
        platform:
          type: string
          description: Platform for the device
          enum:
            - LINUX
        serial:
          type: string
          description: Serial number the device
        os_version:
          type: string
          description: OS version the device
        global_device_id:
          type: string
          description: Esper generated unique id for the device
        tenant_id:
          type: string
          format: uuid
          readOnly: true
        group_id:
          type: string
          format: uuid
          readOnly: true
        provisioned_on:
          type: string
          format: date-time
        tags:
          type: array
          items:
            type: string
            format: uuid
          description: Array of UUIDs representing tags associated with the device
        hardware_info:
          type: object
          properties:
            brand:
              type: string
              description: Device brand
            model:
              type: string
              description: Device model
            serial:
              type: string
              description: Device serial number
            manufacturer:
              type: string
              description: Device manufacturer
            hardware:
              type: string
              description: Hardware information
        software_info:
          type: object
          properties:
            supported_abi:
              type: string
              description: Supported ABI
            os_build_time:
              type: integer
              format: int64
              description: OS build time timestamp
            os_build_number:
              type: string
              description: OS build number
            os_version:
              type: string
              description: OS version
            os:
              type: string
              description: OS name
            os_platform:
              type: string
              description: OS platform
            os_distribution:
              type: string
              description: OS distribution
            bootloader_version:
              type: string
              description: Bootloader version
            kernel_architecture:
              type: string
              description: Kernel architecture
            device_kernel_version:
              type: string
              description: Device kernel version
            last_boot_time:
              type: string
              description: Last boot time
            display_resolution:
              type: string
              description: Display resolution
            display_refresh_rate:
              type: string
              description: Display refresh rate
            esper_agent_info:
              type: object
              properties:
                version_code:
                  type: string
                  description: Esper agent version code
                version_name:
                  type: string
                  description: Esper agent version name
        network_info:
          type: object
          properties:
            wifi_mac_address:
              type: string
              description: Wi-Fi MAC address
            ethernet_mac_address:
              type: string
              description: Ethernet MAC address
        memory_info:
          type: object
          properties:
            total_ram:
              type: string
              description: Total RAM in bytes
            total_internal_storage:
              type: string
              description: Total internal storage in bytes
            total_swap_memory:
              type: string
              description: Total swap memory in bytes
            units:
              type: string
              description: Units used for the storage capacity
        network_stats:
          type: object
          properties:
            dns_servers:
              type: array
              items:
                type: string
              description: DNS servers
            default_gateway:
              type: string
              description: Default gateway
            ethernet_ip_address:
              type: string
              description: Ethernet IP address
            current_active_connection:
              type: string
              description: The current active connection type
            wifi_network_info:
              type: object
              properties:
                wifi_ssid:
                  type: string
                  description: The SSID of the WiFi network
                wifi_signal_strength:
                  type: integer
                  description: The signal strength of the WiFi network
                wifi_ip_address:
                  type: string
                  description: The IP address of the WiFi network
            ip_address:
              type: array
              items:
                type: string
              description: The IP address of the device
        memory_stats:
          type: object
          properties:
            total_memory:
              type: integer
              format: int64
              description: Total memory in bytes
            total_internal_storage:
              type: integer
              format: int64
              description: Total internal storage in bytes
            total_swap_memory:
              type: integer
              format: int64
              description: Total swap memory in bytes
            available_ram:
              type: integer
              format: int64
              description: The available memory value
            available_internal_storage:
              type: integer
              format: int64
              description: The available internal storage value
            available_swap_memory:
              type: integer
              format: int64
              description: The available swap memory value
            units:
              type: string
              description: The units used for the storage capacity
        cpu_stats:
          type: object
          properties:
            cpu_counts:
              type: integer
              description: Number of CPU cores
            cpu_cores:
              type: array
              items:
                type: number
                format: float
              description: CPU core usage percentages
            cpu_temperature:
              type: number
              format: float
              description: CPU temperature
            total_percent:
              type: number
              format: float
              description: Total CPU usage percentage
        battery_stats:
          type: object
          properties:
            battery_present:
              type: boolean
              description: Whether battery is present
            battery_state:
              type: string
              description: Battery state
            battery_energy:
              type: number
              format: float
              description: Battery energy
            battery_energy_full:
              type: number
              format: float
              description: Battery full energy
            battery_energy_full_design:
              type: number
              format: float
              description: Battery design full energy
            battery_level:
              type: number
              format: int32
              description: Battery level
            battery_technology:
              type: string
              description: Battery technology
            battery_voltage:
              type: number
              format: float
              description: Battery voltage
            battery_health:
              type: number
              format: float
              description: Battery health percentage
            battery_temperature:
              type: number
              format: float
              description: Battery temperature
        location_stats:
          type: object
          properties:
            latitude:
              type: number
              format: float
              description: Device latitude
            longitude:
              type: number
              format: float
              description: Device longitude
            altitude:
              type: number
              format: float
              description: Device altitude
            accuracy:
              type: number
              format: float
              description: Location accuracy
        blueprint_info:
          $ref: '#/components/schemas/LinuxBlueprintInfo'
        managed_by:
          type: string
          description: Whether the device is managed by blueprint or template
          enum:
            - BLUEPRINT
        provisioned_with:
          type: string
          description: Whether the device was provisioned with blueprint or template
          enum:
            - BLUEPRINT
        is_seamless:
          type: boolean
        last_seen:
          type: string
          format: date-time
        created_by:
          type: string
        updated_by:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    WindowsBlueprintInfo:
      type: object
      properties:
        assigned_blueprint_id:
          type: string
          description: Assigned blueprint id of the device
        current_blueprint_id:
          type: string
          description: Current blueprint id of the blueprint assigned to the device
        current_blueprint_version_id:
          type: string
          description: Current Version id of the blueprint assigned to the device
        blueprint_upgrade_status:
          type: string
          description: The status of the blueprint upgrade on the device
          enum:
            - NOT_APPLICABLE
    WindowsDeviceV2:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: Esper generated name for the device
        alias:
          type: string
          description: Alias/alternate name for the device
        os:
          type: string
          description: Operating system for the device
          enum:
            - Windows
        state:
          $ref: '#/components/schemas/DeviceStateEnumWindows'
        platform:
          type: string
          description: Platform for the device
          enum:
            - WINDOWS
        serial:
          type: string
          description: Serial number the device
        os_version:
          type: string
          description: OS version the device
        global_device_id:
          type: string
          description: Windows generated unique id for the device
        tenant_id:
          type: string
          format: uuid
          readOnly: true
        group_id:
          type: string
          format: uuid
          readOnly: true
        provisioned_on:
          type: string
          format: date-time
        tags:
          type: array
          items:
            type: string
            format: uuid
          description: Array of UUIDs representing tags associated with the device
        hardware_info:
          type: object
          properties:
            brand:
              type: string
              description: Device brand
            model:
              type: string
              description: Device model
            serial:
              type: string
              description: Device serial number
            manufacturer:
              type: string
              description: Device manufacturer
            hardware:
              type: string
              description: Hardware information
        software_info:
          type: object
          properties:
            os_build_number:
              type: string
              description: OS build number
            os_version:
              type: string
              description: OS version
            os:
              type: string
              description: OS name
            bootloader_version:
              type: string
              description: Bootloader version
            kernel_architecture:
              type: string
              description: Kernel architecture
            device_kernel_version:
              type: string
              description: Device kernel version
            esper_agent_info:
              type: object
              properties:
                version_code:
                  type: string
                  description: Esper agent version code
                version_name:
                  type: string
                  description: Esper agent version name
        network_info:
          type: object
          properties:
            wifi_mac_address:
              type: string
              description: Wi-Fi MAC address
            ethernet_mac_address:
              type: string
              description: Ethernet MAC address
        memory_info:
          type: object
          properties:
            total_ram:
              type: string
              description: Total RAM in bytes
            total_internal_storage:
              type: string
              description: Total internal storage in bytes
            units:
              type: string
              description: Units used for the storage capacity
        network_stats:
          type: object
          properties:
            dns_servers:
              type: array
              items:
                type: string
              description: DNS servers
            default_gateway:
              type: string
              description: Default gateway
            ethernet_ip_address:
              type: string
              description: Ethernet IP address
            current_active_connection:
              type: string
              description: The current active connection type
            wifi_network_info:
              type: object
              properties:
                wifi_ssid:
                  type: string
                  description: The SSID of the WiFi network
                wifi_signal_strength:
                  type: integer
                  description: The signal strength of the WiFi network
                wifi_ip_address:
                  type: string
                  description: The IP address of the WiFi network
            ip_address:
              type: array
              items:
                type: string
              description: The IP address of the device
        memory_stats:
          type: object
          properties:
            total_memory:
              type: integer
              format: int64
              description: Total memory in bytes
            total_internal_storage:
              type: integer
              format: int64
              description: Total internal storage in bytes
            available_ram:
              type: integer
              format: int64
              description: The available memory value
            available_internal_storage:
              type: integer
              format: int64
              description: The available internal storage value
            units:
              type: string
              description: The units used for the storage capacity
        cpu_stats:
          type: object
          properties:
            cpu_counts:
              type: integer
              description: Number of CPU cores
            cpu_cores:
              type: array
              items:
                type: number
                format: float
              description: CPU core usage percentages
            cpu_temperature:
              type: number
              format: float
              description: CPU temperature
        last_seen:
          type: string
          format: date-time
          description: Last time the device was seen
        blueprint_info:
          $ref: '#/components/schemas/WindowsBlueprintInfo'
        battery_stats:
          type: object
          properties:
            battery_level:
              type: number
              description: Current battery level of the device
        provisioned_with:
          type: string
          description: Whether the device was provisioned with blueprint or template
          enum:
            - BLUEPRINT
        is_seamless:
          type: boolean
        windows_config:
          type: object
          properties:
            channel_uri:
              type: string
              description: Channel URI for the device
            channel_updated_at:
              type: string
              format: date-time
              description: Last updated time of the channel URI
        created_by:
          type: string
        updated_by:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    EsperDeviceHeartbeat:
      type: object
      properties:
        device_id:
          type: string
          description: UUID of the device
          format: uuid
        timestamp:
          type: string
          description: Last seen time stamp of the device
          format: date-time
        status:
          type: integer
          description: >-
            Legacy field representing whether the device was last seen in the
            last 30 minutes (returns 1) or not (returns 0). 
          enum:
            - 0
            - 1
    DeviceLastSeen:
      type: object
      properties:
        count:
          type: integer
        prev:
          type: string
        next:
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/EsperDeviceHeartbeat'
    DeviceAppsResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        device_id:
          type: string
          format: uuid
        app_id:
          type: string
          format: uuid
        app_type:
          type: string
          enum:
            - TENANT_IOS
            - ESPER_IOS
            - ESPER_WINDOWS
            - TENANT_WINDOWS
        app_version_id:
          type: string
          format: uuid
        base64_app_config:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        tenant_id:
          type: string
          format: uuid
    AutoInstallConstraint:
      type: object
      properties:
        charging_state_constraint:
          type: string
          description: Constraint on the device's charging state for installation.
        device_idle_state_constraint:
          type: string
          description: Constraint on the device's idle state for installation.
        network_type_constraint:
          type: string
          description: Network type required for installation.
    AutoInstallPolicy:
      type: object
      properties:
        auto_install_constraint:
          type: array
          items:
            $ref: '#/components/schemas/AutoInstallConstraint'
          description: Constraints for auto-installing the product.
        auto_install_mode:
          type: string
          description: Mode for auto-installation.
        auto_install_priority:
          type: integer
          description: Priority of the auto-installation.
    VariableSet:
      type: object
      properties:
        placeholder:
          type: string
          description: Placeholder key for configuration variable.
          example: $emailaddress$
        user_value:
          type: string
          description: User-provided value for the placeholder.
          example: user@example.com
    ManagedConfiguration:
      type: object
      properties:
        configuration_variables:
          type: object
          description: Variables used for managed configurations.
          properties:
            mcm_id:
              type: string
              description: MCM ID required for configuration management.
              example: '00982462290877382272'
            variable_set:
              type: array
              description: Set of configuration variables and their values.
              items:
                $ref: '#/components/schemas/VariableSet'
        kind:
          type: string
          description: Type of managed configuration.
          example: androidenterprise#managedConfiguration
    ProductPolicy:
      type: object
      properties:
        auto_update_mode:
          type: string
          description: Mode of auto-updating the product.
        product_id:
          type: string
          description: Unique identifier for the product.
        auto_install_policy:
          $ref: '#/components/schemas/AutoInstallPolicy'
        managed_configuration:
          $ref: '#/components/schemas/ManagedConfiguration'
    Policy:
      type: object
      properties:
        auto_update_policy:
          type: string
          description: Defines the auto-update policy for the device.
        device_report_policy:
          type: string
          description: Policy for device report generation.
        product_availability_policy:
          type: string
          description: Defines the product availability policy.
        product_policy:
          type: array
          items:
            $ref: '#/components/schemas/ProductPolicy'
    GoogleEMMDevice:
      type: object
      properties:
        android_id:
          type: string
          description: Unique identifier for the Android device.
        management_type:
          type: string
          description: The management type of the device (e.g., managedDevice).
        policy:
          $ref: '#/components/schemas/Policy'
    GoogleApplication:
      type: object
      properties:
        product_id:
          type: string
          description: The unique product ID in the format of app:<package_name>.
          example: app:com.android.chrome
        mcm_id:
          type: string
          description: The MCM ID if required for configuration management.
          example: mcm_12345
        app_action:
          type: string
          description: Action to be performed on the app, either 'install' or 'uninstall'.
          enum:
            - install
            - uninstall
          example: install
    GoogleEMMDevicePolicyRequest:
      type: object
      properties:
        applications:
          type: array
          items:
            $ref: '#/components/schemas/GoogleApplication'
    GoogleDevice:
      type: object
      properties:
        androidId:
          type: string
          description: >-
            The Google Play Services Android ID for the device encoded as a
            lowercase hex string. For example, '123456789abcdef0'.
        managementType:
          type: string
          description: >-
            The type of management applied to the device, such as 'enterprise'
            or 'work'.
    DevicesListResponse:
      type: object
      properties:
        device:
          type: array
          items:
            $ref: '#/components/schemas/GoogleDevice'
    GoogleAccount:
      type: object
      properties:
        tenant_id:
          type: string
          format: uuid
          description: The ID of the tenant associated with the Google account.
        google_user_id:
          type: string
          description: The unique identifier for the Google user.
        device_id:
          type: string
          format: uuid
          description: The ID of the device associated with the Google account.
        google_device_id:
          type: string
          description: The unique identifier for the Google device.
        account_identifier:
          type: string
          description: An identifier for the account.
        account_type:
          type: integer
          description: The type of the Google account.
        google_authentication_token:
          type: string
          description: The authentication token for the Google account.
        created_at:
          type: string
          format: date-time
          description: The timestamp when the Google account was created.
        updated_at:
          type: string
          format: date-time
          description: The timestamp when the Google account was last updated.
      required:
        - tenant_id
        - google_user_id
        - device_id
        - account_type
    GoogleAccountUpdateRequestBody:
      type: object
      properties:
        google_device_id:
          type: string
          description: Unique identifier for the Google device.
        google_user_id:
          type: string
          description: Unique identifier for the Google user.
      required:
        - google_device_id
        - google_user_id
    GoogleAccountUpdateResponseBody:
      type: object
      properties:
        device_id:
          type: string
          description: Unique identifier for the device.
        tenant_id:
          type: string
          description: Unique identifier for the tenant.
      required:
        - device_id
        - tenant_id
    Error_409_Conflict:
      type: object
      properties:
        code:
          type: integer
          format: int32
          default: 409
        message:
          type: string
        content:
          type: object
      required:
        - code
        - message
    OperationScheduleArgsTimeTypeEnum:
      type: string
      description: >
        The Time-Type argument, in Schedule args, is to indicate which timezone
        the Command Framework should utilize when scheduling the command.

        Following Schedule Args for Time-Type are supported:


        ```

        * CONSOLE: Use the local timezone of the user creating the schedule.

        * DEVICE: Use the local timezone of the device, to which the command is
        issued, wherever it may be.

        ```
      enum:
        - console
        - device
    ScheduleArgs:
      type: object
      properties:
        start_datetime:
          type: string
          format: date-time
          description: >-
            Start date and time in ISO 8601 format, including timezone (e.g.,
            2024-08-08T14:30:00Z or 2024-08-08T14:30:00+05:30).
        end_datetime:
          type: string
          format: date-time
          description: >-
            End date and time in ISO 8601 format, including timezone (e.g.,
            2024-08-08T15:30:00Z or 2024-08-08T15:30:00+05:30).
        time_type:
          $ref: '#/components/schemas/OperationScheduleArgsTimeTypeEnum'
        window_start_time:
          type: string
          format: date-time
          description: >-
            It is automatically populated by the time field from the request's
            start_datetime and cannot be injected via the API request body.
        window_end_time:
          type: string
          format: date-time
          description: >-
            It is automatically populated by the time field from the request's
            end_datetime and cannot be injected via the API request body.
        days:
          type: array
          items:
            type: integer
    OperationActivity:
      type: array
      items:
        type: object
        properties:
          operation_state:
            type: string
            enum:
              - CREATED
              - QUERY INITIATED
              - QUERY RESOLVED
              - DISPATCHING
              - DISPATCHED
              - PROCESSING
              - SUCCESS
              - FAILURE
          created_at:
            type: string
            format: date-time
    OperationStats:
      type: object
      properties:
        device_operation_statuses_count:
          type: object
          properties:
            resolved_device_count:
              type: integer
            dispatched_device_count:
              type: integer
            dispatch_failed_count:
              type: integer
            failed_device_count:
              type: integer
            success_device_count:
              type: integer
    OperationWithStats:
      type: object
      properties:
        id:
          type: string
          format: uuid
        operation:
          type: string
          description: ''
          enum:
            - CONVERGE
        state:
          type: string
          description: ''
          enum:
            - CREATED
            - RESOLVING
            - RESOLVED
            - DISPATCHING
            - COMPLETED
            - FAILED
        schedule_type:
          type: string
          description: |
            Following Schedule types are supported
            ```
            * IMMEDIATE: Schedule the command to execcute Immediately
            * WINDOW: Schedule the command to execute within the given window
          enum:
            - IMMEDIATE
            - WINDOW
        schedule_args:
          $ref: '#/components/schemas/ScheduleArgs'
        operation_device_query:
          type: object
        arguments:
          type: object
          properties:
            converge_with_provision:
              type: boolean
            sample_key:
              type: string
        reason:
          type: string
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
          format: uuid
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
          format: uuid
        operation_activity:
          $ref: '#/components/schemas/OperationActivity'
        operation_stats:
          $ref: '#/components/schemas/OperationStats'
    Operations_POST:
      type: object
      properties:
        operation_type:
          type: string
          description: ''
          enum:
            - CONVERGE
            - INSTALL
            - UNINSTALL
            - INSTALL_APP
            - UNINSTALL_APP
            - REBOOT
            - LOCK
            - SHUT_DOWN
            - WIPE
            - ADD_EMM_ACCOUNT
            - ADD_OVERRIDE_APN
            - ADD_WIFI_AP
            - REMOVE_WIFI_AP
            - SET_ETHERNET_SETTINGS
            - SET_STATIC_IP
            - USE_ONLY_SAVED_WIFI_AP
            - ADD_TO_WHITELIST
            - REMOVE_FROM_WHITELIST
            - ALLOW_BLUETOOTH
            - ALLOW_CAMERA
            - ALLOW_FACTORY_RESET
            - ALLOW_UNENROLLMENT_FROM_DEVICE
            - DEFER_OS_UPDATES
            - PAUSE_OS_UPDATES
            - SET_OS_UPDATE_POLICY
            - APPLE_APP_UNINSTALL
            - APPLY_APP_CONFIG
            - CLEAR_APP_DATA
            - DIRECT_IOS_APP_INSTALL
            - INSTALL_CERTIFICATE
            - INSTALL_OTA
            - NOTIFY_OTA
            - REFRESH_APPLIST
            - SET_APP_NOTIFICATIONS
            - SET_APP_PERMISSION
            - SET_APP_STATE
            - SET_KIOSK_APP
            - SET_MULTI_APP_MODE
            - SET_NEW_POLICY
            - SIMPLE_INSTALL
            - SYNC_CONTENT
            - UNINSTALL_CERTIFICATE
            - VPP_APP_INSTALL
            - INSTALL_PROFILE
            - INSTALL_PROVISIONING_PROFILE
            - INSTALL_WEBCLIP
            - REMOVE_PROVISIONING_PROFILE
            - UNINSTALL_WEBCLIP
            - LIST_PROVISIONING_PROFILES
            - BEEP_DEVICE
            - CAPTURE_SCREENSHOT
            - INITIATE_CONFERENCE_CALL
            - INITIATE_OFFER
            - NOTIFY_DEVICE
            - NUDGE_DEVICE
            - REQUEST_BUGREPORT
            - REQUEST_DPCLOG
            - DEPLOY_SYSTEM_OTA
            - UPDATE_BLUEPRINT
            - UPDATE_DEVICE_CONFIG
            - UPDATE_OEM_CONFIG
            - CLEAR_PASSCODE
            - RESET_LOCKSCREEN_PASSWORD
            - SET_ADB_STATE
            - SET_DEVICE_LOCKDOWN_STATE
            - DISABLE_LOST_MODE
            - ENABLE_LOST_MODE
            - LOST_MODE_DEVICE_LOCATION
            - PLAY_LOST_MODE_SOUND
            - SET_BLUETOOTH_STATE
            - SET_BRIGHTNESS_SCALE
            - SET_DEVICE_LANGUAGE
            - SET_GEO_FENCE
            - SET_GPS_STATE
            - SET_LOCATION_SERVICE
            - SET_ROTATION_STATE
            - SET_SCREEN_OFF_TIMEOUT
            - SET_STREAM_VOLUME
            - SET_TIMEZONE
            - SET_WALLPAPER
            - SET_WIDGET
            - SET_WIFI_STATE
            - RUN_CSP_PAYLOAD
            - SET_PFN
            - COLLECT_LOGS
            - REMOTE_CONNECTION
            - REMOVE_AGENT
            - REMOVE_DEVICE
            - RUN_CUSTOM_ACTION
            - RUN_SHELL_SCRIPT
            - DECLARATIVE_MANAGEMENT
        schedule_type:
          type: string
          description: |
            Following Schedule types are supported
            ```
            * IMMEDIATE: Schedule the command to execcute Immediately
            * WINDOW: Schedule the command to execute within the given window
          enum:
            - IMMEDIATE
            - WINDOW
        schedule_args:
          $ref: '#/components/schemas/ScheduleArgs'
        operation_device_query:
          type: object
          description: A flexible JSON object to define device properties and filters.
          properties: {}
        arguments:
          type: object
          properties:
            converge_with_provision:
              type: boolean
            sample_key:
              type: string
    DeviceOperationActivity:
      type: object
      properties:
        device_operation_state:
          type: string
          description: The state of the device operation (e.g., queued, processing).
          example: CREATED
        created_at:
          type: string
          format: date-time
          description: The start time of the device operation state.
    DeviceOperationWithStats:
      type: object
      properties:
        id:
          type: string
          format: uuid
        operation_id:
          type: string
          format: uuid
        device_id:
          type: string
          format: uuid
        state:
          type: string
          enum:
            - CREATED
            - INITIATED
            - SUCCEDED
            - FAILED
        reason:
          type: string
          example: ''
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        device_operation_activity:
          type: array
          items:
            $ref: '#/components/schemas/DeviceOperationActivity'
    RemoteViewerSessionsListForTenantResponse:
      type: object
      properties:
        session_id:
          type: string
          format: uuid
        device_id:
          type: string
          format: uuid
        state:
          type: string
          enum:
            - INITIATED
            - ACKNOWLEDGED
            - ACTIVE
            - TERMINATED
            - FAILED
        reason:
          type: string
        video_quality:
          type: string
          enum:
            - STANDARD
            - DATA_SAVER
        duration:
          type: string
          format: duration
          description: >-
            Depicts the time duration (in ISO 8601 duration format) of only a
            valid elapsed session, i.e., sessions that have moved from ACTIVE
            state (where session start-time can be captured) to TERMINATED or
            FAILED state (where the session end-time can be captured).
          example: PT10M30S
        created_by:
          type: string
        updated_by:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        device_name:
          type: string
          description: Name of the device.
        device_alias:
          type: string
          description: Alias of the device (if any).
        device_state:
          $ref: '#/components/schemas/DeviceStateEnumAndroid'
    VPPLicense:
      type: object
      properties:
        app_id:
          type: string
        assigned_count:
          type: integer
        available_count:
          type: integer
        pricing_param:
          type: string
        supported_platforms:
          type: array
          items:
            type: string
        total_count:
          type: integer
    ItunesAppInfoV2:
      type: object
      properties:
        app_id:
          type: string
          format: uuid
          description: App ID in UUID format
        apple_app_id:
          type: string
          description: App ID from Apple
        app_version_id:
          type: string
          format: uuid
          description: current version of the app in UUID format
        apple_app_version:
          type: string
          description: current version of the app
        app_name:
          type: string
          description: name of the app
        icon_url:
          type: string
          description: url of the app's icon
        developer:
          type: string
          description: developer of the app
        itunes_url:
          type: string
          description: URL for the app on the iTunes store
        genres:
          type: array
          items:
            type: string
            description: genre of the app
        device_families:
          type: array
          items:
            type: string
            description: devices the app is compatible with
        bundle_id:
          type: string
          description: bundle ID of the app
        price:
          type: number
          description: price of the app
        app_size:
          type: integer
          description: size of the app
        minimum_os_version:
          type: string
          description: minimum OS version required for the app
        description:
          type: string
          description: description of the app
        last_updated_date:
          type: string
          description: date the app was last updated
        pricing_param:
          type: string
          description: pricing parameter
    TenantAppResponse:
      type: object
      properties:
        id:
          type: string
        platform:
          type: string
          enum:
            - APPLE
            - WINDOWS
        tenant_id:
          type: string
        package_name:
          type: string
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
    AppUploadRequestBody:
      type: object
      properties:
        platform:
          type: string
          enum:
            - APPLE
            - WINDOWS
        file:
          type: string
          format: binary
    TenantAppUploadResponse:
      type: object
      properties:
        id:
          type: string
        version_id:
          type: string
        app_name:
          type: string
        platform:
          type: string
          enum:
            - APPLE
            - WINDOWS
        tenant_id:
          type: string
        package_name:
          type: string
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
    Error_403_Forbidden:
      type: object
      properties:
        code:
          type: integer
          format: int32
          default: 403
        message:
          type: string
        content:
          type: object
      required:
        - code
        - message
    TenantAppVersionResponse:
      type: object
      properties:
        id:
          type: string
        app_id:
          type: string
        app_type:
          type: string
          enum:
            - TENANT_IOS
            - TENANT_WINDOWS
        tenant_id:
          type: string
        app_name:
          type: string
        app_icon_url:
          type: string
        release_notes:
          type: string
        description:
          type: string
        file_size_in_kb:
          type: integer
        device_family:
          type: array
          items:
            type: string
        version_name:
          type: string
        build_number:
          type: string
          description: Build number of the app. Omitted when legacy_format is false.
        version_code:
          type: string
          description: >-
            Version code of the app (same as build_number). Only present when
            legacy_format is false.
        min_sdk_version:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        created_by:
          type: string
        updated_by:
          type: string
    TenantAppVersionDetailResponse:
      allOf:
        - $ref: '#/components/schemas/TenantAppVersionResponse'
        - type: object
          properties:
            app_download_url:
              type: string
              description: >-
                Presigned URL for downloading the app binary. Present for
                TENANT_IOS (IPA) and TENANT_WINDOWS (MSI) app types.
            app_sha256_hash:
              type: string
              description: >-
                SHA256 hash of the app binary. Present for TENANT_IOS and
                TENANT_WINDOWS app types.
            product_code:
              type: string
              description: MSI product code. Present only when app_type is TENANT_WINDOWS.
    AppleAppStoreApp:
      type: object
      properties:
        icon:
          type: string
          format: uri
          description: URL for the app icon
          example: https://icon-url.com
        name:
          type: string
          description: Name of the app
          example: Safari
        bundle_id:
          type: string
          description: Bundle identifier for the app
          example: com.apple.mobilesafari
        file_size_in_bytes:
          type: string
          description: File size of the app in bytes
          example: '100'
        app_store_url:
          type: string
          format: uri
          description: URL to the app store listing
          example: https://apps.apple.com/us/app/
        minimum_os:
          type: string
          description: Minimum OS version required
          example: '10.0'
        release_date:
          type: string
          format: date-time
          description: Release date of the app
          example: '2021-10-25T07:00:00Z'
        seller_name:
          type: string
          description: Name of the seller
          example: Apple Inc.
    AppInfo:
      type: object
      properties:
        app_id:
          type: string
          description: Unique identifier for the app.
        app_version_id:
          type: string
          description: Unique identifier for the app version.
        app_type:
          type: string
          description: Type of the app.
        tenant_id:
          type: string
          description: Identifier for the tenant.
        name:
          type: string
          description: Name of the app to show on console.
        label:
          type: string
          description: Label for the app to show on device.
        icon_url:
          type: string
          format: uri
          description: URL to the app icon.
        package_name:
          type: string
          description: Unique identifier for the app bundle.
        is_removable:
          type: boolean
          description: Indicates if the app can be removed.
        is_full_screen:
          type: boolean
          description: Indicates if the app runs in full-screen mode.
        url:
          type: string
          format: uri
          description: URL to access the app.
        file_size_in_kb:
          type: integer
          description: Size of the app in kilobytes.
        release_notes:
          type: string
          description: Release notes for the app version.
        description:
          type: string
          description: Description of the app.
        build_number:
          type: string
          description: Build number of the app. Omitted when legacy_format is false.
        version_code:
          type: string
          description: >-
            Version code of the app (same as build_number). Only present when
            legacy_format is false.
        version_name:
          type: string
          description: Version name of the app.
        min_sdk_version:
          type: string
          description: Minimum SDK version required to run the app.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the app was created.
        created_by:
          type: string
          description: User who created the app entry.
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the app was last updated.
        updated_by:
          type: string
          description: User who last updated the app entry.
    Webclip:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the web clip
          example: 09811f63-e2ca-4625-97c1-081145195d67
        tenant_id:
          type: string
          format: uuid
          description: Tenant identifier
          example: 7d5fd1bf-bdf9-490b-9e32-203756a61235
        label:
          type: string
          description: Label of the web clip
          example: Google
        url:
          type: string
          format: uri
          description: URL associated with the web clip
          example: https://www.google.com/
        icon_url:
          type: string
          format: uri
          nullable: true
          description: URL for the icon of the web clip
          example: null
        target_bundle_name:
          type: string
          description: Name of the target bundle
          example: Esper
        target_bundle_id:
          type: string
          description: ID of the target bundle
          example: com.esper.io
        is_full_screen:
          type: boolean
          description: Indicates if the web clip is full screen
          example: false
        is_removable:
          type: boolean
          description: Indicates if the web clip is removable
          example: true
        created_at:
          type: string
          format: date-time
          description: Timestamp of when the web clip was created
        updated_at:
          type: string
          format: date-time
          description: Timestamp of when the web clip was last updated
        created_by:
          type: string
          description: The user who created the web clip
        updated_by:
          type: string
          description: The user who last updated the web clip
    WebclipCreateRequest:
      type: object
      properties:
        icon:
          type: string
          format: binary
          description: Icon of the webclip
        label:
          type: string
          description: Label of the web clip which is displayed on device
          example: Example Label
        esper_name:
          type: string
          description: Name of the webclip in Esper
          example: Example Name
        url:
          type: string
          description: URL for the webclip
          example: https://example.com
        target_bundle_id:
          type: string
          description: Target bundle ID for the webclip
          example: com.example.bundle
        target_bundle_name:
          type: string
          description: Target bundle name for the webclip
          example: Example Bundle
        is_full_screen:
          type: boolean
          description: Indicates if the webclip is full screen
          example: true
        is_removable:
          type: boolean
          description: Indicates if the webclip is removable
          example: false
      required:
        - label
        - esper_name
        - url
        - target_bundle_id
        - target_bundle_name
        - is_full_screen
        - is_removable
    ProvisioningProfileUploadResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the provisioning profile
        version_id:
          type: string
          format: uuid
          description: Unique identifier for this specific version of the profile
        name:
          type: string
          description: Display name of the provisioning profile
        team_identifier:
          type: string
          description: Apple Developer Team identifier
        app_identifier:
          type: string
          description: Bundle identifier of the associated app
        profile_type:
          type: string
          description: Type of profile (development, distribution, etc.)
          enum:
            - development
            - ad-hoc
            - app-store
            - enterprise
        expiration_date:
          type: string
          format: date-time
          description: When the provisioning profile expires
        tenant_id:
          type: string
          format: uuid
          description: Tenant that owns this provisioning profile
        created_at:
          type: string
          format: date-time
          description: When the provisioning profile was first created
        updated_at:
          type: string
          format: date-time
          description: When this version was last updated
        created_by:
          type: string
          description: User who created the provisioning profile
        updated_by:
          type: string
          description: User who created this version
    ProvisioningProfileWithDownloadResponse:
      type: object
      allOf:
        - $ref: '#/components/schemas/ProvisioningProfileUploadResponse'
        - type: object
          properties:
            download_url:
              type: string
              format: uri
              description: Signed URL for downloading the provisioning profile file
              example: >-
                https://s3.amazonaws.com/bucket/provisioning-profiles/profile.mobileprovision?signature=abc123
    ProvisioningProfileUploadRequest:
      type: object
      properties:
        file:
          type: string
          format: binary
          description: Provisioning profile file (.mobileprovision)
      required:
        - file
    ProvisioningProfileVersionWithDownloadResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Primary key and unique identifier for this version
        profile_id:
          type: string
          format: uuid
          description: Foreign key reference to the parent ProvisioningProfile
        uuid:
          type: string
          description: Apple's UUID for this specific provisioning profile version
        name:
          type: string
          description: Display name of the provisioning profile version
        sha256_hash:
          type: string
          description: SHA256 hash of the provisioning profile file for duplicate detection
        creation_date:
          type: string
          format: date-time
          description: >-
            When Apple created this provisioning profile (from .mobileprovision
            file)
        expiration_date:
          type: string
          format: date-time
          description: When this provisioning profile expires (from Apple)
        time_to_live:
          type: integer
          description: Days until expiration from creation date
        provisions_all_devices:
          type: boolean
          description: Whether this profile provisions all devices (enterprise profiles)
        is_xcode_managed:
          type: boolean
          description: Whether this profile is managed by Xcode automatically
        platforms:
          type: string
          description: JSON array of supported platforms (iOS, macOS, etc.)
        entitlements:
          type: string
          description: JSON object of app entitlements and capabilities
        developer_certificates:
          type: string
          description: JSON array of developer certificates included in this profile
        tenant_id:
          type: string
          format: uuid
          description: Tenant that owns this provisioning profile version
        created_by:
          type: string
          description: User identifier who uploaded this version
        updated_by:
          type: string
          description: User identifier who last modified this version record
        created_at:
          type: string
          format: date-time
          description: Timestamp when this version record was created in the database
        updated_at:
          type: string
          format: date-time
          description: Timestamp when this version record was last modified
        download_url:
          type: string
          format: uri
          description: Signed URL for downloading the provisioning profile file
          example: >-
            https://s3.amazonaws.com/bucket/provisioning-profiles/version.mobileprovision?signature=abc123
    EsperAppVersionResponse:
      type: object
      properties:
        id:
          type: string
        app_id:
          type: string
        app_type:
          type: string
          enum:
            - TENANT_IOS
            - ESPER_IOS
            - ESPER_ANDROID
            - ESPER_LINUX
            - ESPER_WINDOWS
        app_name:
          type: string
        app_icon_url:
          type: string
        app_download_url:
          type: string
        app_sha256_hash:
          type: string
        signature_hash:
          type: string
          description: >-
            SHA-256 fingerprint of the app's public key in uppercase hexadecimal
            with colon separators (only for Android apps)
        architecture:
          type: string
        release_notes:
          type: string
        description:
          type: string
        file_size_in_kb:
          type: integer
        device_family:
          type: array
          items:
            type: string
        version_name:
          type: string
        build_number:
          type: string
        min_sdk_version:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        created_by:
          type: string
        updated_by:
          type: string
    TenantEsperAppsItem:
      type: object
      properties:
        tenant_id:
          type: string
        app_version_id:
          type: string
        app_id:
          type: string
        package_name:
          type: string
          description: Package name of the app (only shown for Android apps)
        app_sha256_hash:
          type: string
        signature_hash:
          type: string
          description: Signature hash of the app (only shown for Android apps)
        architecture:
          type: string
        app_download_url:
          type: string
        version_code:
          type: string
          description: Version code of the app (only shown for Android apps)
        created_by:
          type: string
        created_at:
          type: string
          format: date-time
    DeviceCommandEnum:
      type: string
      description: >
        Following commands are supported

        ```

        * ADD_TO_WHITELIST: Whitelist an installed sytem app. Requires
        `package_name` in command arguments where `package_name` is the app
        package uploaded on Esper

        * ADD_WIFI_AP : Add wifi access points for device. Requires
        `wifi_access_points` in command arguments where `wifi_access_points` is
        the data with access points

        * APPLY_APP_CONFIG : Apply app configuration for an installed app.

        * CLEAR_APP_DATA : Clear data for an installed app. Requires
        `package_name` in command arguments where `package_name` is the app
        package uploaded on Esper

        * CONVERGE: Converge command for Blueprint

        * INSTALL: Install an app on a device. Requires `app_version` in command
        arguments where `app_version` is the version id of app uploaded on Esper

        * INSTALL_CERTIFICATE: Install a certificate chain in the system
        keystore of an android device. Requires `cert_file_type`,
        `cert_data_base64`, `cert_alias_name` and `cert_storage_type` in command
        arguments where `cert_file_type` must be set to "pkcs12",
        `cert_data_base64` contains the base64 encoded content of the pkcs12
        file, `cert_alias_name` is the alias name with which the certificate
        chain is supposed to be installed and `cert_storage_type` must be set to
        "system". If the pkcs12 file is password protected, the password should
        be specified in the optional parameter `cert_password`.

        * LOCK: Lock device screen, Supports Android, iOS and Windows devices.

        * REBOOT: Reboot a device. Supports Android, iOS, and Windows devices.

        * REMOVE_FROM_WHITELIST : Remove an installed system app from whitelist.
        Requires `package_name` in command arguments where `package_name` is the
        app package uploaded on Esper

        * REMOVE_WIFI_AP : Remove Wifi access points for device. Requires
        `wifi_access_points` in command arguments where `wifi_access_points` is
        the data with access points

        * SET_APP_PERMISSION : Set permission for an installed app. Requires
        `package_name`, `grant_state`, `permission` in command arguments where
        `package_name` is the app package uploaded on Esper, `grant_state`
        should be "PERMISSION_GRANT_STATE_DEFAULT",
        "PERMISSION_GRANT_STATE_DENIED", "PERMISSION_GRANT_STATE_GRANTED" and
        `permission` is a valid permission

        * SET_APP_STATE : Set the state of an app -
        SHOW/HIDE/DISABLE/LAUNCHABLE_BUT_HIDDEN. Requries `app_state` and
        `package_name` in command arguments where `app_state` is the state of
        app and `package_name` is the app package uploaded on Esper For
        LAUNCHABLE_BUT_HIDDEN: Hide an app on the home screen but allow it to be
        launched from other apps. Requires Esper agent 8.5+ and `package_name`. 

        * SET_BLUETOOTH_STATE : Set bluetooth state (ON/OFF) for device.
        Requires `bluetooth_state` in command arguments where `bluetooth_state`
        is a boolean.

        * SET_BRIGHTNESS_SCALE : Set brightness for device. Requires
        `brightness_value` in command arguments where `brightness_value` is an
        integer (1-100).

        * SET_DEVICE_LOCKDOWN_STATE : Set lockdown state for a device. Requires
        `state` and `message` in command arguments where `state` is
        LOCKED/UNLOCKED and `message` is the message to be added with command

        * SET_GPS_STATE :Set the GPS state for a device. Requires `gps_state` in
        command arguments where `gps_state` should be either 0, 1, 2, 3 or 4
        (LOCATION_MODE_HIGH_ACCURACY = 0, LOCATION_MODE_SENSORS_ONLY = 1,
        LOCATION_MODE_BATTERY_SAVING = 2, LOCATION_MODE_OFF = 3,
        LOCATION_MODE_ON = 4)

        * SET_KIOSK_APP : Command to set the Kiosk app for a device. Requires
        `package_name` in command arguments where `package_name` is the app
        package uploaded on Esper


        * SET_MULTI_APP_MODE : Command to set the device back to multi app mode.

        * SET_NEW_POLICY : Apply policy on device. Requires `policy_url` in
        command arguments where `policy_url` is the URL to the policy

        * SET_ROTATION_STATE : Set screen orientation. Requires `rotate_state`
        in command arguments where `rotate_state` should be either 0, 1 or 2 (0
        = AUTO, 1 = PORTRAIT_ONLY, 2 = LANDSCAPE_ONLY)

        * SET_SCREEN_OFF_TIMEOUT: Set screen off timeout for a device. Requires
        `screen_off_timeout` in command arguments where `screen_off_timeout`
        should be either -1 or between 5000 and 1800000

        * SET_STREAM_VOLUME : Set strema volume for a device. Requires `stream`
        and `volume_level` in command arguments where `stream` should be either
        0(Ring), 1(Notification), 2(Alarm) or 3(Music) and `volume_level` should
        be a value from 0 to 100

        * SET_TIMEZONE : Set the timezone for a device. Requires
        `timezone_string` in command arguments where `timezone_string` is a
        valid string representing the timezone

        * SET_WIFI_STATE : Set the wifi state (ON/OFF) for a device. Requires
        `wifi_state` in command arguments where `wifi_state` is a boolean.

        * UNINSTALL: Uninstall an app from device. Requires `package_name` in
        command arguments where `package_name` is the app package uploaded on
        Esper

        * UNINSTALL_CERTIFICATE: Uninstall a certificate from an android
        device's system keystore using the installed certificate's alias name.
        Requires `cert_alias_name` and `cert_storage_type` in command arguments
        where `cert_alias_name` is the alias name of the certificate to be
        uninstalled and `cert_storage_type` must be set to "system"

        * UPDATE_DEVICE_CONFIG: Push additional configurations to the Device

        * UPDATE_HEARTBEAT: Ping a device

        * UPDATE_LATEST_DPC : Prompt device to update the DPC app to the latest
        versions.

        * WIPE : Wipes the device.

        * RESET_LOCKSCREEN_PASSWORD: Change the lockscreen password of the
        device. Requires `new_lockscreen_password` in command arguments where
        `new_lockscreen_password` is a valid string.

        * UPDATE_BLUEPRINT: Pushes or reapplies the most current Blueprint
        version to the device or group.

        * NOTIFY_DEVICE: Allows you to  broadcast message to the device.

        * SET_DEVICE_LANGUAGE: Set language for a device. Requires locale value
        in xx[_Zzzz]_yy where xx is language code, Zzzz is script (optional) and
        yy is country code.

        * SET_ETHERNET_SETTINGS: Set ethernet settings on supported Device

        * SET_STATIC_IP: Set static ip on the deivce. Requires interface,
        dhcp_dnabled, static_ip, primary_dns, subnet_mask, gateway,
        secondary_dns (optional)

        * BEEP_DEVICE: Allows you to make the device beep for a specified
        duration

        * SET_APP_NOTIFICATIONS: Enable/disable app notifications. Requries
        `app_notifications_state` and `package_name` in command arguments where
        `app_notifications_state` is a string that has the value `ENABLED` or
        `DISABLED` and `package_name` is the app package uploaded on Esper.

        * USE_ONLY_SAVED_WIFI_AP: Allow/disallow device to connect to
        unregistered WiFi APs. Requires boolean `use_only_saved_ap`..

        * DEVICE_INFORMATION: Prompt device to update the device information

        * VPP_APP_INSTALL: Install a vpp app on an iOS device. Requires `app_id`
        and `bundle_identifier` in command arguments that corresponds to the
        associate vpp app

        * APPLE_APP_UNINSTALL: Uninstall an app on an iOS device. Requires
        `app_id` and `bundle_identifier` in command arguments that corresponds
        to the associated app

        * CLEAR_PASSCODE: Clear the passcode in a device

        * LIST_INSTALLED_PROFILES: Returns a list of all installed profiles on
        an iOS device.

        * INSTALL_PROFILE: Install a profile on an iOS device.

        * REMOVE_PROFILE: Remove a profile from an iOS device.

        * RUN_SHELL_SCRIPT: Run a shell script on a Linux or Windows device.
        Requires `script` and `interpreter` in command arguments.

        * RUN_CUSTOM_ACTION: Run a custom action (script) on a Linux device.
        Requires custom action parameters in command arguments.

        * COLLECT_LOGS: Collect and upload Esper agent logs from a Linux device.

        ```
      enum:
        - ADD_TO_WHITELIST
        - ADD_WIFI_AP
        - APPLY_APP_CONFIG
        - CLEAR_APP_DATA
        - CONVERGE
        - INSTALL
        - INSTALL_CERTIFICATE
        - LIST_INSTALLED_PROFILES
        - LOCK
        - REBOOT
        - REMOVE_FROM_WHITELIST
        - REMOVE_PROFILE
        - REMOVE_WIFI_AP
        - SET_APP_PERMISSION
        - SET_APP_STATE
        - SET_BLUETOOTH_STATE
        - SET_BRIGHTNESS_SCALE
        - SET_DEVICE_LOCKDOWN_STATE
        - SET_GPS_STATE
        - SET_KIOSK_APP
        - SET_MULTI_APP_MODE
        - SET_NEW_POLICY
        - SET_ROTATION_STATE
        - SET_SCREEN_OFF_TIMEOUT
        - SET_STREAM_VOLUME
        - SET_TIMEZONE
        - SET_WIFI_STATE
        - UNINSTALL
        - UNINSTALL_CERTIFICATE
        - UPDATE_DEVICE_CONFIG
        - UPDATE_HEARTBEAT
        - UPDATE_LATEST_DPC
        - WIPE
        - RESET_LOCKSCREEN_PASSWORD
        - UPDATE_BLUEPRINT
        - NOTIFY_DEVICE
        - SET_DEVICE_LANGUAGE
        - SET_ETHERNET_SETTINGS
        - SET_STATIC_IP
        - BEEP_DEVICE
        - SET_APP_NOTIFICATIONS
        - USE_ONLY_SAVED_WIFI_AP
        - DEVICE_INFORMATION
        - VPP_APP_INSTALL
        - APPLE_APP_UNINSTALL
        - CLEAR_PASSCODE
        - INSTALL_PROFILE
        - RUN_SHELL_SCRIPT
        - RUN_CUSTOM_ACTION
        - COLLECT_LOGS
    CommandArgs:
      title: Command args
      type: object
      properties:
        device_alias_name:
          type: string
          description: Alternate human-readable name for your Device
        custom_settings_config:
          type: object
          properties: {}
          description: Managed configurations for your device (passed as JSON object)
        app_version:
          type: string
          description: The version id of app uploaded on Esper
        package_name:
          type: string
          description: The app package name uploaded on Esper
        policy_url:
          type: string
          description: The URL to the policy
        wifi_access_points:
          type: object
          properties: {}
          description: Wifi access points for the device (passed as JSON object)
        state:
          type: string
          description: LOCKED/UNLOCKED
        message:
          type: string
          description: Message to be added with command to notify device.
        title:
          type: string
          description: Message title  to be added with command to notify device.
        url:
          type: string
          description: (Optional) Link to notify device.
        app_state:
          type: string
          description: The state of app - SHOW/HIDE/DISABLE/LAUNCHABLE_BUT_HIDDEN
        bluetooth_state:
          type: boolean
          description: The state of bluetooth - ON/OFF
        brightness_value:
          type: integer
          description: The brightness value of a device(1-100)
        gps_state:
          type: integer
          description: >-
            The GPS state of a device. Should be either 0, 1, 2, 3 or 4
            (LOCATION_MODE_HIGH_ACCURACY = 0, LOCATION_MODE_SENSORS_ONLY = 1,
            LOCATION_MODE_BATTERY_SAVING = 2, LOCATION_MODE_OFF = 3,
            LOCATION_MODE_ON = 4)
        rotate_state:
          type: integer
          description: >-
            The screen orientation of a device. Should be either 0, 1 or 2 (0 =
            AUTO, 1 = PORTRAIT_ONLY, 2 = LANDSCAPE_ONLY)
        screen_off_timeout:
          type: integer
          description: >-
            The value for screen timeout of a device. Should be either -1 or
            between 5000 and 1800000
        stream:
          type: integer
          description: >-
            The value of the volume stream. Should be either 0(Ring),
            1(Notification), 2(Alarm) or 3(Music)
        volume_level:
          type: integer
          description: The level of volume. Should be a value from 0 to 100
        timezone_string:
          type: integer
          description: The timezone of a device. Should be a valid timezone string
        wifi_state:
          type: boolean
          description: The state of WIFI - ON/OFF
        wifi_revert_timeout:
          type: integer
          description: The WIFI revert timeout. Should be greater than or equal to 1
        locale:
          type: string
          description: >-
            Language and country code in xx[_Zzzz]_yy where xx is language code,
            Zzzz is script (optional) and yy is country code.
        ethernet_auth_mode:
          type: string
          description: Chosen mode of authentication
          enum:
            - NONE
            - EAP_TLS
        ethernet_ca_cert_alias:
          type: string
          description: CA certificate alias. It is mandatory with Auth Mode EAP_TLS
        ethernet_client_cert_alias:
          type: string
          description: Client certificate alias. It is mandatory with Auth Mode EAP_TLS
        ethernet_eap_identity:
          type: string
          description: EAP identity
        interface:
          type: string
          description: The network interface of the device - wlan/eth
        dhcp_enabled:
          type: string
          description: The dhcp state on the device - true/false
        static_ip:
          type: string
          description: The static ip to set on the device. Should be a valid ipv4
        primary_dns:
          type: string
          description: The primary dns to set on the device. Should be a valid ipv4
        subnet_mask:
          type: string
          description: >-
            The subnet mask set on the device. Should between 1-32 both
            inclusive
        secondary_dns:
          type: string
          description: The secondary dns to set on the device. Should be a valid ipv4
        gateway:
          type: string
          description: The gateway to set on the device. Should be a valid ipv4
        duration:
          type: string
          description: >-
            The beep duration specified in seconds. Value must be between 10 and
            300, both inclusive.
        video_quality:
          type: string
          default: HIGH
          description: >-
            The video quality of the respective Remote Viewer session. Options
            are "LOW", "MEDIUM" and "HIGH".
        enable_debug_mode:
          type: boolean
          default: false
          description: >-
            The flag to determine whether device must go into Debug Mode, in
            order to retreive bug report when the device is already in Kiosk
            Mode.
        app_id:
          type: string
          description: The unique identifier for VPP application in Apple’s ecosystem
        bundle_identifier:
          type: string
          description: The unique identifier for an application in Apple’s ecosystem
        managed_only:
          type: boolean
          description: If true, list outs only the profiles that was installed via MDM.
        profile_identifier:
          type: string
          description: The identifier of the profile to remove.
        profile:
          type: string
          description: Base 64 encoded profile plist to be installed on the device.
        is_converge:
          type: boolean
          description: This value indicates that the command belongs to a converge action.
        script:
          type: string
          description: A complete shell script to execute on Linux or Windows devices.
        interpreter:
          type: string
          description: >-
            Type of interpreter to use for executing the script. e.g. For Linux
            use bash, zsh, or sh. For Windows use powershell. This field is
            mandatory.
        execute_as:
          type: string
          description: >-
            User to execute the script as root or Esper (default user) -
            Optional, default is Esper if not specified. Supports Linux devices.
        cert_file_type:
          type: string
          description: Certificate file type. Currently file type of "pkcs12" is supported
        cert_data_base64:
          type: string
          description: Base64 encoded content of the certificate file
        cert_alias_name:
          type: string
          description: >-
            Alias name of the certificate to be used during installation or
            uninstallation
        cert_storage_type:
          type: string
          description: >-
            Refers to the keystore type to be used for certificate installation
            or uninstallation. Currently storage type of "system" is supported
        cert_password:
          type: string
          description: >-
            Provides the password if the pkcs12 file is password protected -
            Optional
        is_factory_reset:
          type: boolean
          description: >-
            If true, performs factory reset and unenrolls the device. If false,
            only unenrolls the device without wiping data. Required for WIPE
            command on Windows devices.
    CommandScheduleEnum:
      type: string
      description: >
        Following Schedule types are supported

        ```

        * IMMEDIATE: Schedule the command to execcute Immediately

        * WINDOW: Schedule the command to execute within the given window

        * RECURRING: Schedule the command to execute during the scheduled time
        until it succeeds or expires. After executing successfully, it will not
        fire again.

        ```
      enum:
        - IMMEDIATE
        - WINDOW
        - RECURRING
    CommandScheduleArgsTimeTypeEnum:
      type: string
      description: >
        The Time-Type argument, in Schedule args, is to indicate which timezone
        the Command Framework should utilize when scheduling the command.

        Following Schedule Args for Time-Type are supported:

        ```

        * CONSOLE: Use the local timezone of the user creating the schedule.

        * DEVICE: Use the local timezone of the device, to which the command is
        issued, wherever it may be.

        ```
      enum:
        - console
        - device
    CommandScheduleArgs:
      title: Command Schedule Arguments
      type: object
      properties:
        name:
          type: string
        start_datetime:
          type: string
          format: date-time
        end_datetime:
          type: string
          format: date-time
        time_type:
          $ref: '#/components/schemas/CommandScheduleArgsTimeTypeEnum'
        window_start_time:
          type: string
        window_end_time:
          type: string
        days:
          type: array
          items:
            type: string
    CommandRequest:
      type: object
      properties:
        id:
          type: string
          description: Unique command request identifier
          format: uuid
          readOnly: true
        command_type:
          type: string
          description: |
            Identifies the type of command

            ```
            * DEVICE: command request is meant for devices
            * GROUP: command request is meant for groups
            * DYNAMIC: command request is meant for dynamic set of devices
              i.e subset of devices from different groups or otherwise.
            ```
          enum:
            - DEVICE
            - GROUP
            - DYNAMIC
        devices:
          maxItems: 1000
          minItems: 0
          type: array
          description: list of devices to run commands
          items:
            type: string
            format: uuid
        groups:
          maxItems: 500
          minItems: 0
          type: array
          description: list of groups to run commands
          items:
            type: string
            format: uuid
        device_type:
          type: string
          description: >-
            Filtering by device_type is not supported currently and applies to
            'all' devices. If 'active' or 'inactive' is specified, it will be
            ignored.
          default: active
          enum:
            - active
            - inactive
            - all
        command:
          $ref: '#/components/schemas/DeviceCommandEnum'
        command_args:
          $ref: '#/components/schemas/CommandArgs'
        schedule:
          $ref: '#/components/schemas/CommandScheduleEnum'
        schedule_args:
          $ref: '#/components/schemas/CommandScheduleArgs'
        reason:
          type: string
          description: >-
            details briefing the reason for current command request processing
            stage
        created_by:
          type: string
          description: user id of the user
          readOnly: true
        created_at:
          type: string
          description: Timestamp of command request
          format: date-time
          readOnly: true
    CommandRequest_POST:
      type: object
      properties:
        command_type:
          type: string
          description: |
            Identifies the type of command

            ```
            * DEVICE: command request is meant for devices
            * GROUP: command request is meant for groups
            * DYNAMIC: command request is meant for dynamic set of devices
              i.e subset of devices from different groups or otherwise.
            ```
          enum:
            - DEVICE
            - GROUP
            - DYNAMIC
        alias:
          type: string
          description: Another name for the command, provided by the user or Console.
        devices:
          maxItems: 1000
          minItems: 0
          type: array
          description: >-
            List of devices to run commands. Required if command_type is
            'DEVICE' or 'DYNAMIC'
          items:
            type: string
            format: uuid
        groups:
          maxItems: 500
          minItems: 0
          type: array
          description: >-
            List of groups to run commands. Required if command_type is 'GROUP'
            or 'DYNAMIC'
          items:
            type: string
            format: uuid
        device_type:
          type: string
          description: >-
            Filtering by device_type is currently not supported. Please specify
            'all'.
          enum:
            - all
        command:
          $ref: '#/components/schemas/DeviceCommandEnum'
        command_args:
          $ref: '#/components/schemas/CommandArgs'
        schedule:
          $ref: '#/components/schemas/CommandScheduleEnum'
        schedule_args:
          $ref: '#/components/schemas/CommandScheduleArgs'
    CommandRequestStats:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        status:
          type: array
          description: List of each command status associated to its count.
          items:
            type: object
            properties:
              state:
                type: string
                description: State of the command
                enum:
                  - Command Queued
                  - Command Initiated
                  - Command Acknowledged
                  - Command In Progress
                  - Command TimeOut
                  - Command Success
                  - Command Failure
                  - Command Scheduled
                  - Command Cancelled
              total:
                type: number
                description: >-
                  Count of the devices that are in the corresponding command
                  state
    CommandStatus:
      type: object
      properties:
        id:
          type: string
          description: Unique command identifier
          format: uuid
          readOnly: true
        request:
          title: Request Id
          type: string
          description: Request Id associated with this command
          format: uuid
          readOnly: true
        device:
          title: Device
          type: string
          description: Device associated with this command
          format: uuid
          readOnly: true
        state:
          type: string
          description: Current state of the command
          enum:
            - Command Queued
            - Command Initiated
            - Command Acknowledged
            - Command In Progress
            - Command TimeOut
            - Command Success
            - Command Failure
            - Command Scheduled
            - Command Cancelled
        reason:
          type: string
          description: details briefing the reason for current command state
        created_at:
          type: string
          description: Timestamp of command creation
          format: date-time
          readOnly: true
        updated_at:
          type: string
          description: Last updated timestamp of command
          format: date-time
          readOnly: true
    CommandStatus_PUT:
      type: object
      properties:
        state:
          type: string
          description: Command state to update
          enum:
            - Command Acknowledged
            - Command In Progress
            - Command TimeOut
            - Command Success
            - Command Failure
            - Command Scheduled
            - Command Cancelled
        reason:
          type: string
          description: State change reason to update
    CommandInbox:
      type: object
      properties:
        id:
          type: string
          description: Unique command identifier
          format: uuid
          readOnly: true
        command:
          type: string
          description: The command to be executed
        command_args:
          type: object
          description: Arguments for the command
          properties:
            script:
              type: string
              description: The script to be executed
        device_meta:
          type: object
          description: Metadata about the device
          properties:
            platform:
              type: string
              description: The platform of the device
        state:
          type: string
          description: Current state of the command
          enum:
            - Command Queued
        created_on:
          type: string
          description: Timestamp of command creation
          format: date-time
          readOnly: true
        updated_on:
          type: string
          description: Last updated timestamp of command
          format: date-time
          readOnly: true
    BlueprintsInfo:
      type: object
      properties:
        blueprint_id:
          type: string
          description: Unique blueprint ID
          format: uuid
        blueprint_version_id:
          type: string
          description: Version ID of blueprint
          format: uuid
    ScheduleEnum:
      type: string
      description: |
        Following Schedule types are supported
        ``` * IMMEDIATE: Schedule the command to execcute Immediately
        * WINDOW: Schedule the command to execute within the given window ```
      enum:
        - IMMEDIATE
        - WINDOW
    Converge:
      type: object
      properties:
        id:
          type: string
          description: Unique converge identifier
          format: uuid
          readOnly: true
        device_id:
          type: string
          description: ID of the device
          format: uuid
        converge_with_provision_option:
          type: boolean
        blueprint_info:
          type: object
          $ref: '#/components/schemas/BlueprintsInfo'
        schedule_type:
          $ref: '#/components/schemas/ScheduleEnum'
        schedule_args:
          type: object
        status:
          type: string
          description: Current aggregrated status of the converge action
          enum:
            - QUEUED
            - PROCESSING
            - IN_PROGRESS
            - SUCCESS
            - FAILURE
        reason:
          type: string
          description: details briefing the reason for current converge status
        created_by:
          type: string
          description: user id of the user
          readOnly: true
        created_at:
          type: string
          description: Creation timestamp of converge
          format: date-time
          readOnly: true
        updated_at:
          type: string
          description: Updation timestamp of converge
          format: date-time
          readOnly: true
    Converge_POST:
      type: object
      properties:
        device_id:
          type: string
          description: ID of the device
          format: uuid
        converge_with_provision_option:
          type: boolean
        schedule_type:
          $ref: '#/components/schemas/ScheduleEnum'
        schedule_args:
          type: object
      required:
        - device_id
        - converge_with_provision_option
    ConvergeCommand:
      type: object
      properties:
        command_request_id:
          type: string
          description: ID of the command request
          format: uuid
        command_state:
          type: string
          description: Current state of the command
          enum:
            - Command Queued
            - Command Initiated
            - Command Acknowledged
            - Command In Progress
            - Command TimeOut
            - Command Success
            - Command Failure
            - Command Scheduled
            - Command Cancelled
        reason:
          type: string
          description: Details briefing the reason for current command state.
        created_at:
          type: string
          description: Creation timestamp of converge command
          format: date-time
          readOnly: true
        updated_at:
          type: string
          description: Updation timestamp of converge command
          format: date-time
          readOnly: true
    SeamlessRequest:
      type: object
      properties:
        id:
          type: string
          format: uuid
        assigned_blueprint_id:
          type: string
          format: uuid
        group_id:
          type: string
          format: uuid
          nullable: true
        unique_ids:
          type: string
        unique_id_type:
          type: integer
        tenant_id:
          type: string
    SeamlessInfo:
      type: object
      properties:
        unique_ids:
          type: string
          example: >-
            3e41fd18-d53d-4673-a10a-23089cbb6b73,3e41fd18-d53d-4673-a10a-23089cbb6b73
        unique_id_type:
          type: integer
          example: 2
    SeamlessRequestBody:
      type: object
      properties:
        assigned_blueprint_id:
          type: string
          format: uuid
          example: 3e41fd18-d53d-4673-a10a-23089cbb6b73
        group_id:
          type: string
          format: uuid
          example: 3e41fd18-d53d-4673-a10a-23089cbb6b73
        seamless_info:
          $ref: '#/components/schemas/SeamlessInfo'
    DEPSyncDeviceStatus:
      type: object
      properties:
        serial:
          type: string
        reason:
          type: string
    DEPSyncRequestForGetResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique DEP sync request identifier
          format: uuid
          readOnly: true
        status:
          type: string
          description: Status of the DEP sync request
          enum:
            - QUEUED
            - INPROGRESS
            - COMPLETE
            - FAILURE
            - SUCCESS
        failure_reason:
          type: string
          description: >-
            Reason for DEP Sync failure. If this field is included in the
            response, a list of devices with which failed to process DEP sync
            will also be returned in the API response.
        devices:
          type: object
          properties:
            failure:
              type: array
              items:
                $ref: '#/components/schemas/DEPSyncDeviceStatus'
        created_by:
          type: string
          description: user id of the user
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    DEPSyncRequest:
      type: object
      properties:
        id:
          type: string
          description: Unique DEP sync request identifier
          format: uuid
          readOnly: true
        status:
          type: string
          description: Status of the DEP sync request
          enum:
            - QUEUED
            - INPROGRESS
            - COMPLETE
            - FAILURE
            - SUCCESS
        created_by:
          type: string
          description: user id of the user
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    APNSCertInfo:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        apple_id:
          type: string
        meta:
          type: object
          properties:
            topic:
              type: string
            cert_created_at:
              type: string
              format: date-time
            cert_expiry_on:
              type: string
              format: date-time
        state:
          type: string
          description: state of APNs certificate upload
          enum:
            - CSR_GENERATED
            - COMPLETED
        created_by:
          type: number
          format: int32
        updated_by:
          type: number
          format: int32
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    APNSCert_PUT:
      type: object
      properties:
        file:
          type: string
          format: binary
        apple_id:
          type: string
      required:
        - file
        - apple_id
    VPPToken:
      type: object
      properties:
        id:
          type: string
          format: uuid
        tenant_id:
          type: string
          maxLength: 64
        key:
          type: string
          maxLength: 256
        meta:
          type: object
        created_by:
          type: string
          maxLength: 64
        updated_by:
          type: string
          maxLength: 64
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - tenant_id
        - created_by
        - updated_by
    DEP_Token_GET:
      type: object
      properties:
        id:
          type: string
          format: UUID
          description: id of DEP token
        token_name:
          type: string
          description: name of DEP Token
        meta:
          type: object
          description: meta information about the DEP token
          properties:
            token_expiry_on:
              type: string
        state:
          type: string
          description: state of DEP token upload
          enum:
            - CSR_GENERATED
            - COMPLETED
        created_by:
          type: string
          description: user id of the user
        updated_by:
          type: string
          description: user id of the user
        created_at:
          type: string
          description: Timestamp of DEP token creation
          readOnly: true
        updated_at:
          type: string
          description: Timestamp of DEP token creation
          readOnly: true
    DEP_Token_POST:
      type: object
    BeginGoogleEMMEnrollmentRequest:
      type: object
      properties:
        callback_url:
          type: string
      required:
        - callback_url
    BeginGoogleEMMEnrollmentResponse:
      type: object
      properties:
        signup_url:
          type: string
        completion_token:
          type: string
    GoogleEnterpriseDetails:
      type: object
      properties:
        id:
          type: integer
        google_enterprise_id:
          type: string
        name:
          type: string
        state:
          type: integer
        callback_url:
          type: string
        signup_url:
          type: string
        completion_token:
          type: string
        enterprise_token:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        tenant_id:
          type: string
    CreateWebTokenRequest:
      type: object
      properties:
        google_enterprise_id:
          type: string
          description: The ID of the Google enterprise. It is required and cannot be empty.
          example: test
          minLength: 1
        parent_url:
          type: string
          description: The parent URL. It must be a valid URL with the https scheme.
          format: uri
          example: https://valid.url
          pattern: ^https://
      required:
        - google_enterprise_id
        - parent_url
    CreateWebTokenResponse:
      type: object
      properties:
        token:
          type: string
          description: The generated token.
          example: test_1245
    GoogleServiceAccountDetails:
      type: object
      properties:
        tenant_id:
          type: string
        google_enterprise_id:
          type: string
        name:
          type: string
        key_id:
          type: string
        type:
          type: integer
        is_set:
          type: boolean
        is_active:
          type: boolean
        data:
          type: string
        public_data:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Build_V1:
      type: object
      properties:
        build_id:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        deprecated_on:
          type: string
          format: date-time
        created_by:
          type: string
        updated_by:
          type: string
        ab_update:
          type: boolean
        android_major_version:
          type: integer
        android_minimum_sdk_level:
          type: integer
        android_minor_version:
          type: string
        android_sdk_level:
          type: integer
        build_arch:
          type: string
        build_flavor:
          type: string
        build_hash:
          type: string
        build_ota_hash:
          type: string
        build_job_url:
          type: string
        build_job_id:
          type: integer
        build_fingerprint_hash:
          type: string
        build_type:
          type: string
        build_url:
          type: string
          format: url
        build_update_meta_data:
          type: string
          format: json
        build_update_url:
          type: string
          format: url
        file_size_kb:
          type: integer
        foundation_build_number:
          type: integer
        foundation_major_number:
          type: integer
        foundation_minor_number:
          type: integer
        foundation_name:
          type: string
        model_display_name:
          type: string
        build_job_params:
          type: string
          format: json
        prebuilt_app_info:
          type: string
          format: json
        release_notes:
          type: string
          format: json
        release_rating:
          type: string
        source_build_id:
          type: string
        build_state:
          type: string
          enum:
            - released
            - to_be_deprecated
            - unavailable
        device_model_id:
          type: string
        approved:
          type: boolean
    Foundry_Build_PUT_Request_V1:
      type: object
      properties:
        approve:
          type: boolean
        user_remarks:
          type: string
    Device_Model_V1:
      type: object
      properties:
        model_display_name:
          type: string
          example: Motorola Edge 20 - T2E20
        manufacturer:
          type: string
          example: Motorola
        model:
          type: string
          example: Edge 20
        profile_name:
          type: string
          example: Tacobell
        profile_variant:
          type: string
          example: T2E20
        update_compatible_android_api_level_begin:
          type: integer
          example: 11
        device_model_id:
          type: string
          format: uuid
          example: eb566c45-f841-41e5-a0af-435e90a96cae
        auto_update:
          type: boolean
          example: false
        latest:
          type: boolean
          example: false
        locked_build_id:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
          example: '2023-12-07T17:14:46.419449+05:30'
        updated_at:
          type: string
          format: date-time
          example: '2023-12-07T17:14:46.419449+05:30'
        created_by:
          type: string
          example: FoundryAdmin
        updated_by:
          type: string
          example: FoundryAdmin
    Device_Model_PUT_Request_V1:
      type: object
      properties:
        auto_update:
          type: boolean
          description: >-
            Enables/disables automatic updates for the device model. The other
            properties (latest and locked_build_id) are processed only if
            autoupdate is set to true.
        latest:
          type: boolean
          description: >-
            Configures Foundry service to automatically lock to the latest
            approved build (whenever available) if set to true.
        locked_build_id:
          type: string
          description: >-
            Specifies the UUID of the build which needs to be locked for
            automatic updates.
    Foundry_Event_V1:
      type: object
      properties:
        stack:
          type: string
        tenant:
          type: string
        enterprise_id:
          type: string
        actor:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
        event_message:
          type: string
        event_type:
          type: string
        resource:
          type: object
          properties:
            id:
              type: string
            type:
              type: string
        meta:
          type: object
          properties:
            user_remarks:
              type: string
            change_type:
              type: string
            device_model:
              type: string
        created_timestamp:
          type: integer
    GetReportTypesResponse:
      type: object
      properties:
        content:
          type: object
          properties:
            report_types:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  display_name:
                    type: string
                  description:
                    type: string
                  last_generated_at:
                    type: string
                  available_from:
                    type: string
    ReportsErrorResponse:
      type: object
      properties:
        status:
          type: integer
        error:
          type: string
        message:
          type: string
    DeviceAppsFilter:
      type: object
      properties:
        date:
          type: string
          format: date
          example: '2024-08-28'
          nullable: true
          description: >-
            Date of report. If provided, this value will override start_time and
            end_time values. Example: "2024-08-28". Must be a date later than
            July 1st, 2024.
        package_name:
          type: array
          nullable: true
          items:
            type: string
          example:
            - com.android.chrome
        app_state:
          type: array
          nullable: true
          items:
            type: string
            enum:
              - SHOW
              - HIDE
              - DISABLE
              - LAUNCHABLE_BUT_HIDDEN
          example:
            - SHOW
        device_os:
          type: array
          nullable: true
          items:
            type: string
            enum:
              - Android
              - iOS
          example:
            - Android
        platform:
          type: array
          nullable: true
          items:
            type: string
            enum:
              - Android
              - Apple
              - Linux
              - Windows
          example:
            - Android
    DeviceFilter:
      type: object
      properties:
        date:
          type: string
          format: date
          example: '2025-03-17'
          nullable: true
          description: >-
            Date of report. If provided, this value will override start_time and
            end_time values. Example: "2025-03-17". Must be a date later than
            May 17th, 2025.
        platform:
          type: array
          nullable: true
          items:
            type: string
            enum:
              - Android
              - Apple
              - Linux
              - Windows
          example:
            - Android
    Report:
      type: object
      properties:
        report_type:
          type: string
          enum:
            - device_apps
            - device
          example: device_apps
        start_time:
          description: >-
            Start time of the report in UTC format. Example:
            "2024-08-28T00:00:00Z". Must be a date and time later than July 1st,
            2024.
          type: string
          format: date-time
          example: '2024-08-28T00:00:00Z'
        end_time:
          description: >-
            End time of the report in UTC format. Example:
            "2024-08-29T00:00:00Z". Must be a date and time later than July 1st,
            2024 and equal to the start_time.
          type: string
          format: date-time
          example: '2024-08-28T00:00:00Z'
        is_download:
          type: boolean
        filters:
          type: object
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/DeviceAppsFilter'
            - $ref: '#/components/schemas/DeviceFilter'
      required:
        - report_type
    CreateReportResponse:
      type: object
      properties:
        content:
          type: object
          properties:
            id:
              type: string
            status:
              type: string
              enum:
                - PENDING
                - RUNNING
                - SUCCEEDED
                - FAILED
                - CANCELED
                - CLOSED
    GetReportResponsePreview:
      type: object
      properties:
        content:
          type: object
          properties:
            id:
              type: string
            status:
              type: string
              enum:
                - PENDING
                - RUNNING
                - SUCCEEDED
                - FAILED
                - CANCELED
                - CLOSED
            schema:
              type: object
              properties:
                column_count:
                  type: integer
                columns:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      position:
                        type: integer
                      type_name:
                        type: string
                      type_text:
                        type: string
            data_array:
              type: array
              items:
                type: array
                items:
                  type: string
    GetReportResponseDownload:
      type: object
      properties:
        content:
          type: object
          properties:
            id:
              type: string
            status:
              type: string
              enum:
                - PENDING
                - RUNNING
                - SUCCEEDED
                - FAILED
                - CANCELED
                - CLOSED
            schema:
              type: object
              properties:
                column_count:
                  type: integer
                columns:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      position:
                        type: integer
                      type_name:
                        type: string
                      type_text:
                        type: string
            external_link:
              type: string
    QueryRequest:
      type: object
      required:
        - query
      properties:
        query:
          type: string
          description: SQL query to execute
          example: SELECT * FROM devices WHERE state = 'PROVISIONED'
        is_download:
          type: boolean
          description: Whether this query is for downloading results
          example: false
        row_limit:
          type: integer
          description: Maximum number of rows to return (ignored for download queries)
          example: 1000
          minimum: 0
        latest_data:
          type: boolean
          description: Whether to fetch the latest data
          example: false
    CreateQueryResponse:
      type: object
      properties:
        content:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: Unique identifier for the query
            tenant_id:
              type: string
              format: uuid
              description: Tenant identifier
            user_id:
              type: string
              format: uuid
              description: User identifier who created the query
            query:
              type: string
              description: The SQL query text
            created_at:
              type: string
              format: date-time
              description: Timestamp when the query was created
            updated_at:
              type: string
              format: date-time
              description: Timestamp when the query was last updated
            is_download:
              type: boolean
              description: Whether this query is for downloading results
            row_limit:
              type: integer
              description: Maximum number of rows to return
              nullable: true
            latest_data:
              type: boolean
              description: Whether to fetch the latest data
            status:
              type: string
              description: Current status of the query
              enum:
                - PENDING
                - RUNNING
                - SUCCEEDED
                - FAILED
                - CANCELED
                - CLOSED
            result:
              type: object
              description: Query results (null for newly created queries)
              nullable: true
    QueryStatusResponse:
      type: object
      properties:
        content:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: Unique identifier for the query
            tenant_id:
              type: string
              format: uuid
              description: Tenant identifier
            user_id:
              type: string
              format: uuid
              description: User identifier who created the query
            query:
              type: string
              description: The SQL query text
            created_at:
              type: string
              format: date-time
              description: Timestamp when the query was created
            updated_at:
              type: string
              format: date-time
              description: Timestamp when the query was last updated
            is_download:
              type: boolean
              description: Whether this query is for downloading results
            row_limit:
              type: integer
              description: Maximum number of rows to return
              nullable: true
            latest_data:
              type: boolean
              description: Whether to fetch the latest data
            status:
              type: string
              description: Current status of the query
              enum:
                - PENDING
                - RUNNING
                - SUCCEEDED
                - FAILED
                - CANCELED
                - CLOSED
            result:
              type: object
              description: Query results with schema and data
              nullable: true
              properties:
                schema:
                  type: object
                  properties:
                    column_count:
                      type: integer
                    columns:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                          position:
                            type: integer
                          type_name:
                            type: string
                          type_text:
                            type: string
                data_array:
                  type: array
                  items:
                    type: array
                    items:
                      type: string
                truncated:
                  type: boolean
                  description: Whether the results were truncated due to size limits
            error_message:
              type: string
              description: Error message if the query failed
              nullable: true
    IngestsListResponse:
      type: object
      properties:
        content:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: Unique identifier for the ingest job
              created_by:
                type: string
                format: uuid
                description: User ID who created the ingest job
              created_at:
                type: string
                format: date-time
                description: Timestamp when the ingest job was created
    IngestCreateResponse:
      type: object
      properties:
        content:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: Unique identifier for the ingest job
            status:
              type: string
              description: Current status of the ingest job
              enum:
                - RUNNING
                - FAILED
    IngestStatusResponse:
      type: object
      properties:
        content:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: Unique identifier for the ingest job
            created_by:
              type: string
              format: uuid
              description: User ID who created the ingest job
            created_at:
              type: string
              format: date-time
              description: Timestamp when the ingest job was created
            status:
              type: string
              description: Current status of the ingest job
              enum:
                - RUNNING
                - PENDING
                - FAILED
                - BLOCKED
                - QUEUED
                - WAITING
                - SUCCESS
  parameters:
    EnterpriseID:
      name: enterprise_id
      description: Enterprise ID
      in: path
      required: true
      schema:
        type: string
        format: uuid
    GroupThumbnailID:
      name: thumbnail_id
      description: Group thumbnail ID
      in: path
      required: true
      schema:
        type: string
        format: uuid
    InviteID:
      name: invite_id
      description: Invite ID
      in: path
      required: true
      schema:
        type: string
        format: uuid
    UserID:
      name: user_id
      description: User ID
      in: path
      required: true
      schema:
        type: integer
    AuthNUserID:
      name: user_id
      description: AuthN User Id. The authn_user_id from the Get Users response.
      in: path
      required: true
      schema:
        type: string
        format: uuid
    GroupID:
      name: group_id
      description: Device Group ID
      in: path
      required: true
      schema:
        type: string
        format: uuid
    BlueprintID:
      name: blueprint_id
      description: Blueprint ID
      in: path
      required: true
      schema:
        type: string
        format: uuid
    BlueprintRevisionID:
      name: revision_id
      description: Blueprint Revision ID
      in: path
      required: true
      schema:
        type: string
        format: uuid
    DirectoryRecordID:
      name: directory_record_id
      description: Directory record ID
      in: path
      required: true
      schema:
        type: string
        format: uuid
    IsDefault:
      name: is_default
      description: Is Default
      in: query
      required: false
      schema:
        type: boolean
    ConnectionID:
      name: connection_id
      description: Connection ID
      in: path
      required: true
      schema:
        type: string
        format: uuid
    RoleID:
      name: role_id
      description: Role ID
      in: path
      required: true
      schema:
        type: string
        format: uuid
    PersonalAccessTokenID:
      name: personal_access_token_id
      description: Personal Access Token Id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    LegacyUserID:
      name: legacy_user_id
      description: Legacy User ID
      in: query
      required: false
      schema:
        type: integer
    ReportID:
      name: report_id
      description: Report ID
      in: path
      required: true
      schema:
        type: string
        format: uuid
    QueryID:
      name: id
      in: path
      description: Query ID
      required: true
      schema:
        type: string
        format: uuid
    IngestID:
      name: id
      in: path
      description: Ingest job ID
      required: true
      schema:
        type: string
        format: uuid
  examples:
    example_devices:
      summary: An example where the query specifies a list of devices.
      value:
        operation_type: CONVERGE
        schedule_type: IMMEDIATE
        schedule_args:
          start_datetime: '2024-08-08T19:13:36.969Z'
          end_datetime: '2024-08-08T19:13:36.969Z'
          time_type: console
          window_start_time: '2024-08-08T19:00:00Z'
          window_end_time: '2024-08-08T20:00:00Z'
          days:
            - 0
        operation_device_query:
          device_ids: >-
            460a4c28-b974-4c20-99b5-29aa6f10054f,560a4c28-b974-4c20-99b5-29aa6f10054e
        arguments:
          converge_with_provision: true
          sample_key: value
      description: >-
        An example where the query specifies a list of devices with specific
        values.
    example_filters:
      summary: An example with devices filters.
      value:
        operation_type: CONVERGE
        schedule_type: IMMEDIATE
        schedule_args:
          start_datetime: '2024-08-08T19:13:36.969Z'
          end_datetime: '2024-08-08T19:13:36.969Z'
          time_type: console
          window_start_time: '2024-08-08T19:00:00Z'
          window_end_time: '2024-08-08T20:00:00Z'
          days:
            - 0
        operation_device_query:
          device_request:
            group_multi: >-
              460a4c28-b974-4c20-99b5-29aa6f10054f,760a4c28-b974-4c20-99b5-29aa6f10054e
            state: '1'
            filter1: val1
            filter2: val2
        arguments:
          converge_with_provision: true
          sample_key: value
      description: >
        An example with dynamic filters, where 'filter1' and 'filter2' are used
        to apply specific criteria (Same as existing device api filters).

        - active_connection                     (string)

        - android_version                       (string)

        - assigned_blueprint_id                 (string)

        - battery_level_gte                     (string)

        - battery_level_lte                     (string)

        - current_blueprint_id                  (string)

        - current_blueprint_version_id          (string)

        - current_blueprint_version_id_net      (string)

        - device_source                         (string)

        - group_multi                           (string)

        - group_multi_immediate                 (string)

        - ios_version                           (string)

        - ipados_version                        (string)

        - windows_version                       (string)

        - is_gms                                (string)

        - last_seen_gt                          (time.Time)

        - last_seen_lt                          (time.Time)

        - managed_by                            (string)

        - ordering                              (string)

        - os                                    (string)

        - platform                              (string)

        - policy_multi                          (string)

        - provisioned_on_gt                     (time.Time)

        - provisioned_on_lt                     (time.Time)

        - search                                (string)

        - security_status                       (string)

        - serial                                (string)

        - state                                 (string)

        - tags                                  (string)

        - template_multi                        (string)

        - udid                                  (string)

        - is_seamless                           (string)

        - is_locked_down                        (string)
x-tagGroups:
  - name: ESPER CLOUD API
    tags:
      - Company Settings
      - Application
      - Application V1
      - AndroidDevice
      - Device Group
      - Token (Deprecated)
      - Commands V2
      - Enterprise Policy
      - Geofence
      - Content
      - User (Deprecated)
      - User
      - Blueprint (Deprecated)
      - Directory Record
      - Tile Icon
      - Alerts
      - Alarms
      - Wallpapers
      - Device Telemetry
      - Daily and Custom Reports
      - SSO Connections
      - Roles
      - Personal Access Token
  - name: BLUEPRINTS
    tags:
      - Blueprints API
      - Custom Actions API
  - name: PIPELINES
    tags:
      - System Status Code
      - System
      - Pipelines
      - Stages
      - Target Lists
      - Targets
      - Device Groups
      - Operation Lists
      - Operations
      - Pipeline Runs
      - Stage Runs
      - Target Runs
  - name: DEVICE
    tags:
      - Device
      - Device Heartbeat
      - Device Apps
      - Device Enrollment in EMM
      - Operations
      - DeviceOperations
      - MultiOS Remote Viewer
      - Device V2
  - name: APPS MANAGEMENT
    tags:
      - VPP License Management
      - VPP App Management
      - Tenant Apps
      - Apple App Store
      - App List
      - Webclips
      - Provisioning Profiles
      - Esper Apps
      - Tenant Esper Apps
  - name: COMMANDS
    tags:
      - Command Request
      - Command Status
  - name: DRIFT
    tags:
      - Converge
      - Converge Command
  - name: DEVICE ONBOARDING
    tags:
      - DEP Sync Request
      - ABM Provisioning
  - name: TENANT
    tags:
      - APNs certificate
      - DEP Tokens
      - VPP Token Management
      - Google Enterprise
  - name: FOUNDATION
    tags:
      - FoundryBuilds
      - FoundryDeviceModels
      - FoundryEvents
  - name: REPORTS
    tags:
      - Reports API
      - Query API
      - Ingest API
