Bulk operations API (v1)

Bulk operations API

uploadCsvFile

Upload csv file with identifiers list (barcodes, UUIDs, HRIDs, etc.) or csv-file with already updated entities

query Parameters
entityType
required
string (EntityType)
Enum: "USER" "ITEM" "HOLDINGS_RECORD" "INSTANCE" "INSTANCE_MARC"

Entity type (USER, ITEM, HOLDINGS_RECORD)

identifierType
required
string (IdentifierType)
Enum: "ID" "BARCODE" "HRID" "FORMER_IDS" "ACCESSION_NUMBER" "HOLDINGS_RECORD_ID" "USER_NAME" "EXTERNAL_SYSTEM_ID" "INSTANCE_HRID" "ITEM_BARCODE" "ISBN" "ISSN"

Identifier type (ID, BARCODE, etc.)

manual
boolean
Default: false

Key if manual approach is used

operationId
string <uuid> (UUID)

UUID of the Bulk Operation (applicable for (manual = true) case)

header Parameters
X-Okapi-User-Id
string <uuid>
Request Body schema: multipart/form-data
file
string <binary>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "hrId": 0,
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "operationType": "UPDATE",
  • "entityType": "USER",
  • "entityCustomIdentifierType": "ID",
  • "status": "NEW",
  • "approach": "MANUAL",
  • "dataExportJobId": "4cbb210a-627d-41df-b45f-8bd3d5bddab3",
  • "linkToTriggeringCsvFile": "string",
  • "linkToMatchedRecordsJsonFile": "string",
  • "linkToMatchedRecordsCsvFile": "string",
  • "linkToMatchedRecordsMarcFile": "string",
  • "linkToMatchedRecordsErrorsCsvFile": "string",
  • "linkToModifiedRecordsJsonFile": "string",
  • "linkToModifiedRecordsCsvFile": "string",
  • "linkToModifiedRecordsMarcFile": "string",
  • "linkToCommittedRecordsJsonFile": "string",
  • "linkToCommittedRecordsCsvFile": "string",
  • "linkToCommittedRecordsMarcFile": "string",
  • "linkToCommittedRecordsErrorsCsvFile": "string",
  • "totalNumOfRecords": 0,
  • "processedNumOfRecords": 0,
  • "matchedNumOfRecords": 0,
  • "committedNumOfRecords": 0,
  • "matchedNumOfErrors": 0,
  • "matchedNumOfWarnings": 0,
  • "committedNumOfErrors": 0,
  • "committedNumOfWarnings": 0,
  • "executionChunkSize": 0,
  • "startTime": "2019-08-24T14:15:22Z",
  • "endTime": "2019-08-24T14:15:22Z",
  • "errorMessage": "string",
  • "expired": false,
  • "fqlQueryId": "7f1204d5-80c4-4422-be7a-46cd9ffe5640",
  • "fqlQuery": "string",
  • "userFriendlyQuery": "string",
  • "tenantNotePairs": [
    ],
  • "usedTenants": [
    ]
}

triggerBulkEditByQuery

Trigger bulk edit by query

header Parameters
X-Okapi-User-Id
string <uuid>
Request Body schema: application/json
queryId
required
string <uuid>

FQL query identifier

fqlQuery
string

FQL string

userFriendlyQuery
string

User-friendly representation of FQL query

entityTypeId
required
string <uuid>

Entity type identifier

Responses

Request samples

