openapi: 3.0.0
info:
  description: Aura configuration atria tvSections API definition.
  version: 9.24.0-main-tv-section-show-25763.0
  title: Aura configuration atria tvSections API Swagger
  contact:
    email: auradev@tid.es
servers:
  - url: https://localhost:8999
paths:
  /aura-services/v2/configuration/tv/sections/{tvSectionId}:
    get:
      tags:
        - TvSections
      summary: Gets all the info associated to one tvSection
      description: Returns channel info by tvSectionId
      operationId: getTvSectionById
      security:
        - apiKeyHeader: []
      parameters:
        - name: tvSectionId
          in: path
          description: Unique Aura tvSection identifier
          required: true
          schema:
            type: string
        - name: excludeFields
          description: Filters to exclude some keys from the returned object. Only root values of tvSectionConfiguration can be filtered
          in: query
          required: false
          schema:
            type: string
        - name: includeFields
          description: Set all the keys returned in the result object. Only root values of tvSectionConfiguration can be filtered
          in: query
          required: false
          schema:
            type: string
        - name: correlator
          in: header
          description:
            Unique identifier of a request to be used as correlator in all
            systems
          required: false
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: Successfully retrieved
          headers:
            correlator:
              description: Correlation id for the different services
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TvSectionsConfigurationPartial"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-swagger-router-controller: "modules"
    put:
      tags:
        - TvSections
      summary: Updates all the info associated to one tvSection
      description: Updates all tvSection info
      operationId: updateTvSection
      security:
        - apiKeyHeader: []
      parameters:
        - name: tvSectionId
          in: path
          description: Unique Aura tvSection identifier
          required: true
          schema:
            type: string
        - name: correlator
          in: header
          description:
            Unique identifier of a request to be used as correlator in all systems
          required: false
          schema:
            type: string
            format: uuid
      requestBody:
        description: Input tvSectionData to update
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TvSectionsConfiguration"
      responses:
        "204":
          description: Successfully updated
          headers:
            correlator:
              description: Correlation id for the different services
              schema:
                type: string
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-swagger-router-controller: "modules"
    patch:
      tags:
        - TvSections
      summary: Updates some info associated to one tvSection
      description: Updates some fields of tvSection info
      operationId: modifyTvSection
      security:
        - apiKeyHeader: []
      parameters:
        - name: tvSectionId
          in: path
          description: Unique Aura tvSection identifier
          required: true
          schema:
            type: string
        - name: correlator
          in: header
          description:
            Unique identifier of a request to be used as correlator in all
            systems
          required: false
          schema:
            type: string
            format: uuid
      requestBody:
        description: Input channelData to add
        required: true
        content:
          application/json:
            schema:              
              $ref: "#/components/schemas/TvSectionsConfigurationPartial"
      responses:
        "204":
          description: Successfully updated
          headers:
            correlator:
              description: Correlation id for the different services
              schema:
                type: string
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-swagger-router-controller: "modules"
    delete:
      tags:
        - TvSections
      summary: Delete one tvSection
      description: Delete tvSection info by id
      operationId: deleteTvSectionById
      security:
        - apiKeyHeader: []
      parameters:
        - name: tvSectionId
          in: path
          description: Unique Aura tvSection identifier
          required: true
          schema:
            type: string
        - name: correlator
          in: header
          description:
            Unique identifier of a request to be used as correlator in all
            systems
          required: false
          schema:
            type: string
            format: uuid
      responses:
        "204":
          description: Successfully updated
          headers:
            correlator:
              description: Correlation id for the different services
              schema:
                type: string
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
      x-swagger-router-controller: "modules"
  /aura-services/v2/configuration/tv/sections:
    get:
      tags:
        - TvSections
      summary: Gets all tvSections info
      description: Returns tvSections info
      operationId: getAllTvSections
      security:
        - apiKeyHeader: []
      parameters:
        - name: excludeFields
          description: Filters to exclude some keys from the returned object. Only root values of tvSectionConfiguration can be filtered
          in: query
          required: false
          schema:
            type: string
        - name: includeFields
          description: Set all the keys returned in the result object. Properties of private properties can't be filtered
          in: query
          required: false
          schema:
            type: string
        - name: correlator
          in: header
          description:
            Unique identifier of a request to be used as correlator in all
            systems
          required: false
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: Successfully retrieved
          headers:
            correlator:
              description: Correlation id for the different services
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TvSectionsConfigurationPartial"
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "500":
          $ref: "#/components/responses/InternalError"
      x-swagger-router-controller: "modules"
    post:
      tags:
        - TvSections
      summary: Adds a new tvSection
      description: Adds a new complete tvSectionId
      operationId: addTvSection
      security:
        - apiKeyHeader: []
      parameters:
        - name: correlator
          in: header
          description:
            Unique identifier of a request to be used as correlator in all
            systems
          required: false
          schema:
            type: string
            format: uuid
      requestBody:
        description: Input tvSectionData to add
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TvSectionsConfiguration"
      responses:
        "201":
          description: Successfully gathered
          headers:
            correlator:
              description: Correlation id for the different services
              schema:
                type: string
            location:
              description: URI to access this channel configuration
              schema:
                type: string
                format: url
        "400":
          $ref: "#/components/responses/InvalidRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "409":
          $ref: "#/components/responses/Conflict"
        "500":
          $ref: "#/components/responses/InternalError"
      x-swagger-router-controller: "modules"
  /aura-services/v2/configuration/changes/tv/sections:
    get:
      tags:
        - TvSections
      summary: Gets if tvSections have been modified
      description: Returns if tvSections are modified
      operationId: getChangedTvSections
      security:
        - apiKeyHeader: []
      parameters:
        - name: since
          description: Date to check modifications in extended iso format ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ)
          in: query
          required: true
          schema:
            type: string
        - name: correlator
          in: header
          description: Unique identifier of a request to be used as correlator in all systems
          required: false
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully retrieved
          headers:
            correlator:
              description: Correlation id for the different services
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModificationResponse'
        '400':
          $ref: '#/components/responses/InvalidRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
      x-swagger-router-controller: modules
