openapi: 3.0.0

info:
  title: SEALDD Server Policy Configuration Service
  version: 1.1.0
  description: |
    SEALDD Server Policy Configuration 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-pc/v1'
    variables:
      apiRoot:
        default: https://example.com
        description: apiRoot as defined in clause 6.5 of 3GPP TS 29.549

security:
  - {}
  - oAuth2ClientCredentials: []

paths:
  /configurations:
    post:
      summary: Request the creation of a Policy Configuration.
      operationId: CreatePolicyConfig
      tags:
        - Policy Configurations (Collection)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicyConfig'
      responses:
        '201':
          description: >
            Created. The Policy Configuration is successfully created and a representation of
            the created Individual Policy Configuration resource shall be returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyConfig'
          headers:
            Location:
              description: >
                Contains the URI of the created Individual Policy Configuration 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'

  /configurations/{configId}:
    parameters:
      - name: configId
        in: path
        description: >
          Represents the identifier of the Individual Policy Configuration resource.
        required: true
        schema:
          type: string

    get:
      summary: Retrieve an existing Individual Policy Configuration resource.
      operationId: GetIndPolicyConfig
      tags:
        - Individual Policy Configuration (Document)
      responses:
        '200':
          description: >
            OK. The requested Individual Policy Configuration resource shall be returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyConfig'
        '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 Policy Configuration resource.
      operationId: UpdateIndPolicyConfig
      tags:
        - Individual Policy Configuration (Document)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicyConfig'
      responses:
        '200':
          description: >
            OK. The Individual Policy Configuration 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/PolicyConfig'
        '204':
          description: >
            No Content. The Individual Policy Configuration 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 Policy Configuration resource.
      operationId: ModifyIndPolicyConfig
      tags:
        - Individual Policy Configuration (Document)
      requestBody:
        required: true
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/PolicyConfigPatch'
      responses:
        '200':
          description: >
            OK. The Individual Policy Configuration 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/PolicyConfig'
        '204':
          description: >
            No Content. The Individual Policy Configuration 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 Policy Configuration resource.
      operationId: DeleteIndPolicyConfig
      tags:
        - Individual Policy Configuration (Document)
      responses:
        '204':
          description: >
            No Content. The Individual Policy Configuration 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