Content type
application/json
{
  • "queryId": "10210520-b895-40ca-bce5-474f9643bf53",
  • "fqlQuery": "string",
  • "userFriendlyQuery": "string",
  • "entityTypeId": "29842682-4fc1-4a12-b775-fa06e71c91e2"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "hrId": 0,
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "operationType": "UPDATE",
  • "entityType": "USER",
  • "entityCustomIdentifierType": "ID",
  • "status": "NEW",
  • "approach": "MANUAL",
  • "dataExportJobId": "4cbb210a-627d-41df-b45f-8bd3d5bddab3",
  • "linkToTriggeringCsvFile": "string",
  • "linkToMatchedRecordsJsonFile": "string",
  • "linkToMatchedRecordsCsvFile": "string",
  • "linkToMatchedRecordsMarcFile": "string",
  • "linkToMatchedRecordsErrorsCsvFile": "string",
  • "linkToModifiedRecordsJsonFile": "string",
  • "linkToModifiedRecordsCsvFile": "string",
  • "linkToModifiedRecordsMarcFile": "string",
  • "linkToCommittedRecordsJsonFile": "string",
  • "linkToCommittedRecordsCsvFile": "string",
  • "linkToCommittedRecordsMarcFile": "string",
  • "linkToCommittedRecordsErrorsCsvFile": "string",
  • "totalNumOfRecords": 0,
  • "processedNumOfRecords": 0,
  • "matchedNumOfRecords": 0,
  • "committedNumOfRecords": 0,
  • "matchedNumOfErrors": 0,
  • "matchedNumOfWarnings": 0,
  • "committedNumOfErrors": 0,
  • "committedNumOfWarnings": 0,
  • "executionChunkSize": 0,
  • "startTime": "2019-08-24T14:15:22Z",
  • "endTime": "2019-08-24T14:15:22Z",
  • "errorMessage": "string",
  • "expired": false,
  • "fqlQueryId": "7f1204d5-80c4-4422-be7a-46cd9ffe5640",
  • "fqlQuery": "string",
  • "userFriendlyQuery": "string",
  • "tenantNotePairs": [
    ],
  • "usedTenants": [
    ]
}

postContentUpdates

Upload content updates

path Parameters
operationId
required
string <uuid> (UUID)

UUID of the Bulk Operation

Request Body schema: application/json
required
required
Array of objects (BulkOperationRule)

List of bulk operation rules

Array
id
string <uuid>

Bulk operation rule ID

bulkOperationId
required
string <uuid>

Bulk operation ID

required
object (RuleDetails)
totalRecords
required
integer

Responses

Request samples

Content type
application/json
{
  • "bulkOperationRules": [
    ],
  • "totalRecords": 0
}

Response samples

Content type
application/json
{
  • "bulkOperationRules": [
    ],
  • "totalRecords": 0
}

postMarcContentUpdates

Upload MARC content updates

path Parameters
operationId
required
string <uuid> (UUID)

UUID of the Bulk Operation

Request Body schema: application/json
required
required
Array of objects (BulkOperationMarcRule)

List of bulk operation MARC rules

Array
tag
required
string

MARC field tag

