https://github.com/folio-org/mod-oai-pmh
API for retrieving MARC21_WITHHOLDINGS harvesting request metadata.
Service that allows to retrieve Request Metadata Collection
Get list of request metadata
GET /oai/request-metadata
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response. Using limit=0 will return totalRecords with the exact value. For details about totalRecords see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
10
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Request metadata collection",
"type": "object",
"additionalProperties": false,
"properties": {
"requestMetadataCollection": {
"description": "list of request metadata",
"type": "array",
"id": "requestMetadataCollection",
"items": {
"javaType": "org.folio.rest.jaxrs.model.RequestMetadata",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Request Metadata DTO Schema",
"additionalProperties": false,
"properties": {
"requestId": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/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}$"
},
"lastUpdatedDate": {
"description": "last updated date-time",
"type": "string",
"format": "date-time"
},
"startedDate": {
"description": "started date-time",
"type": "string",
"format": "date-time"
},
"streamEnded": {
"description": "stream ended",
"type": "boolean"
},
"downloadedAndSavedInstancesCounter": {
"description": "saved instances counter",
"type": "integer"
},
"failedToSaveInstancesCounter": {
"description": "failed to save instances counter",
"type": "integer"
},
"returnedInstancesCounter": {
"description": "returned instances counter",
"type": "integer"
},
"skippedInstancesCounter": {
"description": "skipped instances counter",
"type": "integer"
},
"failedInstancesCounter": {
"description": "failed instances counter",
"type": "integer"
},
"suppressedInstancesCounter": {
"description": "suppressed instances counter",
"type": "integer"
},
"linkToErrorFile": {
"description": "link to error file in S3",
"type": "string"
},
"pathToErrorFile": {
"description": "path to error file in S3",
"type": "string"
}
}
}
},
"totalRecords": {
"type": "integer",
"description": "Total number of records"
}
},
"required": [
"requestMetadataCollection",
"totalRecords"
]
}
Example:
{
"requestId" : "a8e1d986-2eef-4007-827d-59c49f640086",
"lastUpdatedDate" : "2022-04-28T10:56:15.192+00:00",
"startedDate" : "2022-04-28T10:56:15.192+00:00",
"streamEnded" : true,
"downloadedAndSavedInstancesCounter" : 20,
"failedToSaveInstancesCounter" : 10,
"returnedInstancesCounter" : 1,
"skippedInstancesCounter" : 0,
"failedInstancesCounter" : 1,
"suppressedInstancesCounter" : 0,
"linkToErrorFile" : "link_to_file_in_S3",
"pathToErrorFile" : "path_to_file_in_S3"
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
"unable to list request-metadata -- malformed parameter 'query', syntax error at column 6"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
"unable to list request-metadata -- unauthorized"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"request-metadatum not found"
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Get list of failed to save instances UUIDs
GET /oai/request-metadata/{requestId}/failed-to-save-instances
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response. Using limit=0 will return totalRecords with the exact value. For details about totalRecords see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
10
Returns a list of failed-to-save-instance items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "UUID collection",
"type": "object",
"additionalProperties": false,
"properties": {
"uuidCollection": {
"description": "list of UUIDs",
"type": "array",
"id": "uuidCollection",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Regexp pattern for UUID validation",
"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}$"
}
},
"totalRecords": {
"type": "integer",
"description": "Total number of records"
}
},
"required": [
"uuidCollection",
"totalRecords"
]
}
Example:
{
"uuidCollection" : [
"a8e1d986-2eef-4007-827d-59c49f640086",
"ca78250e-16a3-4719-93ec-b506934f40be"
],
"totalRecords" : 2
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
unable to list failed-to-save-instances -- malformed parameter 'query', syntax error at column 6
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Get list of skipped instances UUIDs
GET /oai/request-metadata/{requestId}/skipped-instances
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response. Using limit=0 will return totalRecords with the exact value. For details about totalRecords see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
10
Returns a list of skipped-instance items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "UUID collection",
"type": "object",
"additionalProperties": false,
"properties": {
"uuidCollection": {
"description": "list of UUIDs",
"type": "array",
"id": "uuidCollection",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Regexp pattern for UUID validation",
"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}$"
}
},
"totalRecords": {
"type": "integer",
"description": "Total number of records"
}
},
"required": [
"uuidCollection",
"totalRecords"
]
}
Example:
{
"uuidCollection" : [
"a8e1d986-2eef-4007-827d-59c49f640086",
"ca78250e-16a3-4719-93ec-b506934f40be"
],
"totalRecords" : 2
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
unable to list skipped-instances -- malformed parameter 'query', syntax error at column 6
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Get list of failed instances UUIDs
GET /oai/request-metadata/{requestId}/failed-instances
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response. Using limit=0 will return totalRecords with the exact value. For details about totalRecords see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
10
Returns a list of failed-instance items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "UUID collection",
"type": "object",
"additionalProperties": false,
"properties": {
"uuidCollection": {
"description": "list of UUIDs",
"type": "array",
"id": "uuidCollection",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Regexp pattern for UUID validation",
"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}$"
}
},
"totalRecords": {
"type": "integer",
"description": "Total number of records"
}
},
"required": [
"uuidCollection",
"totalRecords"
]
}
Example:
{
"uuidCollection" : [
"a8e1d986-2eef-4007-827d-59c49f640086",
"ca78250e-16a3-4719-93ec-b506934f40be"
],
"totalRecords" : 2
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
unable to list failed-instances -- malformed parameter 'query', syntax error at column 6
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Get list of suppressed from discovery instances UUIDs
GET /oai/request-metadata/{requestId}/suppressed-from-discovery-instances
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response. Using limit=0 will return totalRecords with the exact value. For details about totalRecords see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
10
Returns a list of suppressed-from-discovery-instance items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "UUID collection",
"type": "object",
"additionalProperties": false,
"properties": {
"uuidCollection": {
"description": "list of UUIDs",
"type": "array",
"id": "uuidCollection",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Regexp pattern for UUID validation",
"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}$"
}
},
"totalRecords": {
"type": "integer",
"description": "Total number of records"
}
},
"required": [
"uuidCollection",
"totalRecords"
]
}
Example:
{
"uuidCollection" : [
"a8e1d986-2eef-4007-827d-59c49f640086",
"ca78250e-16a3-4719-93ec-b506934f40be"
],
"totalRecords" : 2
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
unable to list suppressed-from-discovery-instances -- malformed parameter 'query', syntax error at column 6
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
GET /oai/request-metadata/{requestId}/logs