#

    PolicyConfig:
      description: >
        Represents a SEALDD Policy Configuration.
      type: object
      properties:
        appTrafficIds:
          type: array
          items:
            type: string
          minItems: 1
        valTargetId:
          $ref: 'TS29549_SS_UserProfileRetrieval.yaml#/components/schemas/ValTargetUe'
        sliceId:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Snssai'
        sealddPol:
          $ref: '#/components/schemas/SealddPolicy'
        expTime:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DateTimeRo'
        multimodsddPol:
          $ref: '#/components/schemas/MultiModalSealddPolicy'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - appTrafficIds
      anyOf:
        - required: [sealddPol]
        - required: [multimodsddPol]

    PolicyConfigPatch:
      description: >
        Represents the requested modifications to a SEALDD Policy Configuration.
      type: object
      properties:
        sealddPol:
          $ref: '#/components/schemas/SealddPolicy'
        multimodsddPol:
          $ref: '#/components/schemas/MultiModalSealddPolicy'

    SealddPolicy:
      description: >
        Represents a SEALDD Policy.
      type: object
      properties:
        qualGuarPol:
          $ref: '#/components/schemas/QualGuarPolicy'
        qualOptPol:
          $ref: '#/components/schemas/QualGuarPolicy'
        bdwCtrlSets:
          type: array
          items:
            $ref: '#/components/schemas/BdwCtrlPolicy'
          minItems: 1
        geoPol:
          type: array
          items:
            $ref: '#/components/schemas/GeofencingPolicy'
          minItems: 1
        tempPol:
          $ref: '#/components/schemas/TempPolicy'
        non3gppAccMeasPol:
          $ref: '#/components/schemas/Non3gppAccessMeasPol'
      anyOf:
        - required: [qualGuarPol]
        - required: [qualOptPol]
        - required: [bdwCtrlSets]
        - required: [geoPol]
        - required: [tempPol]
        - required: [non3gppAccMeasPol]

    QualGuarPolicy:
      description: >
        Represents the quality guarantee policy.
      type: object
      properties:
        thresholds:
          $ref: '#/components/schemas/QualGuarThresh'
      required:
        - thresholds

    QualGuarThresh:
      description: >
        Represents the quality guarantee related thresholds.
      type: object
      properties:
        measId:
          type: array
          items:
            $ref: 'TS29548_SDD_TransmissionQualityMeasurement.yaml#/components/schemas/MeasurementId'
          minItems: 1
        measThesh:
          $ref: 'TS29548_SDD_TransmissionQualityMeasurement.yaml#/components/schemas/TransQualMeasCriteria'
      required:
        - measId
        - measThesh

    GeofencingPolicy:
      description: Represents a geofencing policy.
      type: object
      properties:
        valServiceId:
          type: string
        area:
          $ref: '#/components/schemas/GeofencingArea'
        action:
          $ref: '#/components/schemas/GeoPolAction'
      required:
        - valServiceId
        - area
        - action

    GeofencingArea:
      description: Represents a geofencing area.
      type: object
      properties:
        geoAreas:
          type: array
          items:
            $ref: 'TS29572_Nlmf_Location.yaml#/components/schemas/GeographicArea'
          minItems: 1
      anyOf:
        - required: [geoAreas]

    MultiModalSealddPolicy:
      description: >
        Represents a Multi-modal SEALDD Policy.
      type: object
      properties:
        syncPol:
          type: array
          items:
            $ref: '#/components/schemas/SyncPolicy'
          minItems: 1
          description: >
            Contains the synchronization policy.
            The key of the map shall be set to the multi-modal flow type provided within the
            "flowType" attribute of the corresponding map value encoded using the SyncPolicy data
            structure.
        alignmentPol:
          $ref: '#/components/schemas/AlignmentPolicy'
        ueToUePol:
          $ref: '#/components/schemas/UEToUEPolicy'
        expTime:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DateTimeRo'
      anyOf:
        - required: [syncPol]
        - required: [alignmentPol]
        - required: [ueToUePol]

    TempPolicy:
      description: >
        Represents a temporal policy.
      type: object
      properties:
        schedule:
          type: array
          items:
            $ref: 'TS29122_CpProvisioning.yaml#/components/schemas/ScheduledCommunicationTime'
          minItems: 1
        timeWindow:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/TimeWindow'
      oneOf:
        - required: [schedule]
        - required: [timeWindow]

    Non3gppAccessMeasPol:
      description: >
        Represents the non-3GPP access measurement policy.
      type: object
      properties:
        accessIds:
          type: array
          items:
            type: string
          minItems: 1
        thresholds:
          type: array
          items:
            $ref: '#/components/schemas/SignalStrengthThreshold'
          minItems: 1
        thrHandling:
          $ref: 'TS29549_SS_NetworkResourceMonitoring.yaml#/components/schemas/ThresholdHandlingMode'
        timeThr:
          $ref: '#/components/schemas/TempPolicy'
      anyOf:
        - required: [accessIds]
        - required: [thresholds]
        - required: [timeThr]

    SignalStrength:
      description: >
        Represents the signal strength value.
      type: object
      properties:
        rssi:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Float'
      anyOf:
        - required: [rssi]

    SignalStrengthThreshold:
      description: >
        Represents the signal strength threshold.
      type: object
      properties:
        value:
          $ref: '#/components/schemas/SignalStrength'
        direction:
          $ref: 'TS29520_Nnwdaf_EventsSubscription.yaml#/components/schemas/MatchingDirection'
      required:
        - value
        - direction

    SyncPolicy:
      description: >
        Represents the synchronization policy.
      type: object
      properties:
        flowType1:
          $ref: '#/components/schemas/MultiModalFlowType'
        flowType2:
          $ref: '#/components/schemas/MultiModalFlowType'
        syncThreshold:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DurationMilliSec'
      required:
        - flowType1
        - flowType2
        - syncThreshold

    AlignmentPolicy:
      description: >
        Represents the multi-modal flows alignment policy.
      type: object
      properties:
        multiModalId:
          $ref: 'TS29514_Npcf_PolicyAuthorization.yaml#/components/schemas/MultiModalId'
        maxAlignTime:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DurationMilliSec'
      anyOf:
        - required: [multiModalId]
        - required: [maxAlignTime]

    UEToUEPolicy:
      description: >
        Represents the multi-modal UE-to-UE policy.
      type: object
      properties:
        entProxThresh:
          $ref: '#/components/schemas/ProximityThresholds'
        leavProxThresh:
          $ref: '#/components/schemas/ProximityThresholds'
        entQoSThresh:
          $ref: '#/components/schemas/QoSThresholds'
        leavQoSThresh:
          $ref: '#/components/schemas/QoSThresholds'
        entQoEThresh:
          $ref: '#/components/schemas/QoEThresholds'
        leavQoEThresh:
          $ref: '#/components/schemas/QoEThresholds'
      anyOf:
        - required: [entProxThresh]
        - required: [leavProxThresh]
        - required: [entQoSThresh]
        - required: [leavQoSThresh]
        - required: [entQoEThresh]
        - required: [leavQoEThresh]

    ProximityThresholds:
      description: >
        Represents the proximity thresholds for entering/leaving the UE-to-UE direct communication
        mode.
      type: object
      properties:
        minUeToUedist:
          type: number
          format: double
          minimum: 0
        avgUeToUedist:
          type: number
          format: double
          minimum: 0
        maxUeToUedist:
          type: number
          format: double
          minimum: 0
      anyOf:
        - required: [minUeToUedist]
        - required: [avgUeToUedist]
        - required: [maxUeToUedist]

    QoSThresholds:
      description: >
        Represents the QoS thresholds for entering/leaving the UE-to-UE direct communication mode.
      type: object
      properties:
        minLatency:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uinteger'
        avgLatency:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uinteger'
        maxLatency:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uinteger'
        minBitRate:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/BitRate'
        avgBitRate:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/BitRate'
        maxBitRate:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/BitRate'
        minPackLossRate:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/PacketLossRate'
        avgPackLossRate:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/PacketLossRate'
        maxPackLossRate:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/PacketLossRate'
        minPackErrRate:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/PacketErrRate'
        avgPackErrRate:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/PacketErrRate'
        maxPackErrRate:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/PacketErrRate'
        minJitter:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uint32'
        avgJitter:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uint32'
        maxJitter:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uint32'
      anyOf:
        - required: [minLatency]
        - required: [avgLatency]
        - required: [maxLatency]
        - required: [minBitRate]
        - required: [avgBitRate]
        - required: [maxBitRate]
        - required: [minPackLossRate]
        - required: [avgPackLossRate]
        - required: [maxPackLossRate]
        - required: [minPackErrRate]
        - required: [avgPackErrRate]
        - required: [maxPackErrRate]
        - required: [minJitter]
        - required: [avgJitter]
        - required: [maxJitter]

    QoEThresholds:
      description: >
        Represents the QoE thresholds for entering/leaving the UE-to-UE direct communication mode.
      type: object
      properties:
        mos:
          type: integer
          minimum: 1
          maximum: 5
      anyOf:
        - required: [mos]


