Commit 9834e5bc authored by bradburyr's avatar bradburyr
Browse files

Content Publishing Provisioning API

parent c9c3c566
Loading
Loading
Loading
Loading
+42 −0
Original line number Diff line number Diff line
@@ -252,6 +252,48 @@ components:
        desiredPacketLossRate:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uinteger'

    M1MediaEntryPoint:
      description: "A typed entry point for downlink or uplink media streaming."
      type: object
      required:
        - relativePath
        - contentType
      properties:
        relativePath:
          $ref: 'TS26510_CommonData.yaml#/components/schemas/RelativeUrl'
        contentType:
          type: string
        profiles:
          type: array
          items:
            $ref: 'TS29571_CommonData.yaml#/components/schemas/Uri'
          minItems: 1

    CachingConfiguration:
      type: object
      description: 'A configuration that affects the caching of media resources in the Media AS and the signalling of cache control metadata in HTTP responses generated by the Media AS.'
      required:
        - urlPatternFilter
        - cachingDirectives
      properties:
        urlPatternFilter:
          type: string
        cachingDirectives:
          type: object
          properties:
            statusCodeFilters:
              type: array
              items:
                type: integer
                minimum: 100
                maximum: 599
              minItems: 1
            noCache:
              type: boolean
              default: false
            maxAge:
              $ref: 'TS29571_CommonData.yaml#/components/schemas/Uint32'

    #####################################
    # Clause 6.4.4: Enumerated data types
    #####################################
+4 −44
Original line number Diff line number Diff line
@@ -294,23 +294,6 @@ components:
        baseURL:
          $ref: 'TS26510_CommonData.yaml#/components/schemas/AbsoluteUrl'

    M1MediaEntryPoint:
      description: "A typed entry point for downlink or uplink media streaming."
      type: object
      required:
        - relativePath
        - contentType
      properties:
        relativePath:
          $ref: 'TS26510_CommonData.yaml#/components/schemas/RelativeUrl'
        contentType:
          type: string
        profiles:
          type: array
          items:
            $ref: 'TS29571_CommonData.yaml#/components/schemas/Uri'
          minItems: 1

    PathRewriteRule:
      type: object
      description: 'A rule to manipulate URL paths.'
@@ -323,31 +306,6 @@ components:
        mappedPath:
          type: string

    CachingConfiguration:
      type: object
      description: 'A content caching configuration.'
      required:
        - urlPatternFilter
      properties:
        urlPatternFilter:
          type: string
        cachingDirectives:
          type: object
          required:
            - noCache
          properties:
            statusCodeFilters:
              type: array
              items:
                type: integer
                minimum: 100
                maximum: 599
              minItems: 1
            noCache:
              type: boolean
            maxAge:
              $ref: 'TS29571_CommonData.yaml#/components/schemas/Uint32'

    DistributionConfiguration:
      type: object
      required:
@@ -384,7 +342,7 @@ components:
          allOf:
            - $ref: 'TS26510_CommonData.yaml#/components/schemas/AbsoluteUrl'
        entryPoint:
          $ref: '#/components/schemas/M1MediaEntryPoint'
          $ref: 'TS26510_CommonData.yaml#/components/schemas/M1MediaEntryPoint'
        pathRewriteRules:
          type: array
          items:
@@ -392,7 +350,8 @@ components:
        cachingConfigurations:
          type: array
          items:
            $ref: '#/components/schemas/CachingConfiguration'
            $ref: 'TS26510_CommonData.yaml#/components/schemas/CachingConfiguration'
          minItems: 1
        geoFencing:
          type: object
          required:
@@ -451,6 +410,7 @@ components:
          type: array
          items:
            $ref: '#/components/schemas/DistributionConfiguration'
          minItems: 1

    DistributionNetworkType:
      description: "Type of distribution network."
+314 −0
Original line number Diff line number Diff line
@@ -27,6 +27,251 @@ security:
  - OAuth2ClientCredentials: [] 

