openapi: 3.0.0

info:
  title: NSCE_InfoCollection
  version: 1.1.0
  description: |
    NSCE_InfoCollection Service.  
    © 2025, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).  
    All rights reserved.

externalDocs:
  description: >
    3GPP TS 29.435 V19.3.0; Service Enabler Architecture Layer for Verticals (SEAL);
    Network Slice Capability Enablement (NSCE) Server Service(s); Stage 3.
  url: http://www.3gpp.org/ftp/Specs/archive/29_series/29.435/

servers:
  - url: '{apiRoot}/nsce-ic/v1'
    variables:
      apiRoot:
        default: https://example.com
        description: apiRoot as defined in clause 6.5 of 3GPP TS 29.549

security:
  - {}
  - oAuth2ClientCredentials: []

paths:
  /subscriptions:
    post:
      summary: Request the creation of an Information Collection Subscription.
      operationId: CreateInfoCollectSubscription
      tags:
        - Information Collection Subscriptions (Collection)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InfoCollectSubsc'
      responses:
        '201':
          description: >
            Created. The Information Collection Subscription is successfully created and a
            representation of the created Individual Information Collection Subscription resource
            shall be returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InfoCollectSubsc'
          headers:
            Location:
              description: >
                Contains the URI of the newly created resource.
              required: true
              schema:
                type: string
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '411':
          $ref: 'TS29122_CommonData.yaml#/components/responses/411'
        '413':
          $ref: 'TS29122_CommonData.yaml#/components/responses/413'
        '415':
          $ref: 'TS29122_CommonData.yaml#/components/responses/415'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'
      callbacks:
        InfoCollectNotif:
          '{$request.body#/notifUri}':
            post:
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/InfoCollectNotif'
              responses:
                '204':
                  description: >
                    No Content. The Information Collection Notification is successfully received.
                '307':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/307'
                '308':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/308'
                '400':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/400'
                '401':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/401'
                '403':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/403'
                '404':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/404'
                '411':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/411'
                '413':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/413'
                '415':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/415'
                '429':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/429'
                '500':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/500'
                '503':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/503'
                default:
                  $ref: 'TS29122_CommonData.yaml#/components/responses/default'

  /subscriptions/{subscriptionId}:
    parameters:
      - name: subscriptionId
        in: path
        description: >
          Represents the identifier of the Information Collection Subscription resource.
        required: true
        schema:
          type: string

    get:
      summary: Retrieve an existing Individual Information Collection Subscription resource.
      operationId: GetIndInfoCollectSubscription
      tags:
        - Individual Information Collection Subscription (Document)
      responses:
        '200':
          description: >
            OK. The requested Individual Information Collection Subscription resource shall be
            returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InfoCollectSubsc'
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '406':
          $ref: 'TS29122_CommonData.yaml#/components/responses/406'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

    put:
      summary: Request the update of an existing Individual Information Collection Subscription resource.
      operationId: UpdateIndInfoCollectSubcription
      tags:
        - Individual Information Collection Subscription (Document)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InfoCollectSubsc'
      responses:
        '200':
          description: >
            OK. The Individual Information Collection Subscription resource is successfully updated
            and a representation of the updated resource shall be returned in the response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InfoCollectSubsc'
        '204':
          description: >
            OK. The Individual Information Collection Subscription resource is successfully updated
            and a representation of the updated resource shall be returned in the response body.
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '411':
          $ref: 'TS29122_CommonData.yaml#/components/responses/411'
        '413':
          $ref: 'TS29122_CommonData.yaml#/components/responses/413'
        '415':
          $ref: 'TS29122_CommonData.yaml#/components/responses/415'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

    patch:
      summary: Request the modification of an existing Individual Information Collection Subscription resource.
      operationId: ModifyIndInfoCollectSubscription
      tags:
        - Individual Information Collection Subscription (Document)
      requestBody:
        required: true
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/InfoCollectSubscPatch'
      responses:
        '200':
          description: >
            OK. The Individual Information Collection Subscription resource is successfully modified
            and a representation of the updated resource shall be returned in the response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InfoCollectSubsc'
        '204':
          description: >
            No Content. The Individual Information Collection Subscription resource is successfully
            modified and no content is returned in the response body.
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '411':
          $ref: 'TS29122_CommonData.yaml#/components/responses/411'
        '413':
          $ref: 'TS29122_CommonData.yaml#/components/responses/413'
        '415':
          $ref: 'TS29122_CommonData.yaml#/components/responses/415'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

    delete:
      summary: Request the deletion of an existing Individual Information Collection Subscription resource.
      operationId: DeleteIndInfoCollectSubcription
      tags:
        - Individual Information Collection Subscription (Document)
      responses:
        '204':
          description: >
            No Content. The Individual Information Collection Subscription resource is successfully
            modified and no content is returned in the response body.
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

