openapi: 3.0.0
info:
  description: This is the OAS 3.0 specification for the Mobile API in Sophos Central.
  version: 1.0.13
  contact:
    name: Sophos Central APIs
    email: apis@sophos.com
    url: 'https://developer.sophos.com'
  title: Mobile API
tags:
  - name: Actions
    description: Provide information about actions.
  - name: AppGroups
    description: Provide information about app groups.
  - name: CompliancePolicies
    description: Provide information about compliance policies.
  - name: DeviceGroups
    description: Provide information about device groups.
  - name: Devices
    description: Provide information about mobile devices.
  - name: Operating Systems
    description: Provide information about operating systems known to Sophos Mobile.
  - name: Policies
    description: Provide information about policies.
  - name: Settings
    description: Configure Sophos Mobile settings.
  - name: Static Setup Data
    description: >-
      Provide static setup data for device enrollment with fixed enrollment
      data.
servers:
  - url: 'https://api-{dataRegion}.central.sophos.com/mobile/v1'
    description: Regional service in the production environment.
    variables:
      dataRegion:
        description: The tenant's data region.
        default: eu01
        enum:
          - eu01
          - eu02
          - us01
          - us03
paths:
  /static-setup-data/ixm-auto-enrollment:
    get:
      summary: IXM enrollment settings
      x-soph-permissions:
        - 'mobile.static-setup-data:read'
      description: Get static setup data for IXM auto enrollments.
      operationId: getIxmAutoEnrollment
      tags:
        - Static Setup Data
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Static setup data for IXM auto enrollments.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Container object to hold the connection code required for IXM
                  auto-enrollment.
                required:
                  - connectionCode
                  - tenant
                properties:
                  connectionCode:
                    description: The connection code for enrolling the IXM app.
                    type: string
                    format: byte
                  tenant:
                    description: Tenant this resource belongs to.
                    type: object
                    required:
                      - id
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
              examples:
                IxmAutoEnrollmentResponse:
                  summary: IXM auto-enrollment setup data
                  description: This is an example of IXM auto enrollment setup data.
                  value:
                    connectionCode: >-
                      eyJ0b2tlbiI6IjBCdzlaanFXRnVtS0xoSnBabTAzWHNpNlVIdkNpL
                      WFCdXB4b0FxOWdmUVBSa3FMd1l0a3NFOFdsWHJmOHZjRHY5RjBWUE
                      JrV3lwcUVPOHUzdEFOTERnIiwiY2hlY2tpblVyaSI6Imh0dHBzOi8
                      vc21jLWRldmljZS1pZi1jbG91ZHN0YXRpb24tdXMtd2VzdC0yLnBy
                      b2QuaHlkcmEuc29waG9zLmNvbS9jbGllbnQtYXBpL2Vucm9sbC9hd
                      XRvLWNvbmZpZ3VyZWQvaXhtL2Q0NmQ5ZGYxLWVlNWEtNDRjYy04Ym
                      Y1LTI1MmZjYzNjMTZmMC9jaGVja2luIn0=
                    tenant:
                      id: d46d9df1-ee5a-44cc-8bf5-252fcc3c16f0
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Can't find configured setup data for IXM auto enrollments.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /operating-systems:
    get:
      summary: List mobile OSs
      x-soph-permissions:
        - 'mobile.os:read'
      description: Get list of mobile operating systems.
      operationId: getOperatingSystems
      tags:
        - Operating Systems
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: ids
          description: List of IDs.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - in: query
          name: sort
          description: Defines how to sort the data.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              pattern: '(^[^:]+$)|(^[^:]+:(asc|desc)$)'
          examples:
            OneFieldDefaultSort:
              value:
                - lastSeenAt
            OneFieldSort:
              value:
                - 'lastSeenAt:asc'
            MoreThanOneTermSort:
              value:
                - 'lastSeenAt:asc'
                - 'hostname:desc'
        - in: query
          name: page
          required: false
          schema:
            type: integer
            default: 1
          description: 'The page number to fetch, starting with 1.'
        - in: query
          name: pageSize
          required: false
          schema:
            type: integer
            default: 50
          description: The size of the page requested.
        - in: query
          name: pageTotal
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
        - in: query
          name: platform
          description: Filter objects by platform.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              format: enum
              description: 'The device platform, i.e. the operating system.'
              enum:
                - iOS
                - macOS
                - android
                - chrome
                - windows
        - in: query
          name: version
          description: Filter operating system objects by version (startsWith).
          style: form
          explode: false
          required: false
          schema:
            type: array
            maxItems: 10
            items:
              type: string
              maxLength: 20
      responses:
        '200':
          description: List of mobile operating systems.
          content:
            application/json:
              schema:
                type: object
                description: Paged response of operating system objects.
                required:
                  - items
                  - pages
                properties:
                  items:
                    type: array
                    description: List of operating systems.
                    items:
                      type: object
                      description: Mobile operating system object.
                      required:
                        - id
                        - version
                        - name
                        - platform
                      properties:
                        id:
                          description: ID of the operating system.
                          type: string
                          format: uuid
                        version:
                          description: The operating system version.
                          type: string
                        name:
                          description: The name of the operating system.
                          type: string
                        platform:
                          type: string
                          format: enum
                          description: 'The device platform, i.e. the operating system.'
                          enum:
                            - iOS
                            - macOS
                            - android
                            - chrome
                            - windows
                        majorVersion:
                          description: OS major version.
                          type: string
                        minorVersion:
                          description: OS minor version.
                          type: string
                        patchVersion:
                          description: OS patch version.
                          type: string
                  pages:
                    type: object
                    required:
                      - current
                      - size
                      - maxSize
                    properties:
                      current:
                        type: integer
                        description: The 1-based page number being returned.
                      size:
                        type: integer
                        description: The size of the page being returned.
                      total:
                        type: integer
                        description: >-
                          (Optional) The total number of pages that exist, if
                          pageTotal=true in the request.
                      items:
                        type: integer
                        description: (Optional) The total number of items across all pages.
                      maxSize:
                        type: integer
                        description: The maximum page size that can be requested.
              examples:
                OperatingSystemsPaged:
                  summary: Operating systems paged
                  description: >-
                    This is an example of a list of mobile operating systems.
                    The first item is the default operating system for  the iOS
                    platform.
                  value:
                    items:
                      - id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                        version: '---'
                        name: iOS
                        platform: ios
                      - id: ed19d8c2-b207-44c9-8233-6a4c07aeb4a0
                        version: 12
                        majorVersion: 12
                        minorVersion: 0
                        name: Android 12.0
                        platform: android
                      - id: b2a29d71-b159-421c-b567-dbfbf0dafeec
                        version: R
                        name: Android R
                        platform: android
                      - id: 4d37de2f-bc4a-4102-9b85-97eac29f41ee
                        version: 7.1.2
                        majorVersion: 7
                        minorVersion: 1
                        patchVersion: 2
                        name: Android 7.1.2
                        platform: android
                      - id: 9852df33-21a7-4173-9f00-976187908658
                        version: 121
                        majorVersion: 121
                        name: Chrome 121
                        platform: chrome
                    pages:
                      current: 1
                      size: 50
                      maxSize: 500
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  '/operating-systems/{id}':
    get:
      summary: Get mobile OS by ID
      x-soph-permissions:
        - 'mobile.os:read'
      description: Get mobile operating system by ID.
      operationId: getOperatingSystemById
      tags:
        - Operating Systems
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: Mobile operating system.
          content:
            application/json:
              schema:
                type: object
                description: Mobile operating system object.
                required:
                  - id
                  - version
                  - name
                  - platform
                properties:
                  id:
                    description: ID of the operating system.
                    type: string
                    format: uuid
                  version:
                    description: The operating system version.
                    type: string
                  name:
                    description: The name of the operating system.
                    type: string
                  platform:
                    type: string
                    format: enum
                    description: 'The device platform, i.e. the operating system.'
                    enum:
                      - iOS
                      - macOS
                      - android
                      - chrome
                      - windows
                  majorVersion:
                    description: OS major version.
                    type: string
                  minorVersion:
                    description: OS minor version.
                    type: string
                  patchVersion:
                    description: OS patch version.
                    type: string
              examples:
                OperatingSystem:
                  summary: Operating system
                  description: This is an example of a single mobile operating system.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    version: 12.0.1
                    name: iOS 12.0.1
                    platform: ios
                    majorVersion: 12
                    minorVersion: 0
                    patchVersion: 1
                OperatingSystemViewFull:
                  summary: Operating system with view=full
                  description: >-
                    This is an example request for an operating system using the
                    'view=full' query parameter.
                  value:
                    id: 85d66987-5c73-4b95-87f6-b0be28c47cbd
                    version: 12.0.1
                    name: iOS 12.0.1
                    platform: ios
                    majorVersion: 12
                    minorVersion: 0
                    patchVersion: 1
                OperatingSystemViewSummary:
                  summary: Operating system with view=summary
                  description: >-
                    This is an example request for an operating system using the
                    'view=summary' query parameter.
                  value:
                    id: 85d66987-5c73-4b95-87f6-b0be28c47cbd
                    name: iOS 12.0.1
                    platform: ios
                OperatingSystemViewBasic:
                  summary: Operating system with view=basic
                  description: >-
                    This is an example request for an operating system using the
                    'view=basic' query parameter.
                  value:
                    id: 85d66987-5c73-4b95-87f6-b0be28c47cbd
                    name: iOS 12.0.1
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Unknown operating system.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /devices:
    get:
      summary: Get list of devices
      x-soph-permissions:
        - 'mobile.device:read'
      description: Get list of devices.
      operationId: getDevices
      tags:
        - Devices
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
        - in: query
          name: ids
          description: List of IDs.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - in: query
          name: operatingSystemIds
          description: List of operating system IDs.
          style: form
          explode: false
          schema:
            type: array
            maxItems: 100
            items:
              type: string
              format: uuid
        - in: query
          name: sort
          description: Defines how to sort the data.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              pattern: '(^[^:]+$)|(^[^:]+:(asc|desc)$)'
          examples:
            OneFieldDefaultSort:
              value:
                - lastSeenAt
            OneFieldSort:
              value:
                - 'lastSeenAt:asc'
            MoreThanOneTermSort:
              value:
                - 'lastSeenAt:asc'
                - 'hostname:desc'
        - in: query
          name: page
          required: false
          schema:
            type: integer
            default: 1
          description: 'The page number to fetch, starting with 1.'
        - in: query
          name: pageSize
          required: false
          schema:
            type: integer
            default: 50
          description: The size of the page requested.
        - in: query
          name: pageTotal
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
        - in: query
          name: search
          description: Term to search for in the specified search fields.
          required: false
          schema:
            type: string
            maxLength: 200
        - in: query
          name: searchFields
          description: List of fields to search in. Defaults to all applicable fields.
          style: form
          explode: false
          required: false
          schema:
            type: array
            default:
              - name
              - modelName
              - osName
            items:
              type: string
              enum:
                - name
                - modelName
                - osName
        - in: query
          name: platform
          description: Filter objects by platform.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              format: enum
              description: 'The device platform, i.e. the operating system.'
              enum:
                - iOS
                - macOS
                - android
                - chrome
                - windows
        - in: query
          name: managementType
          description: Filter objects by management type.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 100
        - in: query
          name: managedState
          description: Filter objects by management status.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              format: enum
              description: The management status of a mobile device.
              enum:
                - notManaged
                - managed
                - decommissioned
                - checkedOut
                - wiped
                - enrolling
        - in: query
          name: compliant
          description: Filter objects by compliance status.
          style: form
          explode: false
          required: false
          schema:
            type: boolean
        - in: query
          name: violationSeverity
          description: Filter objects by compliance violation severity.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              format: enum
              description: The highest severity of a compliance violation.
              enum:
                - low
                - medium
                - high
        - in: query
          name: healthState
          description: Filter objects by health status.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              format: enum
              description: The health status of a mobile device.
              enum:
                - green
                - amber
                - red
        - in: query
          name: ownershipType
          description: Filter objects by device owner.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              format: enum
              description: The ownership type of the mobile device.
              enum:
                - corporate
                - employee
        - in: query
          name: createdBefore
          description: >-
            Find devices created before the given date and time (UTC) or within
            a time interval relative to the current date and time (exclusive).
          examples:
            FullUtcTimestamp:
              value: '2019-09-23T12:02:01.700Z'
            DateOnly:
              value: '2019-09-23T00:00:00.000Z'
            Duration:
              value: '-P3DT4H5M0S'
              summary: >-
                3 days 4 hours 5 minutes and 0 seconds ago, value is
                case-sensitive
            DaysOnly:
              value: P1D
              summary: one day from now
            HoursOnly:
              value: '-PT2H'
              summary: 2 hours ago
            MinutesOnly:
              value: '-PT20M'
              summary: 20 minutes ago
            SecondsOnly:
              value: PT200S
              summary: 200 seconds from now
          required: false
          schema:
            type: string
        - in: query
          name: createdAfter
          description: >-
            Find devices created after the given date and time (UTC) or within a
            time interval relative to the current date and time (inclusive).
          examples:
            FullUtcTimestamp:
              value: '2019-09-23T12:02:01.700Z'
            DateOnly:
              value: '2019-09-23T00:00:00.000Z'
            Duration:
              value: PT4H500S
              summary: '4 hours and 500 seconds from now, value is case-sensitive'
            DaysOnly:
              value: '-P1D'
              summary: one day ago
            HoursOnly:
              value: PT2H
              summary: 2 hours from now
            MinutesOnly:
              value: PT20M
              summary: 20 minutes from now
            SecondsOnly:
              value: '-PT200S'
              summary: 200 seconds ago
          required: false
          schema:
            type: string
        - in: query
          name: lastSeenBefore
          description: >-
            Find devices last seen before the given date and time (UTC) or
            within a time interval relative to the current date and time
            (exclusive).
          examples:
            FullUtcTimestamp:
              value: '2019-09-23T12:02:01.700Z'
            DateOnly:
              value: '2019-09-23T00:00:00.000Z'
            Duration:
              value: '-P3DT4H5M0S'
              summary: >-
                3 days 4 hours 5 minutes and 0 seconds ago, value is
                case-sensitive
            DaysOnly:
              value: P1D
              summary: one day from now
            HoursOnly:
              value: '-PT2H'
              summary: 2 hours ago
            MinutesOnly:
              value: '-PT20M'
              summary: 20 minutes ago
            SecondsOnly:
              value: PT200S
              summary: 200 seconds from now
          required: false
          schema:
            type: string
        - in: query
          name: lastSeenAfter
          description: >-
            Find devices last seen after the given date and time (UTC) or within
            a time interval relative to the current date and time (inclusive).
          examples:
            FullUtcTimestamp:
              value: '2019-09-23T12:02:01.700Z'
            DateOnly:
              value: '2019-09-23T00:00:00.000Z'
            Duration:
              value: PT4H500S
              summary: '4 hours and 500 seconds from now, value is case-sensitive'
            DaysOnly:
              value: '-P1D'
              summary: one day ago
            HoursOnly:
              value: PT2H
              summary: 2 hours from now
            MinutesOnly:
              value: PT20M
              summary: 20 minutes from now
            SecondsOnly:
              value: '-PT200S'
              summary: 200 seconds ago
          required: false
          schema:
            type: string
        - in: query
          name: deviceGroupIds
          description: List of device group IDs.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - in: query
          name: assignedPersonIds
          description: Filter mobile devices by the assigned users' IDs.
          style: form
          explode: false
          schema:
            type: array
            maxItems: 100
            items:
              type: string
              format: uuid
      responses:
        '200':
          description: List of mobile devices.
          content:
            application/json:
              schema:
                type: object
                description: Paged response of mobile device objects.
                required:
                  - items
                  - pages
                properties:
                  items:
                    type: array
                    description: List of mobile devices.
                    items:
                      type: object
                      description: Mobile device response.
                      required:
                        - id
                        - tenant
                      properties:
                        id:
                          description: ID of the mobile device.
                          type: string
                          format: uuid
                        tenant:
                          description: Tenant this resource belongs to.
                          type: object
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                        availableActions:
                          description: >-
                            List of actions that can be performed for the mobile
                            device.
                          type: array
                          items:
                            type: string
                        name:
                          description: Name of the mobile device.
                          type: string
                          maxLength: 255
                        description:
                          description: Description of the mobile device.
                          type: string
                          maxLength: 500
                        phoneNumber:
                          description: >-
                            Phone number of the user assigned to the mobile
                            device.
                          type: string
                          maxLength: 50
                          pattern: '^(\+?\d+|.{0})$'
                        email:
                          description: >-
                            The email address assigned to the device if there's
                            no user assigned.
                          type: string
                          maxLength: 255
                        assignedPerson:
                          type: object
                          description: Assigned user to a mobile device.
                          required:
                            - id
                          properties:
                            id:
                              description: The user's ID in Sophos Central.
                              type: string
                              format: uuid
                            name:
                              description: The user's name.
                              type: string
                              maxLength: 255
                              readOnly: true
                            email:
                              description: The user's email address.
                              type: string
                              maxLength: 255
                              readOnly: true
                        healthState:
                          type: object
                          description: Health status of a mobile device.
                          properties:
                            state:
                              type: string
                              format: enum
                              description: The health status of a mobile device.
                              enum:
                                - green
                                - amber
                                - red
                            mode:
                              type: string
                              format: enum
                              description: The health status mode.
                              enum:
                                - automatic
                                - manual
                        ownershipType:
                          type: string
                          format: enum
                          description: The ownership type of the mobile device.
                          enum:
                            - corporate
                            - employee
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        createdAt:
                          description: The time when the device was created.
                          type: string
                          format: date-time
                        updatedAt:
                          description: The time when the device was last updated.
                          type: string
                          format: date-time
                        lastSeenAt:
                          description: The last time the device contacted Sophos Mobile.
                          type: string
                          format: date-time
                        smcAppLastSeenAt:
                          description: The last sync time of the Sophos Mobile Control app.
                          type: string
                          format: date-time
                        ixmAppLastSeenAt:
                          description: >-
                            The last sync time of the Intercept X for Mobile
                            app.
                          type: string
                          format: date-time
                        compliance:
                          type: object
                          description: Mobile device compliance status.
                          required:
                            - compliant
                          properties:
                            compliant:
                              description: Whether the device is compliant.
                              type: boolean
                            severity:
                              type: string
                              format: enum
                              description: The highest severity of a compliance violation.
                              enum:
                                - low
                                - medium
                                - high
                        modelName:
                          description: Model name of the mobile device.
                          type: string
                          maxLength: 255
                        externalId:
                          description: External ID of the mobile device.
                          type: string
                          maxLength: 255
                        managementType:
                          description: The management type of the mobile device.
                          type: string
                          maxLength: 255
                        supervised:
                          description: Whether the device is supervised.
                          type: boolean
                        managedState:
                          type: string
                          format: enum
                          description: The management status of a mobile device.
                          enum:
                            - notManaged
                            - managed
                            - decommissioned
                            - checkedOut
                            - wiped
                            - enrolling
                        logLevel:
                          type: string
                          format: enum
                          description: The verbosity of the Sophos Mobile app logging.
                          enum:
                            - error
                            - warn
                            - info
                            - debug
                            - trace
                        os:
                          type: object
                          description: Mobile operating system object.
                          required:
                            - id
                            - version
                            - name
                            - platform
                          properties:
                            id:
                              description: ID of the operating system.
                              type: string
                              format: uuid
                            version:
                              description: The operating system version.
                              type: string
                            name:
                              description: The name of the operating system.
                              type: string
                            platform:
                              type: string
                              format: enum
                              description: 'The device platform, i.e. the operating system.'
                              enum:
                                - iOS
                                - macOS
                                - android
                                - chrome
                                - windows
                            majorVersion:
                              description: OS major version.
                              type: string
                            minorVersion:
                              description: OS minor version.
                              type: string
                            patchVersion:
                              description: OS patch version.
                              type: string
                        deviceGroup:
                          type: object
                          description: A device group reference.
                          required:
                            - id
                          properties:
                            id:
                              description: Unique ID of the device group.
                              type: string
                              format: uuid
                            name:
                              description: The device group name.
                              type: string
                        scanResultSummary:
                          type: object
                          description: Overview of IXM scan results.
                          properties:
                            lastScannedAt:
                              description: The time of the scan.
                              type: string
                              format: date-time
                            suspiciousCount:
                              description: The number of suspicious elements.
                              type: integer
                            maliciousCount:
                              description: The number of malicious elements.
                              type: integer
                            puaCount:
                              description: The number of potentially unwanted elements.
                              type: integer
                            lowReputationCount:
                              description: The number of low reputation elements.
                              type: integer
                  pages:
                    type: object
                    required:
                      - current
                      - size
                      - maxSize
                    properties:
                      current:
                        type: integer
                        description: The 1-based page number being returned.
                      size:
                        type: integer
                        description: The size of the page being returned.
                      total:
                        type: integer
                        description: >-
                          (Optional) The total number of pages that exist, if
                          pageTotal=true in the request.
                      items:
                        type: integer
                        description: (Optional) The total number of items across all pages.
                      maxSize:
                        type: integer
                        description: The maximum page size that can be requested.
              examples:
                DevicesPaged:
                  summary: Devices paged
                  description: This is an example of a list of mobile devices.
                  value:
                    items:
                      - id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        availableActions:
                          - unenroll
                          - sync
                          - get-logs
                          - send-message
                        assignedPerson:
                          id: 9f059011-84c7-4849-ae2e-d0563743e485
                          internalId: 670e793648a7e63f0443ba93
                          name: Peter Smith
                          email: peter.smith@example.org
                        name: My device
                        compliance:
                          compliant: false
                          severity: high
                        managedState: managed
                        ownershipType: corporate
                        healthState:
                          state: amber
                          mode: automatic
                        managementType: ixm
                        os:
                          id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                          version: 12.0.1
                          name: iOS 12.0.1
                          platform: ios
                          majorVersion: 12
                          minorVersion: 0
                          patchVersion: 1
                      - id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d4
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        name: Example Android
                        email: somebody@example.com
                        compliance:
                          compliant: false
                          severity: high
                        managementType: notManaged
                        managedState: notManaged
                        os:
                          id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                          version: 12.0.1
                          name: iOS 12.0.1
                          platform: ios
                          majorVersion: 12
                          minorVersion: 0
                          patchVersion: 1
                    pages:
                      current: 1
                      size: 50
                      maxSize: 500
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    post:
      summary: Create mobile device
      x-soph-permissions:
        - 'mobile.device:create'
      description: Create mobile device.
      operationId: createDevice
      tags:
        - Devices
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        description: Create mobile device request.
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Mobile device create request.
              required:
                - name
                - ownershipType
                - platform
              properties:
                name:
                  description: Name of the mobile device.
                  type: string
                  maxLength: 255
                description:
                  description: Description of the mobile device.
                  type: string
                  maxLength: 500
                phoneNumber:
                  description: Phone number of the user assigned to the mobile device.
                  type: string
                  maxLength: 50
                  pattern: '^(\+?\d+|.{0})$'
                email:
                  description: >-
                    The email address assigned to the device if there's no user
                    assigned.
                  type: string
                  maxLength: 255
                assignedPersonId:
                  description: ID of the user assigned to the device.
                  type: string
                  format: uuid
                ownershipType:
                  type: string
                  format: enum
                  description: The ownership type of the mobile device.
                  enum:
                    - corporate
                    - employee
                platform:
                  type: string
                  format: enum
                  description: 'The device platform, i.e. the operating system.'
                  enum:
                    - iOS
                    - macOS
                    - android
                    - chrome
                    - windows
                logLevel:
                  type: string
                  format: enum
                  description: The verbosity of the Sophos Mobile app logging.
                  enum:
                    - error
                    - warn
                    - info
                    - debug
                    - trace
                groupId:
                  description: >-
                    ID of a device group. If not specified in the request, the
                    default device group will be assigned.
                  type: string
                  format: uuid
            example:
              name: My device
              platform: android
              ownershipType: corporate
              groupId: 1c9146a4-43f9-43c7-ae39-8f7708dfa65f
      responses:
        '201':
          description: The new mobile device.
          content:
            application/json:
              schema:
                type: object
                description: Mobile device response.
                required:
                  - id
                  - tenant
                properties:
                  id:
                    description: ID of the mobile device.
                    type: string
                    format: uuid
                  tenant:
                    description: Tenant this resource belongs to.
                    type: object
                    required:
                      - id
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                  availableActions:
                    description: >-
                      List of actions that can be performed for the mobile
                      device.
                    type: array
                    items:
                      type: string
                  name:
                    description: Name of the mobile device.
                    type: string
                    maxLength: 255
                  description:
                    description: Description of the mobile device.
                    type: string
                    maxLength: 500
                  phoneNumber:
                    description: Phone number of the user assigned to the mobile device.
                    type: string
                    maxLength: 50
                    pattern: '^(\+?\d+|.{0})$'
                  email:
                    description: >-
                      The email address assigned to the device if there's no
                      user assigned.
                    type: string
                    maxLength: 255
                  assignedPerson:
                    type: object
                    description: Assigned user to a mobile device.
                    required:
                      - id
                    properties:
                      id:
                        description: The user's ID in Sophos Central.
                        type: string
                        format: uuid
                      name:
                        description: The user's name.
                        type: string
                        maxLength: 255
                        readOnly: true
                      email:
                        description: The user's email address.
                        type: string
                        maxLength: 255
                        readOnly: true
                  healthState:
                    type: object
                    description: Health status of a mobile device.
                    properties:
                      state:
                        type: string
                        format: enum
                        description: The health status of a mobile device.
                        enum:
                          - green
                          - amber
                          - red
                      mode:
                        type: string
                        format: enum
                        description: The health status mode.
                        enum:
                          - automatic
                          - manual
                  ownershipType:
                    type: string
                    format: enum
                    description: The ownership type of the mobile device.
                    enum:
                      - corporate
                      - employee
                  createdBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  updatedBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  createdAt:
                    description: The time when the device was created.
                    type: string
                    format: date-time
                  updatedAt:
                    description: The time when the device was last updated.
                    type: string
                    format: date-time
                  lastSeenAt:
                    description: The last time the device contacted Sophos Mobile.
                    type: string
                    format: date-time
                  smcAppLastSeenAt:
                    description: The last sync time of the Sophos Mobile Control app.
                    type: string
                    format: date-time
                  ixmAppLastSeenAt:
                    description: The last sync time of the Intercept X for Mobile app.
                    type: string
                    format: date-time
                  compliance:
                    type: object
                    description: Mobile device compliance status.
                    required:
                      - compliant
                    properties:
                      compliant:
                        description: Whether the device is compliant.
                        type: boolean
                      severity:
                        type: string
                        format: enum
                        description: The highest severity of a compliance violation.
                        enum:
                          - low
                          - medium
                          - high
                  modelName:
                    description: Model name of the mobile device.
                    type: string
                    maxLength: 255
                  externalId:
                    description: External ID of the mobile device.
                    type: string
                    maxLength: 255
                  managementType:
                    description: The management type of the mobile device.
                    type: string
                    maxLength: 255
                  supervised:
                    description: Whether the device is supervised.
                    type: boolean
                  managedState:
                    type: string
                    format: enum
                    description: The management status of a mobile device.
                    enum:
                      - notManaged
                      - managed
                      - decommissioned
                      - checkedOut
                      - wiped
                      - enrolling
                  logLevel:
                    type: string
                    format: enum
                    description: The verbosity of the Sophos Mobile app logging.
                    enum:
                      - error
                      - warn
                      - info
                      - debug
                      - trace
                  os:
                    type: object
                    description: Mobile operating system object.
                    required:
                      - id
                      - version
                      - name
                      - platform
                    properties:
                      id:
                        description: ID of the operating system.
                        type: string
                        format: uuid
                      version:
                        description: The operating system version.
                        type: string
                      name:
                        description: The name of the operating system.
                        type: string
                      platform:
                        type: string
                        format: enum
                        description: 'The device platform, i.e. the operating system.'
                        enum:
                          - iOS
                          - macOS
                          - android
                          - chrome
                          - windows
                      majorVersion:
                        description: OS major version.
                        type: string
                      minorVersion:
                        description: OS minor version.
                        type: string
                      patchVersion:
                        description: OS patch version.
                        type: string
                  deviceGroup:
                    type: object
                    description: A device group reference.
                    required:
                      - id
                    properties:
                      id:
                        description: Unique ID of the device group.
                        type: string
                        format: uuid
                      name:
                        description: The device group name.
                        type: string
                  scanResultSummary:
                    type: object
                    description: Overview of IXM scan results.
                    properties:
                      lastScannedAt:
                        description: The time of the scan.
                        type: string
                        format: date-time
                      suspiciousCount:
                        description: The number of suspicious elements.
                        type: integer
                      maliciousCount:
                        description: The number of malicious elements.
                        type: integer
                      puaCount:
                        description: The number of potentially unwanted elements.
                        type: integer
                      lowReputationCount:
                        description: The number of low reputation elements.
                        type: integer
              examples:
                MobileDeviceCreated:
                  summary: A new unmanaged Android device
                  description: >-
                    A new unmanaged Android device, as response to a Create
                    Device request.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d4
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: Example Android
                    email: somebody@example.com
                    compliance:
                      compliant: false
                      severity: high
                    managementType: notManaged
                    managedState: notManaged
                    os:
                      id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                      version: 12.0.1
                      name: iOS 12.0.1
                      platform: ios
                      majorVersion: 12
                      minorVersion: 0
                      patchVersion: 1
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Request contains no object.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '422':
          description: Maximum number of devices exceeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  '/devices/{id}':
    get:
      summary: Get by ID
      x-soph-permissions:
        - 'mobile.device:read'
      description: Get mobile device by ID.
      operationId: getDeviceById
      tags:
        - Devices
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      responses:
        '200':
          description: Mobile device.
          content:
            application/json:
              schema:
                type: object
                description: Mobile device response.
                required:
                  - id
                  - tenant
                properties:
                  id:
                    description: ID of the mobile device.
                    type: string
                    format: uuid
                  tenant:
                    description: Tenant this resource belongs to.
                    type: object
                    required:
                      - id
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                  availableActions:
                    description: >-
                      List of actions that can be performed for the mobile
                      device.
                    type: array
                    items:
                      type: string
                  name:
                    description: Name of the mobile device.
                    type: string
                    maxLength: 255
                  description:
                    description: Description of the mobile device.
                    type: string
                    maxLength: 500
                  phoneNumber:
                    description: Phone number of the user assigned to the mobile device.
                    type: string
                    maxLength: 50
                    pattern: '^(\+?\d+|.{0})$'
                  email:
                    description: >-
                      The email address assigned to the device if there's no
                      user assigned.
                    type: string
                    maxLength: 255
                  assignedPerson:
                    type: object
                    description: Assigned user to a mobile device.
                    required:
                      - id
                    properties:
                      id:
                        description: The user's ID in Sophos Central.
                        type: string
                        format: uuid
                      name:
                        description: The user's name.
                        type: string
                        maxLength: 255
                        readOnly: true
                      email:
                        description: The user's email address.
                        type: string
                        maxLength: 255
                        readOnly: true
                  healthState:
                    type: object
                    description: Health status of a mobile device.
                    properties:
                      state:
                        type: string
                        format: enum
                        description: The health status of a mobile device.
                        enum:
                          - green
                          - amber
                          - red
                      mode:
                        type: string
                        format: enum
                        description: The health status mode.
                        enum:
                          - automatic
                          - manual
                  ownershipType:
                    type: string
                    format: enum
                    description: The ownership type of the mobile device.
                    enum:
                      - corporate
                      - employee
                  createdBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  updatedBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  createdAt:
                    description: The time when the device was created.
                    type: string
                    format: date-time
                  updatedAt:
                    description: The time when the device was last updated.
                    type: string
                    format: date-time
                  lastSeenAt:
                    description: The last time the device contacted Sophos Mobile.
                    type: string
                    format: date-time
                  smcAppLastSeenAt:
                    description: The last sync time of the Sophos Mobile Control app.
                    type: string
                    format: date-time
                  ixmAppLastSeenAt:
                    description: The last sync time of the Intercept X for Mobile app.
                    type: string
                    format: date-time
                  compliance:
                    type: object
                    description: Mobile device compliance status.
                    required:
                      - compliant
                    properties:
                      compliant:
                        description: Whether the device is compliant.
                        type: boolean
                      severity:
                        type: string
                        format: enum
                        description: The highest severity of a compliance violation.
                        enum:
                          - low
                          - medium
                          - high
                  modelName:
                    description: Model name of the mobile device.
                    type: string
                    maxLength: 255
                  externalId:
                    description: External ID of the mobile device.
                    type: string
                    maxLength: 255
                  managementType:
                    description: The management type of the mobile device.
                    type: string
                    maxLength: 255
                  supervised:
                    description: Whether the device is supervised.
                    type: boolean
                  managedState:
                    type: string
                    format: enum
                    description: The management status of a mobile device.
                    enum:
                      - notManaged
                      - managed
                      - decommissioned
                      - checkedOut
                      - wiped
                      - enrolling
                  logLevel:
                    type: string
                    format: enum
                    description: The verbosity of the Sophos Mobile app logging.
                    enum:
                      - error
                      - warn
                      - info
                      - debug
                      - trace
                  os:
                    type: object
                    description: Mobile operating system object.
                    required:
                      - id
                      - version
                      - name
                      - platform
                    properties:
                      id:
                        description: ID of the operating system.
                        type: string
                        format: uuid
                      version:
                        description: The operating system version.
                        type: string
                      name:
                        description: The name of the operating system.
                        type: string
                      platform:
                        type: string
                        format: enum
                        description: 'The device platform, i.e. the operating system.'
                        enum:
                          - iOS
                          - macOS
                          - android
                          - chrome
                          - windows
                      majorVersion:
                        description: OS major version.
                        type: string
                      minorVersion:
                        description: OS minor version.
                        type: string
                      patchVersion:
                        description: OS patch version.
                        type: string
                  deviceGroup:
                    type: object
                    description: A device group reference.
                    required:
                      - id
                    properties:
                      id:
                        description: Unique ID of the device group.
                        type: string
                        format: uuid
                      name:
                        description: The device group name.
                        type: string
                  scanResultSummary:
                    type: object
                    description: Overview of IXM scan results.
                    properties:
                      lastScannedAt:
                        description: The time of the scan.
                        type: string
                        format: date-time
                      suspiciousCount:
                        description: The number of suspicious elements.
                        type: integer
                      maliciousCount:
                        description: The number of malicious elements.
                        type: integer
                      puaCount:
                        description: The number of potentially unwanted elements.
                        type: integer
                      lowReputationCount:
                        description: The number of low reputation elements.
                        type: integer
              examples:
                SingleDevice:
                  summary: iOS device
                  description: This is an example of an iOS device.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    availableActions:
                      - unenroll
                      - sync
                      - get-logs
                      - send-message
                    assignedPerson:
                      id: 9f059011-84c7-4849-ae2e-d0563743e485
                      internalId: 670e793648a7e63f0443ba93
                      name: Peter Smith
                      email: peter.smith@example.org
                    name: My device
                    compliance:
                      compliant: false
                      severity: high
                    managedState: managed
                    ownershipType: corporate
                    healthState:
                      state: amber
                      mode: automatic
                    managementType: ixm
                    os:
                      id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                      version: 12.0.1
                      name: iOS 12.0.1
                      platform: ios
                      majorVersion: 12
                      minorVersion: 0
                      patchVersion: 1
                NewAndroidDevice:
                  summary: A new unmanaged Android device
                  description: >-
                    A new unmanaged Android device, as response to a Create
                    Device request.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d4
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: Example Android
                    email: somebody@example.com
                    compliance:
                      compliant: false
                      severity: high
                    managementType: notManaged
                    managedState: notManaged
                    os:
                      id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                      version: 12.0.1
                      name: iOS 12.0.1
                      platform: ios
                      majorVersion: 12
                      minorVersion: 0
                      patchVersion: 1
                DeviceViewFull:
                  summary: Device with view=full
                  description: >-
                    This is an example request for a device using the
                    'view=full' query parameter.
                  value:
                    id: 85d66987-5c73-4b95-87f6-b0be28c47cbd
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: Example Android
                    description: The description of the device
                    availableActions:
                      - unenroll
                      - sync
                      - get-logs
                      - send-message
                    email: john.smith@example.com
                    phoneNumber: 49231987654321
                    healthState:
                      state: green
                      mode: automatic
                    ownershipType: corporate
                    lastSeenAt: '2025-01-02T10:10:00.300Z'
                    smcAppLastSeenAt: '2025-01-02T10:10:00.300Z'
                    ixmAppLastSeenAt: '2025-01-02T10:20:00.300Z'
                    compliance:
                      compliant: false
                      severity: high
                    modelName: Google Pixel 9 Pro
                    externalId: 9f059011-84c7-4849-ae2e-d0563743e485
                    managementType: androidWorkProfile
                    managedState: managed
                    os:
                      id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                      version: 12.0.1
                      name: iOS 12.0.1
                      platform: ios
                      majorVersion: 12
                      minorVersion: 0
                      patchVersion: 1
                    assignedPerson:
                      id: 9f059011-84c7-4849-ae2e-d0563743e485
                      internalId: 670e793648a7e63f0443ba93
                      name: Peter Smith
                      email: peter.smith@example.org
                    deviceGroup:
                      summary: Device group reference
                      description: This is an example of a device group reference.
                      value:
                        id: d602034d-a509-4c93-ade0-61f5b496c963
                        name: A device group
                    scanResultSummary:
                      lastScannedAt: '2023-01-01T00:00:00Z'
                      suspiciousCount: 0
                      maliciousCount: 3
                      puaCount: 4
                      lowReputationCount: 10
                    logLevel: info
                    supervised: false
                    createdAt: '2025-01-02T08:50:00.300Z'
                    createdBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                    updatedAt: '2025-01-02T08:50:01.300Z'
                    updatedBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                DeviceViewSummary:
                  summary: Device with view=summary
                  description: >-
                    This is an example request for a device using the
                    'view=summary' query parameter.
                  value:
                    id: 85d66987-5c73-4b95-87f6-b0be28c47cbd
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: Example Android
                    description: The description of the device
                    email: john.smith@example.com
                    healthState:
                      state: green
                      mode: automatic
                    ownershipType: corporate
                    lastSeenAt: '2025-01-02T10:10:00.300Z'
                    smcAppLastSeenAt: '2025-01-02T10:10:00.300Z'
                    compliance:
                      compliant: false
                      severity: high
                    externalId: 9f059011-84c7-4849-ae2e-d0563743e485
                    managementType: androidWorkProfile
                    managedState: managed
                    os:
                      id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                      version: 12.0.1
                      name: iOS 12.0.1
                      platform: ios
                      majorVersion: 12
                      minorVersion: 0
                      patchVersion: 1
                    assignedPerson:
                      id: 9f059011-84c7-4849-ae2e-d0563743e485
                      internalId: 670e793648a7e63f0443ba93
                      name: Peter Smith
                      email: peter.smith@example.org
                    deviceGroup:
                      summary: Device group reference
                      description: This is an example of a device group reference.
                      value:
                        id: d602034d-a509-4c93-ade0-61f5b496c963
                        name: A device group
                    scanResultSummary:
                      lastScannedAt: '2023-01-01T00:00:00Z'
                      suspiciousCount: 0
                      maliciousCount: 3
                      puaCount: 4
                      lowReputationCount: 10
                    createdAt: '2025-01-02T08:50:00.300Z'
                    createdBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                    updatedAt: '2025-01-02T08:50:01.300Z'
                    updatedBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                DeviceViewBasic:
                  summary: Device with view=basic
                  description: >-
                    This is an example request for a device using the
                    'view=basic' query parameter.
                  value:
                    id: 85d66987-5c73-4b95-87f6-b0be28c47cbd
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: Example Android
                    email: john.smith@example.com
                    healthState:
                      state: green
                      mode: automatic
                    ownershipType: corporate
                    lastSeenAt: '2025-01-02T10:10:00.300Z'
                    smcAppLastSeenAt: '2025-01-02T10:10:00.300Z'
                    compliance:
                      compliant: false
                      severity: high
                    managementType: androidWorkProfile
                    managedState: managed
                    os:
                      id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                      version: 12.0.1
                      name: iOS 12.0.1
                      platform: ios
                      majorVersion: 12
                      minorVersion: 0
                      patchVersion: 1
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Can't find the requested operating system.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    put:
      summary: Update mobile device
      x-soph-permissions:
        - 'mobile.device:update'
      description: Update a mobile device.
      operationId: updateDevice
      tags:
        - Devices
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Mobile device update request.
              required:
                - name
                - ownershipType
                - groupId
              properties:
                name:
                  description: Name of the mobile device.
                  type: string
                  maxLength: 255
                description:
                  description: Description of the mobile device.
                  type: string
                  maxLength: 500
                phoneNumber:
                  description: Phone number of the user assigned to the mobile device.
                  type: string
                  maxLength: 50
                  pattern: '^(\+?\d+|.{0})$'
                email:
                  description: >-
                    The email address assigned to the device if there's no user
                    assigned.
                  type: string
                  maxLength: 255
                assignedPersonId:
                  description: ID of the user assigned to the device.
                  type: string
                  format: uuid
                ownershipType:
                  type: string
                  format: enum
                  description: The ownership type of the mobile device.
                  enum:
                    - corporate
                    - employee
                logLevel:
                  type: string
                  format: enum
                  description: The verbosity of the Sophos Mobile app logging.
                  enum:
                    - error
                    - warn
                    - info
                    - debug
                    - trace
                groupId:
                  description: ID of a device group.
                  type: string
                  format: uuid
            example:
              name: My device
              ownershipType: corporate
              groupId: 1c9146a4-43f9-43c7-ae39-8f7708dfa65f
      responses:
        '200':
          description: The updated mobile device.
          content:
            application/json:
              schema:
                type: object
                description: Mobile device response.
                required:
                  - id
                  - tenant
                properties:
                  id:
                    description: ID of the mobile device.
                    type: string
                    format: uuid
                  tenant:
                    description: Tenant this resource belongs to.
                    type: object
                    required:
                      - id
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                  availableActions:
                    description: >-
                      List of actions that can be performed for the mobile
                      device.
                    type: array
                    items:
                      type: string
                  name:
                    description: Name of the mobile device.
                    type: string
                    maxLength: 255
                  description:
                    description: Description of the mobile device.
                    type: string
                    maxLength: 500
                  phoneNumber:
                    description: Phone number of the user assigned to the mobile device.
                    type: string
                    maxLength: 50
                    pattern: '^(\+?\d+|.{0})$'
                  email:
                    description: >-
                      The email address assigned to the device if there's no
                      user assigned.
                    type: string
                    maxLength: 255
                  assignedPerson:
                    type: object
                    description: Assigned user to a mobile device.
                    required:
                      - id
                    properties:
                      id:
                        description: The user's ID in Sophos Central.
                        type: string
                        format: uuid
                      name:
                        description: The user's name.
                        type: string
                        maxLength: 255
                        readOnly: true
                      email:
                        description: The user's email address.
                        type: string
                        maxLength: 255
                        readOnly: true
                  healthState:
                    type: object
                    description: Health status of a mobile device.
                    properties:
                      state:
                        type: string
                        format: enum
                        description: The health status of a mobile device.
                        enum:
                          - green
                          - amber
                          - red
                      mode:
                        type: string
                        format: enum
                        description: The health status mode.
                        enum:
                          - automatic
                          - manual
                  ownershipType:
                    type: string
                    format: enum
                    description: The ownership type of the mobile device.
                    enum:
                      - corporate
                      - employee
                  createdBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  updatedBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  createdAt:
                    description: The time when the device was created.
                    type: string
                    format: date-time
                  updatedAt:
                    description: The time when the device was last updated.
                    type: string
                    format: date-time
                  lastSeenAt:
                    description: The last time the device contacted Sophos Mobile.
                    type: string
                    format: date-time
                  smcAppLastSeenAt:
                    description: The last sync time of the Sophos Mobile Control app.
                    type: string
                    format: date-time
                  ixmAppLastSeenAt:
                    description: The last sync time of the Intercept X for Mobile app.
                    type: string
                    format: date-time
                  compliance:
                    type: object
                    description: Mobile device compliance status.
                    required:
                      - compliant
                    properties:
                      compliant:
                        description: Whether the device is compliant.
                        type: boolean
                      severity:
                        type: string
                        format: enum
                        description: The highest severity of a compliance violation.
                        enum:
                          - low
                          - medium
                          - high
                  modelName:
                    description: Model name of the mobile device.
                    type: string
                    maxLength: 255
                  externalId:
                    description: External ID of the mobile device.
                    type: string
                    maxLength: 255
                  managementType:
                    description: The management type of the mobile device.
                    type: string
                    maxLength: 255
                  supervised:
                    description: Whether the device is supervised.
                    type: boolean
                  managedState:
                    type: string
                    format: enum
                    description: The management status of a mobile device.
                    enum:
                      - notManaged
                      - managed
                      - decommissioned
                      - checkedOut
                      - wiped
                      - enrolling
                  logLevel:
                    type: string
                    format: enum
                    description: The verbosity of the Sophos Mobile app logging.
                    enum:
                      - error
                      - warn
                      - info
                      - debug
                      - trace
                  os:
                    type: object
                    description: Mobile operating system object.
                    required:
                      - id
                      - version
                      - name
                      - platform
                    properties:
                      id:
                        description: ID of the operating system.
                        type: string
                        format: uuid
                      version:
                        description: The operating system version.
                        type: string
                      name:
                        description: The name of the operating system.
                        type: string
                      platform:
                        type: string
                        format: enum
                        description: 'The device platform, i.e. the operating system.'
                        enum:
                          - iOS
                          - macOS
                          - android
                          - chrome
                          - windows
                      majorVersion:
                        description: OS major version.
                        type: string
                      minorVersion:
                        description: OS minor version.
                        type: string
                      patchVersion:
                        description: OS patch version.
                        type: string
                  deviceGroup:
                    type: object
                    description: A device group reference.
                    required:
                      - id
                    properties:
                      id:
                        description: Unique ID of the device group.
                        type: string
                        format: uuid
                      name:
                        description: The device group name.
                        type: string
                  scanResultSummary:
                    type: object
                    description: Overview of IXM scan results.
                    properties:
                      lastScannedAt:
                        description: The time of the scan.
                        type: string
                        format: date-time
                      suspiciousCount:
                        description: The number of suspicious elements.
                        type: integer
                      maliciousCount:
                        description: The number of malicious elements.
                        type: integer
                      puaCount:
                        description: The number of potentially unwanted elements.
                        type: integer
                      lowReputationCount:
                        description: The number of low reputation elements.
                        type: integer
              examples:
                MobileDeviceUpdated:
                  summary: iOS device
                  description: This is an example of an iOS device.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    availableActions:
                      - unenroll
                      - sync
                      - get-logs
                      - send-message
                    assignedPerson:
                      id: 9f059011-84c7-4849-ae2e-d0563743e485
                      internalId: 670e793648a7e63f0443ba93
                      name: Peter Smith
                      email: peter.smith@example.org
                    name: My device
                    compliance:
                      compliant: false
                      severity: high
                    managedState: managed
                    ownershipType: corporate
                    healthState:
                      state: amber
                      mode: automatic
                    managementType: ixm
                    os:
                      id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                      version: 12.0.1
                      name: iOS 12.0.1
                      platform: ios
                      majorVersion: 12
                      minorVersion: 0
                      patchVersion: 1
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Request contains no object.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    delete:
      summary: Delete mobile device
      x-soph-permissions:
        - 'mobile.device:delete'
      description: Delete a mobile device.
      operationId: deleteDevice
      tags:
        - Devices
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully processed Delete operation.
          content:
            application/json:
              schema:
                type: object
                description: Response to a previous request to delete an item.
                required:
                  - deleted
                properties:
                  deleted:
                    type: boolean
              example:
                deleted: true
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  '/devices/{id}/properties':
    get:
      summary: List device properties
      x-soph-permissions:
        - 'mobile.device:read'
      description: Get list of device properties.
      operationId: getDeviceProperties
      tags:
        - Devices
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
        - in: query
          name: sort
          description: Defines how to sort the data.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              pattern: '(^[^:]+$)|(^[^:]+:(asc|desc)$)'
          examples:
            OneFieldDefaultSort:
              value:
                - lastSeenAt
            OneFieldSort:
              value:
                - 'lastSeenAt:asc'
            MoreThanOneTermSort:
              value:
                - 'lastSeenAt:asc'
                - 'hostname:desc'
        - in: query
          name: page
          required: false
          schema:
            type: integer
            default: 1
          description: 'The page number to fetch, starting with 1.'
        - in: query
          name: pageSize
          required: false
          schema:
            type: integer
            default: 50
          description: The size of the page requested.
        - in: query
          name: pageTotal
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
        - in: query
          name: search
          description: Term to search for in the specified search fields.
          required: false
          schema:
            type: string
            maxLength: 200
        - in: query
          name: searchFields
          description: List of fields to search in. Defaults to all applicable fields.
          style: form
          explode: false
          required: false
          schema:
            type: array
            default:
              - key
            items:
              type: string
              enum:
                - key
                - value
        - in: query
          name: devicePropertyType
          description: Filter objects by devicePropertyType.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              format: enum
              description: The type of a device property.
              enum:
                - system
                - custom
        - in: query
          name: devicePropertyKey
          description: Filter objects by device property key.
          style: form
          explode: false
          required: false
          schema:
            type: array
            maxItems: 20
            uniqueItems: true
            items:
              type: string
              maxLength: 100
      responses:
        '200':
          description: List of device properties.
          content:
            application/json:
              schema:
                type: object
                description: Paged response of device properties.
                required:
                  - items
                  - pages
                properties:
                  items:
                    type: array
                    description: List of device properties.
                    items:
                      type: object
                      description: Device property.
                      properties:
                        key:
                          description: Key of the device property.
                          type: string
                        value:
                          description: Value of the device property.
                          type: string
                        type:
                          type: string
                          format: enum
                          description: The type of a device property.
                          enum:
                            - system
                            - custom
                        createdAt:
                          description: Time when the object was created.
                          type: string
                          format: date-time
                        updatedAt:
                          description: Time when the object was updated.
                          type: string
                          format: date-time
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                  pages:
                    type: object
                    required:
                      - current
                      - size
                      - maxSize
                    properties:
                      current:
                        type: integer
                        description: The 1-based page number being returned.
                      size:
                        type: integer
                        description: The size of the page being returned.
                      total:
                        type: integer
                        description: >-
                          (Optional) The total number of pages that exist, if
                          pageTotal=true in the request.
                      items:
                        type: integer
                        description: (Optional) The total number of items across all pages.
                      maxSize:
                        type: integer
                        description: The maximum page size that can be requested.
              examples:
                DevicePropertiesPaged:
                  summary: Device properties paged
                  description: This is an example of a list of device properties.
                  value:
                    items:
                      - key: custom.someProperty
                        value: someValue
                        type: custom
                    pages:
                      current: 1
                      size: 50
                      maxSize: 500
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    post:
      summary: Create device property
      x-soph-permissions:
        - 'mobile.device:update'
      description: Create custom device property.
      operationId: createCustomDeviceProperty
      tags:
        - Devices
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Device property.
              required:
                - key
                - value
              properties:
                key:
                  description: Key of the device property.
                  type: string
                  pattern: '^custom\.[a-zA-Z0-9.\-_]+$'
                  maxLength: 100
                value:
                  description: Value of the device property.
                  type: string
                  maxLength: 4096
            example:
              key: custom.someKey
              value: a test value
      responses:
        '201':
          description: The new custom device property.
          content:
            application/json:
              schema:
                type: object
                description: Device property.
                properties:
                  key:
                    description: Key of the device property.
                    type: string
                  value:
                    description: Value of the device property.
                    type: string
                  type:
                    type: string
                    format: enum
                    description: The type of a device property.
                    enum:
                      - system
                      - custom
                  createdAt:
                    description: Time when the object was created.
                    type: string
                    format: date-time
                  updatedAt:
                    description: Time when the object was updated.
                    type: string
                    format: date-time
                  createdBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  updatedBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
              examples:
                CustomDeviceProperty:
                  summary: Custom device property
                  description: This is an example of a custom device property.
                  value:
                    key: custom.someProperty
                    value: someValue
                    type: custom
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '422':
          description: Maximum number of custom device properties exceeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  '/devices/{id}/properties/{propertyKey}':
    put:
      summary: Update property by key
      x-soph-permissions:
        - 'mobile.device:update'
      description: Update a device property by key.
      operationId: updateCustomDeviceProperty
      tags:
        - Devices
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: propertyKey
          description: Device property key.
          required: true
          schema:
            type: string
            maxLength: 100
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Device property.
              required:
                - value
              properties:
                value:
                  description: Value of the device property.
                  type: string
                  maxLength: 4096
            example:
              value: changedValue
      responses:
        '200':
          description: A device property.
          content:
            application/json:
              schema:
                type: object
                description: Device property.
                properties:
                  key:
                    description: Key of the device property.
                    type: string
                  value:
                    description: Value of the device property.
                    type: string
                  type:
                    type: string
                    format: enum
                    description: The type of a device property.
                    enum:
                      - system
                      - custom
                  createdAt:
                    description: Time when the object was created.
                    type: string
                    format: date-time
                  updatedAt:
                    description: Time when the object was updated.
                    type: string
                    format: date-time
                  createdBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  updatedBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
              examples:
                CustomDevicePropertyUpdated:
                  summary: Custom device property
                  description: This is an example of a custom device property.
                  value:
                    key: custom.someProperty
                    value: someValue
                    type: custom
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    delete:
      summary: Delete property by key
      x-soph-permissions:
        - 'mobile.device:update'
      description: Delete single device property by key.
      operationId: deleteCustomDeviceProperty
      tags:
        - Devices
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: propertyKey
          description: Device property key.
          required: true
          schema:
            type: string
            maxLength: 100
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully processed Delete operation.
          content:
            application/json:
              schema:
                type: object
                description: Response to a previous request to delete an item.
                required:
                  - deleted
                properties:
                  deleted:
                    type: boolean
              example:
                deleted: true
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  '/devices/{id}/compliance-violations':
    get:
      summary: List violations
      x-soph-permissions:
        - 'mobile.device:read'
      description: Get list of compliance violations.
      operationId: getComplianceViolations
      tags:
        - Devices
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
        - in: query
          name: sort
          description: Defines how to sort the data.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              pattern: '(^[^:]+$)|(^[^:]+:(asc|desc)$)'
          examples:
            OneFieldDefaultSort:
              value:
                - lastSeenAt
            OneFieldSort:
              value:
                - 'lastSeenAt:asc'
            MoreThanOneTermSort:
              value:
                - 'lastSeenAt:asc'
                - 'hostname:desc'
        - in: query
          name: page
          required: false
          schema:
            type: integer
            default: 1
          description: 'The page number to fetch, starting with 1.'
        - in: query
          name: pageSize
          required: false
          schema:
            type: integer
            default: 50
          description: The size of the page requested.
        - in: query
          name: pageTotal
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
        - in: query
          name: violationSeverity
          description: Filter objects by compliance violation severity.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              format: enum
              description: The highest severity of a compliance violation.
              enum:
                - low
                - medium
                - high
      responses:
        '200':
          description: List of compliance violations.
          content:
            application/json:
              schema:
                type: object
                description: Paged response of compliance violations.
                required:
                  - items
                  - pages
                properties:
                  items:
                    type: array
                    description: List of compliance violations.
                    items:
                      type: object
                      description: >-
                        Information about a violation of a specific compliance
                        rule.
                      properties:
                        description:
                          description: Information about the compliance violation.
                          type: string
                          readOnly: true
                        detectedAt:
                          description: Timestamp of the violation detection.
                          type: string
                          format: date-time
                          readOnly: true
                        type:
                          description: The violation type.
                          type: string
                          readOnly: true
                        severity:
                          type: string
                          format: enum
                          description: The highest severity of a compliance violation.
                          enum:
                            - low
                            - medium
                            - high
                  pages:
                    type: object
                    required:
                      - current
                      - size
                      - maxSize
                    properties:
                      current:
                        type: integer
                        description: The 1-based page number being returned.
                      size:
                        type: integer
                        description: The size of the page being returned.
                      total:
                        type: integer
                        description: >-
                          (Optional) The total number of pages that exist, if
                          pageTotal=true in the request.
                      items:
                        type: integer
                        description: (Optional) The total number of items across all pages.
                      maxSize:
                        type: integer
                        description: The maximum page size that can be requested.
              examples:
                ComplianceViolationsPaged:
                  summary: Compliance violation paged
                  description: This is an example of a list of compliance violations.
                  value:
                    items:
                      - description: Os version is too low (< 9.1)
                        detectedAt: '2024-04-08T15:04:53.780Z'
                        type: minOsVersion
                        severity: high
                    pages:
                      current: 1
                      size: 50
                      maxSize: 500
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Unknown device ID.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  '/devices/{id}/scan-results':
    get:
      summary: List IXM scan results
      x-soph-permissions:
        - 'mobile.device:read'
      description: Get list of Intercept X for Mobile scan results.
      operationId: getScanResults
      tags:
        - Devices
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
        - in: query
          name: sort
          description: Defines how to sort the data.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              pattern: '(^[^:]+$)|(^[^:]+:(asc|desc)$)'
          examples:
            OneFieldDefaultSort:
              value:
                - lastSeenAt
            OneFieldSort:
              value:
                - 'lastSeenAt:asc'
            MoreThanOneTermSort:
              value:
                - 'lastSeenAt:asc'
                - 'hostname:desc'
        - in: query
          name: page
          required: false
          schema:
            type: integer
            default: 1
          description: 'The page number to fetch, starting with 1.'
        - in: query
          name: pageSize
          required: false
          schema:
            type: integer
            default: 50
          description: The size of the page requested.
        - in: query
          name: pageTotal
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
        - in: query
          name: search
          description: Term to search for in the specified search fields.
          required: false
          schema:
            type: string
            maxLength: 200
        - in: query
          name: searchFields
          description: List of fields to search in. Defaults to all applicable fields.
          style: form
          explode: false
          required: false
          schema:
            type: array
            default:
              - name
              - identifier
              - threatName
            items:
              type: string
              enum:
                - name
                - identifier
                - threatName
        - in: query
          name: scanResultType
          description: Filter objects by scanResultType.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              format: enum
              description: The type of a scan result.
              enum:
                - threat
                - suspicious
                - pua
                - lowReputation
      responses:
        '200':
          description: List of Intercept X for Mobile scan results.
          content:
            application/json:
              schema:
                type: object
                description: Paged response of scan results.
                required:
                  - items
                  - pages
                properties:
                  items:
                    type: array
                    description: List of scan results.
                    items:
                      type: object
                      description: Detection.
                      properties:
                        type:
                          type: string
                          format: enum
                          description: The type of a scan result.
                          enum:
                            - threat
                            - suspicious
                            - pua
                            - lowReputation
                        name:
                          description: The detection name.
                          type: string
                        identifier:
                          description: App package name or file path on the device.
                          type: string
                        version:
                          description: Version of the scanned app.
                          type: string
                        threatName:
                          description: Sophos threat name of the detection.
                          type: string
                        threatLink:
                          description: >-
                            Link to the Sophos search page for the given threat
                            name.
                          type: string
                        detectedAt:
                          description: The time when the detection was added to quarantine.
                          type: string
                          format: date-time
                  pages:
                    type: object
                    required:
                      - current
                      - size
                      - maxSize
                    properties:
                      current:
                        type: integer
                        description: The 1-based page number being returned.
                      size:
                        type: integer
                        description: The size of the page being returned.
                      total:
                        type: integer
                        description: >-
                          (Optional) The total number of pages that exist, if
                          pageTotal=true in the request.
                      items:
                        type: integer
                        description: (Optional) The total number of items across all pages.
                      maxSize:
                        type: integer
                        description: The maximum page size that can be requested.
              examples:
                ScanResultsPaged:
                  summary: Scan results paged
                  description: This is an example of a list of scan results.
                  value:
                    items:
                      - type: pua
                        name: Potential Unwanted App B
                        identifier: com.sophos.smsec.test.app.puaB
                        version: 1.2
                        threatName: App/RemAdmin/Android Killer Mobile
                        threatLink: >-
                          https://www.sophos.com/en-us/search-results#q=Andr~Test-B
                        detectedAt: '2023-01-01T00:00:00.000Z'
                    pages:
                      current: 1
                      size: 50
                      maxSize: 500
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Unknown device ID.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  '/devices/{id}/policies':
    get:
      summary: List assigned policies
      x-soph-permissions:
        - 'mobile.device:read'
      description: Get list of assigned policies.
      operationId: getAssignedPolicies
      tags:
        - Devices
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
        - in: query
          name: sort
          description: Defines how to sort the data.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              pattern: '(^[^:]+$)|(^[^:]+:(asc|desc)$)'
          examples:
            OneFieldDefaultSort:
              value:
                - lastSeenAt
            OneFieldSort:
              value:
                - 'lastSeenAt:asc'
            MoreThanOneTermSort:
              value:
                - 'lastSeenAt:asc'
                - 'hostname:desc'
        - in: query
          name: page
          required: false
          schema:
            type: integer
            default: 1
          description: 'The page number to fetch, starting with 1.'
        - in: query
          name: pageSize
          required: false
          schema:
            type: integer
            default: 50
          description: The size of the page requested.
        - in: query
          name: pageTotal
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
        - in: query
          name: search
          description: Term to search for in the specified search fields.
          required: false
          schema:
            type: string
            maxLength: 200
        - in: query
          name: searchFields
          description: List of fields to search in. Defaults to all applicable fields.
          style: form
          explode: false
          required: false
          schema:
            type: array
            default:
              - name
            items:
              type: string
              enum:
                - name
      responses:
        '200':
          description: List of assigned policies.
          content:
            application/json:
              schema:
                type: object
                description: Paged response of assigned policies.
                required:
                  - items
                  - pages
                properties:
                  items:
                    type: array
                    description: List of assigned policies.
                    items:
                      type: object
                      description: A policy assigned to a mobile device.
                      required:
                        - state
                      properties:
                        policy:
                          type: object
                          description: A policy reference.
                          required:
                            - id
                          properties:
                            id:
                              description: Unique ID of the device.
                              type: string
                              format: uuid
                            name:
                              description: Unique name of the policy.
                              type: string
                            platform:
                              type: string
                              format: enum
                              description: 'The device platform, i.e. the operating system.'
                              enum:
                                - iOS
                                - macOS
                                - android
                                - chrome
                                - windows
                            type:
                              description: The policy type.
                              type: string
                            version:
                              description: The policy version.
                              type: string
                        state:
                          type: string
                          format: enum
                          description: The status of an assigned policy.
                          enum:
                            - assigned
                            - applying
                            - applied
                            - updating
                            - removing
                        error:
                          description: An error.
                          type: string
                        component:
                          description: The component of this assigned policy.
                          type: string
                        name:
                          description: The policy name.
                          type: string
                        assignedAt:
                          description: Time when the object was assigned.
                          type: string
                          format: date-time
                        assignedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                  pages:
                    type: object
                    required:
                      - current
                      - size
                      - maxSize
                    properties:
                      current:
                        type: integer
                        description: The 1-based page number being returned.
                      size:
                        type: integer
                        description: The size of the page being returned.
                      total:
                        type: integer
                        description: >-
                          (Optional) The total number of pages that exist, if
                          pageTotal=true in the request.
                      items:
                        type: integer
                        description: (Optional) The total number of items across all pages.
                      maxSize:
                        type: integer
                        description: The maximum page size that can be requested.
              examples:
                AssignedPoliciesPaged:
                  summary: Assigned policies paged
                  description: This is an example of a list of assigned policies.
                  value:
                    items:
                      - policy:
                          id: 6d178afe-a9f0-4324-82dc-3176354f9e3c
                          name: My Policy
                          platform: android
                          type: threatDefense
                          version: 1
                        state: applied
                      - name: A deleted policy
                        state: removing
                    pages:
                      current: 1
                      size: 50
                      maxSize: 500
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Can't find device with that endpoint ID.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  '/devices/{id}/installed-apps':
    get:
      summary: List installed apps
      x-soph-permissions:
        - 'mobile.device:read'
      description: Get list of installed apps.
      operationId: getInstalledApps
      tags:
        - Devices
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
        - in: query
          name: sort
          description: Defines how to sort the data.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              pattern: '(^[^:]+$)|(^[^:]+:(asc|desc)$)'
          examples:
            OneFieldDefaultSort:
              value:
                - lastSeenAt
            OneFieldSort:
              value:
                - 'lastSeenAt:asc'
            MoreThanOneTermSort:
              value:
                - 'lastSeenAt:asc'
                - 'hostname:desc'
        - in: query
          name: page
          required: false
          schema:
            type: integer
            default: 1
          description: 'The page number to fetch, starting with 1.'
        - in: query
          name: pageSize
          required: false
          schema:
            type: integer
            default: 50
          description: The size of the page requested.
        - in: query
          name: pageTotal
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
        - in: query
          name: search
          description: Term to search for in the specified search fields.
          required: false
          schema:
            type: string
            maxLength: 200
        - in: query
          name: searchFields
          description: List of fields to search in. Defaults to all applicable fields.
          style: form
          explode: false
          required: false
          schema:
            type: array
            default:
              - name
              - version
              - identifier
            items:
              type: string
              enum:
                - name
                - version
                - identifier
        - in: query
          name: appSource
          description: Filter objects by appSource.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              format: enum
              description: The app source.
              enum:
                - store
                - nonStore
                - system
      responses:
        '200':
          description: List of installed apps.
          content:
            application/json:
              schema:
                type: object
                description: Paged response of installed apps.
                required:
                  - items
                  - pages
                properties:
                  items:
                    type: array
                    description: List of installed apps.
                    items:
                      type: object
                      description: Installed app.
                      properties:
                        name:
                          description: Name of the installed app.
                          type: string
                        version:
                          description: Version of the installed app.
                          type: string
                        identifier:
                          description: Identifier of the installed app.
                          type: string
                        source:
                          type: string
                          format: enum
                          description: The app source.
                          enum:
                            - store
                            - nonStore
                            - system
                        installedAt:
                          description: Time when the app was installed.
                          type: string
                          format: date-time
                  pages:
                    type: object
                    required:
                      - current
                      - size
                      - maxSize
                    properties:
                      current:
                        type: integer
                        description: The 1-based page number being returned.
                      size:
                        type: integer
                        description: The size of the page being returned.
                      total:
                        type: integer
                        description: >-
                          (Optional) The total number of pages that exist, if
                          pageTotal=true in the request.
                      items:
                        type: integer
                        description: (Optional) The total number of items across all pages.
                      maxSize:
                        type: integer
                        description: The maximum page size that can be requested.
              examples:
                InstalledAppsPaged:
                  summary: Installed apps paged
                  description: This is an example of a list of installed apps.
                  value:
                    items:
                      - name: Docs
                        version: 0.1
                        identifier: com.test.docs
                        source: store
                        installedAt: '2024-01-01T00:00:00Z'
                    pages:
                      current: 1
                      size: 50
                      maxSize: 500
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Unknown device ID.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  '/devices/{id}/location':
    get:
      summary: Get location
      x-soph-permissions:
        - 'mobile.device:read'
      description: Get device location.
      operationId: getLocation
      tags:
        - Devices
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      responses:
        '200':
          description: Device location.
          content:
            application/json:
              schema:
                type: object
                description: The location of a device.
                properties:
                  accuracy:
                    description: The accuracy of the location.
                    type: string
                  longitude:
                    description: The longitude.
                    type: number
                    format: float
                    example: 51.4925888
                  latitude:
                    description: The latitude.
                    type: number
                    format: float
                    example: 7.4492825
                  locatedAt:
                    description: The time the device was located.
                    type: string
                    format: date-time
              examples:
                Location:
                  summary: Location
                  description: This is an example request for getting a device location.
                  value:
                    accuracy: +- 4m
                    longitude: 51.4925888
                    latitude: 7.4492825
                    locatedAt: '2024-11-14T10:11:57.183Z'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Unknown device ID or location not available.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /device-groups:
    get:
      summary: List device groups
      x-soph-permissions:
        - 'mobile.device-group:read'
      description: Get list of device groups.
      operationId: getDeviceGroups
      tags:
        - DeviceGroups
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
        - in: query
          name: ids
          description: List of IDs.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - in: query
          name: sort
          description: Defines how to sort the data.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              pattern: '(^[^:]+$)|(^[^:]+:(asc|desc)$)'
          examples:
            OneFieldDefaultSort:
              value:
                - lastSeenAt
            OneFieldSort:
              value:
                - 'lastSeenAt:asc'
            MoreThanOneTermSort:
              value:
                - 'lastSeenAt:asc'
                - 'hostname:desc'
        - in: query
          name: page
          required: false
          schema:
            type: integer
            default: 1
          description: 'The page number to fetch, starting with 1.'
        - in: query
          name: pageSize
          required: false
          schema:
            type: integer
            default: 50
          description: The size of the page requested.
        - in: query
          name: pageTotal
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
        - in: query
          name: search
          description: Term to search for in the specified search fields.
          required: false
          schema:
            type: string
            maxLength: 200
        - in: query
          name: searchFields
          description: List of fields to search in. Defaults to all applicable fields.
          style: form
          explode: false
          required: false
          schema:
            type: array
            default:
              - name
            items:
              type: string
              enum:
                - name
      responses:
        '200':
          description: List of device groups.
          content:
            application/json:
              schema:
                type: object
                description: Paged response of device groups.
                required:
                  - items
                  - pages
                properties:
                  items:
                    type: array
                    description: List of device groups.
                    items:
                      type: object
                      description: Mobile device group response.
                      required:
                        - id
                        - tenant
                      properties:
                        id:
                          description: ID of the device group.
                          type: string
                          format: uuid
                        tenant:
                          description: Tenant this resource belongs to.
                          type: object
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                        name:
                          description: The device group name.
                          type: string
                          maxLength: 100
                        description:
                          description: A description of the device group.
                          type: string
                          maxLength: 500
                        createdAt:
                          description: The time when the device group was created.
                          type: string
                          format: date-time
                        updatedAt:
                          description: The last time when the device group was updated.
                          type: string
                          format: date-time
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        employeeCompliancePolicy:
                          type: object
                          description: A compliance policy reference.
                          required:
                            - id
                          properties:
                            id:
                              description: Unique ID of the compliance policy.
                              type: string
                              format: uuid
                            name:
                              description: The compliance policy name.
                              type: string
                        corporateCompliancePolicy:
                          type: object
                          description: A compliance policy reference.
                          required:
                            - id
                          properties:
                            id:
                              description: Unique ID of the compliance policy.
                              type: string
                              format: uuid
                            name:
                              description: The compliance policy name.
                              type: string
                        iosAutoEnrollment:
                          type: object
                          description: >-
                            Settings for iOS auto-enrollment in mobile device
                            groups.
                          properties:
                            enabled:
                              type: boolean
                              description: >-
                                Whether this device group is assigned to iOS
                                devices that auto-enroll with Sophos Mobile.
                            installSmcApp:
                              type: boolean
                              description: >-
                                Whether the SMC app will be installed via MDM
                                during enrollment.
                            url:
                              type: string
                              format: url
                              description: >-
                                The URL one must enter in Apple Configurator
                                when configuring devices for auto-enrollment.
                  pages:
                    type: object
                    required:
                      - current
                      - size
                      - maxSize
                    properties:
                      current:
                        type: integer
                        description: The 1-based page number being returned.
                      size:
                        type: integer
                        description: The size of the page being returned.
                      total:
                        type: integer
                        description: >-
                          (Optional) The total number of pages that exist, if
                          pageTotal=true in the request.
                      items:
                        type: integer
                        description: (Optional) The total number of items across all pages.
                      maxSize:
                        type: integer
                        description: The maximum page size that can be requested.
              examples:
                DeviceGroupsPaged:
                  summary: Device groups paged
                  description: This is an example of a list of device groups.
                  value:
                    items:
                      - id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        name: My device group
                        employeeCompliancePolicy:
                          id: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
                          name: The name of the compliance policy
                        corporateCompliancePolicy:
                          id: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
                          name: The name of the compliance policy
                      - id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        name: My device group
                        employeeCompliancePolicy:
                          id: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
                          name: The name of the compliance policy
                        corporateCompliancePolicy:
                          id: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
                          name: The name of the compliance policy
                        iosAutoEnrollment:
                          enabled: true
                          installSmcApp: true
                          url: >-
                            https://smc-device-if-cloudstation-us-east-1.prod.hydra.sophos.com/client-api/auto-enrollment/10815/4ff9ec17-aaaa-bbbb-cccc-32f193067e8f
                    pages:
                      current: 1
                      size: 50
                      maxSize: 500
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    post:
      summary: Create device group
      x-soph-permissions:
        - 'mobile.device-group:create'
      description: Create device group.
      operationId: createDeviceGroup
      tags:
        - DeviceGroups
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        description: Create device group.
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Mobile device group create request.
              required:
                - name
                - employeeCompliancePolicyId
                - corporateCompliancePolicyId
              properties:
                name:
                  description: The device group name.
                  type: string
                  maxLength: 100
                description:
                  description: A description of the device group.
                  type: string
                  maxLength: 500
                employeeCompliancePolicyId:
                  description: ID of the compliance policy for devices owned by the user.
                  type: string
                  format: uuid
                corporateCompliancePolicyId:
                  description: >-
                    ID of the compliance policy for devices owned by the
                    organization.
                  type: string
                  format: uuid
                iosAutoEnrollment:
                  type: object
                  description: Settings for iOS auto-enrollment in mobile device groups.
                  required:
                    - enabled
                  properties:
                    enabled:
                      type: boolean
                      description: >-
                        Whether this device group is assigned to iOS devices
                        that auto-enroll with Sophos Mobile..
                    installSmcApp:
                      type: boolean
                      description: >-
                        Whether the SMC app will be installed via MDM during
                        enrollment.
            example:
              name: My device group
              employeeCompliancePolicyId: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
              corporateCompliancePolicyId: 32DBD7D0-23F7-4DAF-AF4E-FEA7036D0304
      responses:
        '201':
          description: The new device group.
          content:
            application/json:
              schema:
                type: object
                description: Mobile device group response.
                required:
                  - id
                  - tenant
                properties:
                  id:
                    description: ID of the device group.
                    type: string
                    format: uuid
                  tenant:
                    description: Tenant this resource belongs to.
                    type: object
                    required:
                      - id
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                  name:
                    description: The device group name.
                    type: string
                    maxLength: 100
                  description:
                    description: A description of the device group.
                    type: string
                    maxLength: 500
                  createdAt:
                    description: The time when the device group was created.
                    type: string
                    format: date-time
                  updatedAt:
                    description: The last time when the device group was updated.
                    type: string
                    format: date-time
                  createdBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  updatedBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  employeeCompliancePolicy:
                    type: object
                    description: A compliance policy reference.
                    required:
                      - id
                    properties:
                      id:
                        description: Unique ID of the compliance policy.
                        type: string
                        format: uuid
                      name:
                        description: The compliance policy name.
                        type: string
                  corporateCompliancePolicy:
                    type: object
                    description: A compliance policy reference.
                    required:
                      - id
                    properties:
                      id:
                        description: Unique ID of the compliance policy.
                        type: string
                        format: uuid
                      name:
                        description: The compliance policy name.
                        type: string
                  iosAutoEnrollment:
                    type: object
                    description: Settings for iOS auto-enrollment in mobile device groups.
                    properties:
                      enabled:
                        type: boolean
                        description: >-
                          Whether this device group is assigned to iOS devices
                          that auto-enroll with Sophos Mobile.
                      installSmcApp:
                        type: boolean
                        description: >-
                          Whether the SMC app will be installed via MDM during
                          enrollment.
                      url:
                        type: string
                        format: url
                        description: >-
                          The URL one must enter in Apple Configurator when
                          configuring devices for auto-enrollment.
              examples:
                DeviceGroupCreated:
                  summary: Device group
                  description: This is an example of a device group response.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My device group
                    employeeCompliancePolicy:
                      id: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
                      name: The name of the compliance policy
                    corporateCompliancePolicy:
                      id: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
                      name: The name of the compliance policy
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Request contains no object.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '422':
          description: Maximum number of device groups exceeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  '/device-groups/{id}':
    get:
      summary: Device group by ID
      x-soph-permissions:
        - 'mobile.device-group:read'
      description: Get device group by ID.
      operationId: getDeviceGroupById
      tags:
        - DeviceGroups
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      responses:
        '200':
          description: Device group.
          content:
            application/json:
              schema:
                type: object
                description: Mobile device group response.
                required:
                  - id
                  - tenant
                properties:
                  id:
                    description: ID of the device group.
                    type: string
                    format: uuid
                  tenant:
                    description: Tenant this resource belongs to.
                    type: object
                    required:
                      - id
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                  name:
                    description: The device group name.
                    type: string
                    maxLength: 100
                  description:
                    description: A description of the device group.
                    type: string
                    maxLength: 500
                  createdAt:
                    description: The time when the device group was created.
                    type: string
                    format: date-time
                  updatedAt:
                    description: The last time when the device group was updated.
                    type: string
                    format: date-time
                  createdBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  updatedBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  employeeCompliancePolicy:
                    type: object
                    description: A compliance policy reference.
                    required:
                      - id
                    properties:
                      id:
                        description: Unique ID of the compliance policy.
                        type: string
                        format: uuid
                      name:
                        description: The compliance policy name.
                        type: string
                  corporateCompliancePolicy:
                    type: object
                    description: A compliance policy reference.
                    required:
                      - id
                    properties:
                      id:
                        description: Unique ID of the compliance policy.
                        type: string
                        format: uuid
                      name:
                        description: The compliance policy name.
                        type: string
                  iosAutoEnrollment:
                    type: object
                    description: Settings for iOS auto-enrollment in mobile device groups.
                    properties:
                      enabled:
                        type: boolean
                        description: >-
                          Whether this device group is assigned to iOS devices
                          that auto-enroll with Sophos Mobile.
                      installSmcApp:
                        type: boolean
                        description: >-
                          Whether the SMC app will be installed via MDM during
                          enrollment.
                      url:
                        type: string
                        format: url
                        description: >-
                          The URL one must enter in Apple Configurator when
                          configuring devices for auto-enrollment.
              examples:
                DeviceGroup:
                  summary: Device group
                  description: This is an example of a device group response.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My device group
                    employeeCompliancePolicy:
                      id: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
                      name: The name of the compliance policy
                    corporateCompliancePolicy:
                      id: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
                      name: The name of the compliance policy
                DeviceGroupWithIosAutoEnrollment:
                  summary: Device group with iOS auto-enrollment
                  description: >-
                    This is an example response for a device group that has the
                    'Enable iOS auto-enrollment' option selected.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My device group
                    employeeCompliancePolicy:
                      id: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
                      name: The name of the compliance policy
                    corporateCompliancePolicy:
                      id: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
                      name: The name of the compliance policy
                    iosAutoEnrollment:
                      enabled: true
                      installSmcApp: true
                      url: >-
                        https://smc-device-if-cloudstation-us-east-1.prod.hydra.sophos.com/client-api/auto-enrollment/10815/4ff9ec17-aaaa-bbbb-cccc-32f193067e8f
                DeviceGroupViewFull:
                  summary: Device group with view=full
                  description: >-
                    This is an example request for a device group using the
                    'view=full' query parameter.
                  value:
                    id: 85d66987-5c73-4b95-87f6-b0be28c47cbd
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My device group
                    description: The description of the device group
                    employeeCompliancePolicy:
                      id: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
                      name: The name of the compliance policy
                    corporateCompliancePolicy:
                      id: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
                      name: The name of the compliance policy
                    iosAutoEnrollment:
                      enabled: true
                      installSmcApp: true
                      url: >-
                        https://smc-device-if-cloudstation-us-east-1.prod.hydra.sophos.com/client-api/auto-enrollment/10815/4ff9ec17-aaaa-bbbb-cccc-32f193067e8f
                    createdAt: '2025-01-02T08:50:00.300Z'
                    createdBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                    updatedAt: '2025-01-02T08:50:01.300Z'
                    updatedBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                DeviceGroupViewSummary:
                  summary: Device group with view=summary
                  description: >-
                    This is an example request for a device group using the
                    'view=summary' query parameter.
                  value:
                    id: 85d66987-5c73-4b95-87f6-b0be28c47cbd
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My device group
                    description: The description of the device group
                    createdAt: '2025-01-02T08:50:00.300Z'
                    createdBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                    updatedAt: '2025-01-02T08:50:01.300Z'
                    updatedBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                DeviceGroupViewBasic:
                  summary: Device group with view=basic
                  description: >-
                    This is an example request for a device group using the
                    'view=basic' query parameter.
                  value:
                    id: 85d66987-5c73-4b95-87f6-b0be28c47cbd
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My device group
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Unknown device group.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    put:
      summary: Update device group
      x-soph-permissions:
        - 'mobile.device-group:update'
      description: Update device group.
      operationId: updateDeviceGroup
      tags:
        - DeviceGroups
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        description: Update device group.
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Mobile device group update request.
              required:
                - name
                - employeeCompliancePolicyId
                - corporateCompliancePolicyId
              properties:
                name:
                  description: The device group name.
                  type: string
                  maxLength: 100
                description:
                  description: A description of the device group.
                  type: string
                  maxLength: 500
                employeeCompliancePolicyId:
                  description: ID of the compliance policy for devices owned by the user.
                  type: string
                  format: uuid
                corporateCompliancePolicyId:
                  description: >-
                    ID of the compliance policy for devices owned by the
                    organization.
                  type: string
                  format: uuid
                iosAutoEnrollment:
                  type: object
                  description: Settings for iOS auto-enrollment in mobile device groups.
                  required:
                    - enabled
                  properties:
                    enabled:
                      type: boolean
                      description: >-
                        Whether this device group is assigned to iOS devices
                        that auto-enroll with Sophos Mobile..
                    installSmcApp:
                      type: boolean
                      description: >-
                        Whether the SMC app will be installed via MDM during
                        enrollment.
            example:
              name: My renamed device group
              employeeCompliancePolicyId: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
              corporateCompliancePolicyId: 32DBD7D0-23F7-4DAF-AF4E-FEA7036D0304
      responses:
        '200':
          description: The updated device group.
          content:
            application/json:
              schema:
                type: object
                description: Mobile device group response.
                required:
                  - id
                  - tenant
                properties:
                  id:
                    description: ID of the device group.
                    type: string
                    format: uuid
                  tenant:
                    description: Tenant this resource belongs to.
                    type: object
                    required:
                      - id
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                  name:
                    description: The device group name.
                    type: string
                    maxLength: 100
                  description:
                    description: A description of the device group.
                    type: string
                    maxLength: 500
                  createdAt:
                    description: The time when the device group was created.
                    type: string
                    format: date-time
                  updatedAt:
                    description: The last time when the device group was updated.
                    type: string
                    format: date-time
                  createdBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  updatedBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  employeeCompliancePolicy:
                    type: object
                    description: A compliance policy reference.
                    required:
                      - id
                    properties:
                      id:
                        description: Unique ID of the compliance policy.
                        type: string
                        format: uuid
                      name:
                        description: The compliance policy name.
                        type: string
                  corporateCompliancePolicy:
                    type: object
                    description: A compliance policy reference.
                    required:
                      - id
                    properties:
                      id:
                        description: Unique ID of the compliance policy.
                        type: string
                        format: uuid
                      name:
                        description: The compliance policy name.
                        type: string
                  iosAutoEnrollment:
                    type: object
                    description: Settings for iOS auto-enrollment in mobile device groups.
                    properties:
                      enabled:
                        type: boolean
                        description: >-
                          Whether this device group is assigned to iOS devices
                          that auto-enroll with Sophos Mobile.
                      installSmcApp:
                        type: boolean
                        description: >-
                          Whether the SMC app will be installed via MDM during
                          enrollment.
                      url:
                        type: string
                        format: url
                        description: >-
                          The URL one must enter in Apple Configurator when
                          configuring devices for auto-enrollment.
              examples:
                DeviceGroupUpdated:
                  summary: Device group
                  description: This is an example of a device group response.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My device group
                    employeeCompliancePolicy:
                      id: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
                      name: The name of the compliance policy
                    corporateCompliancePolicy:
                      id: 5C821A6D-8CD0-41FA-BE00-920BCEE025BC
                      name: The name of the compliance policy
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Request contains no object.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    delete:
      summary: Delete device group
      x-soph-permissions:
        - 'mobile.device-group:delete'
      description: Delete device group.
      operationId: deleteDeviceGroup
      tags:
        - DeviceGroups
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully processed Delete operation.
          content:
            application/json:
              schema:
                type: object
                description: Response to a previous request to delete an item.
                required:
                  - deleted
                properties:
                  deleted:
                    type: boolean
              example:
                deleted: true
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /actions:
    get:
      summary: Get list of actions
      x-soph-permissions:
        - 'mobile.action:read'
      description: Get list of actions.
      operationId: getActions
      tags:
        - Actions
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
        - in: query
          name: sort
          description: Defines how to sort the data.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              pattern: '(^[^:]+$)|(^[^:]+:(asc|desc)$)'
          examples:
            OneFieldDefaultSort:
              value:
                - lastSeenAt
            OneFieldSort:
              value:
                - 'lastSeenAt:asc'
            MoreThanOneTermSort:
              value:
                - 'lastSeenAt:asc'
                - 'hostname:desc'
        - in: query
          name: page
          required: false
          schema:
            type: integer
            default: 1
          description: 'The page number to fetch, starting with 1.'
        - in: query
          name: pageSize
          required: false
          schema:
            type: integer
            default: 50
          description: The size of the page requested.
        - in: query
          name: pageTotal
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
        - in: query
          name: ids
          description: List of IDs.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - in: query
          name: endpointIds
          description: List of endpoint IDs.
          style: form
          explode: false
          schema:
            type: array
            maxItems: 100
            items:
              type: string
              format: uuid
        - in: query
          name: actionType
          description: Filter actions by action type.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 100
        - in: query
          name: actionState
          description: Filter actions by status.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 100
        - in: query
          name: actionError
          description: Filter actions by error.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 100
        - in: query
          name: scheduledBefore
          description: >-
            Find actions scheduled before the given date and time (UTC) or
            within a time interval relative to the current date and time
            (exclusive).
          examples:
            FullUtcTimestamp:
              value: '2019-09-23T12:02:01.700Z'
            DateOnly:
              value: '2019-09-23T00:00:00.000Z'
            Duration:
              value: '-P3DT4H5M0S'
              summary: >-
                3 days 4 hours 5 minutes and 0 seconds ago, value is
                case-sensitive
            DaysOnly:
              value: P1D
              summary: one day from now
            HoursOnly:
              value: '-PT2H'
              summary: 2 hours ago
            MinutesOnly:
              value: '-PT20M'
              summary: 20 minutes ago
            SecondsOnly:
              value: PT200S
              summary: 200 seconds from now
          required: false
          schema:
            type: string
        - in: query
          name: scheduledAfter
          description: >-
            Find actions scheduled after the given date and time (UTC) or within
            a time interval relative to the current date and time (inclusive).
          examples:
            FullUtcTimestamp:
              value: '2019-09-23T12:02:01.700Z'
            DateOnly:
              value: '2019-09-23T00:00:00.000Z'
            Duration:
              value: PT4H500S
              summary: '4 hours and 500 seconds from now, value is case-sensitive'
            DaysOnly:
              value: '-P1D'
              summary: one day ago
            HoursOnly:
              value: PT2H
              summary: 2 hours from now
            MinutesOnly:
              value: PT20M
              summary: 20 minutes from now
            SecondsOnly:
              value: '-PT200S'
              summary: 200 seconds ago
          required: false
          schema:
            type: string
        - in: query
          name: executedBefore
          description: >-
            Find actions executed before the given date and time (UTC) or within
            a time interval relative to the current date and time (exclusive).
          examples:
            FullUtcTimestamp:
              value: '2019-09-23T12:02:01.700Z'
            DateOnly:
              value: '2019-09-23T00:00:00.000Z'
            Duration:
              value: '-P3DT4H5M0S'
              summary: >-
                3 days 4 hours 5 minutes and 0 seconds ago, value is
                case-sensitive
            DaysOnly:
              value: P1D
              summary: one day from now
            HoursOnly:
              value: '-PT2H'
              summary: 2 hours ago
            MinutesOnly:
              value: '-PT20M'
              summary: 20 minutes ago
            SecondsOnly:
              value: PT200S
              summary: 200 seconds from now
          required: false
          schema:
            type: string
        - in: query
          name: executedAfter
          description: >-
            Find actions executed after the given date and time (UTC) or within
            a time interval relative to the current date and time (inclusive).
          examples:
            FullUtcTimestamp:
              value: '2019-09-23T12:02:01.700Z'
            DateOnly:
              value: '2019-09-23T00:00:00.000Z'
            Duration:
              value: PT4H500S
              summary: '4 hours and 500 seconds from now, value is case-sensitive'
            DaysOnly:
              value: '-P1D'
              summary: one day ago
            HoursOnly:
              value: PT2H
              summary: 2 hours from now
            MinutesOnly:
              value: PT20M
              summary: 20 minutes from now
            SecondsOnly:
              value: '-PT200S'
              summary: 200 seconds ago
          required: false
          schema:
            type: string
      responses:
        '200':
          description: List of actions.
          content:
            application/json:
              schema:
                type: object
                description: Paged response of actions.
                required:
                  - items
                  - pages
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      description: Action object.
                      properties:
                        id:
                          description: The action ID.
                          type: string
                          format: uuid
                        tenant:
                          description: Tenant this resource belongs to.
                          type: object
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                        device:
                          type: object
                          description: A device reference.
                          required:
                            - id
                          properties:
                            id:
                              description: Unique ID of the device.
                              type: string
                              format: uuid
                            name:
                              description: The device name.
                              type: string
                        type:
                          description: The action type.
                          type: string
                        name:
                          description: The action name.
                          type: string
                        state:
                          description: The action status.
                          type: string
                        error:
                          description: The action's error description.
                          type: string
                        properties:
                          description: The action properties.
                          type: object
                          additionalProperties: true
                        scheduledAt:
                          description: Time when the action must be executed.
                          type: string
                          format: date-time
                        executedAt:
                          description: Time when the action was executed.
                          type: string
                          format: date-time
                        createdAt:
                          description: Time when the action was created.
                          type: string
                          format: date-time
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        updatedAt:
                          description: Time when the action was updated.
                          type: string
                          format: date-time
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                  pages:
                    type: object
                    required:
                      - current
                      - size
                      - maxSize
                    properties:
                      current:
                        type: integer
                        description: The 1-based page number being returned.
                      size:
                        type: integer
                        description: The size of the page being returned.
                      total:
                        type: integer
                        description: >-
                          (Optional) The total number of pages that exist, if
                          pageTotal=true in the request.
                      items:
                        type: integer
                        description: (Optional) The total number of items across all pages.
                      maxSize:
                        type: integer
                        description: The maximum page size that can be requested.
              examples:
                ActionsPaged:
                  summary: Paged actions
                  description: Example of a paged action response.
                  value:
                    items:
                      - id: ec09add5-a752-4b6e-b1b6-b89000252edb
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        device:
                          id: 52e793b5-6985-4c35-aa95-4f7752638592
                          name: My iPhone
                        type: sendMessage
                        state: successful
                      - id: ec09add5-a752-4b6e-b1b6-b89000252edb
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        device:
                          id: 52e793b5-6985-4c35-aa95-4f7752638592
                          name: My iPhone
                        type: sendMessage
                        state: skipped
                      - id: ec09add5-a752-4b6e-b1b6-b89000252edb
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        device:
                          id: 52e793b5-6985-4c35-aa95-4f7752638592
                          name: My iPhone
                        type: sendMessage
                        state: notified
                      - id: 85d66987-5c73-4b95-87f6-b0be28c47cbd
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        device:
                          id: 52e793b5-6985-4c35-aa95-4f7752631337
                          name: My Android
                        type: scan
                        state: failed
                        error: system.processing-failed
                    pages:
                      current: 1
                      size: 50
                      maxSize: 500
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  '/actions/{id}':
    get:
      summary: Get action by ID
      x-soph-permissions:
        - 'mobile.action:read'
      description: Get action by ID.
      operationId: getActionById
      tags:
        - Actions
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      responses:
        '200':
          description: Action.
          content:
            application/json:
              schema:
                type: object
                description: Action object.
                properties:
                  id:
                    description: The action ID.
                    type: string
                    format: uuid
                  tenant:
                    description: Tenant this resource belongs to.
                    type: object
                    required:
                      - id
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                  device:
                    type: object
                    description: A device reference.
                    required:
                      - id
                    properties:
                      id:
                        description: Unique ID of the device.
                        type: string
                        format: uuid
                      name:
                        description: The device name.
                        type: string
                  type:
                    description: The action type.
                    type: string
                  name:
                    description: The action name.
                    type: string
                  state:
                    description: The action status.
                    type: string
                  error:
                    description: The action's error description.
                    type: string
                  properties:
                    description: The action properties.
                    type: object
                    additionalProperties: true
                  scheduledAt:
                    description: Time when the action must be executed.
                    type: string
                    format: date-time
                  executedAt:
                    description: Time when the action was executed.
                    type: string
                    format: date-time
                  createdAt:
                    description: Time when the action was created.
                    type: string
                    format: date-time
                  createdBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
                  updatedAt:
                    description: Time when the action was updated.
                    type: string
                    format: date-time
                  updatedBy:
                    type: object
                    description: Principal reference.
                    required:
                      - type
                    properties:
                      id:
                        description: Principal ID.
                        type: string
                        format: uuid
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                          - system
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                      accountType:
                        type: string
                        format: enum
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      name:
                        description: Principal name or email.
                        type: string
              examples:
                ActionSuccessful:
                  summary: Action with status Successful
                  description: This is an example of a successful action.
                  value:
                    id: ec09add5-a752-4b6e-b1b6-b89000252edb
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    device:
                      id: 52e793b5-6985-4c35-aa95-4f7752638592
                      name: My iPhone
                    type: sendMessage
                    state: successful
                ActionSkipped:
                  summary: Action with status Skipped
                  description: This is an example of a skipped action.
                  value:
                    id: ec09add5-a752-4b6e-b1b6-b89000252edb
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    device:
                      id: 52e793b5-6985-4c35-aa95-4f7752638592
                      name: My iPhone
                    type: sendMessage
                    state: skipped
                ActionFailed:
                  summary: Action with status Failed
                  description: This is an example of a failed action.
                  value:
                    id: 85d66987-5c73-4b95-87f6-b0be28c47cbd
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    device:
                      id: 52e793b5-6985-4c35-aa95-4f7752631337
                      name: My Android
                    type: scan
                    state: failed
                    error: system.processing-failed
                EnrollmentAction:
                  summary: Enrollment action
                  description: This is an example of an enrollment action.
                  value:
                    id: 24a7386a-3e12-4810-b385-4ef975dc431a
                    device:
                      id: 52e793b5-6985-4c35-aa95-4f7752638592
                      name: My iPhone
                    state: notified
                    type: enroll
                    properties:
                      enrollment.email: someone@example.com
                      enrollment.token: xecpns38
                      enrollment.url: >-
                        smc-device-if-cloudstation-us-east-1.prod.hydra.sophos.com
                ActionViewFull:
                  summary: Action with view=full
                  description: >-
                    This is an example request for an action using the
                    'view=full' query parameter.
                  value:
                    id: 85d66987-5c73-4b95-87f6-b0be28c47cbd
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    device:
                      id: 52e793b5-6985-4c35-aa95-4f7752631337
                      name: My Android
                    type: scan
                    state: failed
                    error: system.processing-failed
                    scheduledAt: '2025-01-02T08:55:00.100Z'
                    executedAt: '2025-01-02T08:59:00.700Z'
                    createdAt: '2025-01-02T08:50:00.300Z'
                    createdBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                    updatedAt: '2025-01-02T08:50:01.300Z'
                    updatedBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                ActionViewSummary:
                  summary: Action with view=summary
                  description: >-
                    This is an example request for an action using the
                    'view=summary' query parameter.
                  value:
                    id: 85d66987-5c73-4b95-87f6-b0be28c47cbd
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    device:
                      id: 52e793b5-6985-4c35-aa95-4f7752631337
                      name: My Android
                    type: scan
                    state: failed
                    error: system.processing-failed
                    scheduledAt: '2025-01-02T08:55:00.100Z'
                    executedAt: '2025-01-02T08:59:00.700Z'
                    createdAt: '2025-01-02T08:50:00.300Z'
                    createdBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                    updatedAt: '2025-01-02T08:50:01.300Z'
                    updatedBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                ActionViewBasic:
                  summary: Action with view=basic
                  description: >-
                    This is an example request for an action using the
                    'view=basic' query parameter.
                  value:
                    id: 85d66987-5c73-4b95-87f6-b0be28c47cbd
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    device:
                      id: 52e793b5-6985-4c35-aa95-4f7752631337
                      name: My Android
                    type: scan
                    state: failed
                    error: system.processing-failed
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Can't find the requested device action.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    delete:
      summary: Delete action
      x-soph-permissions:
        - 'mobile.action:delete'
      description: Delete action.
      operationId: deleteAction
      tags:
        - Actions
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully processed Delete operation.
          content:
            application/json:
              schema:
                type: object
                description: Response to a previous request to delete an item.
                required:
                  - deleted
                properties:
                  deleted:
                    type: boolean
              example:
                deleted: true
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /actions/sync:
    post:
      summary: Sync action
      x-soph-permissions:
        - 'mobile.action.sync:create'
      description: Create Sync action.
      operationId: createSyncAction
      tags:
        - Actions
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        description: New sync action request.
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Action create request object.
              required:
                - endpoints
              properties:
                endpoints:
                  type: array
                  description: List of endpoint IDs.
                  minItems: 1
                  maxItems: 50
                  items:
                    type: string
                    format: uuid
            example:
              endpoints:
                - dd40830b-b103-4f9a-ae02-bbf0d792466d
                - e7e88612-d9b1-4e2f-b248-f2fad48579e4
      responses:
        '201':
          description: The action create response.
          content:
            application/json:
              schema:
                type: object
                description: Action create response object.
                properties:
                  created:
                    type: array
                    description: List of created actions.
                    items:
                      type: object
                      description: Action object.
                      properties:
                        id:
                          description: The action ID.
                          type: string
                          format: uuid
                        tenant:
                          description: Tenant this resource belongs to.
                          type: object
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                        device:
                          type: object
                          description: A device reference.
                          required:
                            - id
                          properties:
                            id:
                              description: Unique ID of the device.
                              type: string
                              format: uuid
                            name:
                              description: The device name.
                              type: string
                        type:
                          description: The action type.
                          type: string
                        name:
                          description: The action name.
                          type: string
                        state:
                          description: The action status.
                          type: string
                        error:
                          description: The action's error description.
                          type: string
                        properties:
                          description: The action properties.
                          type: object
                          additionalProperties: true
                        scheduledAt:
                          description: Time when the action must be executed.
                          type: string
                          format: date-time
                        executedAt:
                          description: Time when the action was executed.
                          type: string
                          format: date-time
                        createdAt:
                          description: Time when the action was created.
                          type: string
                          format: date-time
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        updatedAt:
                          description: Time when the action was updated.
                          type: string
                          format: date-time
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                  errors:
                    type: object
                    description: Action create error object.
                    properties:
                      failedToCreate:
                        description: Details why the action could not be created.
                        type: object
                        properties:
                          endpointsNotFound:
                            description: List of unknown endpoints.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsInWrongState:
                            description: List of endpoints with wrong status.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsupportedPlatform:
                            description: >-
                              List of endpoints with unsupported platforms for
                              the action.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsatisfiedArguments:
                            description: >-
                              List of endpoints with missing mandatory arguments
                              for the action.
                            type: array
                            items:
                              type: string
                              format: uuid
              examples:
                ActionCreateSyncResponse:
                  summary: Sync response
                  description: This is an example of a sync action create response.
                  value:
                    created:
                      - id: ec09add5-a752-4b6e-b1b6-b89000252edb
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        device:
                          id: 7670382c-9027-46ff-b51d-996c8d8ff8c2
                          name: My iPhone
                        type: sync
                        state: accepted
                    errors:
                      failedToCreate:
                        endpointNotFound:
                          - df7d0cee-8921-4c7d-a606-f5d6d6b6b393
                          - 43889ad3-17e1-45af-9d29-ff35421a6481
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '422':
          description: Maximum number of actions exceeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /actions/get-logs:
    post:
      summary: Get logs action
      x-soph-permissions:
        - 'mobile.action.get-logs:create'
      description: Create Get Log action.
      operationId: createGetLogAction
      tags:
        - Actions
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        description: New Get Logs action request.
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Action create request object.
              required:
                - endpoints
              properties:
                endpoints:
                  type: array
                  description: List of endpoint IDs.
                  minItems: 1
                  maxItems: 50
                  items:
                    type: string
                    format: uuid
            example:
              endpoints:
                - dd40830b-b103-4f9a-ae02-bbf0d792466d
                - e7e88612-d9b1-4e2f-b248-f2fad48579e4
      responses:
        '201':
          description: The action create response.
          content:
            application/json:
              schema:
                type: object
                description: Action create response object.
                properties:
                  created:
                    type: array
                    description: List of created actions.
                    items:
                      type: object
                      description: Action object.
                      properties:
                        id:
                          description: The action ID.
                          type: string
                          format: uuid
                        tenant:
                          description: Tenant this resource belongs to.
                          type: object
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                        device:
                          type: object
                          description: A device reference.
                          required:
                            - id
                          properties:
                            id:
                              description: Unique ID of the device.
                              type: string
                              format: uuid
                            name:
                              description: The device name.
                              type: string
                        type:
                          description: The action type.
                          type: string
                        name:
                          description: The action name.
                          type: string
                        state:
                          description: The action status.
                          type: string
                        error:
                          description: The action's error description.
                          type: string
                        properties:
                          description: The action properties.
                          type: object
                          additionalProperties: true
                        scheduledAt:
                          description: Time when the action must be executed.
                          type: string
                          format: date-time
                        executedAt:
                          description: Time when the action was executed.
                          type: string
                          format: date-time
                        createdAt:
                          description: Time when the action was created.
                          type: string
                          format: date-time
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        updatedAt:
                          description: Time when the action was updated.
                          type: string
                          format: date-time
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                  errors:
                    type: object
                    description: Action create error object.
                    properties:
                      failedToCreate:
                        description: Details why the action could not be created.
                        type: object
                        properties:
                          endpointsNotFound:
                            description: List of unknown endpoints.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsInWrongState:
                            description: List of endpoints with wrong status.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsupportedPlatform:
                            description: >-
                              List of endpoints with unsupported platforms for
                              the action.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsatisfiedArguments:
                            description: >-
                              List of endpoints with missing mandatory arguments
                              for the action.
                            type: array
                            items:
                              type: string
                              format: uuid
              examples:
                ActionCreateGetLogsResponse:
                  summary: Get Logs response
                  description: This is an example of a get logs action create response.
                  value:
                    created:
                      - id: ec09add5-a752-4b6e-b1b6-b89000252edb
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        device:
                          id: 7670382c-9027-46ff-b51d-996c8d8ff8c2
                          name: My iPhone
                        type: getLogs
                        state: accepted
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '422':
          description: Maximum number of actions exceeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /actions/scan:
    post:
      summary: Scan action
      x-soph-permissions:
        - 'mobile.action.scan:create'
      description: Create Scan action.
      operationId: createScanAction
      tags:
        - Actions
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        description: New Scan action request.
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Action create request object.
              required:
                - endpoints
              properties:
                endpoints:
                  type: array
                  description: List of endpoint IDs.
                  minItems: 1
                  maxItems: 50
                  items:
                    type: string
                    format: uuid
            example:
              endpoints:
                - dd40830b-b103-4f9a-ae02-bbf0d792466d
                - e7e88612-d9b1-4e2f-b248-f2fad48579e4
      responses:
        '201':
          description: The action create response.
          content:
            application/json:
              schema:
                type: object
                description: Action create response object.
                properties:
                  created:
                    type: array
                    description: List of created actions.
                    items:
                      type: object
                      description: Action object.
                      properties:
                        id:
                          description: The action ID.
                          type: string
                          format: uuid
                        tenant:
                          description: Tenant this resource belongs to.
                          type: object
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                        device:
                          type: object
                          description: A device reference.
                          required:
                            - id
                          properties:
                            id:
                              description: Unique ID of the device.
                              type: string
                              format: uuid
                            name:
                              description: The device name.
                              type: string
                        type:
                          description: The action type.
                          type: string
                        name:
                          description: The action name.
                          type: string
                        state:
                          description: The action status.
                          type: string
                        error:
                          description: The action's error description.
                          type: string
                        properties:
                          description: The action properties.
                          type: object
                          additionalProperties: true
                        scheduledAt:
                          description: Time when the action must be executed.
                          type: string
                          format: date-time
                        executedAt:
                          description: Time when the action was executed.
                          type: string
                          format: date-time
                        createdAt:
                          description: Time when the action was created.
                          type: string
                          format: date-time
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        updatedAt:
                          description: Time when the action was updated.
                          type: string
                          format: date-time
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                  errors:
                    type: object
                    description: Action create error object.
                    properties:
                      failedToCreate:
                        description: Details why the action could not be created.
                        type: object
                        properties:
                          endpointsNotFound:
                            description: List of unknown endpoints.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsInWrongState:
                            description: List of endpoints with wrong status.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsupportedPlatform:
                            description: >-
                              List of endpoints with unsupported platforms for
                              the action.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsatisfiedArguments:
                            description: >-
                              List of endpoints with missing mandatory arguments
                              for the action.
                            type: array
                            items:
                              type: string
                              format: uuid
              examples:
                ActionCreateScanResponse:
                  summary: Create Scan response
                  description: This is an example of a scan action create response.
                  value:
                    created:
                      - id: ec09add5-a752-4b6e-b1b6-b89000252edb
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        device:
                          id: 7670382c-9027-46ff-b51d-996c8d8ff8c2
                          name: My iPhone
                        type: scan
                        state: accepted
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '422':
          description: Maximum number of actions exceeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /actions/unenroll:
    post:
      summary: Unenroll action
      x-soph-permissions:
        - 'mobile.action.unenroll:create'
      description: Create Unenroll action.
      operationId: createUnenrollAction
      tags:
        - Actions
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        description: New Unenroll action request.
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Action create request object.
              required:
                - endpoints
              properties:
                endpoints:
                  type: array
                  description: List of endpoint IDs.
                  minItems: 1
                  maxItems: 50
                  items:
                    type: string
                    format: uuid
            example:
              endpoints:
                - dd40830b-b103-4f9a-ae02-bbf0d792466d
                - e7e88612-d9b1-4e2f-b248-f2fad48579e4
      responses:
        '201':
          description: The action create response.
          content:
            application/json:
              schema:
                type: object
                description: Action create response object.
                properties:
                  created:
                    type: array
                    description: List of created actions.
                    items:
                      type: object
                      description: Action object.
                      properties:
                        id:
                          description: The action ID.
                          type: string
                          format: uuid
                        tenant:
                          description: Tenant this resource belongs to.
                          type: object
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                        device:
                          type: object
                          description: A device reference.
                          required:
                            - id
                          properties:
                            id:
                              description: Unique ID of the device.
                              type: string
                              format: uuid
                            name:
                              description: The device name.
                              type: string
                        type:
                          description: The action type.
                          type: string
                        name:
                          description: The action name.
                          type: string
                        state:
                          description: The action status.
                          type: string
                        error:
                          description: The action's error description.
                          type: string
                        properties:
                          description: The action properties.
                          type: object
                          additionalProperties: true
                        scheduledAt:
                          description: Time when the action must be executed.
                          type: string
                          format: date-time
                        executedAt:
                          description: Time when the action was executed.
                          type: string
                          format: date-time
                        createdAt:
                          description: Time when the action was created.
                          type: string
                          format: date-time
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        updatedAt:
                          description: Time when the action was updated.
                          type: string
                          format: date-time
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                  errors:
                    type: object
                    description: Action create error object.
                    properties:
                      failedToCreate:
                        description: Details why the action could not be created.
                        type: object
                        properties:
                          endpointsNotFound:
                            description: List of unknown endpoints.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsInWrongState:
                            description: List of endpoints with wrong status.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsupportedPlatform:
                            description: >-
                              List of endpoints with unsupported platforms for
                              the action.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsatisfiedArguments:
                            description: >-
                              List of endpoints with missing mandatory arguments
                              for the action.
                            type: array
                            items:
                              type: string
                              format: uuid
              examples:
                ActionCreateUnenrollResponse:
                  summary: Unenroll response
                  description: This is an example of an unenroll create response.
                  value:
                    created:
                      - id: ec09add5-a752-4b6e-b1b6-b89000252edb
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        device:
                          id: 7670382c-9027-46ff-b51d-996c8d8ff8c2
                          name: My iPhone
                        type: unenroll
                        state: accepted
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '422':
          description: Maximum number of actions exceeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /actions/send-message:
    post:
      summary: Send Message action
      x-soph-permissions:
        - 'mobile.action.send-message:create'
      description: Create Send Message action.
      operationId: createSendMessageAction
      tags:
        - Actions
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        description: New Send Message action request.
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Action create request object.
              required:
                - endpoints
                - arguments
              properties:
                endpoints:
                  type: array
                  description: List of endpoint IDs.
                  minItems: 1
                  maxItems: 50
                  items:
                    type: string
                    format: uuid
                arguments:
                  type: object
                  description: Parameter object.
                  required:
                    - message
                  properties:
                    message:
                      description: A message for the Send Message action.
                      type: string
                      maxLength: 500
            example:
              arguments:
                message: Hello World!
              endpoints:
                - dd40830b-b103-4f9a-ae02-bbf0d792466d
                - e7e88612-d9b1-4e2f-b248-f2fad48579e4
      responses:
        '201':
          description: The action create response.
          content:
            application/json:
              schema:
                type: object
                description: Action create response object.
                properties:
                  created:
                    type: array
                    description: List of created actions.
                    items:
                      type: object
                      description: Action object.
                      properties:
                        id:
                          description: The action ID.
                          type: string
                          format: uuid
                        tenant:
                          description: Tenant this resource belongs to.
                          type: object
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                        device:
                          type: object
                          description: A device reference.
                          required:
                            - id
                          properties:
                            id:
                              description: Unique ID of the device.
                              type: string
                              format: uuid
                            name:
                              description: The device name.
                              type: string
                        type:
                          description: The action type.
                          type: string
                        name:
                          description: The action name.
                          type: string
                        state:
                          description: The action status.
                          type: string
                        error:
                          description: The action's error description.
                          type: string
                        properties:
                          description: The action properties.
                          type: object
                          additionalProperties: true
                        scheduledAt:
                          description: Time when the action must be executed.
                          type: string
                          format: date-time
                        executedAt:
                          description: Time when the action was executed.
                          type: string
                          format: date-time
                        createdAt:
                          description: Time when the action was created.
                          type: string
                          format: date-time
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        updatedAt:
                          description: Time when the action was updated.
                          type: string
                          format: date-time
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                  errors:
                    type: object
                    description: Action create error object.
                    properties:
                      failedToCreate:
                        description: Details why the action could not be created.
                        type: object
                        properties:
                          endpointsNotFound:
                            description: List of unknown endpoints.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsInWrongState:
                            description: List of endpoints with wrong status.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsupportedPlatform:
                            description: >-
                              List of endpoints with unsupported platforms for
                              the action.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsatisfiedArguments:
                            description: >-
                              List of endpoints with missing mandatory arguments
                              for the action.
                            type: array
                            items:
                              type: string
                              format: uuid
              examples:
                ActionCreateSendMessageResponse:
                  summary: Send Message response
                  description: This is an example of a send message create response.
                  value:
                    created:
                      - id: ec09add5-a752-4b6e-b1b6-b89000252edb
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        device:
                          id: 7670382c-9027-46ff-b51d-996c8d8ff8c2
                          name: My iPhone
                        type: sendMessage
                        state: accepted
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '422':
          description: Maximum number of actions exceeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /actions/locate:
    post:
      summary: Locate action
      x-soph-permissions:
        - 'mobile.action.locate:create'
      description: Create Locate action.
      operationId: createLocateAction
      tags:
        - Actions
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Action create request object.
              required:
                - endpoints
                - arguments
              properties:
                endpoints:
                  type: array
                  description: List of endpoint IDs.
                  items:
                    type: string
                    format: uuid
                  maxItems: 50
                arguments:
                  type: object
                  description: Parameter object.
                  required:
                    - reason
                  properties:
                    reason:
                      description: >-
                        The reason for locating the device(s). Will be logged in
                        the Sophos Mobile privacy log.
                      type: string
                      maxLength: 255
            example:
              arguments:
                reason: Device is lost and must be located.
              endpoints:
                - dd40830b-b103-4f9a-ae02-bbf0d792466d
                - e7e88612-d9b1-4e2f-b248-f2fad48579e4
      responses:
        '201':
          description: The action create response.
          content:
            application/json:
              schema:
                type: object
                description: Action create response object.
                properties:
                  created:
                    type: array
                    description: List of created actions.
                    items:
                      type: object
                      description: Action object.
                      properties:
                        id:
                          description: The action ID.
                          type: string
                          format: uuid
                        tenant:
                          description: Tenant this resource belongs to.
                          type: object
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                        device:
                          type: object
                          description: A device reference.
                          required:
                            - id
                          properties:
                            id:
                              description: Unique ID of the device.
                              type: string
                              format: uuid
                            name:
                              description: The device name.
                              type: string
                        type:
                          description: The action type.
                          type: string
                        name:
                          description: The action name.
                          type: string
                        state:
                          description: The action status.
                          type: string
                        error:
                          description: The action's error description.
                          type: string
                        properties:
                          description: The action properties.
                          type: object
                          additionalProperties: true
                        scheduledAt:
                          description: Time when the action must be executed.
                          type: string
                          format: date-time
                        executedAt:
                          description: Time when the action was executed.
                          type: string
                          format: date-time
                        createdAt:
                          description: Time when the action was created.
                          type: string
                          format: date-time
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        updatedAt:
                          description: Time when the action was updated.
                          type: string
                          format: date-time
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                  errors:
                    type: object
                    description: Action create error object.
                    properties:
                      failedToCreate:
                        description: Details why the action could not be created.
                        type: object
                        properties:
                          endpointsNotFound:
                            description: List of unknown endpoints.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsInWrongState:
                            description: List of endpoints with wrong status.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsupportedPlatform:
                            description: >-
                              List of endpoints with unsupported platforms for
                              the action.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsatisfiedArguments:
                            description: >-
                              List of endpoints with missing mandatory arguments
                              for the action.
                            type: array
                            items:
                              type: string
                              format: uuid
              examples:
                ActionCreateLocateResponse:
                  summary: Locate response
                  description: This is an example of a locate create response.
                  value:
                    created:
                      - id: ec09add5-a752-4b6e-b1b6-b89000252edb
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        device:
                          id: 7670382c-9027-46ff-b51d-996c8d8ff8c2
                          name: My iPhone
                        type: locate
                        state: accepted
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '422':
          description: Maximum number of actions exceeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /actions/lock:
    post:
      summary: Lock action
      x-soph-permissions:
        - 'mobile.action.lock:create'
      description: Create Lock action.
      operationId: createLockAction
      tags:
        - Actions
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Action create request object.
              required:
                - endpoints
                - arguments
              properties:
                endpoints:
                  type: array
                  description: List of endpoint IDs.
                  items:
                    type: string
                    format: uuid
                  maxItems: 50
                arguments:
                  type: object
                  description: Parameter object.
                  properties:
                    lockCode:
                      description: A lock code. Only required for Macs.
                      type: string
                      pattern: '^[0-9]{6}$'
                    lockScreenMessage:
                      description: >-
                        A message that's shown on the device's lock screen. Only
                        supported on Android and iOS.
                      type: string
                      maxLength: 500
                    phoneNumber:
                      description: The phone number that's shown on locked iPhones.
                      type: string
                      maxLength: 50
                      pattern: '^(\+?\d+|.{0})$'
            example:
              arguments:
                lockCode: 123456
              endpoints:
                - dd40830b-b103-4f9a-ae02-bbf0d792466d
                - e7e88612-d9b1-4e2f-b248-f2fad48579e4
      responses:
        '201':
          description: The action create response.
          content:
            application/json:
              schema:
                type: object
                description: Action create response object.
                properties:
                  created:
                    type: array
                    description: List of created actions.
                    items:
                      type: object
                      description: Action object.
                      properties:
                        id:
                          description: The action ID.
                          type: string
                          format: uuid
                        tenant:
                          description: Tenant this resource belongs to.
                          type: object
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                        device:
                          type: object
                          description: A device reference.
                          required:
                            - id
                          properties:
                            id:
                              description: Unique ID of the device.
                              type: string
                              format: uuid
                            name:
                              description: The device name.
                              type: string
                        type:
                          description: The action type.
                          type: string
                        name:
                          description: The action name.
                          type: string
                        state:
                          description: The action status.
                          type: string
                        error:
                          description: The action's error description.
                          type: string
                        properties:
                          description: The action properties.
                          type: object
                          additionalProperties: true
                        scheduledAt:
                          description: Time when the action must be executed.
                          type: string
                          format: date-time
                        executedAt:
                          description: Time when the action was executed.
                          type: string
                          format: date-time
                        createdAt:
                          description: Time when the action was created.
                          type: string
                          format: date-time
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        updatedAt:
                          description: Time when the action was updated.
                          type: string
                          format: date-time
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                  errors:
                    type: object
                    description: Action create error object.
                    properties:
                      failedToCreate:
                        description: Details why the action could not be created.
                        type: object
                        properties:
                          endpointsNotFound:
                            description: List of unknown endpoints.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsInWrongState:
                            description: List of endpoints with wrong status.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsupportedPlatform:
                            description: >-
                              List of endpoints with unsupported platforms for
                              the action.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsatisfiedArguments:
                            description: >-
                              List of endpoints with missing mandatory arguments
                              for the action.
                            type: array
                            items:
                              type: string
                              format: uuid
              examples:
                ActionCreateLockResponse:
                  summary: Lock response
                  description: This is an example of a lock create response.
                  value:
                    created:
                      - id: ec09add5-a752-4b6e-b1b6-b89000252edb
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        device:
                          id: 7670382c-9027-46ff-b51d-996c8d8ff8c2
                          name: My iPhone
                        type: lock
                        state: accepted
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '422':
          description: Maximum number of actions exceeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /actions/wipe:
    post:
      summary: Wipe action
      x-soph-permissions:
        - 'mobile.action.wipe:create'
      description: Create Wipe action.
      operationId: createWipeAction
      tags:
        - Actions
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Action create request object.
              required:
                - endpoints
                - arguments
              properties:
                endpoints:
                  type: array
                  description: List of endpoint IDs.
                  items:
                    type: string
                    format: uuid
                  maxItems: 50
                arguments:
                  type: object
                  description: Parameter object.
                  properties:
                    wipeCode:
                      description: The code that's required for wiping Macs.
                      type: string
                      maxLength: 6
                      pattern: '^[0-9]{6}$'
                    preserveDataPlan:
                      description: >-
                        An option to preserve configured data plans (e.g. eSIM).
                        Only supported on iOS.
                      type: boolean
                    disallowProximitySetup:
                      description: >-
                        An option to disallow proximity setup for wiped devices.
                        Only supported on iOS.
                      type: boolean
            example:
              arguments:
                wipeCode: 123456
              endpoints:
                - dd40830b-b103-4f9a-ae02-bbf0d792466d
                - e7e88612-d9b1-4e2f-b248-f2fad48579e4
      responses:
        '201':
          description: The action create response.
          content:
            application/json:
              schema:
                type: object
                description: Action create response object.
                properties:
                  created:
                    type: array
                    description: List of created actions.
                    items:
                      type: object
                      description: Action object.
                      properties:
                        id:
                          description: The action ID.
                          type: string
                          format: uuid
                        tenant:
                          description: Tenant this resource belongs to.
                          type: object
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                        device:
                          type: object
                          description: A device reference.
                          required:
                            - id
                          properties:
                            id:
                              description: Unique ID of the device.
                              type: string
                              format: uuid
                            name:
                              description: The device name.
                              type: string
                        type:
                          description: The action type.
                          type: string
                        name:
                          description: The action name.
                          type: string
                        state:
                          description: The action status.
                          type: string
                        error:
                          description: The action's error description.
                          type: string
                        properties:
                          description: The action properties.
                          type: object
                          additionalProperties: true
                        scheduledAt:
                          description: Time when the action must be executed.
                          type: string
                          format: date-time
                        executedAt:
                          description: Time when the action was executed.
                          type: string
                          format: date-time
                        createdAt:
                          description: Time when the action was created.
                          type: string
                          format: date-time
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        updatedAt:
                          description: Time when the action was updated.
                          type: string
                          format: date-time
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                  errors:
                    type: object
                    description: Action create error object.
                    properties:
                      failedToCreate:
                        description: Details why the action could not be created.
                        type: object
                        properties:
                          endpointsNotFound:
                            description: List of unknown endpoints.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsInWrongState:
                            description: List of endpoints with wrong status.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsupportedPlatform:
                            description: >-
                              List of endpoints with unsupported platforms for
                              the action.
                            type: array
                            items:
                              type: string
                              format: uuid
                          endpointsWithUnsatisfiedArguments:
                            description: >-
                              List of endpoints with missing mandatory arguments
                              for the action.
                            type: array
                            items:
                              type: string
                              format: uuid
              examples:
                ActionCreateWipeResponse:
                  summary: Wipe response
                  description: This is an example of a wipe create response.
                  value:
                    created:
                      - id: ec09add5-a752-4b6e-b1b6-b89000252edb
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        device:
                          id: 7670382c-9027-46ff-b51d-996c8d8ff8c2
                          name: My iPhone
                        type: wipe
                        state: accepted
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '422':
          description: Maximum number of actions exceeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /app-groups:
    get:
      summary: List app groups
      x-soph-permissions:
        - 'mobile.app-group:read'
      description: Get list of app groups.
      operationId: getAppGroups
      tags:
        - AppGroups
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
        - in: query
          name: ids
          description: List of IDs.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - in: query
          name: sort
          description: Defines how to sort the data.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              pattern: '(^[^:]+$)|(^[^:]+:(asc|desc)$)'
          examples:
            OneFieldDefaultSort:
              value:
                - lastSeenAt
            OneFieldSort:
              value:
                - 'lastSeenAt:asc'
            MoreThanOneTermSort:
              value:
                - 'lastSeenAt:asc'
                - 'hostname:desc'
        - in: query
          name: page
          required: false
          schema:
            type: integer
            default: 1
          description: 'The page number to fetch, starting with 1.'
        - in: query
          name: pageSize
          required: false
          schema:
            type: integer
            default: 50
          description: The size of the page requested.
        - in: query
          name: pageTotal
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
        - in: query
          name: search
          description: Term to search for in the specified search fields.
          required: false
          schema:
            type: string
            maxLength: 200
        - in: query
          name: searchFields
          description: List of fields to search in. Defaults to all applicable fields.
          style: form
          explode: false
          required: false
          schema:
            type: array
            default:
              - name
            items:
              type: string
              enum:
                - name
        - in: query
          name: platform
          description: Filter objects by platform.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              format: enum
              description: 'The device platform, i.e. the operating system.'
              enum:
                - iOS
                - macOS
                - android
                - chrome
                - windows
      responses:
        '200':
          description: List of app groups.
          content:
            application/json:
              schema:
                type: object
                description: Paged response of app groups.
                required:
                  - items
                  - pages
                properties:
                  items:
                    type: array
                    description: List of app groups.
                    items:
                      type: object
                      description: Mobile app group summary response.
                      required:
                        - id
                        - tenant
                      properties:
                        id:
                          description: ID of the app group.
                          type: string
                          format: uuid
                        tenant:
                          description: Tenant this resource belongs to.
                          type: object
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                        name:
                          description: The app group name.
                          type: string
                          maxLength: 255
                        count:
                          description: The number of apps in this app group.
                          type: integer
                        platform:
                          type: string
                          format: enum
                          description: 'The device platform, i.e. the operating system.'
                          enum:
                            - iOS
                            - macOS
                            - android
                            - chrome
                            - windows
                        createdAt:
                          description: Time when the app group was created.
                          type: string
                          format: date-time
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        updatedAt:
                          description: Time when the app group was last updated.
                          type: string
                          format: date-time
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                  pages:
                    type: object
                    required:
                      - current
                      - size
                      - maxSize
                    properties:
                      current:
                        type: integer
                        description: The 1-based page number being returned.
                      size:
                        type: integer
                        description: The size of the page being returned.
                      total:
                        type: integer
                        description: >-
                          (Optional) The total number of pages that exist, if
                          pageTotal=true in the request.
                      items:
                        type: integer
                        description: (Optional) The total number of items across all pages.
                      maxSize:
                        type: integer
                        description: The maximum page size that can be requested.
              examples:
                AppGroupsPaged:
                  summary: App groups paged
                  description: This is an example of a list of app groups.
                  value:
                    items:
                      - id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        name: My app group
                        count: 1
                        platform: android
                    pages:
                      current: 1
                      size: 50
                      maxSize: 500
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    post:
      summary: Create app group
      x-soph-permissions:
        - 'mobile.app-group:create'
      description: Create app group.
      operationId: createAppGroup
      tags:
        - AppGroups
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        description: Create app group.
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Mobile app group create request.
              required:
                - name
                - platform
                - apps
              properties:
                name:
                  description: The app group name.
                  type: string
                  maxLength: 255
                apps:
                  type: array
                  description: A list of app group entries.
                  minItems: 1
                  maxItems: 10000
                  uniqueItems: true
                  items:
                    type: object
                    description: App group entry for create or update requests.
                    required:
                      - identifier
                      - name
                    properties:
                      identifier:
                        description: 'The app identifier, for example, the package name.'
                        type: string
                        maxLength: 255
                      name:
                        description: The app name.
                        type: string
                        maxLength: 255
                      link:
                        description: A link to the app.
                        type: string
                        format: url
                        maxLength: 500
                platform:
                  type: string
                  format: enum
                  description: 'The device platform, i.e. the operating system.'
                  enum:
                    - iOS
                    - macOS
                    - android
                    - chrome
                    - windows
            example:
              name: My app group
              apps:
                - identifier: com.sophos.smsec
                  name: Sophos Intercept X for Mobile
                  link: 'https://www.sophos.com'
              platform: chrome
      responses:
        '201':
          description: The new app group.
          content:
            application/json:
              schema:
                type: object
                description: Mobile app group response.
                allOf:
                  - type: object
                    description: Mobile app group summary response.
                    required:
                      - id
                      - tenant
                    properties:
                      id:
                        description: ID of the app group.
                        type: string
                        format: uuid
                      tenant:
                        description: Tenant this resource belongs to.
                        type: object
                        required:
                          - id
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                      name:
                        description: The app group name.
                        type: string
                        maxLength: 255
                      count:
                        description: The number of apps in this app group.
                        type: integer
                      platform:
                        type: string
                        format: enum
                        description: 'The device platform, i.e. the operating system.'
                        enum:
                          - iOS
                          - macOS
                          - android
                          - chrome
                          - windows
                      createdAt:
                        description: Time when the app group was created.
                        type: string
                        format: date-time
                      createdBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                      updatedAt:
                        description: Time when the app group was last updated.
                        type: string
                        format: date-time
                      updatedBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                properties:
                  apps:
                    type: array
                    description: A list of app group entries.
                    minItems: 1
                    maxItems: 10000
                    uniqueItems: true
                    items:
                      type: object
                      description: App group entry for mobile device.
                      properties:
                        identifier:
                          description: 'The app identifier, for example, the package name.'
                          type: string
                          maxLength: 255
                        name:
                          description: The app name.
                          type: string
                          maxLength: 255
                        link:
                          description: A link to the app.
                          type: string
                          format: url
                          maxLength: 500
              examples:
                AppGroupCreated:
                  summary: App group
                  description: This is an example of a app group response.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My app group
                    count: 1
                    platform: android
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '422':
          description: Maximum number of app groups exceeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  '/app-groups/{id}':
    get:
      summary: Get app group by ID
      x-soph-permissions:
        - 'mobile.app-group:read'
      description: Get an app group by id.
      operationId: getAppGroupById
      tags:
        - AppGroups
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      responses:
        '200':
          description: AppGroup group.
          content:
            application/json:
              schema:
                type: object
                description: Mobile app group response.
                allOf:
                  - type: object
                    description: Mobile app group summary response.
                    required:
                      - id
                      - tenant
                    properties:
                      id:
                        description: ID of the app group.
                        type: string
                        format: uuid
                      tenant:
                        description: Tenant this resource belongs to.
                        type: object
                        required:
                          - id
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                      name:
                        description: The app group name.
                        type: string
                        maxLength: 255
                      count:
                        description: The number of apps in this app group.
                        type: integer
                      platform:
                        type: string
                        format: enum
                        description: 'The device platform, i.e. the operating system.'
                        enum:
                          - iOS
                          - macOS
                          - android
                          - chrome
                          - windows
                      createdAt:
                        description: Time when the app group was created.
                        type: string
                        format: date-time
                      createdBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                      updatedAt:
                        description: Time when the app group was last updated.
                        type: string
                        format: date-time
                      updatedBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                properties:
                  apps:
                    type: array
                    description: A list of app group entries.
                    minItems: 1
                    maxItems: 10000
                    uniqueItems: true
                    items:
                      type: object
                      description: App group entry for mobile device.
                      properties:
                        identifier:
                          description: 'The app identifier, for example, the package name.'
                          type: string
                          maxLength: 255
                        name:
                          description: The app name.
                          type: string
                          maxLength: 255
                        link:
                          description: A link to the app.
                          type: string
                          format: url
                          maxLength: 500
              examples:
                AppGroup:
                  summary: App group
                  description: This is an example of a app group response.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My app group
                    count: 1
                    platform: android
                AppGroupViewFull:
                  summary: App group with view=full
                  description: >-
                    This is an example request for an app group using the
                    'view=full' query parameter.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My app group
                    count: 1
                    platform: android
                    createdAt: '2025-01-02T08:50:00.300Z'
                    createdBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                    updatedAt: '2025-01-02T08:50:01.300Z'
                    updatedBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                AppGroupViewSummary:
                  summary: App group with view=summary
                  description: >-
                    This is an example request for an app group using the
                    'view=summary' query parameter.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My app group
                    count: 1
                    platform: android
                    createdAt: '2025-01-02T08:50:00.300Z'
                    createdBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                    updatedAt: '2025-01-02T08:50:01.300Z'
                    updatedBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                AppGroupViewBasic:
                  summary: App group with view=basic
                  description: >-
                    This is an example request for an app group using the
                    'view=basic' query parameter.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My app groups
                    platform: android
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Can't find the requested App group.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    patch:
      summary: Update app group
      x-soph-permissions:
        - 'mobile.app-group:update'
      description: Update parts of an app group.
      operationId: patchAppGroup
      tags:
        - AppGroups
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        description: Update app group.
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Mobile app group update request.
              properties:
                name:
                  description: The app group name.
                  type: string
                  maxLength: 255
                apps:
                  type: array
                  description: >-
                    A list of app group entries to replace previously configured
                    apps.
                  minItems: 1
                  maxItems: 10000
                  uniqueItems: true
                  items:
                    type: object
                    description: App group entry for create or update requests.
                    required:
                      - identifier
                      - name
                    properties:
                      identifier:
                        description: 'The app identifier, for example, the package name.'
                        type: string
                        maxLength: 255
                      name:
                        description: The app name.
                        type: string
                        maxLength: 255
                      link:
                        description: A link to the app.
                        type: string
                        format: url
                        maxLength: 500
            example:
              name: My app group
              apps:
                - identifier: com.sophos.smsec
                  name: Sophos Intercept X for Mobile
                  link: 'https://www.sophos.com'
      responses:
        '200':
          description: The patched app group.
          content:
            application/json:
              schema:
                type: object
                description: Mobile app group response.
                allOf:
                  - type: object
                    description: Mobile app group summary response.
                    required:
                      - id
                      - tenant
                    properties:
                      id:
                        description: ID of the app group.
                        type: string
                        format: uuid
                      tenant:
                        description: Tenant this resource belongs to.
                        type: object
                        required:
                          - id
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                      name:
                        description: The app group name.
                        type: string
                        maxLength: 255
                      count:
                        description: The number of apps in this app group.
                        type: integer
                      platform:
                        type: string
                        format: enum
                        description: 'The device platform, i.e. the operating system.'
                        enum:
                          - iOS
                          - macOS
                          - android
                          - chrome
                          - windows
                      createdAt:
                        description: Time when the app group was created.
                        type: string
                        format: date-time
                      createdBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                      updatedAt:
                        description: Time when the app group was last updated.
                        type: string
                        format: date-time
                      updatedBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                properties:
                  apps:
                    type: array
                    description: A list of app group entries.
                    minItems: 1
                    maxItems: 10000
                    uniqueItems: true
                    items:
                      type: object
                      description: App group entry for mobile device.
                      properties:
                        identifier:
                          description: 'The app identifier, for example, the package name.'
                          type: string
                          maxLength: 255
                        name:
                          description: The app name.
                          type: string
                          maxLength: 255
                        link:
                          description: A link to the app.
                          type: string
                          format: url
                          maxLength: 500
              examples:
                AppGroupUpdated:
                  summary: App group
                  description: This is an example of a app group response.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My app group
                    count: 1
                    platform: android
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Can't find at least one object in the request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    delete:
      summary: Delete app group
      x-soph-permissions:
        - 'mobile.app-group:delete'
      description: Delete an app group.
      operationId: deleteAppGroup
      tags:
        - AppGroups
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully processed Delete operation.
          content:
            application/json:
              schema:
                type: object
                description: Response to a previous request to delete an item.
                required:
                  - deleted
                properties:
                  deleted:
                    type: boolean
              example:
                deleted: true
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /policies:
    get:
      summary: List policies
      x-soph-permissions:
        - 'mobile.policy:read'
      description: Get a list of policies.
      operationId: getPolicies
      tags:
        - Policies
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
        - in: query
          name: ids
          description: List of IDs.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - in: query
          name: sort
          description: Defines how to sort the data.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              pattern: '(^[^:]+$)|(^[^:]+:(asc|desc)$)'
          examples:
            OneFieldDefaultSort:
              value:
                - lastSeenAt
            OneFieldSort:
              value:
                - 'lastSeenAt:asc'
            MoreThanOneTermSort:
              value:
                - 'lastSeenAt:asc'
                - 'hostname:desc'
        - in: query
          name: page
          required: false
          schema:
            type: integer
            default: 1
          description: 'The page number to fetch, starting with 1.'
        - in: query
          name: pageSize
          required: false
          schema:
            type: integer
            default: 50
          description: The size of the page requested.
        - in: query
          name: pageTotal
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
        - in: query
          name: search
          description: Term to search for in the specified search fields.
          required: false
          schema:
            type: string
            maxLength: 200
        - in: query
          name: searchFields
          description: List of fields to search in. Defaults to all applicable fields.
          style: form
          explode: false
          required: false
          schema:
            type: array
            default:
              - name
              - description
            items:
              type: string
              enum:
                - name
                - description
        - in: query
          name: platform
          description: Filter objects by platform.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              format: enum
              description: 'The device platform, i.e. the operating system.'
              enum:
                - iOS
                - macOS
                - android
                - chrome
                - windows
      responses:
        '200':
          description: List of policies.
          content:
            application/json:
              schema:
                type: object
                description: Paged response of policies.
                required:
                  - items
                  - pages
                properties:
                  items:
                    type: array
                    description: List of policies.
                    items:
                      type: object
                      description: Policy for mobile devices.
                      required:
                        - id
                        - tenant
                      properties:
                        id:
                          description: ID of the policy.
                          type: string
                          format: uuid
                        tenant:
                          description: Tenant this resource belongs to.
                          type: object
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                        name:
                          description: Unique name of the policy.
                          type: string
                        description:
                          description: A description of the policy.
                          type: string
                        platform:
                          type: string
                          format: enum
                          description: 'The device platform, i.e. the operating system.'
                          enum:
                            - iOS
                            - macOS
                            - android
                            - chrome
                            - windows
                        type:
                          description: Type of the policy.
                          type: string
                        version:
                          description: Version of the policy.
                          type: string
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        createdAt:
                          description: Indicates when the policy was created.
                          type: string
                          format: date-time
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - type
                          properties:
                            id:
                              description: Principal ID.
                              type: string
                              format: uuid
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                                - system
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                            accountType:
                              type: string
                              format: enum
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            name:
                              description: Principal name or email.
                              type: string
                        updatedAt:
                          description: Indicates when the policy was last updated.
                          type: string
                          format: date-time
                  pages:
                    type: object
                    required:
                      - current
                      - size
                      - maxSize
                    properties:
                      current:
                        type: integer
                        description: The 1-based page number being returned.
                      size:
                        type: integer
                        description: The size of the page being returned.
                      total:
                        type: integer
                        description: >-
                          (Optional) The total number of pages that exist, if
                          pageTotal=true in the request.
                      items:
                        type: integer
                        description: (Optional) The total number of items across all pages.
                      maxSize:
                        type: integer
                        description: The maximum page size that can be requested.
              examples:
                PoliciesPaged:
                  summary: Policies (paginated)
                  description: This is an example of a list of policies.
                  value:
                    items:
                      - id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                        tenant:
                          id: b8a75c7d-7492-4009-9f95-8c815551dc55
                          name: The name of the tenant
                        name: My policy
                        description: Some description for the policy
                        platform: android
                        type: threatDefense
                        version: 2
                    pages:
                      current: 1
                      size: 50
                      maxSize: 500
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    post:
      summary: Create policy
      x-soph-permissions:
        - 'mobile.policy:create'
      description: Create policy.
      operationId: createPolicy
      tags:
        - Policies
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      requestBody:
        description: Create policy.
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Policy create request.
              required:
                - name
                - type
                - platform
              properties:
                name:
                  description: Unique name of the policy.
                  type: string
                  maxLength: 255
                description:
                  description: A description of the policy.
                  type: string
                  maxLength: 500
                platform:
                  type: string
                  format: enum
                  description: 'The device platform, i.e. the operating system.'
                  enum:
                    - iOS
                    - macOS
                    - android
                    - chrome
                    - windows
                type:
                  description: Type of the policy.
                  type: string
                  maxLength: 100
            example:
              name: My policy
              description: Some description for the policy
              platform: android
              type: threatDefense
      responses:
        '201':
          description: The new policy.
          content:
            application/json:
              schema:
                type: object
                description: Policy for mobile devices.
                allOf:
                  - type: object
                    description: Policy for mobile devices.
                    required:
                      - id
                      - tenant
                    properties:
                      id:
                        description: ID of the policy.
                        type: string
                        format: uuid
                      tenant:
                        description: Tenant this resource belongs to.
                        type: object
                        required:
                          - id
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                      name:
                        description: Unique name of the policy.
                        type: string
                      description:
                        description: A description of the policy.
                        type: string
                      platform:
                        type: string
                        format: enum
                        description: 'The device platform, i.e. the operating system.'
                        enum:
                          - iOS
                          - macOS
                          - android
                          - chrome
                          - windows
                      type:
                        description: Type of the policy.
                        type: string
                      version:
                        description: Version of the policy.
                        type: string
                      createdBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                      createdAt:
                        description: Indicates when the policy was created.
                        type: string
                        format: date-time
                      updatedBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                      updatedAt:
                        description: Indicates when the policy was last updated.
                        type: string
                        format: date-time
              examples:
                PolicyCreated:
                  summary: Policy
                  description: This is an example of a policy response.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My policy
                    description: Some description for the policy
                    platform: android
                    type: threatDefense
                    version: 2
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Can't find app group.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '422':
          description: Maximum number of policies exceeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  '/policies/{id}':
    get:
      summary: Get policy by ID
      x-soph-permissions:
        - 'mobile.policy:read'
      description: Get a policy by id.
      operationId: getPolicyById
      tags:
        - Policies
      parameters:
        - in: path
          name: id
          description: Unique object identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: fields
          description: The fields to return in a partial response.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: view
          description: Type of view to be returned in response.
          required: false
          schema:
            type: string
            enum:
              - basic
              - summary
              - full
      responses:
        '200':
          description: Policy.
          content:
            application/json:
              schema:
                type: object
                description: Policy for mobile devices.
                allOf:
                  - type: object
                    description: Policy for mobile devices.
                    required:
                      - id
                      - tenant
                    properties:
                      id:
                        description: ID of the policy.
                        type: string
                        format: uuid
                      tenant:
                        description: Tenant this resource belongs to.
                        type: object
                        required:
                          - id
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                      name:
                        description: Unique name of the policy.
                        type: string
                      description:
                        description: A description of the policy.
                        type: string
                      platform:
                        type: string
                        format: enum
                        description: 'The device platform, i.e. the operating system.'
                        enum:
                          - iOS
                          - macOS
                          - android
                          - chrome
                          - windows
                      type:
                        description: Type of the policy.
                        type: string
                      version:
                        description: Version of the policy.
                        type: string
                      createdBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                      createdAt:
                        description: Indicates when the policy was created.
                        type: string
                        format: date-time
                      updatedBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                      updatedAt:
                        description: Indicates when the policy was last updated.
                        type: string
                        format: date-time
              examples:
                SinglePolicy:
                  summary: Policy
                  description: This is an example of a policy response.
                  value:
                    id: c9c9b03c-5cf7-4fe1-93bb-246afc9044d2
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    name: My policy
                    description: Some description for the policy
                    platform: android
                    type: threatDefense
                    version: 2
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: Can't find the requested policy.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
  /settings/ixm-auto-enrollment:
    get:
      summary: Get IXM auto-enrollment
      x-soph-permissions:
        - 'mobile.settings:read'
      description: Get settings for Intercept X for Mobile auto enrollments.
      operationId: getIxmAutoEnrollmentSettings
      tags:
        - Settings
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Settings for IXM auto enrollments.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    description: Base configuration object for enrollment settings.
                    required:
                      - tenant
                      - deviceGroup
                      - ownershipType
                    properties:
                      tenant:
                        description: Tenant this resource belongs to.
                        type: object
                        required:
                          - id
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                      deviceGroup:
                        type: object
                        description: A device group reference.
                        required:
                          - id
                        properties:
                          id:
                            description: Unique ID of the device group.
                            type: string
                            format: uuid
                          name:
                            description: The device group name.
                            type: string
                      ownershipType:
                        type: string
                        format: enum
                        description: The ownership type of the mobile device.
                        enum:
                          - corporate
                          - employee
                      createdBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                      createdAt:
                        description: Indicates when the policy was created.
                        type: string
                        format: date-time
                      updatedBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                      updatedAt:
                        description: Indicates when the policy was last updated.
                        type: string
                        format: date-time
                  - type: object
                    description: Settings for IXM auto enrollments.
                    properties:
                      androidPolicy:
                        type: object
                        description: A policy reference.
                        required:
                          - id
                        properties:
                          id:
                            description: Unique ID of the device.
                            type: string
                            format: uuid
                          name:
                            description: Unique name of the policy.
                            type: string
                          platform:
                            type: string
                            format: enum
                            description: 'The device platform, i.e. the operating system.'
                            enum:
                              - iOS
                              - macOS
                              - android
                              - chrome
                              - windows
                          type:
                            description: The policy type.
                            type: string
                          version:
                            description: The policy version.
                            type: string
                      iosPolicy:
                        type: object
                        description: A policy reference.
                        required:
                          - id
                        properties:
                          id:
                            description: Unique ID of the device.
                            type: string
                            format: uuid
                          name:
                            description: Unique name of the policy.
                            type: string
                          platform:
                            type: string
                            format: enum
                            description: 'The device platform, i.e. the operating system.'
                            enum:
                              - iOS
                              - macOS
                              - android
                              - chrome
                              - windows
                          type:
                            description: The policy type.
                            type: string
                          version:
                            description: The policy version.
                            type: string
                      connectionCode:
                        type: string
                        description: >-
                          The connection code required for automated enrollment
                          on iOS and Android.
              examples:
                IxmAutoEnrollmentSettings:
                  description: This is an example of IXM auto enrollment settings.
                  value:
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    deviceGroup:
                      id: d602034d-a509-4c93-ade0-61f5b496c963
                      name: A device group
                    ownershipType: corporate
                    androidPolicy:
                      id: ea1735cc-d321-4a39-a61a-7ec4a5975e1d
                      name: My Android policy
                      platform: android
                      type: threatDefense
                      version: 1
                    iosPolicy:
                      id: 15539043-4ec1-4525-bf2d-646e4f5d8212
                      name: My iOS policy
                      platform: iOS
                      type: threatDefense
                      version: 1
                    connectionCode: >-
                      eyJ0b2tlbiI6ImZvb28iLCJjdXN0b21lcmlkIjoiNDgyNzY5Ii
                      widXJsIjoic21jLWRldmljZS1pZi1jbG91ZHN0YXRpb24tZXUt
                      d2VzdC0xLnRlc3QuaHlkcmEuc29waG9zLmNvbSIsImNoZWNraW
                      5VcmkiOiJodHRwczovL3NtYy1kZXZpY2UtaWYtY2xvdWRzdGF0
                      aW9uLWV1LXdlc3QtMS50ZXN0Lmh5ZHJhLnNvcGhvcy5jb20vY2
                      xpZW50LWFwaS9lbnJvbGwvYXV0by1jb25maWd1cmVkL2l4bS9i
                      OGE3NWM3ZC03NDkyLTQwMDktOWY5NS04YzgxMjQ1NTFkYzU1L2
                      NoZWNraW4ifQ==
                    createdAt: '2025-01-02T08:50:00.300Z'
                    createdBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                    updatedAt: '2025-01-02T08:50:01.300Z'
                    updatedBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: >-
            Can't find configured setup data for Intercept X for Mobile auto
            enrollments.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    post:
      summary: Set up IXM auto-enrollm
      x-soph-permissions:
        - 'mobile.settings:create'
      description: >-
        Create settings for Intercept X for Mobile auto enrollments. A post with
        the same values results in an error, as it is already configured.
      operationId: createIxmAutoEnrollmentSettings
      tags:
        - Settings
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  description: Base configuration object for enrollment settings requests.
                  required:
                    - deviceGroupId
                    - ownershipType
                  properties:
                    deviceGroupId:
                      description: ID of the device group.
                      type: string
                      format: uuid
                    ownershipType:
                      type: string
                      format: enum
                      description: The ownership type of the mobile device.
                      enum:
                        - corporate
                        - employee
                - type: object
                  description: Settings for IXM auto enrollments create request.
                  properties:
                    androidPolicyId:
                      description: ID of the android security policy.
                      type: string
                      format: uuid
                    iosPolicyId:
                      description: ID of the iOS security policy.
                      type: string
                      format: uuid
            example:
              deviceGroupId: d602034d-a509-4c93-ade0-61f5b496c963
              ownershipType: corporate
              androidPolicyId: 8ef59086-c490-4c73-a7ed-6c17e4a417ad
              iosPolicyId: f78afaa2-91d5-4f1d-8696-399af29a3941
      responses:
        '201':
          description: The new settings for Intercept X for Mobile auto enrollments.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    description: Base configuration object for enrollment settings.
                    required:
                      - tenant
                      - deviceGroup
                      - ownershipType
                    properties:
                      tenant:
                        description: Tenant this resource belongs to.
                        type: object
                        required:
                          - id
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                      deviceGroup:
                        type: object
                        description: A device group reference.
                        required:
                          - id
                        properties:
                          id:
                            description: Unique ID of the device group.
                            type: string
                            format: uuid
                          name:
                            description: The device group name.
                            type: string
                      ownershipType:
                        type: string
                        format: enum
                        description: The ownership type of the mobile device.
                        enum:
                          - corporate
                          - employee
                      createdBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                      createdAt:
                        description: Indicates when the policy was created.
                        type: string
                        format: date-time
                      updatedBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                      updatedAt:
                        description: Indicates when the policy was last updated.
                        type: string
                        format: date-time
                  - type: object
                    description: Settings for IXM auto enrollments.
                    properties:
                      androidPolicy:
                        type: object
                        description: A policy reference.
                        required:
                          - id
                        properties:
                          id:
                            description: Unique ID of the device.
                            type: string
                            format: uuid
                          name:
                            description: Unique name of the policy.
                            type: string
                          platform:
                            type: string
                            format: enum
                            description: 'The device platform, i.e. the operating system.'
                            enum:
                              - iOS
                              - macOS
                              - android
                              - chrome
                              - windows
                          type:
                            description: The policy type.
                            type: string
                          version:
                            description: The policy version.
                            type: string
                      iosPolicy:
                        type: object
                        description: A policy reference.
                        required:
                          - id
                        properties:
                          id:
                            description: Unique ID of the device.
                            type: string
                            format: uuid
                          name:
                            description: Unique name of the policy.
                            type: string
                          platform:
                            type: string
                            format: enum
                            description: 'The device platform, i.e. the operating system.'
                            enum:
                              - iOS
                              - macOS
                              - android
                              - chrome
                              - windows
                          type:
                            description: The policy type.
                            type: string
                          version:
                            description: The policy version.
                            type: string
                      connectionCode:
                        type: string
                        description: >-
                          The connection code required for automated enrollment
                          on iOS and Android.
              examples:
                IxmAutoEnrollmentSettingsCreated:
                  description: This is an example of IXM auto enrollment settings.
                  value:
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    deviceGroup:
                      id: d602034d-a509-4c93-ade0-61f5b496c963
                      name: A device group
                    ownershipType: corporate
                    androidPolicy:
                      id: ea1735cc-d321-4a39-a61a-7ec4a5975e1d
                      name: My Android policy
                      platform: android
                      type: threatDefense
                      version: 1
                    iosPolicy:
                      id: 15539043-4ec1-4525-bf2d-646e4f5d8212
                      name: My iOS policy
                      platform: iOS
                      type: threatDefense
                      version: 1
                    connectionCode: >-
                      eyJ0b2tlbiI6ImZvb28iLCJjdXN0b21lcmlkIjoiNDgyNzY5Ii
                      widXJsIjoic21jLWRldmljZS1pZi1jbG91ZHN0YXRpb24tZXUt
                      d2VzdC0xLnRlc3QuaHlkcmEuc29waG9zLmNvbSIsImNoZWNraW
                      5VcmkiOiJodHRwczovL3NtYy1kZXZpY2UtaWYtY2xvdWRzdGF0
                      aW9uLWV1LXdlc3QtMS50ZXN0Lmh5ZHJhLnNvcGhvcy5jb20vY2
                      xpZW50LWFwaS9lbnJvbGwvYXV0by1jb25maWd1cmVkL2l4bS9i
                      OGE3NWM3ZC03NDkyLTQwMDktOWY5NS04YzgxMjQ1NTFkYzU1L2
                      NoZWNraW4ifQ==
                    createdAt: '2025-01-02T08:50:00.300Z'
                    createdBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                    updatedAt: '2025-01-02T08:50:01.300Z'
                    updatedBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: >-
            Can't find configured setup data for Intercept X for Mobile auto
            enrollments.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '422':
          description: >-
            Maximum number of Intercept X for Mobile auto-enrollment settings
            exceeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    put:
      summary: Update IXM auto-enrollm
      x-soph-permissions:
        - 'mobile.settings:update'
      description: >-
        Update settings for Intercept X for Mobile auto enrollments. No
        regeneration of connection codes will happen.
      operationId: updateIxmAutoEnrollmentSettings
      tags:
        - Settings
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  description: Base configuration object for enrollment settings requests.
                  required:
                    - deviceGroupId
                    - ownershipType
                  properties:
                    deviceGroupId:
                      description: ID of the device group.
                      type: string
                      format: uuid
                    ownershipType:
                      type: string
                      format: enum
                      description: The ownership type of the mobile device.
                      enum:
                        - corporate
                        - employee
                - type: object
                  description: Settings for IXM auto enrollments update request.
                  properties:
                    androidPolicyId:
                      description: ID of the android security policy.
                      type: string
                      format: uuid
                    iosPolicyId:
                      description: ID of the iOS security policy.
                      type: string
                      format: uuid
                    rotateConnectionCode:
                      description: Indicates if the connection code should be rotated.
                      type: boolean
            example:
              deviceGroupId: d602034d-a509-4c93-ade0-61f5b496c963
              ownershipType: corporate
              androidPolicyId: 8ef59086-c490-4c73-a7ed-6c17e4a417ad
              rotateConnectionCode: true
      responses:
        '200':
          description: The updated settings for Intercept X for Mobile auto enrollments.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    description: Base configuration object for enrollment settings.
                    required:
                      - tenant
                      - deviceGroup
                      - ownershipType
                    properties:
                      tenant:
                        description: Tenant this resource belongs to.
                        type: object
                        required:
                          - id
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                      deviceGroup:
                        type: object
                        description: A device group reference.
                        required:
                          - id
                        properties:
                          id:
                            description: Unique ID of the device group.
                            type: string
                            format: uuid
                          name:
                            description: The device group name.
                            type: string
                      ownershipType:
                        type: string
                        format: enum
                        description: The ownership type of the mobile device.
                        enum:
                          - corporate
                          - employee
                      createdBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                      createdAt:
                        description: Indicates when the policy was created.
                        type: string
                        format: date-time
                      updatedBy:
                        type: object
                        description: Principal reference.
                        required:
                          - type
                        properties:
                          id:
                            description: Principal ID.
                            type: string
                            format: uuid
                          type:
                            description: Principal type.
                            type: string
                            format: enum
                            enum:
                              - user
                              - service
                              - system
                          accountId:
                            description: Account ID.
                            type: string
                            format: uuid
                          accountType:
                            type: string
                            format: enum
                            description: Account type.
                            enum:
                              - partner
                              - tenant
                              - organization
                          name:
                            description: Principal name or email.
                            type: string
                      updatedAt:
                        description: Indicates when the policy was last updated.
                        type: string
                        format: date-time
                  - type: object
                    description: Settings for IXM auto enrollments.
                    properties:
                      androidPolicy:
                        type: object
                        description: A policy reference.
                        required:
                          - id
                        properties:
                          id:
                            description: Unique ID of the device.
                            type: string
                            format: uuid
                          name:
                            description: Unique name of the policy.
                            type: string
                          platform:
                            type: string
                            format: enum
                            description: 'The device platform, i.e. the operating system.'
                            enum:
                              - iOS
                              - macOS
                              - android
                              - chrome
                              - windows
                          type:
                            description: The policy type.
                            type: string
                          version:
                            description: The policy version.
                            type: string
                      iosPolicy:
                        type: object
                        description: A policy reference.
                        required:
                          - id
                        properties:
                          id:
                            description: Unique ID of the device.
                            type: string
                            format: uuid
                          name:
                            description: Unique name of the policy.
                            type: string
                          platform:
                            type: string
                            format: enum
                            description: 'The device platform, i.e. the operating system.'
                            enum:
                              - iOS
                              - macOS
                              - android
                              - chrome
                              - windows
                          type:
                            description: The policy type.
                            type: string
                          version:
                            description: The policy version.
                            type: string
                      connectionCode:
                        type: string
                        description: >-
                          The connection code required for automated enrollment
                          on iOS and Android.
              examples:
                IxmAutoEnrollmentSettings:
                  description: This is an example of IXM auto enrollment settings.
                  value:
                    tenant:
                      id: b8a75c7d-7492-4009-9f95-8c815551dc55
                      name: The name of the tenant
                    deviceGroup:
                      id: d602034d-a509-4c93-ade0-61f5b496c963
                      name: A device group
                    ownershipType: corporate
                    androidPolicy:
                      id: ea1735cc-d321-4a39-a61a-7ec4a5975e1d
                      name: My Android policy
                      platform: android
                      type: threatDefense
                      version: 1
                    iosPolicy:
                      id: 15539043-4ec1-4525-bf2d-646e4f5d8212
                      name: My iOS policy
                      platform: iOS
                      type: threatDefense
                      version: 1
                    connectionCode: >-
                      eyJ0b2tlbiI6ImZvb28iLCJjdXN0b21lcmlkIjoiNDgyNzY5Ii
                      widXJsIjoic21jLWRldmljZS1pZi1jbG91ZHN0YXRpb24tZXUt
                      d2VzdC0xLnRlc3QuaHlkcmEuc29waG9zLmNvbSIsImNoZWNraW
                      5VcmkiOiJodHRwczovL3NtYy1kZXZpY2UtaWYtY2xvdWRzdGF0
                      aW9uLWV1LXdlc3QtMS50ZXN0Lmh5ZHJhLnNvcGhvcy5jb20vY2
                      xpZW50LWFwaS9lbnJvbGwvYXV0by1jb25maWd1cmVkL2l4bS9i
                      OGE3NWM3ZC03NDkyLTQwMDktOWY5NS04YzgxMjQ1NTFkYzU1L2
                      NoZWNraW4ifQ==
                    createdAt: '2025-01-02T08:50:00.300Z'
                    createdBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
                    updatedAt: '2025-01-02T08:50:01.300Z'
                    updatedBy:
                      id: dfa19b8f-5898-4be9-b0dc-45a320ce76b1
                      type: user
                      accountType: tenant
                      accountId: 0ea17949-d95c-4f58-95b7-ba6d9860f5fc
                      name: john.smith@example.com
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '404':
          description: >-
            No existing configuration or can't find one of the referenced
            objects.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notFound
                message: Resource not found.
                correlationId: bc0047d4-9aad-4501-8c4d-fb9ed8436d39
                requestId: 9ec0a3cd-0cd7-4e60-a218-f469a46c1577
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
    delete:
      summary: Delete IXM auto-enrollm
      x-soph-permissions:
        - 'mobile.settings:delete'
      description: >-
        Delete an Intercept X for Mobile Auto Enrollment Setting. Revokes the
        previous connection code.
      operationId: deleteIxmAutoEnrollmentSettings
      tags:
        - Settings
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully processed Delete operation.
          content:
            application/json:
              schema:
                type: object
                description: Response to a previous request to delete an item.
                required:
                  - deleted
                properties:
                  deleted:
                    type: boolean
              example:
                deleted: true
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: badRequest
                message: Bad request.
                correlationId: 715be156-6561-4fc4-8cbe-11a5a49ce440
                requestId: 2dd71c0b-e5fb-41ba-ba15-367eefee54ee
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: notAuthorized
                message: Not authorized.
                correlationId: 714e3cf6-75b1-4a6a-b4fe-dbee2e6a0a58
                requestId: 155a1b5e-0e1e-4809-9b00-f7c66be1ace9
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: forbidden
                message: Forbidden.
                correlationId: 1b697030-1c57-47a8-8051-c9febfa8d0e7
                requestId: 56c9b423-0714-42ec-8e77-1cc5a09dec7c
        '409':
          description: Conflicting modification.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: resourceConflict
                message: Resource conflict.
                correlationId: da494ea1-ad61-4371-9b77-d8e68c484b95
                requestId: 3526d1e5-2996-4245-98ff-81226da03c56
        '429':
          description: Too many requests. See Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
              example:
                error: internalServerError
                message: Internal Server Error.
                correlationId: df88bf88-471b-49d6-8a5e-07a26964d2ec
                requestId: 85073630-8ad8-46da-bf64-cb1e8b6f864b
security:
  - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
