openapi: 3.0.1
info:
  title: ON-API
  description: >-
    Bitvis interpretation of ON-API 2.6, a standardized, RESTful API description
    for seamless system integration.
  contact:
    email: fiber-support@bitvis.se
  license:
    name: MIT
  version: 2.6.0
servers:
  - url: /api/onapi/2.6
    description: Flow ON-API 2.6 Server
tags:
  - name: Accesses
    description: >-
      The accesses endpoint is used to get available accesses from a CO.

      The accesses contain details about the address where the access resides
      and equipment.
    externalDocs:
      description: For more information, see the Orders API documentation.
      url: https://github.com/on-api/on-api/blob/master/2.6.0/spec/accesses.md
  - name: DHCP Lookup
    description: >
      Look up an access with values from DHCP logs, returns a single accessId if
      a unique access can be found.
    externalDocs:
      description: For more information, see the DHCP Lookup API documentation
      url: https://github.com/on-api/on-api/blob/master/2.6.0/spec/dhcplookup.md
  - name: Events
    description: Lists object changes
    externalDocs:
      description: For more information, see the Events API documentation
      url: https://github.com/on-api/on-api/blob/master/2.6.0/spec/events.md
  - name: Invoice Specification
    description: >
      This endpoint aims to provide the service provider (SP) with a
      specification of each billing item,

      this enables the SP to follow up and verify the invoice and correct
      service delivery.
    externalDocs:
      description: For more information, see the Invoice Specification API documentation
      url: >-
        https://github.com/on-api/on-api/blob/master/2.6.0/spec/invoice_specification.md
  - name: Option82 Lookup
    description: >-
      The endpoint enables service providers to lookup access-id using the
      option82 from the DHCP log
    externalDocs:
      description: For more information, see the Option82 Lookup API documentation
      url: >-
        https://github.com/on-api/on-api/blob/master/2.6.0/spec/option82_lookup.md
  - name: Orders
    description: >-
      This endpoint allows the service provider to activate, deactivate,
      suspend, resume, update and change services. Once an order is no longer in
      the state "RECEIVED" no changes can be made to that order.
    externalDocs:
      description: For more information, see the Orders API documentation.
      url: https://github.com/on-api/on-api/blob/master/2.6.0/spec/orders.md
  - name: Order Events
    description: >
      This endpoint lists changes to orders. When an order state changes a event
      row is created that can be polled with this endpoint.
    externalDocs:
      description: For more information, see the Orders API documentation.
      url: https://github.com/on-api/on-api/blob/master/2.6.0/spec/orderevents.md
  - name: Services
    description: >
      Used to fetch a list of all available services from a CO belonging to the
      current SP.
    externalDocs:
      description: For more information, see the Services API documentation.
      url: https://github.com/on-api/on-api/blob/master/2.6.0/spec/services.md
  - name: Subscriptions
    description: >
      Fetch a list of all active subscriptions from a CO belonging to the
      current SP.
    externalDocs:
      description: For more information, see the Orders API documentation.
      url: https://github.com/on-api/on-api/blob/master/2.6.0/spec/subscriptions.md
  - name: Technical Info
    description: >-
      The information communicated is intended for troubleshooting purposes and
      is sourced from network elements. All parameters are optional.


      Technical decisions and data structure design are taken with regards to
      network element resource utilization, and to promote programmatic decision
      making.
    externalDocs:
      description: For more information, see the Technical Info API documentation
      url: >-
        https://github.com/on-api/on-api/blob/master/2.6.0/spec/technical_info.md
  - name: Tickets
    description: |2
          Provides functionality for trouble tickets to be handled between service providers and communication operators.
    externalDocs:
      description: For more information, see the Tickets API documentation.
      url: https://github.com/on-api/on-api/blob/master/2.6.0/spec/tickets.md
