TM Forum importJob API

Operations for ImportJob Resource

OpenAPI Specification

tm-forum-importjob-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Product Catalog Management agreement importJob API
  description: "Product Catalog API is one of Catalog Management API Family. Product Catalog API goal is to provide a catalog of products. \n### Operations\nProduct Catalog API performs the following operations on the resources :\n- Retrieve an entity or a collection of entities depending on filter criteria\n- Partial update of an entity (including updating rules)\n- Create an entity (including default values and creation rules)\n- Delete an entity\n- Manage notification of events"
  version: 5.0.0
servers:
- url: https://serverRoot/productCatalogManagement/v5/
tags:
- name: importJob
  description: Operations for ImportJob Resource
paths:
  /importJob:
    get:
      tags:
      - importJob
      summary: TM Forum List or Find ImportJob Objects
      description: List or find ImportJob objects
      operationId: listImportJob
      parameters:
      - $ref: '#/components/parameters/Fields'
      - $ref: '#/components/parameters/Offset'
      - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          $ref: '#/components/responses/200ImportJobArray'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '405':
          $ref: '#/components/responses/405'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
    post:
      tags:
      - importJob
      summary: TM Forum Creates a ImportJob
      description: This operation creates a ImportJob entity.
      operationId: createImportJob
      parameters:
      - $ref: '#/components/parameters/Fields'
      requestBody:
        $ref: '#/components/requestBodies/ImportJob_FVO'
      responses:
        '201':
          $ref: '#/components/responses/201ImportJob'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '405':
          $ref: '#/components/responses/405'
        '409':
          $ref: '#/components/responses/409'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
  /importJob/{id}:
    get:
      tags:
      - importJob
      summary: TM Forum Retrieves a ImportJob by ID
      description: This operation retrieves a ImportJob entity. Attribute selection enabled for all first level attributes.
      operationId: retrieveImportJob
      parameters:
      - $ref: '#/components/parameters/Id'
      - $ref: '#/components/parameters/Fields'
      responses:
        '200':
          $ref: '#/components/responses/200ImportJob_Get'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '405':
          $ref: '#/components/responses/405'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
    delete:
      tags:
      - importJob
      summary: TM Forum Deletes a ImportJob
      description: This operation deletes a ImportJob entity.
      operationId: deleteImportJob
      parameters:
      - $ref: '#/components/parameters/Id'
      responses:
        '202':
          $ref: '#/components/responses/202'
        '204':
          $ref: '#/components/responses/204'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '405':
          $ref: '#/components/responses/405'
        '409':
          $ref: '#/components/responses/409'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
