foliolib.folio.api.marcMigrations.Marcmigrations

class foliolib.folio.api.marcMigrations.Marcmigrations(tenant: str)

Bases: foliolib.folio.FolioApi

MARC migrations API

Manage MARC migrations

Base class of the Folio API

Parameters

tenant (str) – Tenant id

Methods

createmarcmigrations(newMigrationOperation)

POST /marc-migrations

getmarcmigrationbyid(operationId)

GET /marc-migrations/{operationId}

createmarcmigrations(newMigrationOperation)

POST /marc-migrations

Parameters

newMigrationOperation (dict) – See Schema below.

Returns

See Schema below.

Return type

dict

Raises
  • OkapiRequestUnprocessableEntity – Unexpected request body

  • OkapiRequestFatalError – Unexpected error

Schema

{
    "type": "object",
    "required": [
        "entityType",
        "operationType"
    ],
    "properties": {
        "entityType": {
            "$ref": "#/components/schemas/EntityType"
        },
        "operationType": {
            "$ref": "#/components/schemas/OperationType"
        }
    }
}
{
    "type": "object",
    "properties": {
        "id": {
            "description": "ID of migration operation",
            "type": "string",
            "format": "uuid"
        },
        "userId": {
            "description": "ID of user that created the migration operation",
            "type": "string",
            "format": "uuid"
        },
        "entityType": {
            "$ref": "#/components/schemas/EntityType"
        },
        "operationType": {
            "$ref": "#/components/schemas/OperationType"
        },
        "status": {
            "$ref": "#/components/schemas/MigrationOperationStatus"
        },
        "totalNumOfRecords": {
            "description": "Total number of records that will be migrated",
            "type": "integer"
        },
        "processedNumOfRecords": {
            "description": "Total number of migrated records",
            "type": "integer"
        },
        "startTimeMapping": {
            "description": "Start time of mapping step of migration",
            "type": "string",
            "format": "date-time"
        },
        "endTimeMapping": {
            "description": "End time of mapping step of migration",
            "type": "string",
            "format": "date-time"
        },
        "startTimeSaving": {
            "description": "Start time of saving step of migration",
            "type": "string",
            "format": "date-time"
        },
        "endTimeSaving": {
            "description": "End time of saving step of migration",
            "type": "string",
            "format": "date-time"
        }
    }
}
getmarcmigrationbyid(operationId)

GET /marc-migrations/{operationId}

Parameters

operationId (str) – The UUID of a MARC migration operation (format: uuid)

Returns

See Schema below.

Return type

dict

Raises
  • OkapiRequestError – Bad request

  • OkapiRequestNotFound – MARC migration operation was not found

  • OkapiRequestFatalError – Unexpected error

Schema

{
    "type": "object",
    "properties": {
        "id": {
            "description": "ID of migration operation",
            "type": "string",
            "format": "uuid"
        },
        "userId": {
            "description": "ID of user that created the migration operation",
            "type": "string",
            "format": "uuid"
        },
        "entityType": {
            "$ref": "#/components/schemas/EntityType"
        },
        "operationType": {
            "$ref": "#/components/schemas/OperationType"
        },
        "status": {
            "$ref": "#/components/schemas/MigrationOperationStatus"
        },
        "totalNumOfRecords": {
            "description": "Total number of records that will be migrated",
            "type": "integer"
        },
        "processedNumOfRecords": {
            "description": "Total number of migrated records",
            "type": "integer"
        },
        "startTimeMapping": {
            "description": "Start time of mapping step of migration",
            "type": "string",
            "format": "date-time"
        },
        "endTimeMapping": {
            "description": "End time of mapping step of migration",
            "type": "string",
            "format": "date-time"
        },
        "startTimeSaving": {
            "description": "Start time of saving step of migration",
            "type": "string",
            "format": "date-time"
        },
        "endTimeSaving": {
            "description": "End time of saving step of migration",
            "type": "string",
            "format": "date-time"
        }
    }
}