paths:
  /provisioning-sessions/{provisioningSessionId}/content-publishing-configuration:
    parameters:
      - name: provisioningSessionId
        in: path
        required: true
        schema:
          $ref: 'TS26510_CommonData.yaml#/components/schemas/ResourceId'
        description: 'The resource identifier of an existing Provisioning Session.'
    post:
      operationId: createContentPublishingConfiguration
      summary: 'Create and upload the Content Publishing Configuration for the specified Provisioning Session'
      requestBody:
        description: 'A JSON representation of a Content Publishing Configuration'
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentPublishingConfiguration'
      responses:
        '201': # Created
          description: 'Content Publishing Configuration Created'
          headers:
            Location:
              description: 'URL of the newly created Content Publishing Configuration (same as request URL).'
              required: true
              schema:
                $ref: 'TS26510_CommonData.yaml#/components/schemas/AbsoluteUrl'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentPublishingConfiguration'
        '400': # Bad Request: The syntax of the HTTP request is malformed in a way not covered by one of the following more specific client errors
          $ref: 'TS29571_CommonData.yaml#/components/responses/400'
        '401': # Unauthorized
          $ref: 'TS29571_CommonData.yaml#/components/responses/401'
        '403': # Forbidden
          $ref: 'TS29571_CommonData.yaml#/components/responses/403'
        '411': # Length Required
          $ref: 'TS29571_CommonData.yaml#/components/responses/411'
        '413': # Payload Too Large
          $ref: 'TS29571_CommonData.yaml#/components/responses/413'
        '414': # URI Too Long
          $ref: 'TS29571_CommonData.yaml#/components/responses/414'
        '415': # Unsupported Media Type
          $ref: 'TS29571_CommonData.yaml#/components/responses/415'
        '500': # Internal Server Error
          $ref: 'TS29571_CommonData.yaml#/components/responses/500'
        '503': # Service Unavailable
          $ref: 'TS29571_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29571_CommonData.yaml#/components/responses/default'
    get:
      operationId: retrieveContentPublishingConfiguration
      summary: 'Retrieve the Content Publishing Configuration of the specified Provisioning Session'
      responses:
        '200': # OK
          description: 'Success'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentPublishingConfiguration'
        '400': # Bad Request: The syntax of the HTTP request is malformed in a way not covered by one of the following more specific client errors
          $ref: 'TS29571_CommonData.yaml#/components/responses/400'
        '401': # Unauthorized
          $ref: 'TS29571_CommonData.yaml#/components/responses/401'
        '404': # Not Found
          $ref: 'TS29571_CommonData.yaml#/components/responses/404'
        '410': # Gone: Resource no longer exists
          $ref: 'TS29571_CommonData.yaml#/components/responses/410'
        '413': # Payload Too Large: No request body allowed for this operation
          $ref: 'TS29571_CommonData.yaml#/components/responses/413'
        '414': # URI Too Long
          $ref: 'TS29571_CommonData.yaml#/components/responses/414'
        '500': # Internal Server Error
          $ref: 'TS29571_CommonData.yaml#/components/responses/500'
        '503': # Service Unavailable
          $ref: 'TS29571_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29571_CommonData.yaml#/components/responses/default'
    put:
      operationId: updateContentPublishingConfiguration
      summary: 'Update (by replacement) the Content Publishing Configuration for the specified Provisioning Session'
      requestBody:
        description: 'A JSON representation of a Content Publishing Configuration'
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentPublishingConfiguration'
      responses:
        '200': # OK
          description: 'Updated Content Publishing Configuration'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentPublishingConfiguration'
        '204': # No Content
          description: 'Content Publishing Configuration Unchanged'
        '400': # Bad Request: The syntax of the HTTP request is malformed in a way not covered by one of the following more specific client errors
          $ref: 'TS29571_CommonData.yaml#/components/responses/400'
        '401': # Unauthorized
          $ref: 'TS29571_CommonData.yaml#/components/responses/401'
        '403': # Forbidden
          $ref: 'TS29571_CommonData.yaml#/components/responses/403'
        '404': # Not Found
          $ref: 'TS29571_CommonData.yaml#/components/responses/404'
        '410': # Gone: Resource no longer exists
          $ref: 'TS29571_CommonData.yaml#/components/responses/410'
        '411': # Length Required
          $ref: 'TS29571_CommonData.yaml#/components/responses/411'
        '413': # Payload Too Large
          $ref: 'TS29571_CommonData.yaml#/components/responses/413'
        '414': # URI Too Long
          $ref: 'TS29571_CommonData.yaml#/components/responses/414'
        '415': # Unsupported Media Type
          $ref: 'TS29571_CommonData.yaml#/components/responses/415'
        '500': # Internal Server Error
          $ref: 'TS29571_CommonData.yaml#/components/responses/500'
        '503': # Service Unavailable
          $ref: 'TS29571_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29571_CommonData.yaml#/components/responses/default'
    patch:
      operationId: patchContentPublishingConfiguration
      summary: 'Patch the Content Publishing Configuration for the specified Provisioning Session'
      requestBody:
        description: 'A JSON representation of a Content Publishing Configuration'
        required: true
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/ContentPublishingConfiguration'
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/ContentPublishingConfiguration'
      responses:
        '200': # OK
          description: 'Patched Content Publishing Configuration'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentPublishingConfiguration'
        '204': # No Content
          description: 'Content Publishing Configuration Unchanged'
        '400': # Bad Request: The syntax of the HTTP request is malformed in a way not covered by one of the following more specific client errors
          $ref: 'TS29571_CommonData.yaml#/components/responses/400'
        '401': # Unauthorized
          $ref: 'TS29571_CommonData.yaml#/components/responses/401'
        '403': # Forbidden
          $ref: 'TS29571_CommonData.yaml#/components/responses/403'
        '404': # Not Found
          $ref: 'TS29571_CommonData.yaml#/components/responses/404'
        '410': # Gone: Resource no longer exists
          $ref: 'TS29571_CommonData.yaml#/components/responses/410'
        '411': # Length Required
          $ref: 'TS29571_CommonData.yaml#/components/responses/411'
        '413': # Payload Too Large
          $ref: 'TS29571_CommonData.yaml#/components/responses/413'
        '414': # URI Too Long
          $ref: 'TS29571_CommonData.yaml#/components/responses/414'
        '415': # Unsupported Media Type
          $ref: 'TS29571_CommonData.yaml#/components/responses/415'
        '500': # Internal Server Error
          $ref: 'TS29571_CommonData.yaml#/components/responses/500'
        '503': # Service Unavailable
          $ref: 'TS29571_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29571_CommonData.yaml#/components/responses/default'
    delete:
      operationId: destroyContentPublishingConfiguration
      summary: 'Destroy the current Content Publishing Configuration of the specified Provisioning Session'
      responses:
        '204': # No Content
          description: 'Destroyed Content Publishing Configuration'
        '400': # Bad Request: The syntax of the HTTP request is malformed in a way not covered by one of the following more specific client errors
          $ref: 'TS29571_CommonData.yaml#/components/responses/400'
        '401': # Unauthorized
          $ref: 'TS29571_CommonData.yaml#/components/responses/401'
        '404': # Not Found
          $ref: 'TS29571_CommonData.yaml#/components/responses/404'
        '410': # Gone: Resource no longer exists
          $ref: 'TS29571_CommonData.yaml#/components/responses/410'
        '413': # Payload Too Large: No request body allowed for this operation
          $ref: 'TS29571_CommonData.yaml#/components/responses/413'
        '414': # URI too long
          $ref: 'TS29571_CommonData.yaml#/components/responses/414'
        '500': # Internal Server Error
          $ref: 'TS29571_CommonData.yaml#/components/responses/500'
        '503': # Service Unavailable
          $ref: 'TS29571_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29571_CommonData.yaml#/components/responses/default'
          
  /provisioning-sessions/{provisioningSessionId}/content-publishing-configuration/purge:
    parameters:
        - name: provisioningSessionId
          in: path
          required: true
          schema:
            $ref: 'TS26510_CommonData.yaml#/components/schemas/ResourceId'
          description: A unique identifier of the Provisioning Session
    post:
      operationId: purgeContentPublishingCache
      summary: 'Purge the content of the cache for the Content Publishing Configuration of the specified Provisioning Session'
      requestBody:
        description: 'The regular expression pattern for resources to purge from the cache'
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                pattern: 
                  description: 'The regular expression'
                  type: string
      responses:
        '200': # OK
          description: 'Content Purged'
          content:
            application/json:
              schema:
                description: 'The aggregate number of cache entries purged in all 5GMSd AS instances distributing content for the requested Provisioning Session.'
                type: integer
                minimum: 1
        '204': # No Content
          description: 'No Content Purged'
        '400': # Bad Request (e.g. syntactically invalid regular expression in request body)
          $ref: 'TS29571_CommonData.yaml#/components/responses/400'
        '401': # Unauthorized
          $ref: 'TS29571_CommonData.yaml#/components/responses/401'
        '404': # Not Found
          $ref: 'TS29571_CommonData.yaml#/components/responses/404'
        '411': # Length Required
          $ref: 'TS29571_CommonData.yaml#/components/responses/411'
        '413': # Payload Too Large
          $ref: 'TS29571_CommonData.yaml#/components/responses/413'
        '414': # URI Too Long
          $ref: 'TS29571_CommonData.yaml#/components/responses/414'
        '415': # Unsupported Media Type
          $ref: 'TS29571_CommonData.yaml#/components/responses/415'
        '500': # Internal Server Error
          $ref: 'TS29571_CommonData.yaml#/components/responses/500'
        '503': # Service Unavailable
          $ref: 'TS29571_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29571_CommonData.yaml#/components/responses/default'