components:
  responses:
    InvalidRequest:
      description: Incoming HTTP request format is not valid
      headers:
        correlator:
          description: Correlation id for the different services
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AuraError"
    Unauthorized:
      description: Incoming HTTP request authorization is not valid
      headers:
        correlator:
          description: Correlation id for the different services
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AuraError"
    Conflict:
      description:
        The request could not be completed due to a conflict with the current
        state of the target resource.
      headers:
        correlator:
          description: Correlation id for the different services
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AuraError"
    TooManyRequests:
      description: The user has sent too many requests in a given amount of time
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AuraError"
    InternalError:
      description: Unexpected internal error
      headers:
        correlator:
          description: Correlation id for the different services
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AuraError"
    NotFound:
      description: Request resource not found
      headers:
        correlator:
          description: Correlation id for the different services
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AuraError"
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      name: Authorization
      in: header
  schemas:
    TvSectionsConfigurationPartial:
      type: object
      required:
        - id
      additionalProperties: false
      properties:
        id:
          type: string
          format: uuid
        pid:
          type: string
        name:
          type: string
        canon:
          type: string
        type:
          type: string
          enum:
            - app
            - section
        metadata:
          $ref: "#/components/schemas/DocumentMetadata"
    TvSectionsConfiguration:
      type: object
      allOf:
        - $ref: '#/components/schemas/TvSectionsConfigurationPartial'
        - required:
            - id
            - pid
            - name
            - canon
            - type
    DocumentMetadata:
      type: object
      description: Metadata for configuratin-api docs
      properties:
        version:
          type: string
          description: configuration-api version when document was created
        createdAt:
          type: string
          description: creation date
          format: date-time
        updatedAt:
          type: string
          description: creation date
          format: date-time
      additionalProperties: true
