{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/JobDetailsResponseById",
  "title": "JobDetailsResponseById",
  "type": "object",
  "required": [
    "name",
    "id",
    "sourceUserId",
    "sourceCustomerId",
    "targetCustomerId",
    "instanceId",
    "latestExecutionStatus",
    "counts"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "moveusers",
      "description": "Job name."
    },
    "id": {
      "type": "string",
      "example": "Y2lzY29zcGFyazovL3VzL0pPQl9JRC9mZjBlN2Q2Ni05MDRlLTRkZGItYjJlNS05ZGM0ODk0ZDY5OTk",
      "description": "Unique identifier of the job."
    },
    "trackingId": {
      "type": "string",
      "example": "ROUTER_ebb52b5b",
      "description": "d060-4164-9757-48b383423d73` (string, required) - Unique identifier to track the flow of HTTP requests."
    },
    "sourceUserId": {
      "type": "string",
      "example": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS85YzJhMDUxMC0wOTUwLTQ1MmYtODFmZi05YTVkMjM2OTJkZTY",
      "description": "Unique identifier to identify which user has run the job."
    },
    "sourceCustomerId": {
      "type": "string",
      "example": "Y2lzY29zcGFyazovL3VzL09SR0FOSVpBVElPTi8wMjEyNGVlZi04YWY3LTQ4OWMtODA1Yi0zNjNjYzY0MDE4OTM",
      "description": "Unique identifier to identify the customer who has run the job."
    },
    "targetCustomerId": {
      "type": "string",
      "example": "Y2lzY29zcGFyazovL3VzL09SR0FOSVpBVElPTi8wMjEyNGVlZi04YWY3LTQ4OWMtODA1Yi0zNjNjYzY0MDE4OTM",
      "description": "Unique identifier to identify the customer for which the job was run."
    },
    "instanceId": {
      "type": "number",
      "example": 11,
      "description": "Unique identifier to identify the instance of the job."
    },
    "jobExecutionStatus": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/JobExecutionStatusObject"
      },
      "description": "Displays the most recent step's execution status. Contains execution statuses of all the steps involved in the execution of the job."
    },
    "latestExecutionStatus": {
      "type": "string",
      "enum": [
        "STARTING",
        "STARTED",
        "COMPLETED",
        "FAILED",
        "UNKNOWN",
        "ABANDONED"
      ],
      "description": "Most recent status of the job at the time of invocation.\n * `STARTING` - Job has started.\n * `STARTED` - Job is in progress.\n * `COMPLETED` - Job has completed.\n * `FAILED` - Job has failed.\n * `UNKNOWN` - Job status is unknown.\n * `ABANDONED` - Job has been abandoned (manually stopped).\n"
    },
    "latestExecutionExitCode": {
      "type": "string",
      "enum": [
        "UNKNOWN",
        "COMPLETED",
        "FAILED",
        "STOPPED",
        "COMPLETED_WITH_ERRORS",
        "COMPLETED_WITH_PENDING_ORDERS"
      ],
      "description": "Most recent exit code of the job at the time of invocation.\n * `UNKNOWN` - Job is in progress.\n * `COMPLETED` - Job has completed successfully.\n * `FAILED` - Job has failed.\n * `STOPPED` - Job has been stopped.\n * `COMPLETED_WITH_ERRORS` - Job has completed with errors.\n * `COMPLETED_WITH_PENDING_ORDERS` - Job has completed with pending number orders.\n"
    },
    "counts": {
      "$ref": "#/components/schemas/CountObject",
      "description": "Job statistics."
    },
    "csvFile": {
      "type": "string",
      "example": "02124eef-7be6-489c-805b-363cc6401893/cbf865e9-d069-4004-bb57-2a39f5bfb5fe_d1fde6bf944c40ed8ffbab14e6ca6a12",
      "description": "Reference ID for the file that holds the errors and impacts."
    },
    "csvFileExpiryTime": {
      "type": "string",
      "example": "2023-07-12T12:20:33.503Z",
      "description": "Date and time with seconds, the file expires in UTC format."
    },
    "fileFormat": {
      "type": "string",
      "example": "text/csv",
      "description": "Format of the file generated."
    },
    "csvFileDownloadUrl": {
      "type": "string",
      "example": "https://files-int-us-east-1.webexcontent.com/5ab33047-d7ad-42dd-83c5-2e73da63b2ad/8c54b800-10ed-11ee-97c3-a38ed64ceaf4?x-amz-meta-tracking-id=NA_33b1a151-4c47-46a5-8fc5-09f3111c4313&x-amz-meta-user-id=ef2e385f-acad-4e90-8c10-c6532aa0c28d&Expires=1687440028&Signature=ckIcTq-7mUfcdsvSbAR5cUGC76FfyJ6D06~bKXuCrfHkku-eqPsMImRIBCqvWoBRQ1nwGdZk043AFXrwKMxDR9y~GJkzPVAjZwEU3Rr1pK-2aVEDMzP8AVlMYQmJPrmVFlnX8AxDh9YnCeoGUhwUbT~wjyj~NJP3PGfc-hwyXWnFTmdvL3Ehn66z9BQxKksZMOWCyghd~9otoBVC-WyA1Nx2LDOT1qmlLeqN2xwWpdu5Atll0tPUQaOQbCP3-bnOcmL0tR~2gUzfBMUhsW7UO1IPD451va8qcw687~Mglu5VPdpWlIjVXZu6Qk1uCIWSQ0czRDOiFH6RKWtQCD95qw__&Key-Pair-Id=APKAJADAKLCI2FW2U32Q",
      "description": "URL to the CSV file containing errors and impacts."
    }
  }
}