paths:
  /:
    get:
      operationId: getEndpoints
      responses:
        default:
          description: default response
          content:
            application/json: {}
  /accesses/{id}:
    get:
      tags:
        - Accesses
      summary: Get a single access
      description: >-
        The single access contains details about activated services and the
        services available for activation.
      operationId: getAccess
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for a single object.
      responses:
        '200':
          description: Access found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Access'
        '400':
          description: An invalid accessId was provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Access not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accesses:
    get:
      tags:
        - Accesses
      summary: Get all accesses
      description: >-
        The accesses endpoint is used to get available accesses from a CO. The
        accesses contain details about the address where the access resides and
        equipment.
      operationId: getAccesses
      responses:
        '200':
          description: Accesses found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Access'
        '304':
          description: >-
            No updated accesses found. Only applicable when using
            If-Modified-Since header.
        '404':
          description: Access not found
  /dhcplookup:
    get:
      tags:
        - DHCP Lookup
      summary: Get an accessId
      description: >-
        Look up an access with values from DHCP logs, returns a single accessId
        if a unique access can be found
      operationId: apiDhcpLookup
      parameters:
        - name: ipv4CircuitId
          in: query
          schema:
            type: string
        - name: ipv4RemoteId
          in: query
          schema:
            type: string
        - name: ipv6InterfaceId
          in: query
          schema:
            type: string
        - name: ipv6RemoteId
          in: query
          schema:
            type: string
        - name: ipv4option82
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Access found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessLookupResponse'
        '404':
          description: Access not found
  /events:
    get:
      tags:
        - Events
      summary: Get events
      description: Get all events stored in the system up to the previous second
      operationId: apiGetEvents
      responses:
        '200':
          description: Events found
        '304':
          description: No new events since the last request
        '404':
          description: Events not found
  /invoicespecification/{id}:
    get:
      tags:
        - Invoice Specification
      summary: Get invoice specification period by id
      description: >-
        Fetch a specific invoice specification period by id given from the
        response of the get all invoice specification periods endpoint
      operationId: apiGetInvoiceSpecificationPeriodById
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Invoice specification for given id found
        '404':
          description: Invoice specification period for given period not found
  /invoicespecification:
    get:
      tags:
        - Invoice Specification
      summary: Get all invoice specification periods
      description: Get all invoice specification periods
      operationId: apiGetInvoiceSpecificationPeriods
      responses:
        '200':
          description: All invoice specification periods
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InvoicePeriod'
  /option82/{option82}:
    get:
      tags:
        - Option82 Lookup
      summary: Get access-id
      description: >-
        Look up an access with values from DHCP logs, returns a single accessId
        if a unique access can be found
      operationId: apiOption82Lookup
      parameters:
        - name: option82
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Access found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessLookupResponse'
        '404':
          description: Access not found
  /orders:
    get:
      tags:
        - Orders
      summary: Get orders
      description: >
        The orders endpoint is used to get available orders from a CO.

        The orders contain details about the address where the order resides and
        equipment
      operationId: apiGetOrders
      parameters:
        - name: accessId
          in: query
          description: Get all orders pertaining a specific acccessId
          schema:
            type: string
            description: ''
        - name: state
          in: query
          description: Get all orders with a certain state
          schema:
            type: string
            enum:
              - RECEIVED
              - IN_PROGRESS
              - DONE_FAILED
              - DONE_SUCCESS
      responses:
        '200':
          description: Orders found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        '404':
          description: Order not found
    post:
      tags:
        - Orders
      summary: Create a new order
      description: >-
        The orders endpoint is used to create a new order from a CO. The orders
        contain details about the address where the order resides and equipment.
      operationId: apiCreateOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Order'
      responses:
        '201':
          description: Order created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        '400':
          description: Bad request
  /orders/{id}:
    get:
      tags:
        - Orders
      summary: Get a single order
      description: >-
        The single order contains details about activated services and the
        services available for activation.
      operationId: getApiOrder
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for a single object.
      responses:
        '200':
          description: Order found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        '404':
          description: Order not found
    put:
      tags:
        - Orders
      summary: Update an order
      description: >-
        With put it is possible to update an order for which the state is
        "RECEIVED", using the complete object. Use orderId as key.
      operationId: updateApiOrder
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for a single object.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Order'
      responses:
        '204':
          description: Order updated
        '400':
          description: Bad request
        '406':
          description: Update not possible
    patch:
      tags:
        - Orders
      summary: Patch an order
      description: >-
        Update an order for which the state is "RECEIVED", using only the
        changed part. Use orderId as key.
      operationId: patchApiOrder
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for a single object.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Order'
      responses:
        '204':
          description: Order updated
        '400':
          description: Bad request
        '406':
          description: Update not possible
  /orderevents:
    get:
      tags:
        - Order Events
      summary: Get all order events
      operationId: apiGetOrderEvents
      parameters:
        - name: since
          in: query
          schema:
            type: string
            description: Unique identifier for a single object.
      responses:
        '200':
          description: Order events found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrderEvent'
        '404':
          description: Order events not found
  /services/{accessId}:
    get:
      tags:
        - Services
      summary: Lists services for a certain accessId
      description: Lists services for a certain accessId
      operationId: apiGetServicesForAccessId
      parameters:
        - name: accessId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Services found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessServices'
  /services:
    get:
      tags:
        - Services
      summary: Lists all services
      operationId: apiGetServicesForAllAccesses
      responses:
        '200':
          description: Services found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccessServices'
  /subscriptions/{id}:
    get:
      tags:
        - Subscriptions
      summary: Get subscriptions for an access
      description: Fetch a list of all subscriptions from a CO belonging to the current SP.
      operationId: apiGetSubscription
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for a single object.
      responses:
        '200':
          description: Subscription found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionResponse'
  /subscriptions:
    get:
      tags:
        - Subscriptions
      summary: Get all active subscriptions
      description: >-
        Fetch a list of all active subscriptions from a CO belonging to the
        current SP.
      operationId: apiGetSubscriptions
      responses:
        '200':
          description: Subscriptions found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubscriptionResponse'
        '404':
          description: No subscriptions found
  /tech/cpe/{accessId}/status:
    get:
      tags:
        - Technical Info
      summary: Fetch full cpe state
      description: Fetch full cpe state
      operationId: apiGetCpeStatus
      parameters:
        - name: accessId
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for a single object.
      responses:
        '200':
          description: CPE status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CpeStatus'
        '404':
          description: No data found
  /tech/access/{accessId}/hardware:
    get:
      tags:
        - Technical Info
      summary: Get hardware information
      description: >-
        Information about the customer-facing network element, eg. access
        switch.
      operationId: apiGetHardware
      parameters:
        - name: accessId
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for a single object.
      responses:
        '200':
          description: Hardware found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Hardware'
        '404':
          description: Hardware not found
  /tech/access/{accessId}/link/igmpsnooping:
    get:
      tags:
        - Technical Info
      summary: Fetch igmp snooping data from only the access interface
      description: Fetch igmp snooping data from only the access interface
      operationId: apiGetIgmpSnooping
      parameters:
        - name: accessId
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for a single object.
      responses:
        '200':
          description: Igmp snooping data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgmpSnoop'
        '404':
          description: No data found
  /tech/access/{accessId}/link/leaseinfo:
    get:
      tags:
        - Technical Info
      summary: Fetch lease data from the access interface
      description: Fetch lease data from the access interface.
      operationId: apiGetLeaseInfo
      parameters:
        - name: accessId
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for a single object.
      responses:
        '200':
          description: Lease data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mac'
        '404':
          description: No data found
  /tech/access/{accessId}/link/status:
    get:
      tags:
        - Technical Info
      summary: Fetch access equipment access interface status
      description: Fetch access equipment access interface status
      operationId: apiGetLinkStatus
      parameters:
        - name: accessId
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for a single object.
      responses:
        '200':
          description: Access equipment access interface status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkStatus'
        '404':
          description: No data found
  /tech/access/{accessId}/link/macaddresstable:
    get:
      tags:
        - Technical Info
      summary: Fetch mac address table data from only the access interface
      description: Fetch mac address table data from only the access interface.
      operationId: apiGetMacAddressTable
      parameters:
        - name: accessId
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for a single object.
      responses:
        '200':
          description: Mac address table data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mac'
        '404':
          description: No data found
  /tickets:
    get:
      tags:
        - Tickets
      summary: Fetch tickets
      description: >-
        Fetch one or many tickets, able to filter by created timestamp or ticket
        status
      operationId: apiGetTickets
      parameters:
        - name: status
          in: query
          schema:
            type: string
            enum:
              - CREATED
              - IN_PROGRESS_CO
              - IN_PROGRESS_SP
              - CLOSED
        - name: created
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Tickets found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TicketSummary'
        '404':
          description: Tickets not found
    post:
      tags:
        - Tickets
      summary: Create a ticket
      description: Create a new ticket
      operationId: apiCreateTicket
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccessTicket'
      responses:
        '201':
          description: Valid response containing the CO reference
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTicketResponse'
  /tickets/{coTicketReference}:
    get:
      tags:
        - Tickets
      summary: Fetch ticket by reference
      description: Fetch a ticket by its reference
      operationId: apiGetTicket
      parameters:
        - name: coTicketReference
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ticket found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessTicket'
        '404':
          description: Ticket not found
    patch:
      tags:
        - Tickets
      summary: Update ticket status
      description: Update ticket status and add comments. Also used for closing a ticket
      operationId: apiPatchTicket
      parameters:
        - name: coTicketReference
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchTicketRequest'
      responses:
        '204':
          description: No content
