openapi: 3.0.0
info:
  title: 3gpp-iptvconfiguration
  version: 1.1.1
  description: |
    API for IPTV configuration.  
    © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).  
    All rights reserved.
externalDocs:
  description: >
    3GPP TS 29.522 V17.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-iptvconfiguration/v1'
    variables:
      apiRoot:
        default: https://example.com
        description: apiRoot as defined in clause 5.2.4 of 3GPP TS 29.122.
paths:
  /{afId}/configurations:
    get:
      summary: read all of the active configurations for the AF
      operationId: ReadAllSubscriptions
      tags:
        - IPTV Configurations
      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 configurations for the AF)
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IptvConfigData'
                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 configuration resource
      operationId: CreateNewSubscription
      tags:
        - IPTV Configurations
      parameters:
        - name: afId
          in: path
          description: Identifier of the AF
          required: true
          schema:
            type: string
      requestBody:
        description: new configuration creation
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IptvConfigData'
      responses:
        '201':
          description: Created (Successful creation of configuration)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IptvConfigData'
          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'

  /{afId}/configurations/{configurationId}:
    get:
      summary: read an active configuration for the AF and the configuration Id
      operationId: ReadAnSubscription
      tags:
        - Individual IPTV Configuration
      parameters:
        - name: afId
          in: path
          description: Identifier of the AF
          required: true
          schema:
            type: string
        - name: configurationId
          in: path
          description: Identifier of the configuration resource
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK (Successful get the active configuration)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IptvConfigData'
        '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 configuration resource
      operationId: FullyUpdateAnSubscription
      tags:
        - Individual IPTV Configuration
      parameters:
        - name: afId
          in: path
          description: Identifier of the AF
          required: true
          schema:
            type: string
        - name: configurationId
          in: path
          description: Identifier of the configuration resource
          required: true
          schema:
            type: string
      requestBody:
        description: Parameters to update/replace the existing configuration
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IptvConfigData'
      responses:
        '200':
          description: OK (Successful deletion of the existing configuration)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IptvConfigData'
        '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 configuration resource
      operationId: PartialUpdateAnSubscription
      tags:
        - Individual IPTV Configuration
      parameters:
        - name: afId
          in: path
          description: Identifier of the AF
          required: true
          schema:
            type: string
        - name: configurationId
          in: path
          description: Identifier of the configuration resource
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/IptvConfigDataPatch'
      responses:
        '200':
          description: OK. The configuration was modified successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IptvConfigData'
        '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 configuration
      operationId: DeleteAnSubscription
      tags:
        - Individual IPTV Configuration
      parameters:
        - name: afId
          in: path
          description: Identifier of the AF
          required: true
          schema:
            type: string
        - name: configurationId
          in: path
          description: Identifier of the configuration resource
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content (Successful deletion of the existing configuration)
        '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: 
    IptvConfigData:
      description: Represents an individual IPTV Configuration resource.
      type: object
      properties:
        self:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Link'
        gpsi:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Gpsi'
        exterGroupId:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/ExternalGroupId'
        afAppId:
          type: string
        dnn:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Dnn'
        snssai:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Snssai'
        multiAccCtrls:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/MulticastAccessControl'
          minProperties: 1
          description: >
            Identifies a list of multicast address access control information.
            Any string value can be used as a key of the map.
        mtcProviderId:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/MtcProviderInformation'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - afAppId
        - multiAccCtrls
        - suppFeat
    IptvConfigDataPatch:
      description: >
        Represents the parameters to request the modification of an IPTV Configuration resource.
      type: object
      properties:
        multiAccCtrls:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/MulticastAccessControl'
          minProperties: 1
          description: >
            Identifies a list of multicast address access control information.
            Any string value can be used as a key of the map.
    MulticastAccessControl:
      description: Represents multicast address access control information.
      type: object
      properties:
        srcIpv4Addr:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Ipv4Addr'
        srcIpv6Addr:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Ipv6Addr'
        multicastV4Addr:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Ipv4Addr'
        multicastV6Addr:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Ipv6Addr'
        accStatus:
          $ref: '#/components/schemas/AccessRightStatus'
      required:
        - accStatus
    AccessRightStatus:
      anyOf:
        - type: string
          enum:
            - FULLY_ALLOWED
            - PREVIEW_ALLOWED
            - NO_ALLOWED
        - type: string
          description: >
            This string provides forward-compatibility with future extensions to the enumeration but
            is not used to encode content defined in the present version of this API.
      description: |
        Possible values are:
        - FULLY_ALLOWED: The User is fully allowed to access to the channel.
        - PREVIEW_ALLOWED: The User is preview allowed to access to the channel.
        - NO_ALLOWED: The User is not allowed to access to the channel.

