Source Record Storage Module (v1.0)

http://localhost

Table of contents

Source Record Storage API

API for managing records

/source-storage

GET /source-storage/snapshot

Get a list of snapshots

GET /source-storage/snapshot
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.

    with valid searchable fields: for example status=NEW

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    status=NEW
    
  • 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
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns a list of snapshot items

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Snapshot collection",
  "type": "object",
  "properties": {
    "snapshots": {
      "description": "List of snapshots",
      "type": "array",
      "id": "snapshotList",
      "items": {
        "type": "object",
        "$ref": "snapshot.json"
      }
    },
    "totalRecords": {
      "description": "Total number of snapshots",
      "type": "integer"
    }
  },
  "required": [
    "snapshots",
    "totalRecords"
  ]
}

Example:

{
  "snapshots": {
    {
      "jobExecutionId": "67dfac11-1caf-4470-9ad1-d533f6360bdd",
      "status": "NEW"
    },
    {
      "jobExecutionId": "17dfac11-1caf-4470-9ad1-d533f6360bdd",
      "status": "IMPORT_IN_PROGRESS"
    },
    {
      "jobExecutionId": "27dfac11-1caf-4470-9ad1-d533f6360bdd",
      "status": "PARSING_IN_PROGRESS"
    }
  },
  "totalRecords": 3
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to list snapshot -- unauthorized

Response 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",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

POST /source-storage/snapshot

Create new snapshot

POST /source-storage/snapshot
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": "Snapshot Schema",
  "type": "object",
  "properties": {
    "jobExecutionId": {
      "description": "Corresponding jobExecution id",
      "type": "string"
    },
    "status": {
      "description": "Current status",
      "type": "string",
      "enum": ["NEW", "IMPORT_IN_PROGRESS", "IMPORT_FINISHED", "PARSING_IN_PROGRESS", "PARSING_FINISHED", "PROCESSING_IN_PROGRESS", "PROCESSING_FINISHED", "COMMITTED"]
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "jobExecutionId",
    "status"
  ]
}

Example:

{
  "jobExecutionId": "67dfac11-1caf-4470-9ad1-d533f6360bdd",
  "status": "NEW"
}

Response 201

Returns a newly created item, with server-controlled fields like 'id' populated

Headers
  • Location: required (string)

    URI to the created snapshot item

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Snapshot Schema",
  "type": "object",
  "properties": {
    "jobExecutionId": {
      "description": "Corresponding jobExecution id",
      "type": "string"
    },
    "status": {
      "description": "Current status",
      "type": "string",
      "enum": ["NEW", "IMPORT_IN_PROGRESS", "IMPORT_FINISHED", "PARSING_IN_PROGRESS", "PARSING_FINISHED", "PROCESSING_IN_PROGRESS", "PROCESSING_FINISHED", "COMMITTED"]
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "jobExecutionId",
    "status"
  ]
}

Example:

{
  "jobExecutionId": "67dfac11-1caf-4470-9ad1-d533f6360bdd",
  "status": "NEW"
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create snapshot -- unauthorized

Response 422

Unprocessable Entity

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",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

GET /source-storage/snapshot/{jobExecutionId}

Get snapshot by id

GET /source-storage/snapshot/{jobExecutionId}
URI Parameters
  • jobExecutionId: required (string)

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Snapshot Schema",
  "type": "object",
  "properties": {
    "jobExecutionId": {
      "description": "Corresponding jobExecution id",
      "type": "string"
    },
    "status": {
      "description": "Current status",
      "type": "string",
      "enum": ["NEW", "IMPORT_IN_PROGRESS", "IMPORT_FINISHED", "PARSING_IN_PROGRESS", "PARSING_FINISHED", "PROCESSING_IN_PROGRESS", "PROCESSING_FINISHED", "COMMITTED"]
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "jobExecutionId",
    "status"
  ]
}

Response 404

Not found

Body

Media type: text/plain

Type: any

Example:

Not found

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

PUT /source-storage/snapshot/{jobExecutionId}

Update snapshot

PUT /source-storage/snapshot/{jobExecutionId}
URI Parameters
  • jobExecutionId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Snapshot Schema",
  "type": "object",
  "properties": {
    "jobExecutionId": {
      "description": "Corresponding jobExecution id",
      "type": "string"
    },
    "status": {
      "description": "Current status",
      "type": "string",
      "enum": ["NEW", "IMPORT_IN_PROGRESS", "IMPORT_FINISHED", "PARSING_IN_PROGRESS", "PARSING_FINISHED", "PROCESSING_IN_PROGRESS", "PROCESSING_FINISHED", "COMMITTED"]
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "jobExecutionId",
    "status"
  ]
}

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Snapshot Schema",
  "type": "object",
  "properties": {
    "jobExecutionId": {
      "description": "Corresponding jobExecution id",
      "type": "string"
    },
    "status": {
      "description": "Current status",
      "type": "string",
      "enum": ["NEW", "IMPORT_IN_PROGRESS", "IMPORT_FINISHED", "PARSING_IN_PROGRESS", "PARSING_FINISHED", "PROCESSING_IN_PROGRESS", "PROCESSING_FINISHED", "COMMITTED"]
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "jobExecutionId",
    "status"
  ]
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 404

Not found

Body

Media type: text/plain

Type: any

Example:

Not found

Response 422

Unprocessable Entity

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",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "type": "integer"
    }
  }
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

DELETE /source-storage/snapshot/{jobExecutionId}

Delete snapshot by id

DELETE /source-storage/snapshot/{jobExecutionId}
URI Parameters
  • jobExecutionId: required (string)

Response 204

Body

Media type: text/plain

Type: any

Response 404

File not found

Body

Media type: text/plain

Type: any

Example:

File not found

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

GET /source-storage/record

Get a list of records

GET /source-storage/record
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.

    with valid searchable fields: for example recordType=MARC

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    recordType=MARC
    
  • 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
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns a list of record items

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Collection of record DTO",
  "type": "object",
  "properties": {
    "records": {
      "description": "List of records",
      "type": "array",
      "id": "recordList",
      "items": {
        "type": "object",
        "$ref": "record.json"
      }
    },
    "totalRecords": {
      "description": "Total number of records",
      "type": "integer"
    }
  },
  "required": [
    "records",
    "totalRecords"
  ]
}

