Data export version v2.0
https://github.com/folio-org/mod-data-export
Data export Mapping Profile API
APIs for managing Mapping Profiles
/data-export/mapping-profiles
Service provides APIs supporting Mapping profiles
Create a new mapping-profile item.
Retrieve a list of mapping-profile items.
post /data-export/mapping-profiles
Create a new mapping-profile item.
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Mapping Profile schema",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Unique identifier",
"$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}$"
},
"name": {
"description": "Mapping Profile name",
"type": "string"
},
"default": {
"description": "Is default mapping profile",
"type": "boolean",
"default": false,
"readonly": true
},
"description": {
"description": "Mapping Profile description",
"type": "string"
},
"recordTypes": {
"description": "Mapping Profile records type",
"type": "array",
"items": {
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Enum of entity (record) types",
"additionalProperties": false,
"enum": [
"INSTANCE",
"HOLDINGS",
"ITEM",
"AUTHORITY",
"SRS"
]
}
},
"transformations": {
"description": "List of mapping profile transformations",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Mapping transformations detail",
"javaType": "org.folio.rest.jaxrs.model.Transformations",
"additionalProperties": false,
"properties": {
"fieldId": {
"description": "Field identifier",
"type": "string"
},
"path": {
"description": "JSON path to set mapped value",
"type": "string"
},
"enabled": {
"description": "Indicates whether field should be mapped",
"type": "boolean",
"default": false
},
"transformation": {
"description": "Mapping expression",
"type": "string",
"pattern": "((\\d{3}([\\s]|[\\d]|[a-zA-Z]){2}(\\$([a-zA-Z]|[\\d]{1,2}))?)|(^$))"
},
"recordType": {
"description": "Mapping Profile type",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"INSTANCE",
"HOLDINGS",
"ITEM",
"AUTHORITY",
"SRS"
]
},
"metadataParameters": {
"description": "Additional parameters used for mapping",
"type": "object",
"javaType": "java.util.Map<String, String>"
}
},
"required": [
"fieldId",
"recordType"
]
}
},
"userInfo": {
"description": "First name, last name and username of the user, who updated the Mapping Profile",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"firstName": {
"description": "User first name",
"type": "string"
},
"lastName": {
"description": "User last name",
"type": "string"
},
"userName": {
"description": "User name (nickname)",
"type": "string"
}
}
},
"outputFormat": {
"description": "Mapping Profile output format",
"type": "string",
"enum": [
"MARC"
]
},
"metadata": {
"description": "Metadata provided by the server",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/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": [
"name",
"recordTypes"
]
}Example:
{
"id": "3798f546-7afb-11ea-bc55-0242ac130003",
"name": "Mapping profile",
"description": "Mapping profile description",
"recordTypes": [
"INSTANCE"
],
"outputFormat": "MARC",
"transformations": [
{
"fieldId": "electronicAccess.linkText",
"path": "Json path for electronicAccess[*].linkText",
"transformation": "001",
"enabled": true,
"recordType": "INSTANCE"
}
],
"userInfo": {
"firstName": "User",
"lastName": "User",
"userName": "@username"
},
"metadata": {
"createdDate": "2019-07-22T11:22:07Z",
"createdByUserId": "dee12548-9cee-45fa-bbae-675c1cc0ce3b",
"createdByUsername": "janedoeuser",
"updatedDate": "2019-07-27T13:28:54Z",
"updatedByUserId": "dee12548-9cee-45fa-bbae-675c1cc0ce3b",
"updatedByUsername": ""
}
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created mapping-profile item
Body
Media type: application/json
Type: any
Example:
{
"id": "3798f546-7afb-11ea-bc55-0242ac130003",
"name": "Mapping profile",
"description": "Mapping profile description",
"recordTypes": [
"INSTANCE"
],
"outputFormat": "MARC",
"transformations": [
{
"fieldId": "electronicAccess.linkText",
"path": "Json path for electronicAccess[*].linkText",
"transformation": "001",
"enabled": true,
"recordType": "INSTANCE"
}
],
"userInfo": {
"firstName": "User",
"lastName": "User",
"userName": "@username"
},
"metadata": {
"createdDate": "2019-07-22T11:22:07Z",
"createdByUserId": "dee12548-9cee-45fa-bbae-675c1cc0ce3b",
"createdByUsername": "janedoeuser",
"updatedDate": "2019-07-27T13:28:54Z",
"updatedByUserId": "dee12548-9cee-45fa-bbae-675c1cc0ce3b",
"updatedByUsername": ""
}
}
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 mapping-profile -- 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 mapping-profiles -- unauthorizedHTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/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#",
"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": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"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 /data-export/mapping-profiles
Retrieve a list of mapping-profile items.
Query Parameters
- 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
Example:
10 - 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.
with valid searchable fields
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode status=SUCCESS - lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 200
Returns a list of mapping-profile items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of Mapping Profiles",
"type": "object",
"additionalProperties": false,
"properties": {
"mappingProfiles": {
"description": "List of Mapping Profiles",
"type": "array",
"id": "mappingProfileList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Mapping Profile schema",
"additionalProperties": false,
"properties": {
"id": {
"description": "Unique identifier",
"$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}$"
},
"name": {
"description": "Mapping Profile name",
"type": "string"
},
"default": {
"description": "Is default mapping profile",
"type": "boolean",
"default": false,
"readonly": true
},
"description": {
"description": "Mapping Profile description",
"type": "string"
},
"recordTypes": {
"description": "Mapping Profile records type",
"type": "array",
"items": {
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Enum of entity (record) types",
"additionalProperties": false,
"enum": [
"INSTANCE",
"HOLDINGS",
"ITEM",
"AUTHORITY",
"SRS"
]
}
},
"transformations": {
"description": "List of mapping profile transformations",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Mapping transformations detail",
"javaType": "org.folio.rest.jaxrs.model.Transformations",
"additionalProperties": false,
"properties": {
"fieldId": {
"description": "Field identifier",
"type": "string"
},
"path": {
"description": "JSON path to set mapped value",
"type": "string"
},
"enabled": {
"description": "Indicates whether field should be mapped",
"type": "boolean",
"default": false
},
"transformation": {
"description": "Mapping expression",
"type": "string",
"pattern": "((\\d{3}([\\s]|[\\d]|[a-zA-Z]){2}(\\$([a-zA-Z]|[\\d]{1,2}))?)|(^$))"
},
"recordType": {
"description": "Mapping Profile type",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"INSTANCE",
"HOLDINGS",
"ITEM",
"AUTHORITY",
"SRS"
]
},
"metadataParameters": {
"description": "Additional parameters used for mapping",
"type": "object",
"javaType": "java.util.Map<String, String>"
}
},
"required": [
"fieldId",
"recordType"
]
}
},
"userInfo": {
"description": "First name, last name and username of the user, who updated the Mapping Profile",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"firstName": {
"description": "User first name",
"type": "string"
},
"lastName": {
"description": "User last name",
"type": "string"
},
"userName": {
"description": "User name (nickname)",
"type": "string"
}
}
},
"outputFormat": {
"description": "Mapping Profile output format",
"type": "string",
"enum": [
"MARC"
]
},
"metadata": {
"description": "Metadata provided by the server",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/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": [
"name",
"recordTypes"
]
}
},
"totalRecords": {
"description": "Total number of Mapping Profiles",
"type": "integer"
}
},
"required": [
"mappingProfiles",
"totalRecords"
]
}Example:
{
"mappingProfiles": [
{
"id": "3798f546-7afb-11ea-bc55-0242ac130003",
"name": "Example mapping profile",
"description": "Example mapping profile description",
"recordTypes": [
"INSTANCE"
],
"outputFormat": "MARC",
"transformations": [
{
"fieldId": "electronicAccess.linkText",
"path": "Json path for electronicAccess[*].linkText",
"transformation": "001",
"enabled": true,
"recordType": "INSTANCE"
}
],
"userInfo": {
"firstName": "User",
"lastName": "User",
"userName": "@username"
},
"metadata": {
"createdDate": "2020-04-10T12:41:22.000",
"createdByUserId": "",
"createdByUsername": "@username",
"updatedDate": "2020-04-10T12:41:22.000",
"updatedByUserId": "",
"updatedByUsername": "@username"
}
}
],
"totalRecords": 1
}
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 mapping-profiles -- 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 mapping-profiles -- unauthorizedHTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/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#",
"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": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"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 mapping Profile
Retrieve mapping-profile item with given {mapping-profileId}
Delete mapping-profile item with given {mapping-profileId}
Update mapping-profile item with given {mapping-profileId}
get /data-export/mapping-profiles/{id}
Retrieve mapping-profile item with given {mapping-profileId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a mapping Profile
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
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": "Mapping Profile schema",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Unique identifier",
"$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}$"
},
"name": {
"description": "Mapping Profile name",
"type": "string"
},
"default": {
"description": "Is default mapping profile",
"type": "boolean",
"default": false,
"readonly": true
},
"description": {
"description": "Mapping Profile description",
"type": "string"
},
"recordTypes": {
"description": "Mapping Profile records type",
"type": "array",
"items": {
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Enum of entity (record) types",
"additionalProperties": false,
"enum": [
"INSTANCE",
"HOLDINGS",
"ITEM",
"AUTHORITY",
"SRS"
]
}
},
"transformations": {
"description": "List of mapping profile transformations",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Mapping transformations detail",
"javaType": "org.folio.rest.jaxrs.model.Transformations",
"additionalProperties": false,
"properties": {
"fieldId": {
"description": "Field identifier",
"type": "string"
},
"path": {
"description": "JSON path to set mapped value",
"type": "string"
},
"enabled": {
"description": "Indicates whether field should be mapped",
"type": "boolean",
"default": false
},
"transformation": {
"description": "Mapping expression",
"type": "string",
"pattern": "((\\d{3}([\\s]|[\\d]|[a-zA-Z]){2}(\\$([a-zA-Z]|[\\d]{1,2}))?)|(^$))"
},
"recordType": {
"description": "Mapping Profile type",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"INSTANCE",
"HOLDINGS",
"ITEM",
"AUTHORITY",
"SRS"
]
},
"metadataParameters": {
"description": "Additional parameters used for mapping",
"type": "object",
"javaType": "java.util.Map<String, String>"
}
},
"required": [
"fieldId",
"recordType"
]
}
},
"userInfo": {
"description": "First name, last name and username of the user, who updated the Mapping Profile",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"firstName": {
"description": "User first name",
"type": "string"
},
"lastName": {
"description": "User last name",
"type": "string"
},
"userName": {
"description": "User name (nickname)",
"type": "string"
}
}
},
"outputFormat": {
"description": "Mapping Profile output format",
"type": "string",
"enum": [
"MARC"
]
},
"metadata": {
"description": "Metadata provided by the server",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/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": [
"name",
"recordTypes"
]
}Example:
{
"id": "3798f546-7afb-11ea-bc55-0242ac130003",
"name": "Mapping profile",
"description": "Mapping profile description",
"recordTypes": [
"INSTANCE"
],
"outputFormat": "MARC",
"transformations": [
{
"fieldId": "electronicAccess.linkText",
"path": "Json path for electronicAccess[*].linkText",
"transformation": "001",
"enabled": true,
"recordType": "INSTANCE"
}
],
"userInfo": {
"firstName": "User",
"lastName": "User",
"userName": "@username"
},
"metadata": {
"createdDate": "2019-07-22T11:22:07Z",
"createdByUserId": "dee12548-9cee-45fa-bbae-675c1cc0ce3b",
"createdByUsername": "janedoeuser",
"updatedDate": "2019-07-27T13:28:54Z",
"updatedByUserId": "dee12548-9cee-45fa-bbae-675c1cc0ce3b",
"updatedByUsername": ""
}
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"mapping-profile 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 /data-export/mapping-profiles/{id}
Delete mapping-profile item with given {mapping-profileId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a mapping Profile
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
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 mapping-profile -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"mapping-profile 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 administratorput /data-export/mapping-profiles/{id}
Update mapping-profile item with given {mapping-profileId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a mapping Profile
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Mapping Profile schema",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Unique identifier",
"$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}$"
},
"name": {
"description": "Mapping Profile name",
"type": "string"
},
"default": {
"description": "Is default mapping profile",
"type": "boolean",
"default": false,
"readonly": true
},
"description": {
"description": "Mapping Profile description",
"type": "string"
},
"recordTypes": {
"description": "Mapping Profile records type",
"type": "array",
"items": {
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Enum of entity (record) types",
"additionalProperties": false,
"enum": [
"INSTANCE",
"HOLDINGS",
"ITEM",
"AUTHORITY",
"SRS"
]
}
},
"transformations": {
"description": "List of mapping profile transformations",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Mapping transformations detail",
"javaType": "org.folio.rest.jaxrs.model.Transformations",
"additionalProperties": false,
"properties": {
"fieldId": {
"description": "Field identifier",
"type": "string"
},
"path": {
"description": "JSON path to set mapped value",
"type": "string"
},
"enabled": {
"description": "Indicates whether field should be mapped",
"type": "boolean",
"default": false
},
"transformation": {
"description": "Mapping expression",
"type": "string",
"pattern": "((\\d{3}([\\s]|[\\d]|[a-zA-Z]){2}(\\$([a-zA-Z]|[\\d]{1,2}))?)|(^$))"
},
"recordType": {
"description": "Mapping Profile type",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"INSTANCE",
"HOLDINGS",
"ITEM",
"AUTHORITY",
"SRS"
]
},
"metadataParameters": {
"description": "Additional parameters used for mapping",
"type": "object",
"javaType": "java.util.Map<String, String>"
}
},
"required": [
"fieldId",
"recordType"
]
}
},
"userInfo": {
"description": "First name, last name and username of the user, who updated the Mapping Profile",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"firstName": {
"description": "User first name",
"type": "string"
},
"lastName": {
"description": "User last name",
"type": "string"
},
"userName": {
"description": "User name (nickname)",
"type": "string"
}
}
},
"outputFormat": {
"description": "Mapping Profile output format",
"type": "string",
"enum": [
"MARC"
]
},
"metadata": {
"description": "Metadata provided by the server",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/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": [
"name",
"recordTypes"
]
}Example:
{
"id": "3798f546-7afb-11ea-bc55-0242ac130003",
"name": "Mapping profile",
"description": "Mapping profile description",
"recordTypes": [
"INSTANCE"
],
"outputFormat": "MARC",
"transformations": [
{
"fieldId": "electronicAccess.linkText",
"path": "Json path for electronicAccess[*].linkText",
"transformation": "001",
"enabled": true,
"recordType": "INSTANCE"
}
],
"userInfo": {
"firstName": "User",
"lastName": "User",
"userName": "@username"
},
"metadata": {
"createdDate": "2019-07-22T11:22:07Z",
"createdByUserId": "dee12548-9cee-45fa-bbae-675c1cc0ce3b",
"createdByUsername": "janedoeuser",
"updatedDate": "2019-07-27T13:28:54Z",
"updatedByUserId": "dee12548-9cee-45fa-bbae-675c1cc0ce3b",
"updatedByUsername": ""
}
}
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 mapping-profile -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"mapping-profile 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