openapi: 3.0.0
info:
  description: >-
    This is the OAS 3.0 specification for the Wi-Fi Management API in Sophos
    Central.
  version: 1.0.0
  contact:
    name: Sophos Central APIs
    email: apis@sophos.com
    url: 'https://developer.sophos.com'
  title: Wi-Fi Management API
tags:
  - name: MacFiltering
    description: >-
      Retrieve, update and delete MAC filter policies for the tenant to allow or
      block the devices connected to the access point.
  - name: Tasks
    description: Retrieve task details for the tenant.
servers:
  - url: 'https://api-{dataRegion}.central.sophos.com/wifi/v1'
    description: Regional service in the production environment.
    variables:
      dataRegion:
        description: The data region where tenant data is stored.
        default: eu01
        enum:
          - eu01
          - eu02
          - us01
          - us03
security:
  - bearerAuth: []
paths:
  /settings/mac-filtering:
    get:
      x-soph-permissions: 'wifix.config:read'
      summary: Retrieve MAC filter
      description: Get MAC filter settings for the tenant.
      operationId: getMacFilterSettings
      tags:
        - MacFiltering
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: MAC filter settings retrieved.
          content:
            application/json:
              schema:
                type: object
                description: Create or delete MAC filter policies for the tenant.
                required:
                  - macAddresses
                properties:
                  tenant:
                    type: object
                    description: Tenant ID.
                    required:
                      - id
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Tenant ID.
                  createdBy:
                    type: object
                    description: Principal reference.
                    required:
                      - id
                      - type
                    properties:
                      id:
                        description: Principal email or client ID.
                        type: string
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                      accountType:
                        type: string
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                  createdAt:
                    type: string
                    format: date-time
                  updatedBy:
                    type: object
                    description: Principal reference.
                    required:
                      - id
                      - type
                    properties:
                      id:
                        description: Principal email or client ID.
                        type: string
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                      accountType:
                        type: string
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                  updatedAt:
                    type: string
                    format: date-time
                  macAddresses:
                    type: array
                    description: List of MAC addresses.
                    items:
                      type: string
                      format: mac
                    uniqueItems: true
                    maxItems: 256
              examples:
                MacFilterSettings:
                  value:
                    macAddresses:
                      - '5c:85:7e:32:97:26'
                      - '5c:85:7e:32:98:28'
                    tenant:
                      id: 3e382b8e-49fd-4cd9-8360-a364371d7650
                    createdBy:
                      id: 97483e58-55d7-44fb-b03f-9422f106ef66
                      type: user
                      accountId: 3e382b8e-49fd-4cd9-8360-a364371d7650
                      accountType: tenant
                    createdAt: '2022-03-30T05:43:59.492'
                    updatedBy:
                      id: 97483e58-55d7-44fb-b03f-9422f106ef66
                      type: user
                      accountId: 3e382b8e-49fd-4cd9-8360-a364371d7650
                      accountType: tenant
                    updatedAt: '2022-03-30T05:43:59.492'
        '400':
          description: Bad 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
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: 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: Authorization required.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: 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: Unknown 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
    put:
      x-soph-permissions: 'wifix.config:write'
      summary: Update MAC filter
      description: Update MAC filter settings for the tenant.
      operationId: updateMacFilterSettings
      tags:
        - MacFiltering
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Update MAC filter settings for the tenant.
        required: true
        content:
          application/json:
            schema:
              type: object
              description: >-
                Block or unblock devices connected to the access point by their
                MAC addresses.
              properties:
                macAddresses:
                  type: array
                  description: List of MAC addresses.
                  items:
                    type: string
                    format: mac
                  uniqueItems: true
                  maxItems: 256
            examples:
              MacFilterSettings:
                value:
                  macAddresses:
                    - '5c:85:7e:32:97:26'
                    - '5c:85:7e:32:98:28'
      responses:
        '201':
          description: Mac filter policies updated.
          content:
            application/json:
              schema:
                type: object
                description: Create or delete MAC filter policies for the tenant.
                required:
                  - macAddresses
                properties:
                  tenant:
                    type: object
                    description: Tenant ID.
                    required:
                      - id
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Tenant ID.
                  createdBy:
                    type: object
                    description: Principal reference.
                    required:
                      - id
                      - type
                    properties:
                      id:
                        description: Principal email or client ID.
                        type: string
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                      accountType:
                        type: string
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                  createdAt:
                    type: string
                    format: date-time
                  updatedBy:
                    type: object
                    description: Principal reference.
                    required:
                      - id
                      - type
                    properties:
                      id:
                        description: Principal email or client ID.
                        type: string
                      type:
                        description: Principal type.
                        type: string
                        format: enum
                        enum:
                          - user
                          - service
                      accountType:
                        type: string
                        description: Account type.
                        enum:
                          - partner
                          - tenant
                          - organization
                      accountId:
                        description: Account ID.
                        type: string
                        format: uuid
                  updatedAt:
                    type: string
                    format: date-time
                  macAddresses:
                    type: array
                    description: List of MAC addresses.
                    items:
                      type: string
                      format: mac
                    uniqueItems: true
                    maxItems: 256
              examples:
                MacFilterSettings:
                  value:
                    macAddresses:
                      - '5c:85:7e:32:97:26'
                      - '5c:85:7e:32:98:28'
                    tenant:
                      id: 3e382b8e-49fd-4cd9-8360-a364371d7650
                    createdBy:
                      id: 97483e58-55d7-44fb-b03f-9422f106ef66
                      type: user
                      accountId: 3e382b8e-49fd-4cd9-8360-a364371d7650
                      accountType: tenant
                    createdAt: '2022-03-30T05:43:59.492'
                    updatedBy:
                      id: 97483e58-55d7-44fb-b03f-9422f106ef66
                      type: user
                      accountId: 3e382b8e-49fd-4cd9-8360-a364371d7650
                      accountType: tenant
                    updatedAt: '2022-03-30T05:43:59.492'
        '400':
          description: Bad 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
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: 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: Authorization required.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: 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: Unexpected 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
  /tasks:
    get:
      x-soph-permissions: 'wifix.config:read'
      summary: Retrieve tasks
      description: Get task details for the tenant.
      operationId: getTasks
      tags:
        - Tasks
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: page
          in: query
          description: 'The page number to fetch, starting with 1.'
          required: false
          schema:
            type: integer
            default: 1
        - in: query
          name: pageTotal
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
          required: false
          schema:
            type: boolean
            default: false
        - in: query
          name: pageSize
          description: The size of the page requested.
          required: false
          schema:
            type: integer
            default: 100
            minimum: 1
            maximum: 500
        - name: type
          in: query
          description: Type of the policy to filter the tasks.
          required: false
          schema:
            type: string
        - name: fields
          in: query
          description: Fields to be retrieved for task.
          style: form
          explode: false
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - accessPoints
      responses:
        '200':
          description: Tasks retrieved.
          content:
            application/json:
              schema:
                type: object
                description: Task details for the tenant.
                required:
                  - items
                  - pages
                properties:
                  items:
                    type: array
                    description: List of tasks.
                    items:
                      type: object
                      description: List of tasks for the tenant.
                      required:
                        - id
                        - type
                        - tenant
                        - status
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: UUID of the task.
                        type:
                          type: string
                          description: >-
                            Type of the policy, valid values are macFilter,
                            vlan.
                        tenant:
                          type: object
                          description: Tenant ID.
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Tenant ID.
                        createdBy:
                          type: object
                          description: Principal reference.
                          required:
                            - id
                            - type
                          properties:
                            id:
                              description: Principal email or client ID.
                              type: string
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                            accountType:
                              type: string
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                        createdAt:
                          type: string
                          format: date-time
                          description: Timestamp when the task is created.
                        updatedBy:
                          type: object
                          description: Principal reference.
                          required:
                            - id
                            - type
                          properties:
                            id:
                              description: Principal email or client ID.
                              type: string
                            type:
                              description: Principal type.
                              type: string
                              format: enum
                              enum:
                                - user
                                - service
                            accountType:
                              type: string
                              description: Account type.
                              enum:
                                - partner
                                - tenant
                                - organization
                            accountId:
                              description: Account ID.
                              type: string
                              format: uuid
                        updatedAt:
                          type: string
                          format: date-time
                          description: Timestamp when the task is updated.
                        status:
                          type: object
                          description: Task status statistics for the access points.
                          required:
                            - succeeded
                            - failed
                            - pending
                            - noSupportSubscription
                            - total
                          properties:
                            succeeded:
                              type: integer
                              description: >-
                                Number of access points with successfully
                                synchronized task.
                            failed:
                              type: integer
                              description: >-
                                Number of access points with failed synchronized
                                task.
                            pending:
                              type: integer
                              description: >-
                                Number of access points with pending
                                synchronized task.
                            noSupportSubscription:
                              type: integer
                              description: >-
                                Number of access points where a task isn't
                                synchronised due to a missing or invalid support
                                subscription.
                            total:
                              type: integer
                              description: >-
                                Number of access points for which a task is
                                generated.
                        accessPoints:
                          type: array
                          description: List of access points with status.
                          items:
                            type: object
                            description: Task status statistics for the access points.
                            required:
                              - id
                              - status
                            properties:
                              id:
                                type: string
                                format: uuid
                                description: UUID of the access point.
                              status:
                                type: string
                                description: Task status.
                                enum:
                                  - succeeded
                                  - failed
                                  - pending
                                  - noSupportSubscription
                              error:
                                type: object
                                required:
                                  - message
                                properties:
                                  error:
                                    type: string
                                  message:
                                    type: string
                                  code:
                                    type: string
                                  docUrl:
                                    type: string
                                    format: uri
                    uniqueItems: true
                  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:
                Tasks:
                  value:
                    items:
                      - id: 687079a8-4249-4933-9ac6-2d701b4107ff
                        type: macFilter
                        tenant:
                          id: 3e382b8e-49fd-4cd9-8360-a364371d7650
                        createdBy:
                          id: 97483e58-55d7-44fb-b03f-9422f106ef66
                          type: user
                          accountId: 3e382b8e-49fd-4cd9-8360-a364371d7650
                          accountType: tenant
                        createdAt: '2022-03-30T05:43:59.492'
                        updatedBy:
                          id: 97483e58-55d7-44fb-b03f-9422f106ef66
                          type: user
                          accountId: 1bdb604c-0afe-4bd5-9d4a-2a5d7ffd0da8
                          accountType: tenant
                        updatedAt: '2022-03-30T05:43:59.492'
                        status:
                          succeeded: 1
                          failed: 1
                          pending: 1
                          noSupportSubscription: 1
                          total: 4
                        accessPoints:
                          - id: 5519e706-a704-4a42-9a3a-282aa4e336c5
                            status: succeeded
                          - id: 867df519-f483-41f3-9799-30d3b6d926e0
                            status: failed
                            error:
                              error: badRequest
                              message: The MAC address filter already exists
                              code: null
                              docUrl: null
                          - id: 3b6c8fc1-2745-4382-b20a-e57f19171403
                            status: pending
                          - id: 8c7e74f0-61fb-4d7d-9057-c072c163432f
                            status: noSupportSubscription
                      - id: 2d90a679-5bac-4e45-a5f3-b62c78c08b24
                        type: macFilter
                        tenant:
                          id: 3e382b8e-49fd-4cd9-8360-a364371d7650
                        createdBy:
                          id: 97483e58-55d7-44fb-b03f-9422f106ef66
                          type: user
                          accountId: 3e382b8e-49fd-4cd9-8360-a364371d7650
                          accountType: tenant
                        createdAt: '2022-03-30T05:43:59.492'
                        updatedBy:
                          id: 97483e58-55d7-44fb-b03f-9422f106ef66
                          type: user
                          accountId: 1bdb604c-0afe-4bd5-9d4a-2a5d7ffd0da8
                          accountType: tenant
                        updatedAt: '2022-03-30T05:43:59.492'
                        status:
                          succeeded: 1
                          failed: 0
                          pending: 0
                          noSupportSubscription: 0
                          total: 1
                        accessPoints:
                          - id: 5519e706-a704-4a42-9a3a-282aa4e336c5
                            status: succeeded
                    pages:
                      current: 1
                      total: 1
                      items: 1
                      size: 100
                      maxSize: 1000
        '400':
          description: Bad 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
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: 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: Authorization required.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: 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: Unexpected 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
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