# SIMPLE DATA TYPES
#

#
# ENUMERATIONS
#

    BdwCtrlPolicy:
      anyOf:
        - type: string
          enum:
          - REALLOCATE_DL
          - REALLOCATE_UL
          - NOT_REALLOCATE_DL
          - NOT_REALLOCATE_UL
        - 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 bandwidth control policy.  
        Possible values are:
        - REALLOCATE_DL: Indicates that the bandwidth control action is to reallocate the
          bandwidth limit between different VAL users for DL traffic.
        - REALLOCATE_UL: Indicates that the bandwidth control action is to reallocate the
          bandwidth limit between different VAL users for UL traffic.
        - NOT_REALLOCATE_DL: Indicates that the bandwidth control action is to not reallocate
          the bandwidth limit between different VAL users for DL traffic.
        - NOT_REALLOCATE_UL: Indicates that the bandwidth control action is to not reallocate
          the bandwidth limit between different VAL users for UL traffic.

    GeoPolAction:
      anyOf:
        - type: string
          enum:
          - ALLOW
          - BLOCK
        - 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 geofencing policy action.  
        Possible values are:
        - ALLOW: Indicates that the geofencing policy is to allow.
        - BLOCK: Indicates that the geofencing policy is to block.

    MultiModalFlowType:
      anyOf:
        - type: string
          enum:
          - AUDIO
          - VIDEO
          - VOICE
        - 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 Multi-modal flow type.  
        Possible values are:
        - AUDIO: Indicates that the Multi-modal flow type is audio.
        - VIDEO: Indicates that the Multi-modal flow type is video.
        - VOICE: Indicates that the Multi-modal flow type is voice.



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

