Metadata Sources version v1
http://localhost/mod-finc-config
mod-finc-config API
This documents the API calls that can be made to query and manage metadata sources for all tenants/isils
Metadata Sources
Collection of metadata-source items.
Get all metadata sources
Post new metadata source
get /finc-config/metadata-sources
Get all metadata sources
Query Parameters
- query: (string)
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode ((label="Journals*" or sourceId="Journals*") and status=("active" or "technical implementation")) sortby label
- orderBy: (string)
Order by field: label, sourceId, status, solrShard, lastProcessed
- order: (one of desc, asc - default: desc)
Order
- 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 metadata-source items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Collection of metadata sources in finc config",
"properties": {
"fincConfigMetadataSources": {
"type": "array",
"id": "fincConfigMetadataSourcesData",
"description": "List of metadata sources in finc config",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Source Schema",
"description": "Metadata source in finc config",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string",
"description": "A unique name for this metadata source"
},
"description": {
"type": "string",
"description": "A globally unique (UUID) identifier"
},
"status": {
"type": "string",
"description": "Current status of metadata source",
"enum": [
"active",
"closed",
"impossible",
"implementation",
"request"
]
},
"organization": {
"type": "object",
"description": "The organization delivering content of this metadata source",
"properties": {
"id": {
"type": "string",
"description": "Id of the the sources content’s organization, linked via uuid from organizations app."
},
"name": {
"type": "string",
"description": "Organization's name. If not given, it will be determined by backend module."
}
}
},
"contacts": {
"type": "array",
"description": "List of contacts",
"minItems": 0,
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Contact",
"description": "Contact schema",
"properties": {
"type": {
"type": "string",
"description": "The contact's type. This indicates if the contact originates from the users module or the organizations module.",
"enum": [
"user",
"contact"
]
},
"externalId": {
"type": "string",
"description": "The external id of this contact in the module specified by the type (users or organizations module)."
},
"name": {
"description": "The contact's name (lastName, firstName)",
"type": "string"
},
"role": {
"type": "string",
"description": "The contact's role",
"enum": [
"subject specialist",
"librarian",
"technical",
"vendor"
]
}
},
"required": [
"externalId",
"type",
"name",
"role"
]
}
},
"indexingLevel": {
"type": "string",
"description": "Level used for indexing (e.g. bibliographic)"
},
"generalNotes": {
"type": "string",
"description": "General notes not fitting into the other fields"
},
"lastProcessed": {
"type": "string",
"format": "date-time",
"description": "Date of last processing"
},
"tickets": {
"type": "array",
"description": "Links to internal tickets corresponding to this metadata source",
"minItems": 0,
"items": {
"type": "string"
}
},
"accessUrl": {
"type": "string",
"description": "URL to access metadata source"
},
"sourceId": {
"type": "integer",
"description": "The source id"
},
"solrShard": {
"type": "string",
"description": "Used solr shard",
"enum": [
"SLUB DBoD",
"SLUB dswarm",
"UBL ai",
"UBL DNB",
"UBL main"
]
},
"deliveryMethods": {
"type": "array",
"description": "Available delivery methods (e.g. API download)",
"minItems": 0,
"items": {
"type": "string"
}
},
"formats": {
"type": "array",
"description": "Available formats (e.g. MARC)",
"minItems": 0,
"items": {
"type": "string"
}
},
"updateRhythm": {
"type": "string",
"description": "Metadata source's update rhythm"
},
"inferiorTo": {
"type": "array",
"description": "Link to other metadata sources",
"minItems": 0,
"items": {
"type": "string"
}
},
"selectedBy": {
"type": "array",
"description": "List of tenants/libraries which selected this metadata source",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"isil": {
"type": "string",
"description": "Isil of library/tenant which selected this metadata source"
},
"selected": {
"description": "Indicator if the tenant/library has selected this metadata source",
"enum": [
"all",
"some",
"none"
]
}
}
}
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"id",
"label",
"status",
"sourceId"
],
"additionalProperties": false
}
},
"totalRecords": {
"type": "integer"
}
},
"required": [
"sources",
"totalRecords"
]
}
Example:
{
"fincConfigMetadataSources": [
{
"id": "6dd325f8-b1d5-4568-a0d7-aecf6b8d6697",
"label": "Cambridge University Press Journals",
"internalId": 1,
"solrShard": "UBL main",
"lastProcessed": "2018-06-14",
"description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore.",
"tickets": [
"http://redmine.de/123",
"http://redmine.de/456"
],
"status": "implementation",
"contacts": [
{
"type": "user",
"externalId": "fcfaca0b-12e7-467e-b503-d44a44d60a62",
"name": "Doe, John",
"role": "librarian"
},
{
"type": "contact",
"externalId": "01771c0a-a890-4488-b5e9-366aa697bd93",
"name": "Doe, Jane",
"role": "vendor"
}
]
},
{
"id": "8ac1e1cf-5128-46b9-b57b-52bbfca7261b",
"label": "Oxford Scholarship Online",
"internalId": 2,
"solrShard": "UBL ai",
"lastProcessed": "2018-11-23",
"description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore.",
"organization": {
"id": "uuid-1240",
"name": "Oxford Scholarship Online"
},
"tickets": [
"http://redmine.de/123",
"http://redmine.de/456"
],
"status": "implementation",
"contacts": [
{
"type": "user",
"externalId": "fcfaca0b-12e7-467e-b503-d44a44d60a62",
"name": "Doe, John",
"role": "librarian"
},
{
"type": "contact",
"externalId": "01771c0a-a890-4488-b5e9-366aa697bd93",
"name": "Doe, Jane",
"role": "vendor"
}
]
}
],
"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 metadata-sources -- 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 metadata-sources -- unauthorized
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
post /finc-config/metadata-sources
Post new metadata source
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Source Schema",
"description": "Metadata source in finc config",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string",
"description": "A unique name for this metadata source"
},
"description": {
"type": "string",
"description": "A globally unique (UUID) identifier"
},
"status": {
"type": "string",
"description": "Current status of metadata source",
"enum": [
"active",
"closed",
"impossible",
"implementation",
"request"
]
},
"organization": {
"type": "object",
"description": "The organization delivering content of this metadata source",
"properties": {
"id": {
"type": "string",
"description": "Id of the the sources content’s organization, linked via uuid from organizations app."
},
"name": {
"type": "string",
"description": "Organization's name. If not given, it will be determined by backend module."
}
}
},
"contacts": {
"type": "array",
"description": "List of contacts",
"minItems": 0,
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Contact",
"description": "Contact schema",
"properties": {
"type": {
"type": "string",
"description": "The contact's type. This indicates if the contact originates from the users module or the organizations module.",
"enum": [
"user",
"contact"
]
},
"externalId": {
"type": "string",
"description": "The external id of this contact in the module specified by the type (users or organizations module)."
},
"name": {
"description": "The contact's name (lastName, firstName)",
"type": "string"
},
"role": {
"type": "string",
"description": "The contact's role",
"enum": [
"subject specialist",
"librarian",
"technical",
"vendor"
]
}
},
"required": [
"externalId",
"type",
"name",
"role"
]
}
},
"indexingLevel": {
"type": "string",
"description": "Level used for indexing (e.g. bibliographic)"
},
"generalNotes": {
"type": "string",
"description": "General notes not fitting into the other fields"
},
"lastProcessed": {
"type": "string",
"format": "date-time",
"description": "Date of last processing"
},
"tickets": {
"type": "array",
"description": "Links to internal tickets corresponding to this metadata source",
"minItems": 0,
"items": {
"type": "string"
}
},
"accessUrl": {
"type": "string",
"description": "URL to access metadata source"
},
"sourceId": {
"type": "integer",
"description": "The source id"
},
"solrShard": {
"type": "string",
"description": "Used solr shard",
"enum": [
"SLUB DBoD",
"SLUB dswarm",
"UBL ai",
"UBL DNB",
"UBL main"
]
},
"deliveryMethods": {
"type": "array",
"description": "Available delivery methods (e.g. API download)",
"minItems": 0,
"items": {
"type": "string"
}
},
"formats": {
"type": "array",
"description": "Available formats (e.g. MARC)",
"minItems": 0,
"items": {
"type": "string"
}
},
"updateRhythm": {
"type": "string",
"description": "Metadata source's update rhythm"
},
"inferiorTo": {
"type": "array",
"description": "Link to other metadata sources",
"minItems": 0,
"items": {
"type": "string"
}
},
"selectedBy": {
"type": "array",
"description": "List of tenants/libraries which selected this metadata source",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"isil": {
"type": "string",
"description": "Isil of library/tenant which selected this metadata source"
},
"selected": {
"description": "Indicator if the tenant/library has selected this metadata source",
"enum": [
"all",
"some",
"none"
]
}
}
}
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"id",
"label",
"status",
"sourceId"
],
"additionalProperties": false
}
Example:
{
"id": "6dd325f8-b1d5-4568-a0d7-aecf6b8d6697",
"label": "Cambridge University Press Journals",
"description": "This is a test metadata source",
"status": "active",
"contacts": [
{
"type": "user",
"externalId": "fcfaca0b-12e7-467e-b503-d44a44d60a62",
"name": "Doe, John",
"role": "librarian"
},
{
"type": "contact",
"externalId": "01771c0a-a890-4488-b5e9-366aa697bd93",
"name": "Doe, Jane",
"role": "vendor"
}
],
"indexingLevel": "bibliographic",
"generalNotes": "Test licensing note",
"lastProcessed": "2018-01-01",
"tickets": [
"http://redmine.de/123",
"http://redmine.de/456"
],
"accessUrl": "http://access.url",
"sourceId": 1,
"solrShard": "UBL main",
"deliveryMethods": [
"API Download"
],
"formats": [
"csv"
],
"updateRhythm": "monthly",
"inferiorTo": [
"uuid-789",
"uuid-123"
],
"selectedBy": [
{
"selected": "all",
"isil": "DE-14"
},
{
"selected": "all",
"isil": "DE-15"
}
]
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created metadata-source item
Body
Media type: application/json
Type: any
Example:
{
"id": "6dd325f8-b1d5-4568-a0d7-aecf6b8d6697",
"label": "Cambridge University Press Journals",
"description": "This is a test metadata source",
"status": "active",
"contacts": [
{
"type": "user",
"externalId": "fcfaca0b-12e7-467e-b503-d44a44d60a62",
"name": "Doe, John",
"role": "librarian"
},
{
"type": "contact",
"externalId": "01771c0a-a890-4488-b5e9-366aa697bd93",
"name": "Doe, Jane",
"role": "vendor"
}
],
"indexingLevel": "bibliographic",
"generalNotes": "Test licensing note",
"lastProcessed": "2018-01-01",
"tickets": [
"http://redmine.de/123",
"http://redmine.de/456"
],
"accessUrl": "http://access.url",
"sourceId": 1,
"solrShard": "UBL main",
"deliveryMethods": [
"API Download"
],
"formats": [
"csv"
],
"updateRhythm": "monthly",
"inferiorTo": [
"uuid-789",
"uuid-123"
],
"selectedBy": [
{
"selected": "all",
"isil": "DE-14"
},
{
"selected": "all",
"isil": "DE-15"
}
]
}
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 metadata-source -- 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 metadata-sources -- unauthorized
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
Entity representing a metadata-source
Get one metadata source identified by id
Delete an metadata source identified by id
Put an metadata source identified by id
get /finc-config/metadata-sources/{id}
Get one metadata source identified by id
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#",
"title": "Metadata Source Schema",
"description": "Metadata source in finc config",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string",
"description": "A unique name for this metadata source"
},
"description": {
"type": "string",
"description": "A globally unique (UUID) identifier"
},
"status": {
"type": "string",
"description": "Current status of metadata source",
"enum": [
"active",
"closed",
"impossible",
"implementation",
"request"
]
},
"organization": {
"type": "object",
"description": "The organization delivering content of this metadata source",
"properties": {
"id": {
"type": "string",
"description": "Id of the the sources content’s organization, linked via uuid from organizations app."
},
"name": {
"type": "string",
"description": "Organization's name. If not given, it will be determined by backend module."
}
}
},
"contacts": {
"type": "array",
"description": "List of contacts",
"minItems": 0,
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Contact",
"description": "Contact schema",
"properties": {
"type": {
"type": "string",
"description": "The contact's type. This indicates if the contact originates from the users module or the organizations module.",
"enum": [
"user",
"contact"
]
},
"externalId": {
"type": "string",
"description": "The external id of this contact in the module specified by the type (users or organizations module)."
},
"name": {
"description": "The contact's name (lastName, firstName)",
"type": "string"
},
"role": {
"type": "string",
"description": "The contact's role",
"enum": [
"subject specialist",
"librarian",
"technical",
"vendor"
]
}
},
"required": [
"externalId",
"type",
"name",
"role"
]
}
},
"indexingLevel": {
"type": "string",
"description": "Level used for indexing (e.g. bibliographic)"
},
"generalNotes": {
"type": "string",
"description": "General notes not fitting into the other fields"
},
"lastProcessed": {
"type": "string",
"format": "date-time",
"description": "Date of last processing"
},
"tickets": {
"type": "array",
"description": "Links to internal tickets corresponding to this metadata source",
"minItems": 0,
"items": {
"type": "string"
}
},
"accessUrl": {
"type": "string",
"description": "URL to access metadata source"
},
"sourceId": {
"type": "integer",
"description": "The source id"
},
"solrShard": {
"type": "string",
"description": "Used solr shard",
"enum": [
"SLUB DBoD",
"SLUB dswarm",
"UBL ai",
"UBL DNB",
"UBL main"
]
},
"deliveryMethods": {
"type": "array",
"description": "Available delivery methods (e.g. API download)",
"minItems": 0,
"items": {
"type": "string"
}
},
"formats": {
"type": "array",
"description": "Available formats (e.g. MARC)",
"minItems": 0,
"items": {
"type": "string"
}
},
"updateRhythm": {
"type": "string",
"description": "Metadata source's update rhythm"
},
"inferiorTo": {
"type": "array",
"description": "Link to other metadata sources",
"minItems": 0,
"items": {
"type": "string"
}
},
"selectedBy": {
"type": "array",
"description": "List of tenants/libraries which selected this metadata source",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"isil": {
"type": "string",
"description": "Isil of library/tenant which selected this metadata source"
},
"selected": {
"description": "Indicator if the tenant/library has selected this metadata source",
"enum": [
"all",
"some",
"none"
]
}
}
}
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"id",
"label",
"status",
"sourceId"
],
"additionalProperties": false
}
Example:
{
"id": "6dd325f8-b1d5-4568-a0d7-aecf6b8d6697",
"label": "Cambridge University Press Journals",
"description": "This is a test metadata source",
"status": "active",
"contacts": [
{
"type": "user",
"externalId": "fcfaca0b-12e7-467e-b503-d44a44d60a62",
"name": "Doe, John",
"role": "librarian"
},
{
"type": "contact",
"externalId": "01771c0a-a890-4488-b5e9-366aa697bd93",
"name": "Doe, Jane",
"role": "vendor"
}
],
"indexingLevel": "bibliographic",
"generalNotes": "Test licensing note",
"lastProcessed": "2018-01-01",
"tickets": [
"http://redmine.de/123",
"http://redmine.de/456"
],
"accessUrl": "http://access.url",
"sourceId": 1,
"solrShard": "UBL main",
"deliveryMethods": [
"API Download"
],
"formats": [
"csv"
],
"updateRhythm": "monthly",
"inferiorTo": [
"uuid-789",
"uuid-123"
],
"selectedBy": [
{
"selected": "all",
"isil": "DE-14"
},
{
"selected": "all",
"isil": "DE-15"
}
]
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"metadata-source 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
delete /finc-config/metadata-sources/{id}
Delete an metadata source identified by id
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 metadata-source -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"metadata-source 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
put /finc-config/metadata-sources/{id}
Put an metadata source identified by id
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Source Schema",
"description": "Metadata source in finc config",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string",
"description": "A unique name for this metadata source"
},
"description": {
"type": "string",
"description": "A globally unique (UUID) identifier"
},
"status": {
"type": "string",
"description": "Current status of metadata source",
"enum": [
"active",
"closed",
"impossible",
"implementation",
"request"
]
},
"organization": {
"type": "object",
"description": "The organization delivering content of this metadata source",
"properties": {
"id": {
"type": "string",
"description": "Id of the the sources content’s organization, linked via uuid from organizations app."
},
"name": {
"type": "string",
"description": "Organization's name. If not given, it will be determined by backend module."
}
}
},
"contacts": {
"type": "array",
"description": "List of contacts",
"minItems": 0,
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Contact",
"description": "Contact schema",
"properties": {
"type": {
"type": "string",
"description": "The contact's type. This indicates if the contact originates from the users module or the organizations module.",
"enum": [
"user",
"contact"
]
},
"externalId": {
"type": "string",
"description": "The external id of this contact in the module specified by the type (users or organizations module)."
},
"name": {
"description": "The contact's name (lastName, firstName)",
"type": "string"
},
"role": {
"type": "string",
"description": "The contact's role",
"enum": [
"subject specialist",
"librarian",
"technical",
"vendor"
]
}
},
"required": [
"externalId",
"type",
"name",
"role"
]
}
},
"indexingLevel": {
"type": "string",
"description": "Level used for indexing (e.g. bibliographic)"
},
"generalNotes": {
"type": "string",
"description": "General notes not fitting into the other fields"
},
"lastProcessed": {
"type": "string",
"format": "date-time",
"description": "Date of last processing"
},
"tickets": {
"type": "array",
"description": "Links to internal tickets corresponding to this metadata source",
"minItems": 0,
"items": {
"type": "string"
}
},
"accessUrl": {
"type": "string",
"description": "URL to access metadata source"
},
"sourceId": {
"type": "integer",
"description": "The source id"
},
"solrShard": {
"type": "string",
"description": "Used solr shard",
"enum": [
"SLUB DBoD",
"SLUB dswarm",
"UBL ai",
"UBL DNB",
"UBL main"
]
},
"deliveryMethods": {
"type": "array",
"description": "Available delivery methods (e.g. API download)",
"minItems": 0,
"items": {
"type": "string"
}
},
"formats": {
"type": "array",
"description": "Available formats (e.g. MARC)",
"minItems": 0,
"items": {
"type": "string"
}
},
"updateRhythm": {
"type": "string",
"description": "Metadata source's update rhythm"
},
"inferiorTo": {
"type": "array",
"description": "Link to other metadata sources",
"minItems": 0,
"items": {
"type": "string"
}
},
"selectedBy": {
"type": "array",
"description": "List of tenants/libraries which selected this metadata source",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"isil": {
"type": "string",
"description": "Isil of library/tenant which selected this metadata source"
},
"selected": {
"description": "Indicator if the tenant/library has selected this metadata source",
"enum": [
"all",
"some",
"none"
]
}
}
}
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"id",
"label",
"status",
"sourceId"
],
"additionalProperties": false
}
Example:
{
"id": "6dd325f8-b1d5-4568-a0d7-aecf6b8d6697",
"label": "Cambridge University Press Journals",
"description": "This is a test metadata source",
"status": "active",
"contacts": [
{
"type": "user",
"externalId": "fcfaca0b-12e7-467e-b503-d44a44d60a62",
"name": "Doe, John",
"role": "librarian"
},
{
"type": "contact",
"externalId": "01771c0a-a890-4488-b5e9-366aa697bd93",
"name": "Doe, Jane",
"role": "vendor"
}
],
"indexingLevel": "bibliographic",
"generalNotes": "Test licensing note",
"lastProcessed": "2018-01-01",
"tickets": [
"http://redmine.de/123",
"http://redmine.de/456"
],
"accessUrl": "http://access.url",
"sourceId": 1,
"solrShard": "UBL main",
"deliveryMethods": [
"API Download"
],
"formats": [
"csv"
],
"updateRhythm": "monthly",
"inferiorTo": [
"uuid-789",
"uuid-123"
],
"selectedBy": [
{
"selected": "all",
"isil": "DE-14"
},
{
"selected": "all",
"isil": "DE-15"
}
]
}
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 metadata-source -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"metadata-source not found"
HTTP status code 409
Optimistic locking version conflict
Body
Media type: text/plain
Type: any
Example:
version conflict
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
/finc-config/tiny-metadata-sources
Entity representing a tiny-metadata-source
Get all tiny metadata sources
get /finc-config/tiny-metadata-sources
Get all tiny metadata sources
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#",
"type": "object",
"description": "Collection of tiny metadata sources in finc app",
"properties": {
"tinyMetadataSources": {
"type": "array",
"description": "List of tiny metadata sources",
"id": "tinyMetadataSourcesData",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Source Tiny Schema",
"description": "Tiny metadata source in finc select",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string",
"description": "A unique name for this metadata source"
}
},
"required": [
"id",
"label"
],
"additionalProperties": false
}
},
"totalRecords": {
"type": "integer"
}
},
"required": [
"sources",
"totalRecords"
]
}
Example:
{
"metadataSources": [
{
"id": "6dd325f8-b1d5-4568-a0d7-aecf6b8d6697",
"label": "Cambridge University Press Journals"
},
{
"id": "8ac1e1cf-5128-46b9-b57b-52bbfca7261b",
"label": "Oxford Scholarship Online"
}
],
"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 tiny-metadata-sources -- 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 tiny-metadata-sources -- unauthorized"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"tiny-metadata-source 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
/finc-config/contacts
Entity representing a contact
Get all contacts defined in metadata sources
get /finc-config/contacts
Get all contacts defined in metadata sources
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#",
"type": "object",
"description": "Collection of contacts of metadata sources in finc app",
"properties": {
"contacts": {
"type": "array",
"description": "List of contacts",
"id": "contacts",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Contact",
"description": "Contact schema",
"properties": {
"type": {
"type": "string",
"description": "The contact's type. This indicates if the contact originates from the users module or the organizations module.",
"enum": [
"user",
"contact"
]
},
"externalId": {
"type": "string",
"description": "The external id of this contact in the module specified by the type (users or organizations module)."
},
"name": {
"description": "The contact's name (lastName, firstName)",
"type": "string"
},
"role": {
"type": "string",
"description": "The contact's role",
"enum": [
"subject specialist",
"librarian",
"technical",
"vendor"
]
}
},
"required": [
"externalId",
"type",
"name",
"role"
]
}
},
"totalRecords": {
"type": "integer"
}
},
"required": [
"contacts",
"totalRecords"
]
}
Example:
{
"contacts": [
{
"type": "user",
"externalId": "fcfaca0b-12e7-467e-b503-d44a44d60a62",
"name": "Doe, John",
"role": "librarian"
},
{
"type": "contact",
"externalId": "01771c0a-a890-4488-b5e9-366aa697bd93",
"name": "Doe, Jane",
"role": "vendor"
}
],
"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 contacts -- 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 contacts -- unauthorized"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"contact 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