components:
  schemas:
    Access:
      type: object
      properties:
        accessId:
          type: string
          description: >-
            Identifies a single access. Used as key when fetching a single
            access and ordering services.
        legacyAccessId:
          type: string
          description: >-
            For accesses that have been migrated from another CO the new CO
            might have information on what access-id was used for this access by
            the previous CO.
        streetName:
          type: string
          description: Street name for the address where the access resides
        streetNumber:
          type: string
          description: >-
            In the example of "Kungsgatan 10G", the street number is "10". In
            the example of "Lantvägen 550-70", the street number is "550-7"
        streetLittera:
          type: string
          description: In the example of "Kungsgatan 10G", the street littera is "G".
        postalCode:
          type: string
          description: Postal code for the address where the access resides
        city:
          type: string
          description: City for the address where the access resides
        countryCode:
          type: string
          description: Country code for the address where the access resides
        premisesType:
          type: string
          description: Type of premises where the access resides
          enum:
            - COMMERCIAL
            - MDU_APARTMENT
            - MDU_COMMON
            - MDU_TECHNICAL
            - PUBLIC
            - RESIDENTIAL_HOUSE
            - UNKNOWN
        mduApartmentNumber:
          type: string
          description: >-
            Distinguish between individual apartments in apartment buildings
            sharing a single postal address.
        mduDistinguisher:
          type: string
          description: >-
            Alternative to mduApartmentNumber to distinguish between individual
            apartments in an apartment building sharing a single postal address.
        outlet:
          type: string
          description: >-
            Identify the port in the apartment or house. The port is typically
            labeled with this value. If specified, it should be unique per
            address.
        population:
          type: string
          description: >-
            Describes a subset of all accesses. Used for grouping accesses
            together for commercial or technical purposes.
        priceGroup:
          type: integer
          description: >-
            A price group that this access is a part of. The value must be an
            integer larger or equal to 0 (unsigned integer). The exact meaning
            and associated price list is defined by CO.
          format: int32
        accessState:
          type: string
          description: >-
            Describes the current state of whether the access is connected and
            can be used.
          enum:
            - PLANNED
            - DEPLOYING
            - PASSED
            - CONNECTED
            - DISCONNECTED
            - INMIGRATION
            - OUTMIGRATION
        nationalAddressUUID:
          type: string
          description: >-
            Universally Unique Identifier for the property the address belongs
            to. The value may differ from country to country depending on
            national preferences.
    ErrorResponse:
      type: object
      properties:
        cause:
          type: string
    AccessLookupResponse:
      type: object
      properties:
        accessId:
          type: string
          description: Unique identifier for a single object.
    InvoicePeriod:
      type: object
      properties:
        id:
          type: string
          description: Id of the invoice period
        fromDate:
          type: string
          description: Start date of the invoice period
        toDate:
          type: string
          description: End date of the invoice period
    Characteristics:
      type: object
      properties:
        fixedIp:
          type: boolean
          description: Indicates if a fixedIp is to be used.
        ipAddresses:
          type: array
          items:
            type: string
        sla:
          type: string
      description: Characteristics for the service
    Equipment:
      type: object
      properties:
        vendorId:
          type: string
          description: Specifies the DHCP Option 60 Vendor class identifier.
          externalDocs:
            description: RFC 2132
            url: https://tools.ietf.org/html/rfc2132
        macAddress:
          type: string
          description: Specifies the equipments MAC-address.
      description: Equipment which is used to deliver a service
    Order:
      type: object
      properties:
        orderId:
          type: string
          description: The unique identifier for the order.
        accessId:
          type: string
          description: The unique identifier for the access given in '/accesses'.
        service:
          type: string
          description: The technical service offered by the CO.
        operation:
          type: string
          description: The type of operation this order is intended to perform
          enum:
            - ACTIVATE
            - DEACTIVATE
            - SUSPEND
            - RESUME
            - MODIFY
            - CHANGE
        requestedDateTime:
          type: string
          description: >-
            Earliest date and time for the order to be executed. If date is
            omitted the order is executed immediately.If a date in the past is
            provided (current date is 2019-04-01 and provided date is
            2019-03-28) order will be executed immediately.
          format: date-time
        expectedCompletionDate:
          type: string
          description: >-
            The date and time when the order is expected to be delivered. This
            is an estimated time.
          format: date-time
        spReference:
          type: string
          description: Service provider reference.
        spSubscriptionId:
          type: string
          description: Service provider subscription id.
        subscriptionId:
          type: string
          description: Subscription id
        externalNote:
          type: string
          description: >-
            Note that is formatted in such a way that it can be displayed to the
            end customer.
          example: Your service have been blocked due to outstanding payment
        characteristics:
          $ref: '#/components/schemas/Characteristics'
        forcedTakeover:
          type: boolean
          description: >-
            If the SP wishes to replace the service from another SP this value
            is set to true. This is only possible if the accesses API responds
            with forcedTakeoverPossible: true for the service to be activated.
            If forcedTakeoverPossible is false this field must be omitted or be
            set to false.
        equipment:
          $ref: '#/components/schemas/Equipment'
        state:
          type: string
          description: The state of the order.
          enum:
            - RECEIVED
            - IN_PROGRESS
            - DONE_SUCCESS
            - DONE_FAILED
        message:
          type: string
          description: Used in the response to describe why the status is DONE_FAILED
        path:
          type: string
          description: API path for the specific order.
          readOnly: true
    OrderEvent:
      type: object
      properties:
        event:
          type: string
          description: ID of the event, used as a parameter to fetch following events
        order:
          $ref: '#/components/schemas/OrderEventOrder'
    OrderEventOrder:
      type: object
      properties:
        path:
          type: string
          description: API path for the specific order.
        accessId:
          type: string
          description: The unique identifier for the access given in '/accesses'.
        service:
          type: string
          description: The technical service offered by the CO.
        operation:
          type: string
          description: The type of operation this order is intended to perform
          enum:
            - ACTIVATE
            - DEACTIVATE
            - SUSPEND
            - RESUME
            - MODIFY
            - CHANGE
        state:
          type: string
          description: The state of the order.
          enum:
            - RECEIVED
            - IN_PROGRESS
            - DONE_SUCCESS
            - DONE_FAILED
        message:
          type: string
          description: Used in the response to describe why the status is DONE_FAILED
      description: Object containing select fields from the order
    AccessServices:
      type: object
      properties:
        accessId:
          type: string
          description: >-
            Identifies a single access. Used as key when fetching a single
            access and ordering services.
        services:
          type: array
          description: Lists of deliverable services.
          items:
            $ref: '#/components/schemas/Service'
    LinkedTreeMapFixedTypeNameServiceCharacteristics:
      type: object
      properties:
        empty:
          type: boolean
      additionalProperties:
        $ref: '#/components/schemas/ServiceCharacteristics'
      description: Characteristics available when ordering this service
    Service:
      type: object
      properties:
        serviceName:
          type: string
          writeOnly: true
        connectionDateTime:
          type: string
          description: >-
            The service provider ID. Indicates when the service is technically
            deliverable
        availableDateTime:
          type: string
          description: Indicates when the service can be ordered
        disconnectionDateTime:
          type: string
          description: Indicates when the service is no longer available
        forcedTakeoverPossible:
          type: boolean
          description: >-
            Specifies if a service provider can replace another service
            providers activated service
        comments:
          type: array
          description: A list of messages from the CO intended for the end customer
          items:
            type: string
            description: A list of messages from the CO intended for the end customer
        characteristics:
          type: object
          properties:
            empty:
              type: boolean
          additionalProperties:
            $ref: '#/components/schemas/ServiceCharacteristics'
          description: Characteristics available when ordering this service
        service:
          type: string
      description: Lists of deliverable services.
    ServiceCharacteristics:
      type: object
      properties:
        required:
          type: boolean
        values:
          type: array
          items:
            type: object
      description: Characteristics available when ordering this service
    DhcpIdentifier:
      type: object
      description: DHCP identifier
    Subscription:
      type: object
      properties:
        subscriptionId:
          type: string
          description: The unique identifier for the subscription.
        service:
          type: string
          description: Name of the service for the subscription.
        operationalState:
          type: string
          description: State of the subscription.
          enum:
            - ACTIVATED
            - SUSPENDED
        connectionDate:
          type: string
          description: Date when the subscription was activated
          format: date-time
        disconnectionDate:
          type: string
          description: Date when the subscription was deactivated
          format: date-time
        spReference:
          type: string
          description: A reference to the subscription
        spSubscriptionId:
          type: string
          description: The service providers subscription id
        option82:
          type: string
          description: Option 82 for the service
        dhcpIdentifier:
          $ref: '#/components/schemas/DhcpIdentifier'
        characteristics:
          $ref: '#/components/schemas/Characteristics'
        equipment:
          $ref: '#/components/schemas/Equipment'
    SubscriptionResponse:
      type: object
      properties:
        accessId:
          type: string
          description: Unique identifier for a single object.
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/Subscription'
    CpeStatus:
      type: object
      properties:
        firmware:
          type: string
          description: CPE firmware name
        vendor:
          type: string
          description: CPE vendor name
        model:
          type: string
          description: CPE model name
        mac:
          type: string
          description: CPE mgmt interface mac address
        up:
          type: boolean
          description: Power status
        upSince:
          type: string
          description: Uptime of CPE
        ports:
          type: array
          description: List of port objects
          items:
            $ref: '#/components/schemas/Port'
        macAddressTable:
          type: array
          description: List of mac address objects
          items:
            $ref: '#/components/schemas/Mac'
        dhcpSnoopingTable:
          type: array
          items:
            $ref: '#/components/schemas/DhcpSnooping'
    DhcpSnooping:
      type: object
      properties:
        ip:
          type: string
          description: IP lease
        mac:
          type: string
          description: Mac address of device
        serviceType:
          type: string
          description: Which network service the lease originates from
        timeout:
          type: string
          description: DHCP Lease timeout
          format: date-time
    Mac:
      type: object
      properties:
        mac:
          type: string
          description: Mac address of device
        serviceType:
          type: string
          description: Which network service the mac originates from
        vlan:
          type: integer
          description: Some services can exist on multiple vlans
          format: int32
        port:
          type: string
          description: Distinguish port, In case uplink mac's are included
        learntAt:
          type: string
          description: Some switches keep age of mac table entry
          format: date-time
    Metric:
      type: object
      properties:
        packets:
          type: integer
          description: Count of packets
        bytes:
          type: integer
          description: Count of bytes
        unicast:
          type: integer
          description: Count of unicast packets
        broadcast:
          type: integer
          description: Count of broadcast packets
        multicast:
          type: integer
          description: Count of multicast packets
        pauses:
          type: integer
          description: Count of pauses
        errors:
          type: integer
          description: Count of errors
        crcErrors:
          type: integer
          description: Count of CRC errors
      description: Output
    Port:
      type: object
      properties:
        index:
          type: integer
          description: Interface number
          format: int32
        ifDescription:
          type: string
          description: Interface description
        name:
          type: string
          description: Friendly interface name
        link:
          type: boolean
          description: Duplex status
        fullDuplex:
          type: boolean
          description: Duplex status
        changedAt:
          type: string
          description: Timestamp when port changed state
          format: date-time
        loopDetectionStatus:
          type: string
          description: Loop detection status
        freeSeating:
          type: boolean
          description: Free seating status
        configuredSpeed:
          type: string
          description: Configured speed
        linkSpeed:
          type: integer
          description: Link speed
          format: int32
        transceiver:
          $ref: '#/components/schemas/Transceiver'
        statistics:
          $ref: '#/components/schemas/Statistics'
      description: List of port objects
    Statistics:
      type: object
      properties:
        counterResetAt:
          type: string
          description: Timestamp when statistics counter was started
          format: date-time
        peakInputRate:
          $ref: '#/components/schemas/PeakRate'
        peakOutputRate:
          $ref: '#/components/schemas/PeakRate'
        lastFiveInput:
          $ref: '#/components/schemas/Metric'
        lastFiveOutput:
          $ref: '#/components/schemas/Metric'
        input:
          $ref: '#/components/schemas/Metric'
        output:
          $ref: '#/components/schemas/Metric'
      description: Statistics for the link
    Transceiver:
      type: object
      properties:
        dbmRx:
          type: string
          description: Transceiver receive optical power
        dbmTx:
          type: string
          description: Transceiver transmit optical power
        temp:
          type: string
          description: Transceiver temperature
        biasTx:
          type: string
          description: Transceiver TX bias current
        supplyVoltage:
          type: string
          description: Transceiver Supply voltage
        vendor:
          type: string
          description: Transceiver Vendor
        partNumber:
          type: string
          description: Transceiver Part Number
        serialNumber:
          type: string
          description: Transceiver Serial Number
      description: Transceiver
    Hardware:
      type: object
      properties:
        up:
          type: boolean
          description: Whether the hardware is up or not
        upSince:
          type: string
          description: ISO 8601 timestamp when hardware was started
          format: date-time
        vendor:
          type: string
          description: Hardware vendor
        model:
          type: string
          description: Hardware model
    IgmpSnoop:
      type: object
      properties:
        multicast:
          type: string
          description: Multicast address
        timestamp:
          type: string
          description: Timestamp when latest join was sent
          format: date-time
        counter:
          type: integer
          description: Traffic counter
    ConfiguredSpeed:
      type: object
      properties:
        serviceType:
          type: string
          description: Service type
        queue:
          type: string
          description: Queue index
        cir:
          type: string
          description: Committed rate
        pir:
          type: string
          description: Peak rate
    LinkStatus:
      type: object
      properties:
        link:
          type: boolean
          description: Physical link status
        fullDuplex:
          type: boolean
          description: If interface is set to full duplex
        linkSince:
          type: string
          description: Timestamp when port changed status
          format: date-time
        speed:
          type: string
          description: Link speed
        adminDown:
          type: boolean
          description: Interface is administrative closed
        statistics:
          $ref: '#/components/schemas/Statistics'
        transceiver:
          $ref: '#/components/schemas/Transceiver'
        configuredSpeeds:
          type: array
          items:
            $ref: '#/components/schemas/ConfiguredSpeed'
    PeakRate:
      type: object
      properties:
        counter:
          type: integer
          description: Bytes per second
        timestamp:
          type: string
          description: Timestamp of peak
          format: date-time
      description: Peak output rate
    CreateTicketResponse:
      type: object
      properties:
        coTicketReference:
          type: string
          description: CO Ticket Reference
    AccessTicket:
      type: object
      properties:
        coTicketReference:
          type: string
          description: CO Ticket Reference
          readOnly: true
        spReference:
          type: string
          description: SP Reference
        spTicketReference:
          type: string
          description: SP Ticket Reference
        accessId:
          type: string
          description: Unique identifier for an Access, owned by CO
        createdBy:
          type: string
          description: Created By User
        createdAt:
          type: string
          description: Created Time
          format: date-time
          readOnly: true
        updatedAt:
          type: string
          description: Last Modified time
          format: date-time
          readOnly: true
        heading:
          type: string
          description: Heading
        description:
          type: string
          description: Description
        comments:
          type: array
          description: List of Comments
          readOnly: true
          items:
            $ref: '#/components/schemas/AccessTicketComment'
        status:
          type: string
          description: Status
          enum:
            - CREATED
            - IN_PROGRESS_CO
            - IN_PROGRESS_SP
            - CLOSED
        responsible:
          type: string
          description: Responsible party, used for SLA calculation
          readOnly: true
          enum:
            - SP
            - CO
        subscriptionId:
          type: string
          description: Unique identifier for a Subscription, owned by CO
        problemType:
          type: string
          description: Problem Type
          enum:
            - NO_LINK
            - NO_ACCESS
            - QUALITY
            - OTHER
        additionalInfo:
          $ref: '#/components/schemas/TicketInfo'
    AccessTicketComment:
      type: object
      properties:
        createdBy:
          type: string
          description: Created By User
        message:
          type: string
          description: Message
        createdAt:
          type: string
          description: Created Time
          format: date-time
      description: Comment
    TicketInfo:
      type: object
      properties:
        ip:
          type: string
          description: Customer IP
        mac:
          type: string
          description: Device MAC-address
        link:
          type: boolean
          description: Customer Link Status
      description: Additional info
    TicketSummary:
      type: object
      properties:
        coTicketReference:
          type: string
          description: CO Ticket Reference
        spTicketReference:
          type: string
          description: SP Ticket Reference
        status:
          type: string
          description: Status
          enum:
            - CREATED
            - IN_PROGRESS_CO
            - IN_PROGRESS_SP
            - CLOSED
        responsible:
          type: string
          description: Responsible party, used for SLA calculations
          enum:
            - SP
            - CO
    PatchTicketRequest:
      type: object
      properties:
        status:
          type: string
          description: CO Ticket Reference
          enum:
            - CREATED
            - IN_PROGRESS_CO
            - IN_PROGRESS_SP
            - CLOSED
        comment:
          $ref: '#/components/schemas/AccessTicketComment'
        responsible:
          type: string
          description: Responsible party, used for SLA calculation
          enum:
            - SP
            - CO
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    basic:
      type: http
      scheme: basic
