Source Record Storage Async Migrations API (v1.0)

http://localhost

Table of contents

Source Record Storage Migration Jobs API

API for managing asynchronous migration jobs

Async migrations

API for managing async migration jobs

POST /source-storage/migrations/jobs

Initiate a migration job

POST /source-storage/migrations/jobs
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Request to initialize asynchronous migration job",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "migrations": {
      "description": "Names of the migration tasks",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "migrations"
  ]
}

Example:

{
  "migrations": [
    "marcIndexersVersionMigration"
  ]
}

Response 202

Migration job has been submitted

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Asynchronous migration job",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "description": "Unique identifier",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "type": "string",
      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
    },
    "migrations": {
      "description": "Names of the migration tasks",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "status": {
      "description": "Status of migration job execution",
      "type": "string",
      "enum": [
        "IN_PROGRESS",
        "COMPLETED",
        "ERROR"
      ]
    },
    "startedDate": {
      "description": "Date and time when migration job has been started",
      "type": "string",
      "format": "date-time"
    },
    "completedDate": {
      "description": "Date and time when migration job has been completed",
      "type": "string",
      "format": "date-time"
    },
    "errorMessage": {
      "description": "Error message that describes error occurred during migration job execution",
      "type": "string"
    }
  },
  "required": [
    "id",
    "migrations",
    "status"
  ]
}

Example:

{
  "id": "75d5bbd9-8e66-48ba-acd5-1e47798e2b8b",
  "migrations": [
    "marcIndexersVersionMigration"
  ],
  "status": "COMPLETED",
  "startedDate": "2023-06-12T10:03:53.369+00:00",
  "completedDate": "2023-06-12T12:07:42.369+00:00"
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

GET /source-storage/migrations/jobs/{id}

Get a migration job

GET /source-storage/migrations/jobs/{id}
URI Parameters
  • id: required (string)

Response 200

Migration job has been returned

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Asynchronous migration job",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "description": "Unique identifier",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "type": "string",
      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
    },
    "migrations": {
      "description": "Names of the migration tasks",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "status": {
      "description": "Status of migration job execution",
      "type": "string",
      "enum": [
        "IN_PROGRESS",
        "COMPLETED",
        "ERROR"
      ]
    },
    "startedDate": {
      "description": "Date and time when migration job has been started",
      "type": "string",
      "format": "date-time"
    },
    "completedDate": {
      "description": "Date and time when migration job has been completed",
      "type": "string",
      "format": "date-time"
    },
    "errorMessage": {
      "description": "Error message that describes error occurred during migration job execution",
      "type": "string"
    }
  },
  "required": [
    "id",
    "migrations",
    "status"
  ]
}

Example:

{
  "id": "75d5bbd9-8e66-48ba-acd5-1e47798e2b8b",
  "migrations": [
    "marcIndexersVersionMigration"
  ],
  "status": "COMPLETED",
  "startedDate": "2023-06-12T10:03:53.369+00:00",
  "completedDate": "2023-06-12T12:07:42.369+00:00"
}

Response 404

Not found

Body

Media type: text/plain

Type: any

Example:

Not found