Data export (v1.0)

https://github.com/folio-org/mod-data-export

Table of contents

Data export transformation fields API

API for getting transformation fields

transformation fields service

Service provides APIs for getting transformation fields

GET /data-export/transformation-fields

Retrieve transformation-field item with given {transformation-fieldId}

GET /data-export/transformation-fields
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns item with a given ID

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Collection of transformation fields",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "transformationFields": {
      "description": "List of transformation fields",
      "type": "array",
      "id": "transformationFieldsList",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Transformation field",
        "additionalProperties": false,
        "properties": {
          "fieldId": {
            "description": "Mapping rule id of this field",
            "type": "string"
          },
          "displayNameKey": {
            "description": "Display name key, that will used for localization on UI",
            "type": "string"
          },
          "referenceDataValue": {
            "description": "Reference data value of the field",
            "type": "string"
          },
          "path": {
            "description": "Json path of the field",
            "type": "string"
          },
          "recordType": {
            "description": "Record type of the field",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "string",
            "additionalProperties": false,
            "enum": [
              "INSTANCE",
              "HOLDINGS",
              "ITEM",
              "SRS"
            ]
          },
          "metadataParameters": {
            "description": "Additional parameters used for mapping",
            "type": "object",
            "javaType": "java.util.Map<String, String>"
          }
        },
        "required": [
          "fieldId",
          "displayNameKey",
          "path"
        ]
      }
    },
    "totalRecords": {
      "description": "Total number of transformation fields",
      "type": "integer"
    }
  },
  "required": [
    "transformationFields",
    "totalRecords"
  ]
}

Example:

{
   "transformationFields":[
      {
         "fieldId":"instance.identifiers.invalid.issn",
         "displayNameKey":"instance.identifiers",
         "referenceDataValue":"Invalid ISSN",
         "path":"$.instance[*].identifiers[?(@identifierTypeId==27fd35a6-b8f6-41f2-aa0e-9c663ceb250c)].value",
         "recordType":"INSTANCE"
      }
   ],
   "totalRecords": 1
}

Response 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 transformation-fields -- malformed parameter 'query', syntax error at column 6"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

"unable to list transformation-fields -- unauthorized"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"transformation-field not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator