openapi: 3.0.0
info:
  title: M1_ContentPreparationTemplatesProvisioning
  version: 2.1.1
  description: |
    5GMS AF M1 Content Preparation Templates Provisioning API
    © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).
    All rights reserved.
tags:
  - name: M1_ContentPreparationTemplatesProvisioning
    description: '5G Media Streaming: Provisioning (M1) APIs: Content Preparation Templates Provisioning'
externalDocs:
  description: 'TS 26.512 V17.7.0; 5G Media Streaming (5GMS); Protocols'
  url: 'https://www.3gpp.org/ftp/Specs/archive/26_series/26.512/'
servers:
  - url: '{apiRoot}/3gpp-m1/v2'
    variables:
      apiRoot:
        default: https://example.com
        description: See 3GPP TS 29.512 clause 6.1.
paths:
  /provisioning-sessions/{provisioningSessionId}/content-preparation-templates:
    parameters:
      - name: provisioningSessionId
        in: path
        required: true
        schema: 
          $ref: 'TS26512_CommonData.yaml#/components/schemas/ResourceId'
        description: 'The resource identifier of an existing Provisioning Session.'
    post:
      operationId: createContentPreparationTemplate
      summary: 'Create (and optionally upload) a new Content Preparation Template for the specified Provisioning Session'
      requestBody:
        description: 'A Content Preparation Template of any supported type'
        required: true
        content:
          '*/*':
            schema:
              type: string
      responses:
        '201':
          description: 'Content Preparation Template Created'
          headers:
            Location:
              description: 'URL of the newly created Content Preparation Template.'
              required: true
              schema:
                $ref: 'TS26512_CommonData.yaml#/components/schemas/AbsoluteUrl'
        '415':
          # Unsupported Media Type
          $ref: 'TS29571_CommonData.yaml#/components/responses/415'
        '503':
          # Service Unavailable
          $ref: 'TS29571_CommonData.yaml#/components/responses/503'
  /provisioning-sessions/{provisioningSessionId}/content-preparation-templates/{contentPreparationTemplateId}:
    parameters:
      - name: provisioningSessionId
        in: path
        required: true
        schema: 
          $ref: 'TS26512_CommonData.yaml#/components/schemas/ResourceId'
        description: 'The resource identifier of an existing Provisioning Session.'
      - name: contentPreparationTemplateId
        in: path
        required: true
        schema: 
          $ref: 'TS26512_CommonData.yaml#/components/schemas/ResourceId'
        description: 'The resource identifier of an existing Content Preparation Template.'
    get:
      operationId: retrieveContentPreparationTemplate
      summary: 'Retrieve the specified Content Preparation Template of the specified Provisioning Session'
      responses:
        '200':
          description: 'Success'
          content:
            '*/*':
              schema:
                type: string
    put:
      operationId: updateContentPreparationTemplate
      summary: 'Update the specified Content Preparation Template for the specified Provisioning Session'
      requestBody:
        description: 'A Content Preparation Template of any type'
        required: true
        content:
          '*/*':
            schema:
              type: string
      responses:
        '204':
          description: 'Updated Content Preparation Template'
        '404':
          description: 'Not Found'
        '415':
          # Unsupported Media Type
          $ref: 'TS29571_CommonData.yaml#/components/responses/415'
        '503':
          # Service Unavailable
          $ref: 'TS29571_CommonData.yaml#/components/responses/503'
    patch:
      operationId: patchContentPreparationTemplate
      summary: 'Patch the specified Content Preparation Template for the specified Provisioning Session'
      requestBody:
        description: 'A Content Preparation Template patch of any type'
        required: true
        content:
          application/merge-patch+json:
            schema:
              type: string
          application/json-patch+json:
            schema:
              type: string
      responses:
        '200':
          description: 'Patched Content Preparation Templates'
          content:
            '*/*':
              schema:
                type: string
        '404':
          description: 'Not Found'
        '415':
          # Unsupported Media Type
          $ref: 'TS29571_CommonData.yaml#/components/responses/415'
        '503':
          # Service Unavailable
          $ref: 'TS29571_CommonData.yaml#/components/responses/503'
    delete:
      operationId: destroyContentPreparationTemplate
      summary: 'Destroy the specified Content Preparation Template of the specified Provisioning Session'
      responses:
        '200':
          # OK
          description: 'Content Preparation Template Destroyed'
          content:
            '*/*':
              schema:
                type: string
        '204':
          # No Content
          description: 'Content Preparation Template Destroyed'
        '404':
          # Not Found
          $ref: 'TS29571_CommonData.yaml#/components/responses/404'
        '409':
          # Conflict
          $ref: 'TS29571_CommonData.yaml#/components/responses/409'
        '410':
          # Gone
          $ref: 'TS29571_CommonData.yaml#/components/responses/410'
