openapi: 3.0.0
info:
  description: Nnwdaf_AnalyticsInfo Service API
  version: "1.0.1"
  title: Nnwdaf_AnalyticsInfo
externalDocs:
  description: 3GPP TS 29.520 V15.2.0; 5G System; Network Data Analytics Services.
  url: 'http://www.3gpp.org/ftp/Specs/archive/29_series/29.520/'
security:
  - {}
  - oAuth2ClientCredentials:
    - nnwdaf-analyticsinfo
servers:
  - url: '{apiRoot}/nnwdaf-analyticsinfo/v1'
    variables:
      apiRoot:
        default: https://example.com
        description: apiRoot as defined in subclause 4.4 of 3GPP TS 29.501.
paths:
  /analytics:
    get:
      parameters:
        - name: event-id
          in: query
          description: Identify the analytics.
          required: true
          schema:
            $ref: '#/components/schemas/EventId'
        - name: event-filter
          in: query
          description: Identify the analytics when the eventId is "Load_Level_Information".
          required: false
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventFilter'
        - name: supported-features
          in: query
          description: To filter irrelevant responses related to unsupported features
          schema:
            $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      responses:
        '200':
          description: The individual PCF session biding session binding information resource matching the query parameter(s) is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsData'
        '400':
          $ref: 'TS29571_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29571_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29571_CommonData.yaml#/components/responses/403'
        '404':
          description: Indicates that the NWDAF Analytics resource does not exist.
          content:
            application/problem+json:
              schema:
                $ref: 'TS29571_CommonData.yaml#/components/schemas/ProblemDetails'
        '406':
          $ref: 'TS29571_CommonData.yaml#/components/responses/406'
        '414':
          $ref: 'TS29571_CommonData.yaml#/components/responses/414'
        '429':
          $ref: 'TS29571_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29571_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29571_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29571_CommonData.yaml#/components/responses/default'
components:
  securitySchemes:
    oAuth2ClientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: '{nrfApiRoot}/oauth2/token'
          scopes:
            nnwdaf-analyticsinfo: Access to the Nnwdaf_AnalyticsInfo API
  schemas:
    AnalyticsData:
      type: object
      properties:
        sliceLoadLevelInfos:
          type: array
          items:
            $ref: 'TS29520_Nnwdaf_EventsSubscription.yaml#/components/schemas/SliceLoadLevelInformation'
          minItems: 1
          description: The slices and their load level information.
    EventFilter:
      type: object
      properties:
        anySlice:
          $ref: 'TS29520_Nnwdaf_EventsSubscription.yaml#/components/schemas/AnySlice'
        snssais:
          type: array
          items:
            $ref: 'TS29571_CommonData.yaml#/components/schemas/Snssai'
          minItems: 1
          description: Identification(s) of network slice to which the subscription belongs. When eventId is "Load_level_Information", either information about slice(s) identified by snssai, or anySlice set to "TRUE" shall be included.
        not:
          required: [anySlice, snssais]
    EventId:
      anyOf:
      - type: string
        enum:
          - LOAD_LEVEL_INFORMATION
      - type: string
        description: >
          This string provides forward-compatibility with future
          extensions to the enumeration but is not used to encode
          content defined in the present version of this API.
      description: >
        Possible values are
        - LOAD_LEVEL_INFORMATION: Represent the analytics of load level information of corresponding network slice instance.