foliolib.folio.api.marcMigrations.Marcmigrations
- class foliolib.folio.api.marcMigrations.Marcmigrations(tenant: str)
Bases:
foliolib.folio.FolioApiMARC migrations API
Manage MARC migrations
Base class of the Folio API
- Parameters
tenant (str) – Tenant id
Methods
createmarcmigrations(newMigrationOperation)POST /marc-migrationsgetmarcmigrationbyid(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": { "description": "Type of entity for migration", "type": "string", "enum": [ "authority", "instance" ] }, "operationType": { "description": "Type of migration", "type": "string", "enum": [ "remapping", "import" ] } } }
{ "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": { "description": "Type of entity for migration", "type": "string", "enum": [ "authority", "instance" ] }, "operationType": { "description": "Type of migration", "type": "string", "enum": [ "remapping", "import" ] }, "status": { "description": "Migration status", "type": "string", "enum": [ "new", "data_mapping", "data_mapping_completed", "data_mapping_failed", "data_saving", "data_saving_completed", "data_saving_failed" ] }, "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": { "description": "Type of entity for migration", "type": "string", "enum": [ "authority", "instance" ] }, "operationType": { "description": "Type of migration", "type": "string", "enum": [ "remapping", "import" ] }, "status": { "description": "Migration status", "type": "string", "enum": [ "new", "data_mapping", "data_mapping_completed", "data_mapping_failed", "data_saving", "data_saving_completed", "data_saving_failed" ] }, "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" } } }