Example:

{
  "records": {
    {
      "id": "67dfac11-1caf-4470-9ad1-d533f6360bdd",
      "snapshotId": "11dfac11-1caf-4470-9ad1-d533f6360bdd",
      "matchedProfileId": "c9db56f4-e1d4-11e8-9f32-f2801f1b9fd1",
      "matchedId": "c9db5b04-e1d4-11e8-9f32-f2801f1b9fd1",
      "generation": "1",
      "recordType": "MARC",
      "sourceRecord": {
        "id": "2f390fa6-a2f8-4027-abaf-ee61952668bc",
        "source": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
      },
      "parsedRecord": {
        "id": "c9db5d7a-e1d4-11e8-9f32-f2801f1b9fd1",
        "content": "Parsed content"
      }
    }
  },
  "totalRecords": 1
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to list record -- unauthorized

Response 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",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

POST /source-storage/record

Create new record

POST /source-storage/record
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": "Record DTO Schema",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID",
      "type": "string"
    },
    "snapshotId": {
      "description": "Corresponding snapshot id, which is the same as jobExecutionId",
      "type": "string"
    },
    "matchedProfileId": {
      "description": "Id of the matcher profile which is applied for the record",
      "type": "string"
    },
    "matchedId": {
      "description": "Represents relations with another matched records, necessary for saving the history of applying changes for inventory/holding/etc records",
      "type": "string"
    },
    "generation": {
      "description": "Generation from the last record with the same matchedId incremented by 1",
      "type": "string"
    },
    "recordType": {
      "description": "Type of record, e.g. MARC",
      "type": "string",
      "$ref": "../mod-source-record-storage/recordType.json"
    },
    "sourceRecord": {
      "description": "Source record",
      "type": "object",
      "$ref": "../mod-source-record-storage/sourceRecord.json"
    },
    "parsedRecord": {
      "description": "Parsed record",
      "type": "object",
      "$ref": "../mod-source-record-storage/parsedRecord.json"
    },
    "errorRecord": {
      "description": "Error record",
      "type": "object",
      "$ref": "../mod-source-record-storage/errorRecord.json"
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "snapshotId",
    "recordType",
    "sourceRecord"
  ]
}

