openapi: 3.1.0
info:
  contact:
    url: https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api
  title: 'ETSI GS MEC 015 Multi-access Traffic Steering APIs'
  version: 2.1.1
  description: The present document focuses on the Multi-access Traffic Steering multi-access edge service. It describes the related application policy information including authorization and access control, information flows, required information and service aggregation patterns. The present document specifies the necessary API with the data model and data format.
  license:
    name: BSD-3-Clause
    url: 'https://forge.etsi.org/legal-matters'

externalDocs:
  description: ETSI GS MEC015 V2.1.1 Traffic Management APIs
  url: 'https://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/02.01.01_60/gs_MEC015v020101p.pdf'

servers:
  - url: 'https://localhost/mts/v1'

tags:
- name: "mts"

paths:
  /mts_capability_info:
    get:
      tags:
      - "mts"
      summary: "Retrieve the MTS capability informations"
      description: "Used to query information about the MTS information. Typically used in the 'Get MTS service Info from the MTS Service' procedure as described in clause 6.2.6."
      operationId: "mtsCapabilityInfoGET"
      parameters: []
      responses:
        "200":
          description: "Upon success, a response body containing the MTS capability information is returned."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MtsCapabilityInfo"
        "400":
          $ref: "#/components/responses/400"
        "403":
          $ref: '#/components/responses/403'
        "404":
          $ref: '#/components/responses/404'
  /mts_sessions:
    get:
      tags:
      - "mts"
      summary: "Retrieve information about a list of MTS sessions"
      description: "Retrieves information about a list of MTS sessions. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10."
      operationId: "mtsSessionsListGET"
      parameters:
      - $ref: '#/components/parameters/Query.app_instance_id'
      - $ref: '#/components/parameters/Query.app_name'
      - $ref: '#/components/parameters/Query.session_id'
      responses:
        "200":
          description: "Upon success, a response body containing an array of the MTS sessions is returned."
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/MtsSessionInfo"
        "400":
          $ref: "#/components/responses/400"
        "403":
          $ref: '#/components/responses/403'
        "404":
          $ref: '#/components/responses/404'
    post:
      tags:
      - "mts"
      summary: "Create a MTS session"
      description: "Used to create a MTS session. This method is typically used in 'Register application to the MTS Service' procedure as described in clause 6.2.7."
      operationId: "mtsSessionPOST"
      parameters: []
      requestBody:
        description: "Entity body in the request contains MtsSessionInfo to be created."
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MtsSessionInfo'
      responses:
        "201":
          description: "Upon success, the HTTP response shall include a 'Location' HTTP header that contains the resource URI of the created resource."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MtsSessionInfo"
        "400":
          $ref: "#/components/responses/400"
        "403":
          $ref: '#/components/responses/403'
        "404":
          $ref: '#/components/responses/404'
  /mts_sessions/{sessionId}:
    get:
      tags:
      - "mts"
      summary: "Retrieve information about specific MTS session"
      description: "Retrieves information about an individual MTS session. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10."
      operationId: "mtsSessionGET"
      parameters:
      - $ref: '#/components/parameters/Path.sessionId'
      responses:
        "200":
          description: "Used to indicate nonspecific success. The response body contains a representation of the resource."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MtsSessionInfo"
        "400":
          $ref: "#/components/responses/400"
        "403":
          $ref: '#/components/responses/403'
        "404":
          $ref: '#/components/responses/404'
    put:
      tags:
      - "mts"
      summary: "Update the information about specific MTS session"
      description: "Updates the information about an individual MTS session. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics. "
      operationId: "mtsSessionPUT"
      parameters:
      - $ref: '#/components/parameters/Path.sessionId'
      requestBody:
        description: "MtsSessionInfo with updated information is included as entity body of the request."
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MtsSessionInfo'
      responses:
        "200":
          description: "Used to indicate nonspecific success. The response body contains a representation of the resource."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MtsSessionInfo"
        "400":
          $ref: "#/components/responses/400"
        "403":
          $ref: '#/components/responses/403'
        "404":
          $ref: '#/components/responses/404'
        "412":
          $ref: '#/components/responses/412'
    delete:
      tags:
      - "mts"
      summary: "Remove specific MTS session"
      description: "DELETE method is typically used in 'Unregister from the MTS Service' procedure as described in clause 6.2.8."
      operationId: "mtsSessionDELETE"
      parameters:
      - $ref: '#/components/parameters/Path.sessionId'
      responses:
        "204":
          $ref: '#/components/responses/204'
        "403":
          $ref: '#/components/responses/403'
        "404":
          $ref: '#/components/responses/404'
