openapi: 3.0.0

info:
  title: 3gpp-grp-pp
  version: 1.0.0
  description: |
    API for Group Parameters Provisioning.  
    © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).  
    All rights reserved.

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

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

security:
  - {}
  - oAuth2ClientCredentials: []

paths:
  /pp:
    get:
      summary: Request to retrieve all the active Group Parameters Provisioning resources at the NEF.
      operationId: GetGrpParamsProvisionings
      tags:
        - Group Parameters Provisionings (Collection)
      responses:
        '200':
          description: >
            OK. All the Individual Group Parameters Provisioning resources managed by the NEF are
            returned.
            If there are no existing Individual Group Parameters Provisioning resources managed at
            the NEF, an empty array is returned.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GrpPpData'
                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: Request the creation of a new Group Parameters Provisioning.
      tags:
        - Group Parameters Provisioning (Collection)
      operationId: CreateGrpParamsProvisioning
      requestBody:
        description: >
          Representation of the new Group Parameters Provisioning to be created at the NEF.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GrpPpData'
      responses:
        '201':
          description: >
            Created. A representation of the created Individual Group Parameters Provisioning
            resource is returned in the response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GrpPpData'
          headers:
            Location:
              description: >
                Contains the URI of the newly created resource, according to the structure
                {apiRoot}/3gpp-grp-pp/v1/pp/{ppId}
              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'

  /pp/{ppId}:
    parameters:
      - name: ppId
        in: path
        description: >
          Represents the identifier of the Individual Group Parameters Provisioning resource.
        required: true
        schema:
          type: string

    get:
      summary: Request to retrieve an existing Individual Group Parameters Provisioning resource.
      operationId: GetIndGrpParamsProvisioning
      tags:
        - Individual Group Parameters Provisioning (Document)
      responses:
        '200':
          description: >
            OK. Successful retrieval of the requested Individual Group Parameters Provisioning.
            resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GrpPpData'
        '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 Group Parameters Provisioning resource.
      tags:
        - Individual Group Parameters Provisioning (Document)
      operationId: UpdateIndGrpParamsProvisioning
      requestBody:
        description: >
          Represents the updated Individual Group Parameters Provisioning resource representation.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GrpPpData'
      responses:
        '200':
          description: >
            OK. The Individual Group Parameters Provisioning resource is successfully updated and a
            representation of the updated resource is returned in the response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GrpPpData'
        '204':
          description: >
            No Content. The Individual Group Parameters Provisioning 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 Group Parameters Provisioning resource.
      tags:
        - Individual Group Parameters Provisioning (Document)
      operationId: ModifyIndGrpParamsProvisioning
      requestBody:
        description: >
          Contains the parameters to request the modification of the Individual Group Parameters
          Provisioning resource.
        required: true
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/GrpPpDataPatch'
      responses:
        '200':
          description: >
            OK. The Individual Group Parameters Provisioning resource is successfully modified and a
            representation of the updated resource is returned in the response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GrpPpData'
        '204':
          description: >
            No Content. The Individual Group Parameters Provisioning 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 Group Parameters Provisioning resource.
      tags:
        - Individual Group Parameters Provisioning (Document)
      operationId: DeleteIndGrpParamsProvisioning
      responses:
        '204':
          description: >
            No Content. The Individual Group Parameters Provisioning 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
#
    GrpPpData:
      description: Represents the Group Parameters Provisioning data.
      type: object
      properties:
        afId:
          type: string
        mtcProviderId:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/MtcProviderInformation'
        dnnSnssaiGrpData:
          $ref: '#/components/schemas/DnnSnssaiGrpData'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - afId

    GrpPpDataPatch:
      description: >
        Represents the requested modifications to an existing Group Parameters Provisioning data.
      type: object
      properties:
        dnnSnssaiGrpData:
          $ref: '#/components/schemas/DnnSnssaiGrpData'

    DnnSnssaiGrpData:
      description: Represents DNN and S-NSSAI specific Group Parameters data.
      type: object
      properties:
        extGroupId:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/ExternalGroupId'
        dnn:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Dnn'
        snssai:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Snssai'
        defQos:
          $ref: '#/components/schemas/AfReqDefaultQoS'
        ladnServArea:
          $ref: '#/components/schemas/LadnServArea'
      required:
        - extGroupId
        - dnn
        - snssai
      anyOf:
        - required: [ defQos ]
        - required: [ ladnServArea ]

    AfReqDefaultQoS:
      description: Represents the AF requested default QoS.
      type: object
      properties:
        5qi:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/5Qi'
        arp:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Arp'
        priorityLevel:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/5QiPriorityLevelRm'
      required:
        - 5qi
        - arp

    LadnServArea:
      description: Represents an LADN Service Area.
      type: object
      properties:
        geographicAreas:
          type: array
          items:
            $ref: 'TS29572_Nlmf_Location.yaml#/components/schemas/GeographicArea'
          minItems: 1
        civicAddresses:
          type: array
          items:
            $ref: 'TS29572_Nlmf_Location.yaml#/components/schemas/CivicAddress'
          minItems: 1
        tais:
          type: array
          items:
            $ref: 'TS29571_CommonData.yaml#/components/schemas/Tai'
          minItems: 1
      oneOf:
        - required: [ geographicAreas ]
        - required: [ civicAddresses ]
        - required: [ tais ]

#
# SIMPLE DATA TYPES
#

#
# ENUMERATIONS
#

