openapi: 3.0.0

info:
  title: 3gpp-5glan-pp
  version: 1.2.1
  description: |
    API for 5G LAN Parameter Provision.  
    © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).  
    All rights reserved.

externalDocs:
  description: >
    3GPP TS 29.522 V18.7.0; 5G System; Network Exposure Function Northbound APIs.
  url: 'https://www.3gpp.org/ftp/Specs/archive/29_series/29.522/'

security:
  - {}
  - oAuth2ClientCredentials: []

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

paths:
  /{afId}/subscriptions:
    get:
      summary: read all of the active subscriptions for the AF
      operationId: RealAllSubscriptions
      tags:
        - 5GLAN Parameters Provision Subscriptions
      parameters:
        - name: afId
          in: path
          description: Identifier of the AF
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK (Successful get all of the active subscriptions for the AF)
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/5GLanParametersProvision'
                minItems: 0
        '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'

    post:
      summary: Creates a new subscription resource
      operationId: CreateAnSubscription
      tags:
        - 5GLAN Parameters Provision Subscriptions
      parameters:
        - name: afId
          in: path
          description: Identifier of the AF
          required: true
          schema:
            type: string
      requestBody:
        description: new subscription creation
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/5GLanParametersProvision'
      responses:
        '201':
          description: Created (Successful creation)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/5GLanParametersProvision'
          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:
        5GLANParamProvNotif:
          '{$request.body#/notifUri}':
            post:
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/5GLanParamProvNotif'
              responses:
                '204':
                  description: No Content. Successful reception of the 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'

  /{afId}/subscriptions/{subscriptionId}:
    get:
      summary: read an active subscription for the AF and the subscription Id
      operationId: ReadAnSubscription
      tags:
        - Individual 5GLAN Parameters Provision Subscription
      parameters:
        - name: afId
          in: path
          description: Identifier of the AF
          required: true
          schema:
            type: string
        - name: subscriptionId
          in: path
          description: Identifier of the subscription resource
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK (Successful get the active subscription)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/5GLanParametersProvision'
        '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: Fully updates/replaces an existing subscription resource
      operationId: FullyUpdateAnSubscription
      tags:
        - Individual 5GLAN Parameters Provision Subscription
      parameters:
        - name: afId
          in: path
          description: Identifier of the AF
          required: true
          schema:
            type: string
        - name: subscriptionId
          in: path
          description: Identifier of the subscription resource
          required: true
          schema:
            type: string
      requestBody:
        description: Parameters to update/replace the existing subscription
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/5GLanParametersProvision'
      responses:
        '200':
          description: OK (Successful deletion of the existing subscription)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/5GLanParametersProvision'
        '204':
          description: >
            Successful case. The resource has been successfully updated and no additional
            content is to be sent in the response message.
        '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: Partial updates an existing subscription resource
      operationId: PartialUpdateAnSubscription
      tags:
        - Individual 5GLAN Parameters Provision Subscription
      parameters:
        - name: afId
          in: path
          description: Identifier of the AF
          required: true
          schema:
            type: string
        - name: subscriptionId
          in: path
          description: Identifier of the subscription resource
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/5GLanParametersProvisionPatch'
      responses:
        '200':
          description: OK. The subscription was modified successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/5GLanParametersProvision'
        '204':
          description: >
            Successful case. The resource has been successfully updated and no additional
            content is to be sent in the response message.
        '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: Deletes an already existing subscription
      operationId: DeleteAnSubscription
      tags:
        - Individual 5GLAN Parameters Provision Subscription
      parameters:
        - name: afId
          in: path
          description: Identifier of the AF
          required: true
          schema:
            type: string
        - name: subscriptionId
          in: path
          description: Identifier of the subscription resource
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content (Successful deletion of the existing subscription)
        '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: 
    5GLanParametersProvision:
      description: Represents an individual 5G LAN parameters provision subscription resource.
      type: object
      properties:
        self:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Link'
        5gLanParams:
          $ref: '#/components/schemas/5GLanParameters'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - 5gLanParams
        - suppFeat

    5GLanParametersProvisionPatch:
      description: >
        Represents the 5G LAN parameters to request the modification of a subscription
        to provision parameters.
      type: object
      properties:
        5gLanParamsPatch:
          $ref: '#/components/schemas/5GLanParametersPatch'
        5gLanParams:
          $ref: '#/components/schemas/5GLanParameters'

    5GLanParameters:
      description: Represents 5G LAN service related parameters that need to be provisioned.
      type: object
      properties:
        exterGroupId:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/ExternalGroupId'
        gpsis:
          type: object
          additionalProperties:
            $ref: 'TS29571_CommonData.yaml#/components/schemas/Gpsi'
          minProperties: 1
          description: >
            Contains the list of 5G VN Group members, each member is identified by GPSI.
            Any string value can be used as a key of the map.
        dnn:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Dnn'
        aaaIpv4Addr:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Ipv4Addr'
        aaaIpv6Addr:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Ipv6Addr'
        aaaUsgs:
          type: array
          items:
            $ref: '#/components/schemas/AaaUsage'
          minItems: 1
          description: >
            This attribute shall contain at most 2 array elements. It is however kept
            defined as it is (i.e. with a cardinality of "1..N") for backward
            compatibility considerations.
        mtcProviderId:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/MtcProviderInformation'
        snssai:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Snssai'
        sessionType:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/PduSessionType'
        sessionTypes:
          type: array
          items:
            $ref: 'TS29571_CommonData.yaml#/components/schemas/PduSessionType'
          minItems: 1
          description: Further allowed PDU Session types.
        appDesps:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AppDescriptor'
          minProperties: 1
          description: >
            Describes the operation systems and the corresponding applications for each
            operation systems. The key of map is osId.
        vnGroupCommInd:
          type: boolean
          description: >
            Indicates whether the 5G VN group is associated with 5G VN group communication when
            When set to "true", it indicates that the 5G VN group is associated with 5G VN group
            communication. When set to "false", it indicates that the 5G VN group is not
            associated with 5G VN group communication. The default value when omitted is "false".
        vnGroupCommType:
          $ref: 'TS29503_Nudm_PP.yaml#/components/schemas/5GVnGroupCommunicationType'
        maxGrpDataRateInfo:
          $ref: '#/components/schemas/MaxGrpDataRateInfo'
        cpParams:
          $ref: '#/components/schemas/CpParams'
        npConfigParams:
          $ref: '#/components/schemas/NpConfigParams'
        lpiParams:
          $ref: '#/components/schemas/LpiParams'
        acsParams:
          $ref: '#/components/schemas/AcsParams'
        ecsAddrParams:
          $ref: '#/components/schemas/ECSAddrParams'
        dnnSnssaiParams:
          $ref: '#/components/schemas/DnnSnssaiParams'
        notifUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Link'
      required:
        - exterGroupId
        - gpsis
        - dnn
        - snssai
        - sessionType
        - appDesps

    5GLanParametersPatch:
      deprecated: true
      description: Represents 5G LAN service related parameters that need to be modified.
      type: object
      properties:
        gpsis:
          type: object
          additionalProperties:
            $ref: 'TS29571_CommonData.yaml#/components/schemas/GpsiRm'
          minProperties: 1
          description: >
            Contains the list of 5G VN Group members, each member is identified by GPSI.
            Any string value can be used as a key of the map.
        appDesps:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AppDescriptorRm'
          minProperties: 1
          description: >
            Describes the operation systems and the corresponding applications for
            each operation systems. The key of map is osId.
        cpParams:
          $ref: '#/components/schemas/CpParams'
        npConfigParams:
          $ref: '#/components/schemas/NpConfigParams'
        lpiParams:
          $ref: '#/components/schemas/LpiParams'
        acsParams:
          $ref: '#/components/schemas/AcsParams'
        ecsAddrParams:
          $ref: '#/components/schemas/ECSAddrParams'
        dnnSnssaiParams:
          $ref: '#/components/schemas/DnnSnssaiParams'
        notifUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Link'

    AppDescriptor:
      description: Represents an operation system and the corresponding applications.
      type: object
      properties:
        osId:
          $ref: 'TS29519_Policy_Data.yaml#/components/schemas/OsId'
        appIds:
          type: object
          additionalProperties:
            $ref: 'TS29571_CommonData.yaml#/components/schemas/ApplicationId'
          minProperties: 1
          description: >
            Identifies applications that are running on the UE's operating system.
            Any string value can be used as a key of the map.
      required:
        - osId
        - appIds

    AppDescriptorRm:
      description: >
        Represents the same as the AppDescriptor data type but with the nullable:true
        property.
      type: object
      properties:
        appIds:
          type: object
          additionalProperties:
            $ref: 'TS29571_CommonData.yaml#/components/schemas/ApplicationIdRm'
          minProperties: 1
          description: >
            Identifies applications that are running on the UE's operating system.
            Any string value can be used as a key of the map.

    MaxGrpDataRateInfo:
      description: >
        Represents the Maximum Group Data Rate related information.
      type: object
      properties:
        maxGrpDataRateUl:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/BitRate'
        maxGrpDataRateDl:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/BitRate'
      anyOf:
        - required: [maxGrpDataRateUl]
        - required: [maxGrpDataRateDl]

    CpParams:
      description: Represents Communication Pattern parameters.
      type: object
      properties:
        cpParameterSets:
          type: object
          additionalProperties:
            $ref: 'TS29122_CpProvisioning.yaml#/components/schemas/CpParameterSet'
          minProperties: 1
          description: >
            Contains one or more set(s) of CP parameters information for the 5G VN group.
            Any string value may be used as a key of the map.
        cpReports:
          type: object
          additionalProperties:
            $ref: 'TS29122_CpProvisioning.yaml#/components/schemas/CpReport'
          minProperties: 1
          description: >
            Contains the identifier(s) of the set(s) of CP parameters for which the provided CP
            parameters are not added or modified successfully with the corresponding failure reason.
            Each element provides the related information for one or more CP set identifier(s).
            The key of the map is a string representing the failure identifier.
          readOnly: true
      required:
        - cpParameterSets

    NpConfigParams:
      description: Represents Network Parameters Configuration information.
      type: object
      properties:
        maximumLatency:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DurationSec'
        maximumResponseTime:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DurationSec'
        suggestedNumberOfDlPackets:
          type: integer
          minimum: 0
          description: >
            Contains the number of packets that the serving gateway shall buffer in case the UE is
            not reachable.
        groupReportingGuardTime:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DurationSec'
        validityTime:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DateTime'

    LpiParams:
      description: Represents Location Privacy Indication parameters.
      type: object
      properties:
        lpi:
          $ref: 'TS29503_Nudm_SDM.yaml#/components/schemas/Lpi'
      required:
        - lpi

    AcsParams:
      description: Represents ACS configuration parameters.
      type: object
      properties:
        acsInfo:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/AcsInfo'
      required:
        - acsInfo

    ECSAddrParams:
      description: Represents ECS address configuration parameters.
      type: object
      properties:
        ecsServerAddr:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/EcsServerAddr'
        spatialValidityCond:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SpatialValidityCond'
        ecsAuthMethods:
          type: array
          items:
            $ref: 'TS29503_Nudm_PP.yaml#/components/schemas/EcsAuthMethod'
          minItems: 1
        supportedPlmns:
          type: array
          items:
            $ref: 'TS29503_Nudm_PP.yaml#/components/schemas/SupportedPlmn'
          minItems: 1
      required:
        - ecsServerAddr

    DnnSnssaiParams:
      description: Represents DNN and S-NSSAI specific Group Parameters.
      type: object
      properties:
        defQos:
          $ref: 'TS29522_GroupParametersProvisioning.yaml#/components/schemas/AfReqDefaultQoS'
        ladnServArea:
          $ref: 'TS29522_GroupParametersProvisioning.yaml#/components/schemas/LadnServArea'
      anyOf:
        - required: [ defQos ]
        - required: [ ladnServArea ]

    5GLanParamProvNotif:
      description: Represents a 5G LAN Parameter Provisioning Event Notification.
      type: object
      properties:
        npConfigNotif:
          $ref: '#/components/schemas/NpConfigNotif'

    NpConfigNotif:
      description: Represents a Network Parameters Configuration related notification.
      type: object
      properties:
        configResults:
          type: array
          items:
            $ref: 'TS29122_CommonData.yaml#/components/schemas/ConfigResult'
          minItems: 1
        appliedParam:
          $ref: 'TS29122_MonitoringEvent.yaml#/components/schemas/AppliedParameterConfiguration'

    AaaUsage:
      anyOf:
      - type: string
        enum:
          - AUTH
          - IP_ALLOC
      - 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 usage of the DN-AAA server.  
        Possible values are:
        - AUTH: secondary authentication/authorization needed from DN-AAA server.
        - IP_ALLOC: UE IP address allocation needed from DN-AAA server.
