openapi: 3.0.0

info:
  title: Aimles_DataManagement
  description: |
    API for AIMLE Data Management assistance 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.482 v0.1.0; Artificial Intelligence Machine Learning Enablement 
    (AIMLE) Services; Stage 3.
  url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.549/

servers:
  - url: '{apiRoot}/aimles-dm/v1'
    variables:
      apiRoot:
        default: https://example.com
        description: apiRoot as defined in clause 5.2.4 of 3GPP TS 29.122

security:
  - {}
  - oAuth2ClientCredentials: []

paths:
  /subscriptions:
    post:
      summary: Request the creation of a Individual AIMLE Data Management Assistance Subscription.
      operationId: CreateAimleDmAssistSubscription
      tags:
        - AIMLE Data Management Assistance Subscriptions (Collection)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataMgmtAssistSubsc'
      responses:
        '201':
          description: >
            The requested Individual AIMLE Data Management Assistance Subscription is successfully
            created and a representation of the created resource is returned in the response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataMgmtAssistSubsc'
          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:
        myNotification:
          '{$request.body#/notifUri}': 
            post:
              summary: Notify on the requested data.
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/DataMgmtAssistNotif'
              responses:
                '204':
                  description: The 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 Individual AIMLE Data Management Assistance Subscription resource.
        required: true
        schema:
          type: string

    get:
      summary: Retrieve an existing the Individual AIMLE Data Management Assistance Subscription resource.
      operationId: GetIndAimleDmAssistSubscription
      tags:
        - Individual AIMLE Data Management Assistance Subscription (Document)
      responses:
        '200':
          description: >
            OK. The requested Individual AIMLE Data Management Assistance Subscription resource
            shall be returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataMgmtAssistSubsc'
        '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 AIMLE Data Management Assistance Subscription resource.
      operationId: UpdateIndAimleDmAssistSubscription
      tags:
        - Individual AIMLE Data Management Assistance Subscription (Document)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataMgmtAssistSubsc'
      responses:
        '200':
          description: >
            OK. The Individual AIMLE Data Management Assistance 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/DataMgmtAssistSubsc'
        '204':
          description: >
            No Content. The Individual AIMLE Data Management Assistance Subscription resource is
            successfully updated 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'

    patch:
      summary: Request the modification of an existing Individual AIMLE Data Management Assistance Subscription resource.
      operationId: ModifyIndAimleDmAssistSubscription
      tags:
        - Individual AIMLE Data Management Assistance Subscription (Document)
      requestBody:
        required: true
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/DataMgmtAssistSubscPatch'
      responses:
        '200':
          description: >
            OK. The Individual AIMLE Data Management Assistance 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/DataMgmtAssistSubsc'
        '204':
          description: >
            No Content. The Individual AIMLE Data Management Assistance 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: Remove the Individual AIMLE Data Management Assistance Subscription.
      operationId: UnsubscribeAimleDmAssistSubscription
      tags:
        - Individual AIMLE Data Management Assistance Subscription (Document).
      responses:
        '204':
          description: >
            The individual AIMLE Data Management Assistance Subscription resource matching the
            subscriptionId 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:
    DataMgmtAssistSubsc:
      description: Represents the AIMLE Data Management Assistance subscription information.
      type: object
      properties:
        clientList:
          type: array
          items:
            $ref: '#/components/schemas/AimleClientId'
          minItems: 1
        dataMgmtOp:
          $ref: '#/components/schemas/DataMgmtOp'
        dataPrepReqs:
          $ref: '#/components/schemas/DataPrepReqs'
        dataAnalysisReqs:
          $ref: '#/components/schemas/DataAnalysisReqs'
        notifUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - dataMgmtOp
        - notifUri

    DataMgmtAssistNotif:
      description: Represents the AIMLE Data Management Assistance notification.
      type: object
      properties:
        dataMgmtOp:
          $ref: '#/components/schemas/DataMgmtOp'
        timestamp:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DateTime'
      required:
        - dataMgmtOp

    DataPrepReqs:
      description: Represents the data preparation requirement.
      type: object
      properties:
        dataSetId:
          type: string
        dataOperRequirement:
          type: array
          items:
            $ref: '#/components/schemas/DataOperRequirement'
          minItems: 1
      required:
        - dataSetId
        - dataOperRequirement

    DataAnalysisReqs:
      description: Represents the data analysis requirement.
      type: object
      properties:
        dataSetId:
          type: string
        dataOperRequirement:
          type: array
          items:
            $ref: '#/components/schemas/DataOperRequirement'
          minItems: 1
      required:
        - dataSetId
        - dataOperRequirement

    DataOperRequirement:
      description: Represents the data analysis requirement.
      type: object
      properties:
        dataId:
          type: string
        dataSetFeatureId:
          type: string
      required:
        - dataSetId
        - dataSetFeatureId

    DataMgmtAssistSubscPatch:
      description: >
        Represents the requested modifications to a AIMLE Data Management Assistance subscription.
      type: object
      properties:
        dataPrepReqs:
          $ref: '#/components/schemas/DataPrepReqs'
        dataAnalysisReqs:
          $ref: '#/components/schemas/DataAnalysisReqs'
        notifUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'



# SIMPLE DATA TYPES
#

    AimleClientId:
      description: >
        Represents unique identifier of a AIMLE client
      type: string


# ENUMERATIONS
    DataMgmtOp:
      anyOf:
      - type: string
        enum:
           - DATA_PREPARATION
           - DATA_ANALYSIS
      - 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: |
        Indicates the data management operation type.  
        Possible values are:
        - DATA_PREPARATION: The data management operation type is data preparation.
        - DATA_ANALYSIS: The data management operation type is data analysis.

