Request Metadata version v1.1
https://github.com/folio-org/mod-oai-pmh
Request Metadata API
API for retrieving MARC21_WITHHOLDINGS harvesting request metadata.
OAIPMH Request Metadata API
Service that allows to retrieve Request Metadata Collection
Get list of request metadata
get /oai/request-metadata
Get list of request metadata
Query Parameters
- totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)
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
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
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
HTTP status code 200
Returns item with a given ID
Body
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"
}
HTTP status code 400
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.
Body
Media type: text/plain
Type: any
Example:
"unable to list request-metadata -- malformed parameter 'query', syntax error at column 6"
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
"unable to list request-metadata -- unauthorized"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"request-metadatum not found"
HTTP status code 422
Validation errors
Body
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"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Service that allows to retrieve UUIDs of failed to save instances
Get list of failed to save instances UUIDs
get /oai/request-metadata/{requestId}/failed-to-save-instances
Get list of failed to save instances UUIDs
URI Parameters
- requestId: required(string)
Query Parameters
- totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)
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
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
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
HTTP status code 200
Returns a list of failed-to-save-instance items
Body
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
}
HTTP status code 400
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.
Body
Media type: text/plain
Type: any
Example:
unable to list failed-to-save-instances -- malformed parameter 'query', syntax error at column 6
HTTP status code 422
Validation errors
Body
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"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Service that allows to retrieve UUIDs of skipped instances
Get list of skipped instances UUIDs
get /oai/request-metadata/{requestId}/skipped-instances
Get list of skipped instances UUIDs
URI Parameters
- requestId: required(string)
Query Parameters
- totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)
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
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
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
HTTP status code 200
Returns a list of skipped-instance items
Body
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
}
HTTP status code 400
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.
Body
Media type: text/plain
Type: any
Example:
unable to list skipped-instances -- malformed parameter 'query', syntax error at column 6
HTTP status code 422
Validation errors
Body
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"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Service that allows to retrieve UUIDs of failed instances
Get list of failed instances UUIDs
get /oai/request-metadata/{requestId}/failed-instances
Get list of failed instances UUIDs
URI Parameters
- requestId: required(string)
Query Parameters
- totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)
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
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
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
HTTP status code 200
Returns a list of failed-instance items
Body
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
}
HTTP status code 400
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.
Body
Media type: text/plain
Type: any
Example:
unable to list failed-instances -- malformed parameter 'query', syntax error at column 6
HTTP status code 422
Validation errors
Body
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"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Service that allows to retrieve UUIDs of suppressed from discovery instances
Get list of suppressed from discovery instances UUIDs
get /oai/request-metadata/{requestId}/suppressed-from-discovery-instances
Get list of suppressed from discovery instances UUIDs
URI Parameters
- requestId: required(string)
Query Parameters
- totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)
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
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
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
HTTP status code 200
Returns a list of suppressed-from-discovery-instance items
Body
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
}
HTTP status code 400
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.
Body
Media type: text/plain
Type: any
Example:
unable to list suppressed-from-discovery-instances -- malformed parameter 'query', syntax error at column 6
HTTP status code 422
Validation errors
Body
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"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Service that allows to retrieve error log by request id
get /oai/request-metadata/{requestId}/logs
URI Parameters
- requestId: required(string)
HTTP status code 200
Body
Media type: binary/octet-stream
Type: any
HTTP status code 404
Not found
Body
Media type: text/plain
Type: any
Example:
Not found
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator