Inventory import API (v0.1)

getImportConfigs

Get import configuration records

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

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

postImportConfig

Create import configuration

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Request Body schema: application/json
required
id
string

unique identifier for the config - a UUID

name
string

The name of the harvest configuration at the time of logging the harvest run.

type
string

The type of harvest job (bulk XML or OAI-PMH)

url
string

The URL(s) used for retrieving the records that were harvested during this job.

allowErrors
boolean

Indicates whether the job was configured to continue in case of (certain classes of) errors.

recordLimit
integer

Indicates the limit -- if any -- on the maximum number of records to load according to the configuration.

transformationId
string

unique identifier for the transformation pipeline - a UUID

storageId
string

unique identifier for the storage pipeline - a UUID

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": "string",
  • "url": "string",
  • "allowErrors": true,
  • "recordLimit": 0,
  • "transformationId": "string",
  • "storageId": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": "string",
  • "url": "string",
  • "allowErrors": true,
  • "recordLimit": 0,
  • "transformationId": "string",
  • "storageId": "string"
}

getImportConfig

Get import configuration record

path Parameters
id
required
string

Import configuration identifier

query Parameters
query
string

CQL

offset
string

result set start row

limit
string

result set max rows

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": "string",
  • "url": "string",
  • "allowErrors": true,
  • "recordLimit": 0,
  • "transformationId": "string",
  • "storageId": "string"
}

putImportConfig

Update an import configuration

path Parameters
id
required
string

Import configuration identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Request Body schema: application/json
id
string

unique identifier for the config - a UUID

name
string

The name of the harvest configuration at the time of logging the harvest run.

type
string

The type of harvest job (bulk XML or OAI-PMH)

url
string

The URL(s) used for retrieving the records that were harvested during this job.

allowErrors
boolean

Indicates whether the job was configured to continue in case of (certain classes of) errors.

recordLimit
integer

Indicates the limit -- if any -- on the maximum number of records to load according to the configuration.

transformationId
string

unique identifier for the transformation pipeline - a UUID

storageId
string

unique identifier for the storage pipeline - a UUID

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": "string",
  • "url": "string",
  • "allowErrors": true,
  • "recordLimit": 0,
  • "transformationId": "string",
  • "storageId": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": "string",
  • "url": "string",
  • "allowErrors": true,
  • "recordLimit": 0,
  • "transformationId": "string",
  • "storageId": "string"
}

deleteImportConfig

Delete an import configuration

path Parameters
id
required
string

Import configuration identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

importXmlRecords

Load XML document using given import configuration

path Parameters
id
required
string

Import configuration identifier (UUID)

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Request Body schema: application/xml
required
property name*
additional property
any

Responses

Response samples

Content type
No sample

startImportVerticle

start verticle for given config ID that listens for incoming source records

path Parameters
id
required
string

Import configuration identifier (UUID)

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

Content type
No sample

stopImportVerticle

stop verticle for given config ID that listens for incoming source records

path Parameters
id
required
string

Import configuration identifier (UUID)

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

Content type
No sample

postImportJob

Create job log samples for test purposes etc, for example by import from another FOLIO instance.

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Request Body schema: application/json
required
id
string

unique identifier for this report of a single harvest run - a UUID

importConfigName
string

The name of the import configuration at the time of logging the harvest run.

importConfigId
string

Unique identifier of the import configuration - a UUID.

importType
string

The type of import job (bulk XML or OAI-PMH)

url
string

The URL(s) used for retrieving the records that were harvested during this job.

allowErrors
boolean

Indicates whether the job was configured to continue in case of (certain classes of) errors.

recordLimit
integer

Indicates the limit -- if any -- on the maximum number of records to load according to the configuration.

transformation
string

The name of the transformation pipeline that was used for the harvest job.

storage
string

The name of the storage that was used for persisting the records harvested during the job.

status
string

The outcome of the job. This would usually be the status after the job finished but it's possible to retrieve a history entry for a still running job.

started
string

Timestamp indicating when the job began.

finished
string

Timestamp indicating when the job completed.

amountHarvested
integer

The number of (incoming) records that were processed.

message
string

A description of the outcome of the harvest job, for example update statistics or a fatal error.

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "importConfigName": "string",
  • "importConfigId": "string",
  • "importType": "string",
  • "url": "string",
  • "allowErrors": true,
  • "recordLimit": 0,
  • "transformation": "string",
  • "storage": "string",
  • "status": "string",
  • "started": "string",
  • "finished": "string",
  • "amountHarvested": 0,
  • "message": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "importConfigName": "string",
  • "importConfigId": "string",
  • "importType": "string",
  • "url": "string",
  • "allowErrors": true,
  • "recordLimit": 0,
  • "transformation": "string",
  • "storage": "string",
  • "status": "string",
  • "started": "string",
  • "finished": "string",
  • "amountHarvested": 0,
  • "message": "string"
}