components:
  securitySchemes:
@@ -38,3 +283,72 @@ components:
          scopes: {}

  schemas:
    EgestConfiguration:
      type: object
      description: 'Parameters for egesting content from the Media AS at reference point M2.'
      required:
        - mode
        - protocol
      properties:
        mode:
          $ref: 'TS26510_CommonData.yaml#/components/schemas/ContentTransferMode'
        protocol:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uri'
        baseURL:
          $ref: 'TS26510_CommonData.yaml#/components/schemas/AbsoluteUrl'
        entryPoint:
          $ref: 'TS26510_CommonData.yaml#/components/schemas/M1MediaEntryPoint'
        cachingConfigurations:
          type: array
          items:
            $ref: 'TS26510_CommonData.yaml#/components/schemas/CachingConfiguration'
          minItems: 1
 
    ContributionConfiguration:
      type: object
      description: 'A configuration for content contribution.'
      required:
        - canonicalDomainName
        - baseURL
        - entryPoint
      properties:
        edgeResourcesConfigurationId:
          $ref: 'TS26510_CommonData.yaml#/components/schemas/ResourceId' 
        contentPreparationTemplateId:
          $ref: 'TS26510_CommonData.yaml#/components/schemas/ResourceId'
        certificateId: 
          allOf:
            - $ref: 'TS26510_CommonData.yaml#/components/schemas/ResourceId'
            - description: 'A reference to a Server Certificate resource to be presented by the Media AS at reference point M4.'
        canonicalDomainName:
          readOnly: true
          type: string
          description: 'Default Fully-Qualified Domain Name assigned by the Media AF for use at reference point M4.'
        domainNameAlias: 
          type: string
          description: 'Additional domain name nominated by the Media Application Provider and used by the Media AS to set appropriate CORS HTTP response headers at reference point M4.'
        baseURL:
          readOnly: true
          allOf:
            - $ref: 'TS26510_CommonData.yaml#/components/schemas/AbsoluteUrl'
        entryPoint:
          $ref: 'TS26510_CommonData.yaml#/components/schemas/M1MediaEntryPoint'

    # Schema for the resource itself
    ContentPublishingConfiguration:
      type: object
      description: "A representation of a Content Publishing Configuration resource."
      required:
        - name
        - contributionConfigurations
        - egestConfiguration
      properties:
        name:
          type: string
        contributionConfigurations:
          type: array
          items:
            $ref: '#/components/schemas/ContributionConfiguration'
          minItems: 1
        egestConfiguration:
          $ref: '#/components/schemas/EgestConfiguration'