Example:

{
  "id": "67dfac11-1caf-4470-9ad1-d533f6360bdd",
  "snapshotId": "11dfac11-1caf-4470-9ad1-d533f6360bdd",
  "matchedProfileId": "c9db56f4-e1d4-11e8-9f32-f2801f1b9fd1",
  "matchedId": "c9db5b04-e1d4-11e8-9f32-f2801f1b9fd1",
  "generation": "1",
  "recordType": "MARC",
  "sourceRecord": {
    "id": "2f390fa6-a2f8-4027-abaf-ee61952668bc",
    "source": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
  },
  "parsedRecord": {
    "id": "c9db5d7a-e1d4-11e8-9f32-f2801f1b9fd1",
    "content": "Parsed content"
  }
}

Response 201

Returns a newly created item, with server-controlled fields like 'id' populated

Headers
  • Location: required (string)

    URI to the created record item

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Record DTO Schema",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID",
      "type": "string"
    },
    "snapshotId": {
      "description": "Corresponding snapshot id, which is the same as jobExecutionId",
      "type": "string"
    },
    "matchedProfileId": {
      "description": "Id of the matcher profile which is applied for the record",
      "type": "string"
    },
    "matchedId": {
      "description": "Represents relations with another matched records, necessary for saving the history of applying changes for inventory/holding/etc records",
      "type": "string"
    },
    "generation": {
      "description": "Generation from the last record with the same matchedId incremented by 1",
      "type": "string"
    },
    "recordType": {
      "description": "Type of record, e.g. MARC",
      "type": "string",
      "$ref": "../mod-source-record-storage/recordType.json"
    },
    "sourceRecord": {
      "description": "Source record",
      "type": "object",
      "$ref": "../mod-source-record-storage/sourceRecord.json"
    },
    "parsedRecord": {
      "description": "Parsed record",
      "type": "object",
      "$ref": "../mod-source-record-storage/parsedRecord.json"
    },
    "errorRecord": {
      "description": "Error record",
      "type": "object",
      "$ref": "../mod-source-record-storage/errorRecord.json"
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "snapshotId",
    "recordType",
    "sourceRecord"
  ]
}

Example:

{
  "id": "67dfac11-1caf-4470-9ad1-d533f6360bdd",
  "snapshotId": "11dfac11-1caf-4470-9ad1-d533f6360bdd",
  "matchedProfileId": "c9db56f4-e1d4-11e8-9f32-f2801f1b9fd1",
  "matchedId": "c9db5b04-e1d4-11e8-9f32-f2801f1b9fd1",
  "generation": "1",
  "recordType": "MARC",
  "sourceRecord": {
    "id": "2f390fa6-a2f8-4027-abaf-ee61952668bc",
    "source": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
  },
  "parsedRecord": {
    "id": "c9db5d7a-e1d4-11e8-9f32-f2801f1b9fd1",
    "content": "Parsed content"
  }
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create record -- unauthorized

Response 422

Unprocessable Entity

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",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

GET /source-storage/record/{id}

Get record by id

GET /source-storage/record/{id}
URI Parameters
  • id: required (string)

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Record DTO Schema",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID",
      "type": "string"
    },
    "snapshotId": {
      "description": "Corresponding snapshot id, which is the same as jobExecutionId",
      "type": "string"
    },
    "matchedProfileId": {
      "description": "Id of the matcher profile which is applied for the record",
      "type": "string"
    },
    "matchedId": {
      "description": "Represents relations with another matched records, necessary for saving the history of applying changes for inventory/holding/etc records",
      "type": "string"
    },
    "generation": {
      "description": "Generation from the last record with the same matchedId incremented by 1",
      "type": "string"
    },
    "recordType": {
      "description": "Type of record, e.g. MARC",
      "type": "string",
      "$ref": "../mod-source-record-storage/recordType.json"
    },
    "sourceRecord": {
      "description": "Source record",
      "type": "object",
      "$ref": "../mod-source-record-storage/sourceRecord.json"
    },
    "parsedRecord": {
      "description": "Parsed record",
      "type": "object",
      "$ref": "../mod-source-record-storage/parsedRecord.json"
    },
    "errorRecord": {
      "description": "Error record",
      "type": "object",
      "$ref": "../mod-source-record-storage/errorRecord.json"
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "snapshotId",
    "recordType",
    "sourceRecord"
  ]
}