getImportJobs

Retrieves list of past import jobs

query Parameters
query
string

CQL query, import config ID, name, type, status, message, and amount imported in queries, and the same fields plus started and finished in sorting

offset
string

result set start row

limit
string

result set max rows

from
string

date range start parameter on finished date

until
string

date range end parameter on finished date

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

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

getImportJob

Retrieves details of a previous harvest job

path Parameters
id
required
string <uuid>

Import job identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "importConfigName": "string",
  • "importConfigId": "string",
  • "importType": "string",
  • "url": "string",
  • "allowErrors": true,
  • "recordLimit": 0,
  • "transformation": "string",
  • "storage": "string",
  • "status": "string",
  • "started": "string",
  • "finished": "string",
  • "amountHarvested": 0,
  • "message": "string"
}

deleteImportJob

Delete a past import job with all its logs

path Parameters
id
required
string <uuid>

Import job identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

Content type
No sample

getImportJobLogLines

Retrieves the log of a past import job

path Parameters
id
required
string <uuid>

Import job identifier

query Parameters
query
string

CQL, supporting import config ID, config name, line in query terms

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

Content type
No sample

postImportJobLogLines

For importing job logs from another source.

path Parameters
id
required
string <uuid>

Import job identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

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

Collection of log statements.

Array
id
string

Unique identifier (UUID) for the log line.

importJobId
string

Reference to the import job that generated the log line - a UUID.

timeStamp
string

Date and time the log statement was created.

jobLabel
string

Name of the import config of the job that created the log line.

line
string

The logged statement.

Responses

Request samples

Content type
application/json
{
  • "logLines": [
    ]
}

Response samples

Content type
No sample

getFailedRecordsForJob

Retrieves the failed records of an import job

path Parameters
id
required
string <uuid>

Import job identifier

query Parameters
query
string

CQL query

from
string

date range parameter on error report timestamp

until
string

date range parameter on error report timestamp

offset
string

result set start row

limit
string

result set max rows

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

Content type
application/json
{
  • "failedRecords": [
    ]
}

postFailedRecordsForJob

Create failed record samples without running a job, for example to import from another FOLIO instance.

path Parameters
id
required
string <uuid>

Import job identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

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

List of failed records.

Array
id
string

Unique ID (uuid) for this error report.

importJobId
string

Identifier (uuid) of the import job run creating the error report

importConfigId
string

Identifier (uuid) of the import configuration, by which the job was run.

importConfigName
string

Name of the harvest configuration (harvestable), by which the job was run.

Array of objects

List of errors encountered during upsert or delete.

original
string

I.e. the XML of the incoming record before transformation to an Inventory record set.

transformedRecord
object

The JSON outcome of the transformation of the original record.

timeStamp
string

The time the error occurred, Day Mon DD HH24:mi:ss TZ yyyy

recordNumber
string

The identifier assigned to this error report by Inventory Import

Responses

Request samples

Content type
application/json
{
  • "failedRecords": [
    ]
}

Response samples

Content type
No sample

deleteRecordFailure

Delete a past import job with all its logs

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

Content type
No sample

getSteps

Get step records

query Parameters
query
string

CQL

offset
string

result set start row

limit
string

result set max rows

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

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

postStep

Create step

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Request Body schema: application/json
required
id
string

Unique identifier for the transformation step.

name
required
string

A name assigned to the transformation step.

enabled
boolean
Default: false

Indicates if this step is available to be used in a transformation pipeline.

description
string

Additional descriptions of the storage definition.

type
string
Enum: "XmlTransformStep" "CustomTransformStep"

Type of transformation step.

inputFormat
string

Free-text indication of the format of input data to the step.

outputFormat
string

Free-text indication of the format of the resulting output from the step.

script
string

Transformation script, typically XSLT.

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "enabled": false,
  • "description": "string",
  • "type": "XmlTransformStep",
  • "inputFormat": "string",
  • "outputFormat": "string",
  • "script": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "enabled": false,
  • "description": "string",
  • "type": "XmlTransformStep",
  • "inputFormat": "string",
  • "outputFormat": "string",
  • "script": "string"
}

getStep

Get detailed transformation step definition record

path Parameters
id
required
string

Step identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "enabled": false,
  • "description": "string",
  • "type": "XmlTransformStep",
  • "inputFormat": "string",
  • "outputFormat": "string",
  • "script": "string"
}

putStep

Update a transformation step definition

path Parameters
id
required
string

Step identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Request Body schema: application/json
id
string

