openapi: 3.0.0

info:
  title: SS_ADAE_AIMLMemberCapabilityAnalytics
  description: |
    API for ADAE AIML member capability analytics analytics service.  
    © 2025, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).  
    All rights reserved.
  version: "1.0.0-alpha.1"

externalDocs:
  description: >
    3GPP TS 29.549 v19.2.0 Service Enabler Architecture Layer for Verticals (SEAL);
    Application Programming Interface (API) specification; Stage 3.
  url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.549/

security:
  - {}
  - oAuth2ClientCredentials: []

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

paths:
  /application-aimlmca:
    post:
      description: Creates a new individual AIML member capability analytics event subscription.
      operationId: CreateIndAimlmcaEventSubsc
      tags:
        - AIML member capability analytics event subscriptions (Collection)
      requestBody:
        required: true

        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppAimlMemCapSub'
      callbacks:
        paNotification:
          '{$request.body#/notifUri}':
            post:
              requestBody:  # contents of the callback message
                required: true
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/AppAimlMemCapNotif'
              responses:
                '204':
                  description: No Content (successful notification)
                '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'
      responses:
        '201':
          description: AIML member capability analytics event subscription resource created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppAimlMemCapSub'
          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'

  /application-aimlmca/{appAimlmcaId}:
    get:
      description: Retrieves an individual AIML member capability analytics event subscription.
      operationId: ReadIndAimlmcaEventSubsc
      tags:
        - Individual AIML member capability analytics event subscription (Document)
      parameters:
        - name: appAimlmcaId
          in: path
          description: Identifier of an individual AIML member capability analytics event subscription.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >
            The individual AIML member capability analytics subscription matching the appAimlmcaId is retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppAimlMemCapSub'
        '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'
    delete:
      description: Deletes an individual AIML member capability analytics event subscription.
      operationId: DeleteIndAimlmcaEventSubsc
      tags:
        - Individual AIML member capability analytics event subscription (Document)
      parameters:
        - name: appAimlmcaId
          in: path
          description: Identifier of an individual AIML member capability analytics event subscription.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: >
            The individual AIML member capability analytics subscription matching the appAimlmcaId is deleted.
        '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:
    AppAimlMemCapSub:
      description: Represents an individual AIML member capability analytics event subscription resource.
      type: object
      properties:
        notifUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'
        analyticsId:
          $ref: '#/components/schemas/AppAimlMemCapAnalytics'
        analyticsType:
          $ref: 'TS29549_SS_ADAE_VALPerformanceAnalytics.yaml#/components/schemas/AnalyticsType'
        ueIds:
          type: array
          items:
            type: string
          minItems: 1
          description: >
            One or more VAL UE IDs whose analytics or data collection are subject to subcription.
        aimlMemberIds:
          type: array
          items:
            $ref: '#/components/schemas/AimlMemberId'
          minItems: 1
          description: >
            One or more AIML members whose analytics or data collection are subject to subcription.
        confLevel:
          type: integer
          minimum: 0
          maximum: 100
        area:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/LocationArea5G'
        timeValidity:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/TimeWindow'
        repReq:
          $ref: 'TS29523_Npcf_EventExposure.yaml#/components/schemas/ReportingInformation'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - notifUri
        - analyticsType

    AppAimlMemCapNotif:
      description: Represents notification of the AIML member capability analytics event.
      type: object
      properties:
        analyticsOutput:
          type: string
        analyticsId:
          $ref: '#/components/schemas/AppAimlMemCapAnalytics'
        ueIds:
          type: array
          items:
            type: string
          minItems: 1
          description: List of VAL UEs identifiers.
        aimlMemberIds:
          type: array
          items:
            $ref: '#/components/schemas/AimlMemberId'
          minItems: 1
          description: List of AIML members identifiers.
        confLevel:
          type: integer
          minimum: 0
          maximum: 100
      required:
        - analyticsOutput
        - analyticsId

# SIMPLE DATA TYPES
#

    AimlMemberId:
      description: Represents unique identifier of a AIMLE Member.
      type: string


#
# ENUMERATIONS
#

    AppAimlMemCapAnalytics:
      anyOf:
      - type: string
        enum:
           - APP_MEMBER_CAPABILITY
      - 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 Connection Status Events.  
        Possible values are:
        - APP_MEMBER_CAPABILITY: Indicates that the identifier of the analytics consumer.