ind1
required
string[a-z0-9#\\]

MARC field indicator 1

ind2
required
string[a-z0-9#\\]

MARC field indicator 2

subfield
required
string[a-z0-9]

MARC subfield code

required
Array of objects (MarcAction) non-empty
Array of objects (MarcParameter)
Array of objects (MarcSubfieldAction)
bulkOperationId
required
string <uuid>

Bulk operation ID

totalRecords
required
integer

Responses

Request samples

Content type
application/json
{
  • "bulkOperationMarcRules": [
    ],
  • "totalRecords": 0
}

Response samples

Content type
application/json
{
  • "bulkOperationMarcRules": [
    ],
  • "totalRecords": 0
}

getPreviewByOperationId

Get preview

path Parameters
operationId
required
string <uuid> (UUID)

UUID of the Bulk Operation

query Parameters
step
required
string (BulkOperationStep)
Enum: "UPLOAD" "EDIT" "COMMIT"

Key if manual approach is used

limit
required
integer

The numbers of records to return

offset
integer
Default: 0

Query offset

Responses

Response samples

Content type
application/json
{
  • "header": [
    ],
  • "rows": [
    ]
}

startBulkOperation

Start Bulk Operation

path Parameters
operationId
required
string <uuid> (UUID)

UUID of the Bulk Operation

header Parameters
X-Okapi-User-Id
string <uuid>
Request Body schema: application/json
required
step
string (BulkOperationStep)
Enum: "UPLOAD" "EDIT" "COMMIT"
approach
string (ApproachType)
Enum: "MANUAL" "IN_APP" "QUERY"
entityType
string (EntityType)
Enum: "USER" "ITEM" "HOLDINGS_RECORD" "INSTANCE" "INSTANCE_MARC"
entityCustomIdentifierType
string (IdentifierType)
Enum: "ID" "BARCODE" "HRID" "FORMER_IDS" "ACCESSION_NUMBER" "HOLDINGS_RECORD_ID" "USER_NAME" "EXTERNAL_SYSTEM_ID" "INSTANCE_HRID" "ITEM_BARCODE" "ISBN" "ISSN"
query
string

CQL query for

Responses

Request samples

Content type
application/json
{
  • "step": "UPLOAD",
  • "approach": "MANUAL",
  • "entityType": "USER",
  • "entityCustomIdentifierType": "ID",
  • "query": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "hrId": 0,
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "operationType": "UPDATE",
  • "entityType": "USER",
  • "entityCustomIdentifierType": "ID",
  • "status": "NEW",
  • "approach": "MANUAL",
  • "dataExportJobId": "4cbb210a-627d-41df-b45f-8bd3d5bddab3",
  • "linkToTriggeringCsvFile": "string",
  • "linkToMatchedRecordsJsonFile": "string",
  • "linkToMatchedRecordsCsvFile": "string",
  • "linkToMatchedRecordsMarcFile": "string",
  • "linkToMatchedRecordsErrorsCsvFile": "string",
  • "linkToModifiedRecordsJsonFile": "string",
  • "linkToModifiedRecordsCsvFile": "string",
  • "linkToModifiedRecordsMarcFile": "string",
  • "linkToCommittedRecordsJsonFile": "string",
  • "linkToCommittedRecordsCsvFile": "string",
  • "linkToCommittedRecordsMarcFile": "string",
  • "linkToCommittedRecordsErrorsCsvFile": "string",
  • "totalNumOfRecords": 0,
  • "processedNumOfRecords": 0,
  • "matchedNumOfRecords": 0,
  • "committedNumOfRecords": 0,
  • "matchedNumOfErrors": 0,
  • "matchedNumOfWarnings": 0,
  • "committedNumOfErrors": 0,
  • "committedNumOfWarnings": 0,
  • "executionChunkSize": 0,
  • "startTime": "2019-08-24T14:15:22Z",
  • "endTime": "2019-08-24T14:15:22Z",
  • "errorMessage": "string",
  • "expired": false,
  • "fqlQueryId": "7f1204d5-80c4-4422-be7a-46cd9ffe5640",
  • "fqlQuery": "string",
  • "userFriendlyQuery": "string",
  • "tenantNotePairs": [
    ],
  • "usedTenants": [
    ]
}

getErrorsPreviewByOperationId

Get a list of errors for preview

path Parameters
operationId
required
string <uuid> (UUID)

UUID of the Bulk Operation

query Parameters
limit
required
integer >= 0
Default: 10

The numbers of errors to return

offset
integer >= 0
Default: 0

Query offset

errorType
string (ErrorType)
Enum: "ERROR" "WARNING"

The error type

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ],
  • "totalRecords": 0
}

getBulkOperationCollection

Get a list of operations

query Parameters
query
required
string

Request query

offset
integer

Query offset

limit
integer

Query limit

Responses

Response samples

Content type
application/json
{
  • "bulkOperations": [
    ],
  • "totalRecords": 0
}

downloadFileByOperationId

Download file by operation id

path Parameters
operationId
required
string <uuid> (UUID)

UUID of the Bulk Operation

query Parameters
fileContentType
required
string (FileContentType)
Enum: "TRIGGERING_FILE" "MATCHED_RECORDS_FILE" "RECORD_MATCHING_ERROR_FILE" "PROPOSED_CHANGES_FILE" "PROPOSED_CHANGES_MARC_FILE" "COMMITTED_RECORDS_FILE" "COMMITTED_RECORDS_MARC_FILE" "COMMITTING_CHANGES_ERROR_FILE"

The file content type

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ],
  • "totalRecords": 0
}

getBulkOperationById

Get bulk operation by id

path Parameters
operationId
required
string <uuid> (UUID)