components:
  responses:
    "204":
      description: "Upon success, a response 204 No Content without any response body is returned."
    "400":
      description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    "403":
      description: 'Forbidden :  operation is not allowed given the current status of the resource.'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    "404":
      description: 'Not Found :  used when a client provided a URI that cannot be mapped to a valid resource URI.'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    "412":
      description: 'Precondition failed :  used when a condition has failed during conditional requests, e.g. when
        using ETags to avoid write conflicts when using PUT'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
  parameters:
    Path.sessionId:
      name: sessionId
      in: "path"
      description: "Represents a MTS session instance"
      required: true
      schema:
        type: string
    Query.app_instance_id:
      name: app_instance_id
      in: "query"
      description: "A MEC application instance may use multiple app_instance_ids as an input parameter to query the MTS session of a list of MEC application instances. See note."
      required: false
      schema:
        type: array
        items:
          type: string
    Query.app_name:
      name: app_name
      in: "query"
      description: "A MEC application instance may use multiple app_names as an input parameter to query the MTS session of a list of MEC application instances. See note."
      required: false
      schema:
        type: array
        items:
          type: string
    Query.session_id:
      name: session_id
      in: "query"
      description: "A MEC application instance may use session_id as an input parameter to query the information of a list of MTS sessions. See note."
      required: false
      schema:
        type: array
        items:
          type: string
  schemas:
    MtsCapabilityInfo:
      properties:
        mtsAccessInfo:
          description: The information on access network connection as defined below
          items:
            type: object
            properties:
              accessId:
                format: uint32
                type: integer
                description: Unique identifier for the access network connection
                x-etsi-mec-cardinality: '1'
                x-etsi-mec-origin-type: Uint32
              accessType:
                format: uint32
                type: integer
                description: "Numeric value (0-255) corresponding to specific type of access network as following:
                  0 = Unknown
                  1 = Any IEEE802.11-based WLAN technology
                  2 = Any 3GPP-based Cellular technology
                  3 = Any Fixed Access
                  11 = IEEE802.11 a/b/g WLAN
                  12 = IEEE 802.11 a/b/g/n WLAN
                  13 = IEEE 802.11 a/b/g/n/ac WLAN
                  14 = IEEE 802.11 a/b/g/n/ac/ax WLAN (Wi-Fi 6)
                  15 = IEEE 802.11 b/g/n WLAN
                  31 = 3GPP GERAN/UTRA (2G/3G)
                  32 = 3GPP E-UTRA (4G/LTE)
                  33 = 3GPP NR (5G)"
                x-etsi-mec-cardinality: '1'
                x-etsi-mec-origin-type: Uint32
              metered:
                format: uint32
                type: integer
                description: 'Numeric value (0-255) corresponding to the following:
                  0: the connection is not metered (see note)
                  1: the connection is metered
                  2: unknown '
                x-etsi-mec-cardinality: '1'
                x-etsi-mec-origin-type: Uint32
          required:
          - accessId
          - accessType
          - metered
          minItems: 1
          type: array
          x-etsi-mec-cardinality: 1..N
          x-etsi-mec-origin-type: Structure (inlined)
        mtsMode:
          description: 'Numeric value corresponding to a specific MTS operation supported by the TMS
            0 = low cost, i.e. using the unmetered access network connection whenever it is available
            1 = low latency, i.e. using the access network connection with lower latency
            2 = high throughput, i.e. using the access network connection with higher throughput, or/and multiple access network connection simultaneously if supported
            3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for highreliability and low-latency applications
            4 = QoS, i.e. performing MTS based on the specific QoS requirements from the app'
          items:
            type: integer
            format: uint32
          minItems: 1
          type: array
          x-etsi-mec-cardinality: 1..N
          x-etsi-mec-origin-type: Uint32
        timeStamp:
          description: Time stamp to indicate when the corresponding information elements are sent
          properties:
            nanoSeconds:
              format: uint32
              type: integer
              description: Time in nanoseconds in Unix-time since January 1, 1970, 00:00:00 UTC
              x-etsi-mec-cardinality: '1'
              x-etsi-mec-origin-type: Uint32
            seconds:
              description: Time in seconds in Unix-time since January 1, 1970, 00:00:00 UTC
              format: uint32
              type: integer
              x-etsi-mec-cardinality: '1'
              x-etsi-mec-origin-type: Uint32
          required:
          - seconds
          - nanoSeconds
          type: object
          x-etsi-mec-cardinality: 0..1
          x-etsi-mec-origin-type: Structure (inlined)
      required:
      - mtsAccessInfo
      - mtsMode
      type: object
      x-etsi-notes: "NOTE:\tA metered connection is a network connection that has\
        \ a maximum data usage in a specific period, e.g. per hour/day/week/month.\
        \ The user may get billed extra charges if they go over the allotted amount."
      x-etsi-ref: 7.2.4
    MtsSessionInfo:
      properties:
        appInsId:
          description: Application instance identifier
          type: string
          x-etsi-mec-cardinality: '1'
          x-etsi-mec-origin-type: String
        flowFilter:
          description: Traffic flow filtering criteria, applicable only if when requestType is set as FLOW_SPECIFIC_MTS_SESSION. Any filtering criteria shall define a single session only. In case multiple sessions match flowFilter the request shall be rejected. If the flowFilter field is included, at least one of its subfields shall be included. Any flowFilter subfield that is not included shall be ignored in traffic flow filtering
          items:
            type: object
            properties:
              dscp:
                format: uint32
                type: integer
                description: DSCP in the IPv4 header or Traffic Class in the IPv6 header
                x-etsi-mec-cardinality: 0..1
                x-etsi-mec-origin-type: Uint32
              dstIp:
                description: Destination address identity of session (including range)
                type: string
                x-etsi-mec-cardinality: 0..1
                x-etsi-mec-origin-type: String
              dstPort:
                description: Destination port identity of session
                items:
                  type: integer
                  format: uint32
                minItems: 0
                type: array
                x-etsi-mec-cardinality: 0..N
                x-etsi-mec-origin-type: Uint32
              flowlabel:
                format: uint32
                type: integer
                description: Flow Label in the IPv6 header, applicable only if the flow is IPv6
                x-etsi-mec-cardinality: 0..1
                x-etsi-mec-origin-type: Uint32
              protocol:
                format: uint32
                type: integer
                description: Protocol number
                x-etsi-mec-cardinality: 0..1
                x-etsi-mec-origin-type: Uint32
              sourceIp:
                description: Source address identity of session (including range)
                type: string
                x-etsi-mec-cardinality: 0..1
                x-etsi-mec-origin-type: String
              sourcePort:
                description: Source port identity of session
                items:
                  type: integer
                  format: uint32
                minItems: 0
                type: array
                x-etsi-mec-cardinality: 0..N
                x-etsi-mec-origin-type: Uint32
          minItems: 1
          type: array
          x-etsi-mec-cardinality: 1..N
          x-etsi-mec-origin-type: Structure (inlined)
        mtsMode:
          format: uint32
          type: integer
          description: 'Numeric value (0 - 255) corresponding to a specific MTS mode of the MTS session:
            0 = low cost, i.e. using the unmetered access network connection whenever it is available
            1 = low latency, i.e. using the access network connection with lower latency
            2 = high throughput, i.e. using the access network connection with higher throughput, or multiple access network connection simultaneously
            3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for high-reliability and low-latency applications
            4 = QoS, i.e. performing MTS based on the QoS requirement (qosD)'
          x-etsi-mec-cardinality: '1'
          x-etsi-mec-origin-type: Uint32
        qosD:
          description: QoS requirement description of the MTS session, applicable only if mtsMode = 4 (QoS). If the qosD field is included, at least one of its subfields shall be included. Any qosD subfield that is not included shall be ignored in Multi-access Traffic Steering (MTS)
          properties:
            maxJitter:
              description: tolerable jitter in [10 nanoseconds]
              type: integer
              format: uint32
              x-etsi-mec-cardinality: 0..1
              x-etsi-mec-origin-type: Uint32
            maxLatency:
              description: tolerable (one-way) delay in [10 nanoseconds]
              type: integer
              format: uint32
              x-etsi-mec-cardinality: 0..1
              x-etsi-mec-origin-type: Uint32
            maxLoss:
              description: tolerable packet loss rate in [1/10^x]
              type: integer
              format: uint32
              x-etsi-mec-cardinality: 0..1
              x-etsi-mec-origin-type: Uint32
            minTpt:
              description: minimal throughput in [kbps]
              type: integer
              format: uint32
              x-etsi-mec-cardinality: 0..1
              x-etsi-mec-origin-type: Uint32
            priority:
              description: "numeric value (0 - 255) corresponding to the traffic priority 0: low; 1: medium; 2: high; 3: critical"
              type: integer
              format: uint32
              x-etsi-mec-cardinality: 0..1
              x-etsi-mec-origin-type: Uint32
          type: object
          x-etsi-mec-cardinality: '1'
          x-etsi-mec-origin-type: Structure
        requestType:
          description: 'Numeric value (0 - 255) corresponding to specific type of consumer as following:
            0 = APPLICATION_SPECIFIC_MTS_SESSION
            1 = FLOW_SPECIFIC_MTS_SESSION'
          enum:
          - 0
          - 1
          type: integer
          x-etsi-mec-cardinality: '1'
          x-etsi-mec-origin-type: Enum_inlined
        timeStamp:
          description: 'Time stamp to indicate when the corresponding information elements are sent '
          properties:
            nanoSeconds:
              format: uint32
              type: integer
              description: The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
              x-etsi-mec-cardinality: '1'
              x-etsi-mec-origin-type: Uint32
            seconds:
              format: uint32
              type: integer
              description: The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC
              x-etsi-mec-cardinality: '1'
              x-etsi-mec-origin-type: Uint32
          required:
          - seconds
          - nanoSeconds
          type: object
          x-etsi-mec-cardinality: 0..1
          x-etsi-mec-origin-type: Structure (inlined)
        trafficDirection:
          description: 'The direction of the requested MTS session:
            00 = Downlink (towards the UE)
            01 = Uplink (towards the application/session)
            10 = Symmetrical (see note) '
          type: string
          x-etsi-mec-cardinality: '1'
          x-etsi-mec-origin-type: String
      required:
      - appInsId
      - requestType
      - flowFilter
      - qosD
      - mtsMode
      - trafficDirection
      type: object
      x-etsi-notes: "NOTE:\tFor the downlink direction of a symmetrical flow, \"sourceIp\"\
        \ and \"sourcePort\" in the \"flowFilter\" structure are used for source address\
        \ and port, respectively; \"dstIp\" and \"dstPort\" are used for destination\
        \ address and port, respectively. For the uplink direction of a symmetrical\
        \ flow, \"sourceIp\" and \"sourcePort\" are used for destination address and\
        \ port, respectively; \"dstIp\" and \"dstPort\" are used for source address\
        \ and port, respectively."
      x-etsi-ref: 7.2.5
    ProblemDetails:
      properties:
        detail:
          description: A human-readable explanation specific to this occurrence of the problem
          type: string
          x-etsi-mec-cardinality: 0..1
          x-etsi-mec-origin-type: String
        instance:
          description: A URI reference that identifies the specific occurrence of the problem
          format: uri
          type: string
          x-etsi-mec-cardinality: 0..1
          x-etsi-mec-origin-type: URI
        status:
          description: The HTTP status code for this occurrence of the problem
          format: uint32
          type: integer
          x-etsi-mec-cardinality: 0..1
          x-etsi-mec-origin-type: Uint32
        title:
          description: A short, human-readable summary of the problem type
          type: string
          x-etsi-mec-cardinality: 0..1
          x-etsi-mec-origin-type: String
        type:
          description: A URI reference according to IETF RFC 3986 that identifies the problem type
          format: uri
          type: string
          x-etsi-mec-cardinality: 0..1
          x-etsi-mec-origin-type: URI
      type: object