Response 404

Not found

Body

Media type: text/plain

Type: any

Example:

Not found

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

PUT /source-storage/record/{id}

Update record

PUT /source-storage/record/{id}
URI Parameters
  • id: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Record DTO Schema",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID",
      "type": "string"
    },
    "snapshotId": {
      "description": "Corresponding snapshot id, which is the same as jobExecutionId",
      "type": "string"
    },
    "matchedProfileId": {
      "description": "Id of the matcher profile which is applied for the record",
      "type": "string"
    },
    "matchedId": {
      "description": "Represents relations with another matched records, necessary for saving the history of applying changes for inventory/holding/etc records",
      "type": "string"
    },
    "generation": {
      "description": "Generation from the last record with the same matchedId incremented by 1",
      "type": "string"
    },
    "recordType": {
      "description": "Type of record, e.g. MARC",
      "type": "string",
      "$ref": "../mod-source-record-storage/recordType.json"
    },
    "sourceRecord": {
      "description": "Source record",
      "type": "object",
      "$ref": "../mod-source-record-storage/sourceRecord.json"
    },
    "parsedRecord": {
      "description": "Parsed record",
      "type": "object",
      "$ref": "../mod-source-record-storage/parsedRecord.json"
    },
    "errorRecord": {
      "description": "Error record",
      "type": "object",
      "$ref": "../mod-source-record-storage/errorRecord.json"
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "snapshotId",
    "recordType",
    "sourceRecord"
  ]
}

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Record DTO Schema",
  "type": "object",
  "properties": {
    "id": {
      "description": "UUID",
      "type": "string"
    },
    "snapshotId": {
      "description": "Corresponding snapshot id, which is the same as jobExecutionId",
      "type": "string"
    },
    "matchedProfileId": {
      "description": "Id of the matcher profile which is applied for the record",
      "type": "string"
    },
    "matchedId": {
      "description": "Represents relations with another matched records, necessary for saving the history of applying changes for inventory/holding/etc records",
      "type": "string"
    },
    "generation": {
      "description": "Generation from the last record with the same matchedId incremented by 1",
      "type": "string"
    },
    "recordType": {
      "description": "Type of record, e.g. MARC",
      "type": "string",
      "$ref": "../mod-source-record-storage/recordType.json"
    },
    "sourceRecord": {
      "description": "Source record",
      "type": "object",
      "$ref": "../mod-source-record-storage/sourceRecord.json"
    },
    "parsedRecord": {
      "description": "Parsed record",
      "type": "object",
      "$ref": "../mod-source-record-storage/parsedRecord.json"
    },
    "errorRecord": {
      "description": "Error record",
      "type": "object",
      "$ref": "../mod-source-record-storage/errorRecord.json"
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "snapshotId",
    "recordType",
    "sourceRecord"
  ]
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 404

Not found

Body

Media type: text/plain

Type: any

Example:

Not found

Response 422

Unprocessable Entity

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",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "type": "integer"
    }
  }
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

DELETE /source-storage/record/{id}

Delete record by id

DELETE /source-storage/record/{id}
URI Parameters
  • id: required (string)

Response 204

Body

Media type: text/plain

Type: any

Response 404

File not found

Body

Media type: text/plain

Type: any

Example:

File not found

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

GET /source-storage/result

Get a list of results

GET /source-storage/result
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.

    with valid searchable fields: for example recordType=MARC

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    recordType=MARC
    
  • 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

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Collection of result DTO",
  "type": "object",
  "properties": {
    "results": {
      "description": "List of results",
      "type": "array",
      "id": "resultList",
      "items": {
        "type": "object",
        "$ref": "result.json"
      }
    },
    "totalRecords": {
      "description": "Total number of results",
      "type": "integer"
    }
  },
  "required": [
    "results",
    "totalRecords"
  ]
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 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",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error