components:
  responses:
    '204':
      description: Deleted
    200ImportJobArray:
      description: Success
      headers:
        X-Total-Count:
          $ref: '#/components/headers/X-Total-Count'
        X-Result-Count:
          $ref: '#/components/headers/X-Result-Count'
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ImportJob'
          examples:
            ImportJob_list_example:
              $ref: '#/components/examples/ImportJob_list_example_response'
    '400':
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    200ImportJob_Get:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ImportJob'
          examples:
            ImportJob_retrieve_example:
              $ref: '#/components/examples/ImportJob_retrieve_example_response'
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    201ImportJob:
      description: OK/Created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ImportJob'
          examples:
            Import_Job_Create_example:
              $ref: '#/components/examples/Import_Job_Create_example_response'
    '202':
      description: Accepted
    '403':
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '405':
      description: Method Not allowed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '503':
      description: Service Unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '404':
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '501':
      description: Not Implemented
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '409':
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  requestBodies:
    ImportJob_FVO:
      description: The ImportJob to be created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ImportJob_FVO'
          examples:
            Import_Job_Create_example:
              $ref: '#/components/examples/Import_Job_Create_example_request'
      required: true
  examples:
    ImportJob_retrieve_example_response:
      value:
        id: '2341'
        href: https://mycsp.com:8080/tmf-api/productCatalogManagement/v5/importJob/2341
        contentType: application/json
        creationDate: '2020-08-25T00:00:00Z'
        completionDate: '2020-08-25T00:01:31Z'
        path: https://mycsp.com:8080/tmf-api/productCatalogManagement/v5/
        status: Succeeded
        url: ftp://ftp.mycsp.com/productCatalogManagement/1866.json
        errorLog: http://my-platform/logging/errors.log
        '@type': ImportJob
      description: Here is an example of a request for retrieving a specific import job.
    Import_Job_Create_example_response:
      value:
        id: '2341'
        href: https://mycsp.com:8080/tmf-api/productCatalogManagement/v5/importJob/2341
        contentType: application/json
        creationDate: '2020-08-25T00:00:00Z'
        completionDate: '2020-08-25T00:01:31Z'
        path: https://mycsp.com:8080/tmf-api/productCatalogManagement/v5/
        status: Succeeded
        url: ftp://ftp.mycsp.com/productCatalogManagement/1877.json
        errorLog: http://my-platform/logging/errors.log
        '@type': ImportJob
      description: Here is an example of a response for creating an import job.
    ImportJob_list_example_response:
      value:
      - id: '2340'
        href: https://mycsp.com:8080/tmf-api/productCatalogManagement/v5/importJob/2340
        contentType: application/json
        creationDate: '2020-08-25T00:00:00Z'
        completionDate: '2020-08-25T00:00:19Z'
        path: https://mycsp.com:8080/tmf-api/productCatalogManagement/v5/Catalog/
        status: Failed
        url: ftp://ftp.mycsp.com/productCatalogManagement/2544.json
        errorLog: http://my-platform/logging/errors.log
        '@type': ImportJob
      - id: '2341'
        href: https://mycsp.com:8080/tmf-api/productCatalogManagement/v5/importJob/2341
        contentType: application/json
        creationDate: '2020-08-25T00:00:00Z'
        completionDate: '2020-08-25T00:01:31Z'
        path: https://mycsp.com:8080/tmf-api/productCatalogManagement/v5/
        status: Succeeded
        url: ftp://ftp.mycsp.com/productCatalogManagement/1877.json
        errorLog: ''
        '@type': ImportJob
      description: Here is an example of a request for retrieving multiple import jobs.
    Import_Job_Create_example_request:
      value:
        contentType: application/json
        path: https://mycsp.com:8080/tmf-api/productCatalogManagement/v5/
        url: ftp://ftp.mycsp.com/productCatalogManagement/1877.json
        '@type': ImportJob
      description: Here is an example of a request for creating an import job.
  parameters:
    Fields:
      name: fields
      in: query
      description: Comma-separated properties to be provided in response
      schema:
        type: string
    Offset:
      name: offset
      in: query
      description: Requested index for start of resources to be provided in response
      schema:
        type: integer
    Limit:
      name: limit
      in: query
      description: Requested number of resources to be provided in response
      schema:
        type: integer
    Id:
      name: id
      required: true
      schema:
        type: string
      in: path
      description: Identifier of the Resource
  headers:
    X-Total-Count:
      description: Total number of items matching criteria
      schema:
        type: integer
    X-Result-Count:
      description: Actual number of items returned in the response body
      schema:
        type: integer
  schemas:
    Entity_FVO:
      type: object
      description: Base entity schema for use in TMForum Open-APIs. Property.
      allOf:
      - $ref: '#/components/schemas/Extensible_FVO'
      - $ref: '#/components/schemas/Addressable_FVO'
    ImportJob_FVO:
      allOf:
      - $ref: '#/components/schemas/Entity_FVO'
      - type: object
        description: Represents a task used to import resources from a file
        properties:
          completionDate:
            type: string
            format: date-time
            description: Date at which the job was completed
          contentType:
            type: string
            description: Indicates the format of the imported data
          creationDate:
            type: string
            format: date-time
            description: Date at which the job was created
          errorLog:
            type: string
            description: Path to file or stream where errors encountered during the job processing can be written
          path:
            type: string
            description: URL of the root resource where the content of the file specified by the import job must be applied
          status:
            $ref: '#/components/schemas/JobStateType'
          url:
            type: string
            format: uri
            description: URL of the file containing the data to be imported
          id:
            type: string
            description: unique identifier for import job
        required:
        - url
      discriminator:
        propertyName: '@type'
        mapping:
          ImportJob: '#/components/schemas/ImportJob_FVO'
    Addressable:
      type: object
      description: Base schema for adressable entities
      properties:
        href:
          type: string
          description: Hyperlink reference
        id:
          type: string
          description: unique identifier
    Error:
      discriminator:
        propertyName: '@type'
        mapping:
          Error: '#/components/schemas/Error'
      allOf:
      - $ref: '#/components/schemas/Extensible'
      - type: object
        required:
        - code
        - reason
        properties:
          code:
            type: string
            description: Application relevant detail, defined in the API or a common list.
          reason:
            type: string
            description: Explanation of the reason for the error which can be shown to a client user.
          message:
            type: string
            description: More details and corrective actions related to the error which can be shown to a client user.
          status:
            type: string
            description: HTTP Error code extension
          referenceError:
            type: string
            description: URI of documentation describing the error.
      description: Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)
    JobStateType:
      enum:
      - Not Started
      - Running
      - Succeeded
      - Failed
      type: string
      description: Valid values for the state of a batch job (e.g. catalog import)
    Entity:
      type: object
      description: Base entity schema for use in TMForum Open-APIs. Property.
      allOf:
      - $ref: '#/components/schemas/Extensible'
      - $ref: '#/components/schemas/Addressable'
    ImportJob:
      allOf:
      - $ref: '#/components/schemas/Entity'
      - type: object
        description: Represents a task used to import resources from a file
        properties:
          completionDate:
            type: string
            format: date-time
            description: Date at which the job was completed
          contentType:
            type: string
            description: Indicates the format of the imported data
          creationDate:
            type: string
            format: date-time
            description: Date at which the job was created
          errorLog:
            type: string
            description: Path to file or stream where errors encountered during the job processing can be written
          path:
            type: string
            description: URL of the root resource where the content of the file specified by the import job must be applied
          status:
            $ref: '#/components/schemas/JobStateType'
          url:
            type: string
            format: uri
            description: URL of the file containing the data to be imported
          id:
            type: string
            description: unique identifier for import job
      discriminator:
        propertyName: '@type'
        mapping:
          ImportJob: '#/components/schemas/ImportJob'
    Addressable_FVO:
      type: object
      description: Base schema for adressable entities
      properties:
        id:
          type: string
          description: unique identifier
    Extensible:
      type: object
      description: Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema  MUST be extended with the @type
      properties:
        '@type':
          type: string
          description: When sub-classing, this defines the sub-class Extensible name
        '@baseType':
          type: string
          description: When sub-classing, this defines the super-class
        '@schemaLocation':
          type: string
          description: A URI to a JSON-Schema file that defines additional attributes and relationships
      required:
      - '@type'
    Extensible_FVO:
      type: object
      description: Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema  MUST be extended with the @type
      properties:
        '@type':
          type: string
          description: When sub-classing, this defines the sub-class Extensible name
        '@baseType':
          type: string
          description: When sub-classing, this defines the super-class
        '@schemaLocation':
          type: string
          description: A URI to a JSON-Schema file that defines additional attributes and relationships
      required:
      - '@type'