components:
  securitySchemes:
    oAuth2ClientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: '{tokenUrl}'
          scopes: {}

  schemas:
    InfoCollectSubsc:
      description: Represents an Information Collection subscription.
      type: object
      properties:
        notifUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'
        collectInfo:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/CollectInfo'
          minProperties: 1
          description: >
            Contains the information collected from the interested Network slice.
            The key of the map shall be any unique string encoded value.
        expTime:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DateTime'
        netSlicePerf:
          type: array
          items:
            $ref: 'TS29435_NSCE_PerfMonitoring.yaml#/components/schemas/ReportingData'
          minItems: 1
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - notifUri
        - collectInfo

    InfoCollectSubscPatch:
      description: Represents the requested modifications of an Information Collection subscription.
      type: object
      properties:
        notifUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'
        collectInfo:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/CollectInfo'
          minProperties: 1
          description: >
            Contains the information collected from the interested Network slice.
            The key of the map shall be any unique string encoded value and shall be set to the same
            value as the as the one provided during the creation of the corresponding Information
            Collection Subscription.
        expTime:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DateTime'

    InfoCollectNotif:
      description: Represents an Information Collection Notification.
      type: object
      properties:
        subscriptionId:
          type: string
          description: >
            Contains the identifier of the subscription to which the notification is related.
        netSlicePerf:
          type: array
          description: Contains the network slice related performance and analytics report(s).
          items:
            $ref: 'TS29435_NSCE_PerfMonitoring.yaml#/components/schemas/ReportingData'
          minItems: 1
      required:
        - subscriptionId
        - netSlicePerf

    CollectInfo:
      description: Represents the information to be collected.
      type: object
      properties:
        netSliceId:
          $ref: 'TS29435_NSCE_PolicyManagement.yaml#/components/schemas/NetSliceId'
        qosMetrics:
          type: array
          items:
            $ref: '#/components/schemas/QoSMetric'
          minItems: 1
        repPeriod:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/DurationSec'
        immRepFlag:
          type: boolean
          description: Identifies the request needs immediate reporting or not.
      required:
        - netSliceId

    QoSMetric:
      description: Represents the QoS metric.
      type: object
      properties:
        qosType:
          $ref: '#/components/schemas/QoSType'
        latency:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Float'
        throughput:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/BitRate'
        jitter:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uint32'
      required:
        - qosType

#
# ENUMERATIONS DATA TYPES
#

    QoSType:
      anyOf:
      - type: string
        enum:
          - LATENCY
          - THROUGHPUT
          - JITTER
      - type: string
        description: >
          This string provides forward-compatibility with future
          extensions to the enumeration and is not used to encode
          content defined in the present version of this API.
      description: |
        Represents the QoS metric type.  
        Possible values are:
        - LATENCY: Indicates that the QoS type is latency.
        - THROUGHPUT: Indicates that the QoS type is throughput.
        - JITTER: Indicates that the QoS type is jitter.
