openapi: 3.0.0

info:
  title: SEALDD Background Data Transfer Service
  version: 1.0.0
  description: |
    SEALDD Background Data Transfer Service.  
    © 2025, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).  
    All rights reserved.

externalDocs:
  description: >
    3GPP TS 29.548 V19.5.0; Service Enabler Architecture Layer for Verticals (SEAL);
    SEAL Data Delivery (SEALDD) Server Services; Stage 3.
  url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.548/

servers:
  - url: '{apiRoot}/sdd-bdt/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 a BDT Subscription.
      operationId: CreateBDTSubsc
      tags:
        - BDT Subscriptions (Collection)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BdtSubscription'
      responses:
        '201':
          description: >
            Created. The BDT Subscription is successfully created and a representation of the
            created Individual BDT Subscription resource shall be returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BdtSubscription'
          headers:
            Location:
              description: >
                Contains the URI of the created Individual BDT Subscription 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:
        BdtNotif:
          '{$request.body#/notifUri}':
            post:
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/BdtNotif'
              responses:
                '204':
                  description: >
                    No Content. The BDT Notification is successfully received and acknowledged.
                '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/{subId}:
    parameters:
      - name: subId
        in: path
        description: >
          Represents the identifier of the Individual BDT Subscription resource.
        required: true
        schema:
          type: string

    get:
      summary: Retrieve an existing Individual BDT Subscription resource.
      operationId: GetIndBDTSubsc
      tags:
        - Individual BDT Subscription (Document)
      responses:
        '200':
          description: >
            OK. The requested Individual BDT Subscription resource shall be returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BdtSubscription'
        '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 BDT Subscription resource.
      operationId: UpdateIndBDTSubsc
      tags:
        - Individual BDT Subscription (Document)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BdtSubscription'
      responses:
        '200':
          description: >
            OK. The Individual BDT 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/BdtSubscription'
        '204':
          description: >
            No Content. The Individual BDT 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 BDT Subscription resource.
      operationId: ModifyIndBDTSubsc
      tags:
        - Individual BDT Subscription (Document)
      requestBody:
        required: true
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/BdtSubscriptionPatch'
      responses:
        '200':
          description: >
            OK. The Individual BDT 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/BdtSubscription'
        '204':
          description: >
            No Content. The Individual BDT 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 BDT Subscription resource.
      operationId: DeleteIndBDTSubsc
      tags:
        - Individual BDT Subscription (Document)
      responses:
        '204':
          description: >
            No Content. The Individual BDT Subscription resource is successfully 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:

#
# STRUCTURED DATA TYPES
#

    BdtSubscription:
      description: >
        Represents a SEALDD BDT Subscription.
      type: object
      properties:
        valServiceId:
          type: string
        valUeIds:
          type: array
          items:
            type: string
          minItems: 1
        valGroupId:
          type: string
        timeWnd:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/TimeWindow'
        area:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/LocationArea5G'
        policyGuidances:
          type: array
          items:
            $ref: 'TS29549_SS_NetworkResourceAdaptation.yaml#/components/schemas/PolicyGuidance'
          minItems: 1
        dataVolume:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/UsageThreshold'
        notifUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      oneOf:
        - required: [valUeIds]
        - required: [valGroupId]
      required:
        - valServiceId
        - notifUri
        - dataVolume

    BdtSubscriptionPatch:
      description: >
        Represents the parameters to request the modification of a SEALDD BDT Subscription.
      type: object
      properties:
        timeWnd:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/TimeWindow'
        area:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/LocationArea5G'
        policyGuidances:
          type: array
          items:
            $ref: 'TS29549_SS_NetworkResourceAdaptation.yaml#/components/schemas/PolicyGuidance'
          minItems: 1
        dataVolume:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/UsageThreshold'
        notifUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'

    BdtNotif:
      description: >
        Represents a SEALDD BDT Subscription notification.
      type: object
      properties:
        subId:
          type: string
        reports:
          type: array
          items:
            $ref: '#/components/schemas/BdtReport'
          minItems: 1
      required:
        - subId
        - reports

    BdtReport:
      description: >
        Represents a BDT report.
      type: object
      properties:
        valUeIds:
          type: array
          items:
            type: string
          minItems: 1
        valGroupId:
          type: string
        timeWnd:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/TimeWindow'
        quality:
          $ref: 'TS29548_SDD_TransmissionQualityMeasurement.yaml#/components/schemas/TransQualMeasData'
      not:
        required: [valUeIds, valGroupId]

#
# SIMPLE DATA TYPES
#

#
# ENUMERATIONS
#

# Data types describing alternative data types or combinations of data types:
#


