﻿{
  "openapi": "3.0.4",
  "info": {
    "title": "Relativity.ARM.Services.Interfaces",
    "description": "Relativity.ARM.Services.Interfaces",
    "version": "V3"
  },
  "servers": [
    {
      "url": "/Relativity.REST/api",
      "description": "The URL prefix for all Kepler services"
    }
  ],
  "paths": {
    "/relativity-arm/v3/archive-jobs": {
      "post": {
        "tags": [
          "ArchiveJobs"
        ],
        "summary": "Asynchronously creates an instance of an Archive Job.",
        "requestBody": {
          "description": "Archive job request containing workspace ID, archive directory, and configuration",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArchiveJobRequestWrapper"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ArchiveJobRequestWrapper"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ArchiveJobRequestWrapper"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Archive job created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateArchiveJobResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/relativity-arm/v3/archive-jobs/{jobID}": {
      "get": {
        "tags": [
          "ArchiveJobs"
        ],
        "summary": "Asynchronously read an instance of an Archive Job.",
        "parameters": [
          {
            "name": "jobID",
            "in": "path",
            "description": "Archive job identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archive job retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArchiveJobResponse"
                }
              }
            }
          },
          "404": {
            "description": "Archive job not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "put": {
        "tags": [
          "ArchiveJobs"
        ],
        "summary": "Asynchronously updates an instance of an Archive Job.",
        "parameters": [
          {
            "name": "jobID",
            "in": "path",
            "description": "Archive job identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Updated archive job configuration",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArchiveJobRequestWrapper"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ArchiveJobRequestWrapper"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ArchiveJobRequestWrapper"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Archive job updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateArchiveJobResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Archive job not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "delete": {
        "tags": [
          "ArchiveJobs"
        ],
        "summary": "Asynchronously deletes an instance of an Archive Job.",
        "parameters": [
          {
            "name": "jobID",
            "in": "path",
            "description": "Archive job identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archive job deleted successfully"
          },
          "404": {
            "description": "Archive job not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/relativity-arm/v3/archive-jobs/directories": {
      "get": {
        "tags": [
          "ArchiveJobs"
        ],
        "summary": "Asynchronously gets the archive storage directory tree available for Archive Jobs.",
        "responses": {
          "200": {
            "description": "Archive directories retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArchiveDirectoriesResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/relativity-arm/v3/jobs/{jobID}/cancel": {
      "post": {
        "tags": [
          "JobActions"
        ],
        "summary": "Asynchronously cancels a running job.",
        "parameters": [
          {
            "name": "jobID",
            "in": "path",
            "description": "Job identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Cancel job request with optional parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelJobRequestWrapper"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelJobRequestWrapper"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelJobRequestWrapper"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Job cancellation initiated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelJobResponse"
                }
              }
            }
          },
          "404": {
            "description": "Job not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/relativity-arm/v3/jobs/{jobID}/run": {
      "post": {
        "tags": [
          "JobActions"
        ],
        "summary": "Asynchronously runs a job.",
        "parameters": [
          {
            "name": "jobID",
            "in": "path",
            "description": "Job identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Run job request with optional parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunJobRequestWrapper"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RunJobRequestWrapper"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RunJobRequestWrapper"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Job execution initiated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunJobResponse"
                }
              }
            }
          },
          "404": {
            "description": "Job not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/relativity-arm/v3/jobs/{jobID}/status": {
      "get": {
        "tags": [
          "JobInformation"
        ],
        "summary": "Asynchronously retrieves the current status and progress of a job.",
        "parameters": [
          {
            "name": "jobID",
            "in": "path",
            "description": "Job identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Job status retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobProgressResponse"
                }
              }
            }
          },
          "404": {
            "description": "Job not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/relativity-arm/v3/jobs/{jobID}/statistics": {
      "get": {
        "tags": [
          "JobInformation"
        ],
        "summary": "Gets composition statistics for a completed ARM job.\r\nReturns per-migrator item counts for archive and restore jobs.",
        "parameters": [
          {
            "name": "jobID",
            "in": "path",
            "description": "Job identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Statistics retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatisticsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Job has not yet completed. Statistics are only available for completed jobs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Job not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/relativity-arm/v3/jobs/list": {
      "post": {
        "tags": [
          "JobList"
        ],
        "summary": "Asynchronously retrieves a page of ARM jobs for the requested view.",
        "requestBody": {
          "description": "View selection plus optional pagination parameters.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobListRequestWrapper"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/JobListRequestWrapper"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/JobListRequestWrapper"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Job list retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/relativity-arm/v3/restore-jobs": {
      "post": {
        "tags": [
          "RestoreJobs"
        ],
        "summary": "Asynchronously creates an instance of a Restore Job.",
        "requestBody": {
          "description": "Restore job request containing workspace ID, restore directory, and configuration",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreJobRequestWrapper"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreJobRequestWrapper"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreJobRequestWrapper"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Restore job created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateRestoreJobResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/relativity-arm/v3/restore-jobs/{jobID}": {
      "get": {
        "tags": [
          "RestoreJobs"
        ],
        "summary": "Asynchronously read an instance of a Restore Job.",
        "parameters": [
          {
            "name": "jobID",
            "in": "path",
            "description": "Restore job identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Restore job retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestoreJobResponse"
                }
              }
            }
          },
          "404": {
            "description": "Restore job not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "put": {
        "tags": [
          "RestoreJobs"
        ],
        "summary": "Asynchronously updates an instance of a Restore Job.",
        "parameters": [
          {
            "name": "jobID",
            "in": "path",
            "description": "Restore job identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Updated restore job configuration",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreJobRequestWrapper"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreJobRequestWrapper"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreJobRequestWrapper"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Restore job updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateRestoreJobResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Restore job not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "delete": {
        "tags": [
          "RestoreJobs"
        ],
        "summary": "Asynchronously deletes an instance of a Restore Job.",
        "parameters": [
          {
            "name": "jobID",
            "in": "path",
            "description": "Restore job identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Restore job deleted successfully"
          },
          "404": {
            "description": "Restore job not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/relativity-arm/v3/restore-jobs/available-archives": {
      "post": {
        "tags": [
          "RestoreJobs"
        ],
        "summary": "Asynchronously retrieves a cursor-paged list of archives available for restore.",
        "requestBody": {
          "description": "Request containing an optional continuation token and page size",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AvailableArchivesRequestWrapper"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AvailableArchivesRequestWrapper"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AvailableArchivesRequestWrapper"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Available archives retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailableArchivesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ArchiveDirectoriesResponse": {
        "type": "object",
        "properties": {
          "roots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArchiveDirectoryRootNode"
            },
            "description": "Gets or sets the root nodes of the directory tree, each with its immediate subdirectories.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response with the archive storage directory tree (two levels: roots with their immediate subdirectories)."
      },
      "ArchiveDirectoryNode": {
        "type": "object",
        "properties": {
          "displayPath": {
            "type": "string",
            "description": "Gets or sets the full UNC path of the directory.",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "description": "Gets or sets the directory name displayed to the user.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A leaf node of the archive storage directory tree (immediate child of a root node)."
      },
      "ArchiveDirectoryRootNode": {
        "type": "object",
        "properties": {
          "displayPath": {
            "type": "string",
            "description": "Gets or sets the full UNC path of the directory.",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "description": "Gets or sets the directory name displayed to the user.",
            "nullable": true
          },
          "children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArchiveDirectoryNode"
            },
            "description": "Gets or sets the immediate subdirectories of this root.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a root node of the archive directory tree with its immediate subdirectories."
      },
      "ArchiveJobRequest": {
        "type": "object",
        "properties": {
          "workspaceID": {
            "type": "integer",
            "description": "Gets or sets the Workspace id.",
            "format": "int32"
          },
          "archiveDirectory": {
            "type": "string",
            "description": "Gets or sets ARM Archive Directory",
            "nullable": true
          },
          "scheduledStartTime": {
            "type": "string",
            "description": "Gets or sets scheduled start time.",
            "format": "date-time",
            "nullable": true
          },
          "jobPriority": {
            "$ref": "#/components/schemas/JobPriority"
          },
          "excludedMigrators": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Gets or sets the list of migrators to exclude from execution.\r\nIf null or empty, all available migrators execute with default parameters.",
            "nullable": true,
            "example": [
              "ExtensionData",
              "Invariant",
              "RepositoryFiles",
              "NonRepositoryFiles",
              "dtIndex",
              "analytics-core",
              "StructuredAnalytics",
              "Audit",
              "Database"
            ]
          },
          "migratorOptions": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            },
            "description": "Gets or sets generic per-migrator configuration.\r\nKey = migrator name\r\nValue = JSON  with migrator-specific parameters.\r\nIf a migrator is not listed here, it runs with defaults.\r\nIf null, all non-excluded migrators use default configuration.",
            "nullable": true,
            "example": {
              "Common": {
                "FileFirstFlow": {
                  "IsFilesFirstFlow": true,
                  "AdditionalFilesDirectoryPath": "path"
                }
              },
              "Invariant": {
                "IncludeProcessingFiles": true
              }
            }
          },
          "notificationOptions": {
            "$ref": "#/components/schemas/NotificationOptions"
          },
          "uiJobActionsLocked": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether this job ui actions are locked"
          }
        },
        "additionalProperties": false,
        "description": "Request to create new Archive job"
      },
      "ArchiveJobRequestWrapper": {
        "type": "object",
        "properties": {
          "request": {
            "$ref": "#/components/schemas/ArchiveJobRequest"
          }
        },
        "additionalProperties": false,
        "description": "Request to create new Archive job"
      },
      "ArchiveJobResponse": {
        "type": "object",
        "properties": {
          "jobID": {
            "type": "string",
            "description": "Gets or sets the Job id.",
            "nullable": true
          },
          "jobName": {
            "type": "string",
            "description": "Gets or sets the Job name.",
            "nullable": true
          },
          "archivePath": {
            "type": "string",
            "description": "Gets or sets the path to the archive.",
            "nullable": true
          },
          "workspaceID": {
            "type": "integer",
            "description": "Gets or sets the Workspace id.",
            "format": "int32"
          },
          "scheduledStartTime": {
            "type": "string",
            "description": "Gets or sets scheduled start time.",
            "format": "date-time",
            "nullable": true
          },
          "jobDetails": {
            "$ref": "#/components/schemas/JobDetails"
          },
          "excludedMigrators": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Gets or sets the migrators excluded from this archive job.",
            "nullable": true
          },
          "migratorOptions": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            },
            "description": "Gets or sets per-migrator configuration used for this job.\r\nKey = migrator name,\r\nValue = JSON  with migrator-specific parameters.",
            "nullable": true
          },
          "notificationOptions": {
            "$ref": "#/components/schemas/NotificationOptions"
          },
          "uiJobActionsLocked": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether this job ui actions are locked."
          }
        },
        "additionalProperties": false,
        "description": "Response with Archive Job"
      },
      "AvailableArchiveItem": {
        "type": "object",
        "properties": {
          "formattedName": {
            "type": "string",
            "description": "Gets or sets the formatted display name of the archive.",
            "nullable": true
          },
          "fullPath": {
            "type": "string",
            "description": "Gets or sets the full file-system path to the archive.",
            "nullable": true
          },
          "archiveInUse": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the archive is currently in use by another job."
          }
        },
        "additionalProperties": false,
        "description": "Represents an archive available for restore."
      },
      "AvailableArchivesRequest": {
        "type": "object",
        "properties": {
          "continuationToken": {
            "type": "string",
            "description": "Gets or sets the continuation token from the previous response; omit or null to start from the first page.",
            "nullable": true
          },
          "pageSize": {
            "type": "integer",
            "description": "Gets or sets the maximum number of items per page. Null defaults to 25. Valid range: 1–100.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request for listing archives available for restore."
      },
      "AvailableArchivesRequestWrapper": {
        "type": "object",
        "properties": {
          "request": {
            "$ref": "#/components/schemas/AvailableArchivesRequest"
          }
        },
        "additionalProperties": false,
        "description": "Request body for the available archives endpoint."
      },
      "AvailableArchivesResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailableArchiveItem"
            },
            "description": "Gets or sets the archives in the current page.",
            "nullable": true
          },
          "continuationToken": {
            "type": "string",
            "description": "Gets or sets the continuation token to pass in the next request to fetch the next page; null when this is the last page.",
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScanWarning"
            },
            "description": "Gets or sets containers whose scan was truncated due to the configured non-archive-candidate cap. Empty when nothing was truncated.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Paged response containing archives available for restore."
      },
      "CancelJobRequest": {
        "type": "object",
        "additionalProperties": false,
        "description": "Request for cancelling an ARM Job"
      },
      "CancelJobRequestWrapper": {
        "type": "object",
        "properties": {
          "request": {
            "$ref": "#/components/schemas/CancelJobRequest"
          }
        },
        "additionalProperties": false,
        "description": "Request for cancelling an ARM Job"
      },
      "CancelJobResponse": {
        "type": "object",
        "additionalProperties": false,
        "description": "Response for cancelling an ARM Job"
      },
      "CreateArchiveJobResponse": {
        "type": "object",
        "properties": {
          "jobID": {
            "type": "string",
            "description": "Gets or sets the created Job id.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for Archive Job creation"
      },
      "CreateRestoreJobResponse": {
        "type": "object",
        "properties": {
          "jobID": {
            "type": "string",
            "description": "Gets or sets the created Job id.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for Restore Job creation"
      },
      "CurrentPhase": {
        "type": "object",
        "properties": {
          "phase": {
            "$ref": "#/components/schemas/Phase"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "progress": {
            "type": "number",
            "description": "Completion of the current phase as a fraction between 0 and 1 (mean of the phase's stage progress).",
            "format": "float"
          }
        },
        "additionalProperties": false,
        "description": "The phase (stage) an ARM job is currently in."
      },
      "JobActions": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "UTC date and time when the action was performed.",
            "format": "date-time"
          },
          "type": {
            "type": "string",
            "description": "Type of action performed",
            "nullable": true
          },
          "userName": {
            "type": "string",
            "description": "User who performed the action",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents an action performed on a job"
      },
      "JobDetails": {
        "type": "object",
        "properties": {
          "priority": {
            "$ref": "#/components/schemas/JobPriority"
          },
          "actionsHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobActions"
            },
            "description": "Gets or sets job action history.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "ARM Job details"
      },
      "JobListItem": {
        "type": "object",
        "properties": {
          "jobID": {
            "type": "string",
            "description": "Unique job identifier.",
            "nullable": true
          },
          "jobName": {
            "type": "string",
            "description": "Display name of the job.",
            "nullable": true
          },
          "jobPriority": {
            "$ref": "#/components/schemas/JobPriority"
          },
          "jobState": {
            "$ref": "#/components/schemas/JobProgressStatus"
          },
          "jobType": {
            "$ref": "#/components/schemas/JobType"
          },
          "timeElapsed": {
            "type": "string",
            "description": "Elapsed execution time in `dd:hh:mm:ss` format (e.g. `\"00:00:11:38\"`); null when the job has not started.",
            "nullable": true
          },
          "workspaceID": {
            "type": "integer",
            "description": "Artifact ID of the workspace associated with the job: the source workspace for archive and move jobs, the destination workspace for restore jobs.",
            "format": "int32",
            "nullable": true
          },
          "actionsHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobActions"
            },
            "description": "Ordered history of actions performed on this job.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a single ARM job in a job list response."
      },
      "JobListRequest": {
        "type": "object",
        "properties": {
          "view": {
            "$ref": "#/components/schemas/JobViewType"
          },
          "continuationToken": {
            "type": "string",
            "description": "Opaque token from the previous response; omit on the first request.",
            "nullable": true
          },
          "pageSize": {
            "type": "integer",
            "description": "Number of jobs per page (1–1000). Defaults to 100 when null.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for retrieving a page of ARM jobs."
      },
      "JobListRequestWrapper": {
        "type": "object",
        "properties": {
          "request": {
            "$ref": "#/components/schemas/JobListRequest"
          }
        },
        "additionalProperties": false,
        "description": "Request body for the job list endpoint."
      },
      "JobListResponse": {
        "type": "object",
        "properties": {
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobListItem"
            },
            "description": "Collection of jobs matching the requested view.",
            "nullable": true
          },
          "jobView": {
            "$ref": "#/components/schemas/JobViewType"
          },
          "continuationToken": {
            "type": "string",
            "description": "Opaque token to pass as `continuationToken` on the next request to retrieve the next page;\r\nnull when there are no more results.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response containing a list of ARM jobs for a given view."
      },
      "JobPriority": {
        "enum": [
          "Low",
          "Medium",
          "High"
        ],
        "type": "string",
        "description": "Job priority levels"
      },
      "JobProgressResponse": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "description": "Unique identifier of the job.",
            "nullable": true
          },
          "jobState": {
            "$ref": "#/components/schemas/JobProgressStatus"
          },
          "timeElapsed": {
            "type": "string",
            "description": "Total time the job has spent running in `dd:hh:mm:ss` format (e.g. `\"00:00:00:00\"` for a not-yet-started job).",
            "nullable": true
          },
          "currentPhase": {
            "$ref": "#/components/schemas/CurrentPhase"
          }
        },
        "additionalProperties": false,
        "description": "Response containing job progress information."
      },
      "JobProgressStatus": {
        "enum": [
          "NotStarted",
          "InProgress",
          "Paused",
          "Cancelling",
          "Cancelled",
          "Errored",
          "Completed"
        ],
        "type": "string",
        "description": "Job progress status values"
      },
      "JobStatisticsResponse": {
        "type": "object",
        "properties": {
          "jobID": {
            "type": "string",
            "description": "Echo of the requested job identifier.",
            "nullable": true
          },
          "migrators": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MigratorStatisticsEntry"
            },
            "description": "One entry per migrator that produced statistics for this job.\r\nMigrators not applicable to this job type or configuration are not included.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Job composition statistics."
      },
      "JobType": {
        "enum": [
          "Archive",
          "Restore",
          "DatabaseRestore"
        ],
        "type": "string",
        "description": "ARM job execution type. `DatabaseRestore` is obsolete and will be removed in a future version."
      },
      "JobViewType": {
        "enum": [
          "Transient",
          "Completed",
          "All"
        ],
        "type": "string",
        "description": "Determines which subset of jobs to include in a list response."
      },
      "MigratorStatisticsEntry": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "description": "Human-readable content type name.",
            "nullable": true
          },
          "sourceItemsCount": {
            "type": "integer",
            "description": "Items in source workspace or archive before the job ran.",
            "format": "int64",
            "nullable": true
          },
          "destinationItemsCount": {
            "type": "integer",
            "description": "Items that reached the destination, counted after the job finished.",
            "format": "int64",
            "nullable": true
          },
          "missingItemsCount": {
            "type": "integer",
            "description": "Items present in source but not found on disk. Null if not tracked by this migrator.",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Statistics for a single migrator that participated in an ARM job."
      },
      "NotificationOptions": {
        "type": "object",
        "properties": {
          "notifyJobRunner": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether to notify both creator and runner.\r\nWhen true, notifications are sent to both creator and executor."
          },
          "additionalRecipients": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Gets or sets the list of additional recipient emails.\r\nWhen null or empty, no additional recipients are notified and global recipients are not merged.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "ARM Job notification options"
      },
      "Phase": {
        "enum": [
          "Validating",
          "Executing",
          "Reporting"
        ],
        "type": "string",
        "description": "High-level phase of an ARM job. A job progresses through these phases in order."
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "RestoreDestinationOptions": {
        "type": "object",
        "properties": {
          "matterID": {
            "type": "integer",
            "description": "Gets or sets a matter that the restored workspace will use.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "V3 Restore Job destination options"
      },
      "RestoreJobRequest": {
        "type": "object",
        "properties": {
          "archivePath": {
            "type": "string",
            "description": "Gets or sets path to the archive",
            "nullable": true
          },
          "jobPriority": {
            "$ref": "#/components/schemas/JobPriority"
          },
          "scheduledStartTime": {
            "type": "string",
            "description": "Gets or sets scheduled start time.",
            "format": "date-time",
            "nullable": true
          },
          "existingTargetDatabase": {
            "type": "string",
            "description": "Gets or sets existing target database.\r\nRequired if archive doesn't have a database backup",
            "nullable": true
          },
          "destinationOptions": {
            "$ref": "#/components/schemas/RestoreDestinationOptions"
          },
          "migratorOptions": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            },
            "description": "Gets or sets generic per-migrator configuration.\r\nValue = JSON string with migrator-specific parameters.\r\nIf null, all migrators use default configuration.",
            "nullable": true
          },
          "notificationOptions": {
            "$ref": "#/components/schemas/NotificationOptions"
          },
          "uiJobActionsLocked": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether this job ui actions are locked"
          }
        },
        "additionalProperties": false,
        "description": "Request to create new Restore job V3"
      },
      "RestoreJobRequestWrapper": {
        "type": "object",
        "properties": {
          "request": {
            "$ref": "#/components/schemas/RestoreJobRequest"
          }
        },
        "additionalProperties": false,
        "description": "Request to create new Restore job V3"
      },
      "RestoreJobResponse": {
        "type": "object",
        "properties": {
          "jobID": {
            "type": "string",
            "description": "Gets or sets the Job id.",
            "nullable": true
          },
          "jobName": {
            "type": "string",
            "description": "Gets or sets the Job name.",
            "nullable": true
          },
          "archivePath": {
            "type": "string",
            "description": "Gets or sets the path to the archive.",
            "nullable": true
          },
          "scheduledStartTime": {
            "type": "string",
            "description": "Gets or sets scheduled start time.",
            "format": "date-time",
            "nullable": true
          },
          "sourceWorkspace": {
            "type": "string",
            "description": "Gets or sets the name of the source workspace.",
            "nullable": true
          },
          "destinationWorkspaceID": {
            "type": "integer",
            "description": "Gets or sets a destination workspace artifact id.",
            "format": "int32",
            "nullable": true
          },
          "existingTargetDatabase": {
            "type": "string",
            "description": "Gets or sets existing target database.",
            "nullable": true
          },
          "jobDetails": {
            "$ref": "#/components/schemas/JobDetails"
          },
          "destinationOptions": {
            "$ref": "#/components/schemas/RestoreDestinationOptions"
          },
          "migratorOptions": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            },
            "description": "Gets or sets generic per-migrator configuration.\r\nValue = JSON string with migrator-specific parameters.\r\nIf null, all migrators use default configuration.",
            "nullable": true
          },
          "notificationOptions": {
            "$ref": "#/components/schemas/NotificationOptions"
          },
          "uiJobActionsLocked": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether this job ui actions are locked."
          }
        },
        "additionalProperties": false,
        "description": "Response with Restore Job V3"
      },
      "RunJobRequest": {
        "type": "object",
        "additionalProperties": false,
        "description": "Request for running an ARM Job"
      },
      "RunJobRequestWrapper": {
        "type": "object",
        "properties": {
          "request": {
            "$ref": "#/components/schemas/RunJobRequest"
          }
        },
        "additionalProperties": false,
        "description": "Request for running an ARM Job"
      },
      "RunJobResponse": {
        "type": "object",
        "additionalProperties": false,
        "description": "Response for running an ARM Job"
      },
      "ScanWarning": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Gets or sets the full path of the container or staging folder this warning is about.",
            "nullable": true
          },
          "scannedCount": {
            "type": "integer",
            "description": "Gets or sets how many entries were scanned before a truncated scan stopped; 0 for a skipped staging folder.",
            "format": "int32"
          },
          "warningType": {
            "type": "string",
            "description": "Gets or sets \"Truncated\" or \"FilesFirstFlowFolderSkipped\".",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Either a container whose archive scan was truncated because it exceeded the configured cap on\r\nnon-archive subdirectories, or a Files First Flow staging folder (`EDDS<workspaceArtifactId>`)\r\nfound and skipped during discovery. See Relativity.ARM.Services.Interfaces.V3.Models.Restore.ScanWarning.WarningType."
      },
      "Status": {
        "enum": [
          "NotStarted",
          "Queued",
          "InProgress",
          "Completed",
          "Errored"
        ],
        "type": "string",
        "description": "Progress status of a job phase or stage."
      },
      "UpdateArchiveJobResponse": {
        "type": "object",
        "additionalProperties": false,
        "description": "Response for Archive Job update"
      },
      "UpdateRestoreJobResponse": {
        "type": "object",
        "additionalProperties": false,
        "description": "Response for Restore Job update"
      }
    }
  },
  "tags": [
    {
      "name": "ArchiveJobs"
    },
    {
      "name": "JobActions"
    },
    {
      "name": "JobInformation"
    },
    {
      "name": "JobList"
    },
    {
      "name": "RestoreJobs"
    }
  ]
}