UUID of the Bulk Operation

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "hrId": 0,
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "operationType": "UPDATE",
  • "entityType": "USER",
  • "entityCustomIdentifierType": "ID",
  • "status": "NEW",
  • "approach": "MANUAL",
  • "dataExportJobId": "4cbb210a-627d-41df-b45f-8bd3d5bddab3",
  • "linkToTriggeringCsvFile": "string",
  • "linkToMatchedRecordsJsonFile": "string",
  • "linkToMatchedRecordsCsvFile": "string",
  • "linkToMatchedRecordsMarcFile": "string",
  • "linkToMatchedRecordsErrorsCsvFile": "string",
  • "linkToModifiedRecordsJsonFile": "string",
  • "linkToModifiedRecordsCsvFile": "string",
  • "linkToModifiedRecordsMarcFile": "string",
  • "linkToCommittedRecordsJsonFile": "string",
  • "linkToCommittedRecordsCsvFile": "string",
  • "linkToCommittedRecordsMarcFile": "string",
  • "linkToCommittedRecordsErrorsCsvFile": "string",
  • "totalNumOfRecords": 0,
  • "processedNumOfRecords": 0,
  • "matchedNumOfRecords": 0,
  • "committedNumOfRecords": 0,
  • "matchedNumOfErrors": 0,
  • "matchedNumOfWarnings": 0,
  • "committedNumOfErrors": 0,
  • "committedNumOfWarnings": 0,
  • "executionChunkSize": 0,
  • "startTime": "2019-08-24T14:15:22Z",
  • "endTime": "2019-08-24T14:15:22Z",
  • "errorMessage": "string",
  • "expired": false,
  • "fqlQueryId": "7f1204d5-80c4-4422-be7a-46cd9ffe5640",
  • "fqlQuery": "string",
  • "userFriendlyQuery": "string",
  • "tenantNotePairs": [
    ],
  • "usedTenants": [
    ]
}

cleanUpLogFiles

Removed all files older than 30 days

Responses

getListUsers

Get a list of users

query Parameters
query
required
string

Request query

offset
integer

Query offset

limit
integer

Query limit

Responses

Response samples

Content type
application/json
{
  • "users": [
    ],
  • "total_records": 0
}

deleteFileByNameAndOperationId

Delete file by name and bulk operation id

path Parameters
operationId
required
string <uuid> (UUID)

UUID of the Bulk Operation

fileName
required
string

File name

Responses

cancelOperationById

Cancel bulk operation by id

path Parameters
operationId
required
string <uuid> (UUID)

UUID of the Bulk Operation

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ],
  • "totalRecords": 0
}

getListUsedTenants

Get a list of used tenants

path Parameters
operationId
required
string <uuid> (UUID)

UUID of the Bulk Operation

Responses

Response samples

Content type
application/json
[
  • "string"
]

getProfiles

Get a list of Profiles

query Parameters
query
string

Request query

offset
integer

Query offset

limit
integer

Query limit

Responses

Response samples

Content type
application/json
{
  • "content": [
    ],
  • "totalRecords": 0
}

createProfile

Create a new Profile

Request Body schema: application/json
required
name
required
string

The name of the profile, used for identification and display.

description
string

Indicates description of the profile.

locked
required
boolean

Indicates whether the profile is locked and cannot be modified.

entityType
required
string (EntityType)
Enum: "USER" "ITEM" "HOLDINGS_RECORD" "INSTANCE" "INSTANCE_MARC"
Array of objects (RuleDetails)

Rule Collection

