{
  "openapi": "3.0.1",
  "info": {
    "title": "File Upload Job",
    "description": "Create and administer file upload jobs for a specific upload type.",
    "version": "9.1.20.0",
    "x-introduced": "9.1.0.0"
  },
  "servers": [
    {
      "url": "https://{hostname}:{port}/rest/admin/v2",
      "variables": {
        "port": {
          "default": "443",
          "enum": [
            "443",
            "8000"
          ]
        },
        "hostname": {
          "default": "localhost",
          "enum": [
            "localhost",
            "test.hcl.com"
          ]
        }
      }
    }
  ],
  "tags": [
    {
      "name": "File Upload Job",
      "description": "Provide RESTful services to manage file upload job resources."
    }
  ],
  "paths": {
    "/file-upload-jobs": {
      "get": {
        "tags": [
          "File Upload Job"
        ],
        "summary": "Get all file upload jobs for a specific upload type",
        "parameters": [
          {
            "name": "storeId",
            "in": "query",
            "description": "The unique numeric ID for identifying the store.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "x-context-data": "storeId"
            },
            "x-context-data": "storeId"
          },
          {
            "name": "type",
            "in": "query",
            "description": "The type of the file upload process. The supported upload types:\n* CatalogImport\n* CatalogFilterImport\n* PriceListImport\n* PromotionCodeImport\n* InventoryImport (x-introduced: 9.1.14.0+)\n",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "CatalogImport",
                "CatalogFilterImport",
                "PriceListImport",
                "PromotionCodeImport",
                "InventoryImport"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation is successful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUploadJobCollection"
                }
              }
            },
            "x-entity-path": "dataArea/fileUploadJob"
          }
        },
        "x-expression-template": "{_wcf.ap='{accessProfile}'}/FileUploadJob[UploadType='{type}']",
        "x-facade-client-class": "com.ibm.commerce.content.facade.client.ContentFacadeClient",
        "x-facade-client-method": "getFileUploadJob",
        "x-flow-class": "com.ibm.commerce.rest.admin.v2.content.FileUploadJobGetBodMappingFlow",
        "x-request-bod-class": "com.ibm.commerce.content.facade.datatypes.GetFileUploadJobType"
      },
      "post": {
        "tags": [
          "File Upload Job"
        ],
        "summary": "Create a file upload job for a specific type of file upload.",
        "parameters": [
          {
            "name": "storeId",
            "in": "query",
            "description": "The unique numeric ID for identifying the store.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "x-context-data": "storeId"
            },
            "x-context-data": "storeId"
          },
          {
            "name": "type",
            "in": "query",
            "description": "The type of the file upload process. The supported upload types:\n* CatalogImport\n* CatalogFilterImport\n* PriceListImport\n* PromotionCodeImport\n* InventoryImport (x-introduced: 9.1.14.0+)\n",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "CatalogImport",
                "CatalogFilterImport",
                "PriceListImport",
                "PromotionCodeImport",
                "InventoryImport"
              ]
            }
          },
          {
            "name": "uniqueId",
            "in": "query",
            "description": "If the type of the file upload process is CatalogImport, the unique ID is the catalog ID. For PriceListImport, the unique ID is the price list ID. If uniqueId is not specified, either the default catalog ID or price list ID for the store will be used.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "characterSet",
            "in": "query",
            "description": "The encoding of the file to be uploaded. The default is UTF-8",
            "schema": {
              "type": "string",
              "default": "UTF-8"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "body": {}
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The operation is successful.",
            "content": {},
            "headers": {
              "Location": {
                "description": "The URI of the file upload job.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "links": {
              "GetFileUploadJobsById": {
                "operationRef": "#/paths/~1file-upload-jobs~1{id}/get",
                "parameters": {
                  "id": "$response.header.Location"
                },
                "description": "The `id` value used in the request body can be used as the `id` parameter in `GET /file-upload-jobs/{id}`.\n"
              },
              "DeleteFileUploadJobsById": {
                "operationRef": "#/paths/~1file-upload-jobs~1{id}/delete",
                "parameters": {
                  "id": "$response.header.Location"
                },
                "description": "The `id` value used in the request body can be used as the `id` parameter in `DELETE /file-upload-jobs/{id}`.\n"
              }
            },
            "x-entity-path": "uploadFileId"
          }
        },
        "x-flow-class": "com.ibm.commerce.rest.admin.v2.content.FileUploadJobCommandFlow"
      }
    },
    "/file-upload-jobs/{id}": {
      "get": {
        "tags": [
          "File Upload Job"
        ],
        "summary": "Get a file upload job details by ID.",
        "parameters": [
          {
            "name": "storeId",
            "in": "query",
            "description": "The unique numeric ID for identifying the store.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "x-context-data": "storeId"
            },
            "x-context-data": "storeId"
          },
          {
            "name": "id",
            "in": "path",
            "description": "The unique numeric ID for identifying the file upload job.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "x-entity-path": "dataArea/fileUploadJob[1]/fileUploadJobIdentifier/uniqueID"
            },
            "x-entity-path": "dataArea/fileUploadJob[1]/fileUploadJobIdentifier/uniqueID"
          },
          {
            "name": "accessProfile",
            "in": "query",
            "description": "The access profile.",
            "schema": {
              "type": "string",
              "default": "IBM_Admin_Details"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation is successful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUploadJob"
                }
              }
            },
            "x-entity-path": "dataArea/fileUploadJob[1]"
          }
        },
        "x-expression-template": "{_wcf.ap={accessProfile}}/FileUploadJob[FileUploadJobIdentifier[UniqueID='{id}']]",
        "x-facade-client-class": "com.ibm.commerce.content.facade.client.ContentFacadeClient",
        "x-facade-client-method": "getFileUploadJob",
        "x-request-bod-class": "com.ibm.commerce.content.facade.datatypes.GetFileUploadJobType"
      },
      "delete": {
        "tags": [
          "File Upload Job"
        ],
        "summary": "Delete a file upload job",
        "parameters": [
          {
            "name": "storeId",
            "in": "query",
            "description": "The unique numeric ID for identifying the store.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "x-context-data": "storeId"
            },
            "x-context-data": "storeId"
          },
          {
            "name": "id",
            "in": "path",
            "description": "The unique numeric ID for identifying the file upload job.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "x-entity-path": "dataArea/fileUploadJob[1]/fileUploadJobIdentifier/uniqueID"
            },
            "x-entity-path": "dataArea/fileUploadJob[1]/fileUploadJobIdentifier/uniqueID"
          }
        ],
        "responses": {
          "204": {
            "description": "The operation is successful",
            "content": {}
          }
        },
        "x-action-code": "Delete",
        "x-expression-template": "/FileUploadJob[1]",
        "x-facade-client-class": "com.ibm.commerce.content.facade.client.ContentFacadeClient",
        "x-facade-client-method": "processFileUploadJob",
        "x-request-bod-class": "com.ibm.commerce.content.facade.datatypes.ProcessFileUploadJobType"
      }
    }
  },
  "components": {
    "schemas": {
      "FileUploadJob": {
        "type": "object",
        "properties": {
          "characterSet": {
            "type": "string",
            "description": "The encoding of the file to be uploaded. The default is UTF-8.",
            "default": "UTF-8",
            "x-entity-path": "uploadFile/fileInfo/fileEncoding"
          },
          "dateTime": {
            "type": "string",
            "description": "The date and time that the file was uploaded.",
            "format": "date-time",
            "x-entity-path": "uploadFile/uploadTime"
          },
          "fileName": {
            "type": "string",
            "description": "The name of the uploaded file.",
            "x-entity-path": "uploadFile/fileInfo/fileName"
          },
          "id": {
            "type": "integer",
            "description": "The unique numeric ID for identifying the file upload job.",
            "format": "int64",
            "x-entity-path": "fileUploadJobIdentifier/uniqueID"
          },
          "jobEndDateTime": {
            "type": "string",
            "description": "The date and time that the file upload job ended.",
            "format": "date-time",
            "x-entity-path": "processFile/endTime"
          },
          "jobStartDateTime": {
            "type": "string",
            "description": "The date and time that the file upload job started.",
            "format": "date-time",
            "x-entity-path": "processFile/startTime"
          },
          "jobStatus": {
            "type": "string",
            "description": "The status of the file upload job. Available values:\n* Canceled\n* Complete\n* Failed\n* New\n* Processing\n",
            "enum": [
              "Canceled",
              "Complete",
              "Failed",
              "New",
              "Processing"
            ],
            "x-entity-path": "processFile/status"
          },
          "path": {
            "type": "string",
            "description": "The full path of the uploaded file.",
            "x-entity-path": "uploadFile/fileInfo/filePath"
          },
          "size": {
            "type": "integer",
            "description": "The file size (in bytes).",
            "format": "int64",
            "x-entity-path": "uploadFile/fileInfo/fileSize"
          },
          "summaryReport": {
            "type": "string",
            "description": "The summary report of the file processing information.",
            "x-entity-path": "processFile/processInfo"
          },
          "type": {
            "type": "string",
            "description": "The type of the file upload process. Available values:\n* CatalogImport\n* CatalogFilterImport\n* PriceListImport\n* PromotionCodeImport\n* InventoryImport (x-introduced: 9.1.14.0+)\n",
            "enum": [
              "CatalogImport",
              "CatalogFilterImport",
              "PriceListImport",
              "PromotionCodeImport",
              "InventoryImport"
            ],
            "x-entity-path": "uploadType"
          },
          "userName": {
            "type": "string",
            "description": "The name of the user that uploaded the file.",
            "x-entity-path": "uploadFile/userName"
          }
        },
        "description": "The details of file upload job.",
        "x-entity-class": "com.ibm.commerce.content.facade.datatypes.FileUploadJobType"
      },
      "FileUploadJobCollection": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileUploadJob"
            }
          }
        },
        "description": "The collection of file upload jobs."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "x-components": {}
}
