{
  "openapi": "3.0.1",
  "info": {
    "title": "File Export Job",
    "description": "Create and administer file export jobs for a specific export 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 Export Job",
      "description": "Provide RESTful services to manage file export job."
    }
  ],
  "paths": {
    "/file-export-jobs": {
      "get": {
        "tags": [
          "File Export Job"
        ],
        "summary": "Get all file export jobs for a specific export 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 export process. The supported export types:\n* CustomerSegmentExport\n* PromotionCodeExport\n",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "CustomerSegmentExport",
                "PromotionCodeExport"
              ]
            }
          },
          {
            "name": "accessProfile",
            "in": "query",
            "description": "The access profile.",
            "schema": {
              "type": "string",
              "default": "IBM_Admin_Summary"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation is successful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileExportJobCollection"
                }
              }
            },
            "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-request-bod-class": "com.ibm.commerce.content.facade.datatypes.GetFileUploadJobType"
      },
      "post": {
        "tags": [
          "File Export Job"
        ],
        "summary": "Create a file export job for a specific type of file export.",
        "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 export process. The supported export types:\n* CustomerSegmentExport\n* PromotionCodeExport\n",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "CustomerSegmentExport",
                "PromotionCodeExport"
              ]
            }
          },
          {
            "name": "uniqueId",
            "in": "query",
            "description": "If the type of the file export process is PromotionCodeExport, the unique ID is the promotion ID. If the type of the file export process is CustomerSegmentExport, the unique ID is the customer segment ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "exportFileName",
            "in": "query",
            "description": "The name of the exported file. The default is exportFile",
            "schema": {
              "type": "string",
              "default": "exportFile"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The operation is successful.",
            "content": {},
            "headers": {
              "Location": {
                "description": "The URI of the file export job.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "links": {
              "GetFileExportJobsById": {
                "operationRef": "#/paths/~1file-export-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-export-jobs/{id}`.\n"
              },
              "GetDataByFileExportJobsId": {
                "operationRef": "#/paths/~1file-export-jobs~1{id}~1data/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-export-jobs/{id}/data`.\n"
              },
              "DeleteDataByFileExportJobsId": {
                "operationRef": "#/paths/~1file-export-jobs~1{id}~1data/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-export-jobs/{id}/data`.\n"
              }
            },
            "x-entity-path": "uploadFileId"
          }
        },
        "x-flow-class": "com.ibm.commerce.rest.admin.v2.content.FileExportJobCommandFlow"
      }
    },
    "/file-export-jobs/{id}": {
      "get": {
        "tags": [
          "File Export Job"
        ],
        "summary": "Get a file export 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 export 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/FileExportJob"
                }
              }
            },
            "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"
      }
    },
    "/file-export-jobs/{id}/data": {
      "get": {
        "tags": [
          "File Export Job"
        ],
        "summary": "Get the data exported from a file export 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 export job.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation is successful.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-flow-class": "com.ibm.commerce.rest.admin.v2.content.FileExportJobCommandFlow"
      },
      "delete": {
        "tags": [
          "File Export Job"
        ],
        "summary": "Delete a file export 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 export 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": {
      "FileExportJob": {
        "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 exported.",
            "format": "date-time",
            "x-entity-path": "uploadFile/uploadTime"
          },
          "fileName": {
            "type": "string",
            "description": "The name of the exported file.",
            "x-entity-path": "uploadFile/fileInfo/fileName"
          },
          "id": {
            "type": "integer",
            "description": "The unique numeric ID for identifying the file export job.",
            "format": "int64",
            "x-entity-path": "fileUploadJobIdentifier/uniqueID"
          },
          "jobEndDateTime": {
            "type": "string",
            "description": "The date and time that the file export job ended.",
            "format": "date-time",
            "x-entity-path": "processFile/endTime"
          },
          "jobStartDateTime": {
            "type": "string",
            "description": "The date and time that the file export job started.",
            "format": "date-time",
            "x-entity-path": "processFile/startTime"
          },
          "jobStatus": {
            "type": "string",
            "description": "The status of the file export 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 exported 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 export process. Available values:\n* CustomerSegmentExport\n* PromotionCodeExport\n",
            "enum": [
              "CustomerSegmentExport",
              "PromotionCodeExport"
            ],
            "x-entity-path": "uploadType"
          },
          "userName": {
            "type": "string",
            "description": "The name of the user that exported the file.",
            "x-entity-path": "uploadFile/userName"
          }
        },
        "description": "The details of file export job.",
        "x-entity-class": "com.ibm.commerce.content.facade.datatypes.FileUploadJobType"
      },
      "FileExportJobCollection": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileExportJob"
            }
          }
        },
        "description": "The collection of file export jobs."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "x-components": {}
}
