Configuration Settings API version v3.1
https://github.com/folio-org/mod-oai-pmh
Configuration Settings API
API for managing OAI-PMH configuration settings
Configuration Settings
CRUD API for managing configuration settings
Create a new configuration-setting item.
Retrieve a list of configuration-setting items.
post /oai-pmh/configuration-settings
Create a new configuration-setting item.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Configuration Setting DTO Schema",
"title": "Configuration Settings Schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the configuration entry"
},
"configName": {
"type": "string",
"description": "Name of the configuration group"
},
"configValue": {
"type": "object",
"description": "JSON configuration values"
}
},
"additionalProperties": false,
"required": [
"configName",
"configValue"
]
}Example:
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"configName": "behavior",
"configValue": {
"deletedRecordsSupport": "persistent",
"suppressedRecordsProcessing": "true",
"errorsProcessing": "200",
"recordsSource": "Source record storage"
}
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created configuration-setting item
Body
Media type: application/json
Type: any
Example:
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"configName": "behavior",
"configValue": {
"deletedRecordsSupport": "persistent",
"suppressedRecordsProcessing": "true",
"errorsProcessing": "200",
"recordsSource": "Source record storage"
}
}
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 add configuration-setting -- malformed JSON at 13:3"
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to create configuration-settings -- unauthorizedHTTP 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 administratorget /oai-pmh/configuration-settings
Retrieve a list of configuration-setting items.
Query Parameters
- name: (string)
Filter configuration settings by name (configName field)
- 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 configuration-setting items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Configuration Collection DTO Schema",
"title": "Configuration Settings Collection Schema",
"type": "object",
"properties": {
"configurationSettings": {
"type": "array",
"description": "List of configuration settings",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Configuration Setting DTO Schema",
"title": "Configuration Settings Schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the configuration entry"
},
"configName": {
"type": "string",
"description": "Name of the configuration group"
},
"configValue": {
"type": "object",
"description": "JSON configuration values"
}
},
"additionalProperties": false,
"required": [
"configName",
"configValue"
]
}
},
"totalRecords": {
"type": "integer",
"description": "Total number of records"
}
},
"additionalProperties": false,
"required": [
"configurationSettings",
"totalRecords"
]
}Example:
{
"configurationSettings": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"configName": "behavior",
"configValue": {
"deletedRecordsSupport": "persistent",
"suppressedRecordsProcessing": "true",
"errorsProcessing": "200",
"recordsSource": "Source record storage"
}
},
{
"id": "123e4567-e89b-12d3-a456-426614174001",
"configName": "general",
"configValue": {
"enableOaiService": "true",
"repositoryName": "FOLIO_OAI_Repository",
"baseUrl": "http://folio.org/oai",
"administratorEmail": "oai-pmh@folio.org",
"timeGranularity": "YYYY-MM-DDThh:mm:ssZ"
}
}
],
"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 configuration-settings -- malformed parameter 'query', syntax error at column 6HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to list configuration-settings -- unauthorizedHTTP 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 administratorGet, Delete or Update a specific configuration setting
Update configuration-setting item with given {configuration-settingId}
Retrieve configuration-setting item with given {configuration-settingId}
Delete configuration-setting item with given {configuration-settingId}
put /oai-pmh/configuration-settings/{id}
Update configuration-setting item with given {configuration-settingId}
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Configuration Setting DTO Schema",
"title": "Configuration Settings Schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the configuration entry"
},
"configName": {
"type": "string",
"description": "Name of the configuration group"
},
"configValue": {
"type": "object",
"description": "JSON configuration values"
}
},
"additionalProperties": false,
"required": [
"configName",
"configValue"
]
}Example:
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"configName": "behavior",
"configValue": {
"deletedRecordsSupport": "persistent",
"suppressedRecordsProcessing": "true",
"errorsProcessing": "200",
"recordsSource": "Source record storage"
}
}
HTTP status code 204
Item successfully updated
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 update configuration-setting -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"configuration-setting not found"
HTTP status code 409
Optimistic locking version conflict
Body
Media type: text/plain
Type: any
Example:
version conflictHTTP 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 administratorget /oai-pmh/configuration-settings/{id}
Retrieve configuration-setting item with given {configuration-settingId}
URI Parameters
- id: required(string)
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": "Configuration Setting DTO Schema",
"title": "Configuration Settings Schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the configuration entry"
},
"configName": {
"type": "string",
"description": "Name of the configuration group"
},
"configValue": {
"type": "object",
"description": "JSON configuration values"
}
},
"additionalProperties": false,
"required": [
"configName",
"configValue"
]
}Example:
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"configName": "behavior",
"configValue": {
"deletedRecordsSupport": "persistent",
"suppressedRecordsProcessing": "true",
"errorsProcessing": "200",
"recordsSource": "Source record storage"
}
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"configuration-setting 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 administratordelete /oai-pmh/configuration-settings/{id}
Delete configuration-setting item with given {configuration-settingId}
URI Parameters
- id: required(string)
HTTP status code 204
Item deleted successfully
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 delete configuration-setting -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"configuration-setting 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