Unique identifier for the transformation step.

name
required
string

A name assigned to the transformation step.

enabled
boolean
Default: false

Indicates if this step is available to be used in a transformation pipeline.

description
string

Additional descriptions of the storage definition.

type
string
Enum: "XmlTransformStep" "CustomTransformStep"

Type of transformation step.

inputFormat
string

Free-text indication of the format of input data to the step.

outputFormat
string

Free-text indication of the format of the resulting output from the step.

script
string

Transformation script, typically XSLT.

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "enabled": false,
  • "description": "string",
  • "type": "XmlTransformStep",
  • "inputFormat": "string",
  • "outputFormat": "string",
  • "script": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "enabled": false,
  • "description": "string",
  • "type": "XmlTransformStep",
  • "inputFormat": "string",
  • "outputFormat": "string",
  • "script": "string"
}

deleteStep

Delete a transformation step definition

path Parameters
id
required
string

Step identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

getScript

Get transformation step script

path Parameters
id
required
string

Step identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

putScript

Update a transformation step script

path Parameters
id
required
string

Step identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Request Body schema: application/xml
property name*
additional property
any

Responses

Response samples

Content type
No sample

getTransformations

Get transformation definitions

query Parameters
query
string

CQL

offset
string

result set start row

limit
string

result set max rows

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

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

postTransformation

Create transformation pipeline

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Request Body schema: application/json
required
id
string

Unique record identifier (UUID).

name
string

Name of the transformation pipeline.

description
string

Details about the pipeline.

enabled
string
Enum: "true" "false"

Indicates if the transformation pipeline can be used by harvest jobs

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "enabled": "true"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "enabled": "true"
}

getTransformation

Get transformation pipeline record

path Parameters
id
required
string

Transformation pipeline identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "enabled": "true"
}

putTransformation

Update a transformation pipeline

path Parameters
id
required
string

Transformation pipeline identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Request Body schema: application/json
id
string

Unique record identifier (UUID).

name
string

Name of the transformation pipeline.

description
string

Details about the pipeline.

enabled
string
Enum: "true" "false"

Indicates if the transformation pipeline can be used by harvest jobs

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "enabled": "true"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "enabled": "true"
}

deleteTransformation

Delete a transformation pipeline

path Parameters
id
required
string

Transformation pipeline identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

getTsas

Get transformation step associations

query Parameters
query
string

CQL

offset
string

result set start row

limit
string

result set max rows

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

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

postTsa

Create new transformation step association

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Request Body schema: application/json
Any of
id
string

unique identifier for the association

stepId
required
string

UUID referencing a transformation step.

transformationId
required
string

UUID referencing a transformation pipeline.

position
required
string

The position of the step amongst other transformation steps in the pipeline.

object

DEPRECATED, legacy Harvester schema, contains id of step that is associated with a pipeline

id
string

Id of the step associated with a pipeline.

name
string

Name for the step associated with a pipeline.

property name*
additional property
any
transformation
string

DEPRECATED, legacy Harvester schema, id of the transformation pipeline that the step is associated with.

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "stepId": "string",
  • "transformationId": "string",
  • "position": "string",
  • "step": {
    },
  • "transformation": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "stepId": "string",
  • "transformationId": "string",
  • "position": "string",
  • "step": {
    },
  • "transformation": "string"
}

deleteTsas

Delete all transformation step associations

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

getTsa

Get a transformation step association by ID

path Parameters
id
required
string

Association identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "stepId": "string",
  • "transformationId": "string",
  • "position": "string",
  • "step": {
    },
  • "transformation": "string"
}

putTsa

Update a transformation step association

path Parameters
id
required
string

Association identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Request Body schema: application/json
Any of
id
string

unique identifier for the association

stepId
required
string

UUID referencing a transformation step.

transformationId
required
string

UUID referencing a transformation pipeline.

position
required
string

The position of the step amongst other transformation steps in the pipeline.

object

DEPRECATED, legacy Harvester schema, contains id of step that is associated with a pipeline

id
string

Id of the step associated with a pipeline.

name
string

Name for the step associated with a pipeline.

property name*
additional property
any
transformation
string

DEPRECATED, legacy Harvester schema, id of the transformation pipeline that the step is associated with.

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "stepId": "string",
  • "transformationId": "string",
  • "position": "string",
  • "step": {
    },
  • "transformation": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "stepId": "string",
  • "transformationId": "string",
  • "position": "string",
  • "step": {
    },
  • "transformation": "string"
}

deleteTsa

Delete a transformation step association by ID

path Parameters
id
required
string

Association identifier

header Parameters
X-Okapi-Tenant
string

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

Responses

purgeAgedLogs

Delete old import job logs from storage

Responses