Array
option
string (UpdateOptionType)
Enum: "PATRON_GROUP" "EXPIRATION_DATE" "EMAIL_ADDRESS" "PERMANENT_LOCATION" "TEMPORARY_LOCATION" "PERMANENT_LOAN_TYPE" "TEMPORARY_LOAN_TYPE" "STATUS" "SUPPRESS_FROM_DISCOVERY" "ITEM_NOTE" "INSTANCE_NOTE" "ADMINISTRATIVE_NOTE" "CHECK_IN_NOTE" "CHECK_OUT_NOTE" "HOLDINGS_NOTE" "ELECTRONIC_ACCESS_URL_RELATIONSHIP" "ELECTRONIC_ACCESS_URI" "ELECTRONIC_ACCESS_LINK_TEXT" "ELECTRONIC_ACCESS_MATERIALS_SPECIFIED" "ELECTRONIC_ACCESS_URL_PUBLIC_NOTE" "STAFF_SUPPRESS" "STATISTICAL_CODE"
tenants
Array of strings
Array of objects (Action) non-empty
Array of objects (MarcRuleDetails)

Bulk Operation Marc Rule Collection

Array
tag
required
string

MARC field tag

ind1
required
string[a-z0-9#\\]

MARC field indicator 1

ind2
required
string[a-z0-9#\\]

MARC field indicator 2

subfield
required
string[a-z0-9]

MARC subfield code

required
Array of objects (MarcAction) non-empty
Array of objects (MarcParameter)
Array of objects (MarcSubfieldAction)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "locked": true,
  • "entityType": "USER",
  • "ruleDetails": [
    ],
  • "marcRuleDetails": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "locked": true,
  • "entityType": "USER",
  • "ruleDetails": [
    ],
  • "marcRuleDetails": [
    ],
  • "createdDate": "2019-08-24T14:15:22Z",
  • "createdBy": "string",
  • "updatedDate": "2019-08-24T14:15:22Z",
  • "updatedBy": "string"
}

deleteProfile

Delete a Profile by ID

path Parameters
id
required
string <uuid> (UUID)

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ],
  • "totalRecords": 0
}

Update a profile

path Parameters
id
required
string <uuid> (UUID)
Request Body schema: application/json
required

Profile object

name
required
string

The name of the profile, used for identification and display.

description
string

Indicates description of the profile.

locked
required
boolean

Indicates whether the profile is locked and cannot be modified.

entityType
required
string (EntityType)
Enum: "USER" "ITEM" "HOLDINGS_RECORD" "INSTANCE" "INSTANCE_MARC"
Array of objects (RuleDetails)

Rule Collection

Array
option
string (UpdateOptionType)
Enum: "PATRON_GROUP" "EXPIRATION_DATE" "EMAIL_ADDRESS" "PERMANENT_LOCATION" "TEMPORARY_LOCATION" "PERMANENT_LOAN_TYPE" "TEMPORARY_LOAN_TYPE" "STATUS" "SUPPRESS_FROM_DISCOVERY" "ITEM_NOTE" "INSTANCE_NOTE" "ADMINISTRATIVE_NOTE" "CHECK_IN_NOTE" "CHECK_OUT_NOTE" "HOLDINGS_NOTE" "ELECTRONIC_ACCESS_URL_RELATIONSHIP" "ELECTRONIC_ACCESS_URI" "ELECTRONIC_ACCESS_LINK_TEXT" "ELECTRONIC_ACCESS_MATERIALS_SPECIFIED" "ELECTRONIC_ACCESS_URL_PUBLIC_NOTE" "STAFF_SUPPRESS" "STATISTICAL_CODE"
tenants
Array of strings
Array of objects (Action) non-empty
Array of objects (MarcRuleDetails)

Bulk Operation Marc Rule Collection

Array
tag
required
string

MARC field tag

ind1
required
string[a-z0-9#\\]

MARC field indicator 1

ind2
required
string[a-z0-9#\\]

MARC field indicator 2

subfield
required
string[a-z0-9]

MARC subfield code

required
Array of objects (MarcAction) non-empty
Array of objects (MarcParameter)
Array of objects (MarcSubfieldAction)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "locked": true,
  • "entityType": "USER",
  • "ruleDetails": [
    ],
  • "marcRuleDetails": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "locked": true,
  • "entityType": "USER",
  • "ruleDetails": [
    ],
  • "marcRuleDetails": [
    ],
  • "createdDate": "2019-08-24T14:15:22Z",
  • "createdBy": "string",
  • "updatedDate": "2019-08-24T14:15:22Z",
  • "updatedBy": "string"
}