Source Record Storage Stream API (v1.0)

http://localhost

Table of contents

Source Record Storage Stream API

Streaming API for searching records

/source-storage/stream

GET /source-storage/stream/records

Stream collection of records; including raw record, parsed record, and error record if applicable

GET /source-storage/stream/records
Query Parameters
  • snapshotId: (string)

    Filter by Snapshot Id

    Example:

    e5ddbbdc-90b3-498f-bb8f-49367ca4c142
  • recordType: required (string - default: MARC_BIB)

    Filter by Record Type

    Example:

    MARC_BIB
  • state: (string)

    Filter by State

    Example:

    ACTUAL
  • orderBy: (array of string)

    Sort Records

    Example:

    [
      "order,ASC"
    ]
  • 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

    Example:

    10

Response 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"
        }
      ]
    }
  ]
}

GET /source-storage/stream/source-records

Stream collection of source records; including only latest generation and parsed record

GET /source-storage/stream/source-records
Query Parameters
  • recordId: (string)

    Filter by Record Id

    Example:

    876270bc-fbb4-409d-b8b0-3f59b1cb61f2
  • snapshotId: (string)

    Filter by Snapshot Id

    Example:

    7a8fbd77-5b2a-496c-93e7-cd04478f4fcc
  • externalId: (string)

    Filter by external entity Id

    Example:

    8b07da70-8ea7-4acd-83a0-44d83979c73b
  • externalHrid: (string)

    Filter by external entity Hrid

    Example:

    12345
  • instanceId: (string)

    Filter by Instance Id

    Example:

    8b07da70-8ea7-4acd-83a0-44d83979c73b
  • instanceHrid: (string)

    Filter by Instance Hrid

    Example:

    12345
  • holdingsId: (string)

    Filter by Holdings Id

    Example:

    8b07da70-8ea7-4acd-83a0-44d83979c73b
  • holdingsHrid: (string)

    Filter by Holdings Hrid

    Example:

    12345
  • recordType: required (string - default: MARC_BIB)

    Filter by Record Type

    Example:

    MARC_BIB
  • suppressFromDiscovery: (boolean)

    Filter by suppress from discovery

    Example:

    true
  • deleted: required (boolean - default: false)

    Filter by records with state ACTUAL OR state DELETED OR leader 05 status d, s, or x

    Example:

    true
  • leaderRecordStatus: (string - pattern: ^[a|c|d|n|p|o|s|x]{1}$)

    Filter by MARC leader 05 status

    Example:

    n
  • updatedAfter: (datetime)

    Start date to filter after, inclusive

  • updatedBefore: (datetime)

    End date to filter before, inclusive

  • orderBy: (array of string)

    Sort records

    Example:

    [
      "order,ASC"
    ]
  • 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

    Example:

    10

Response 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"
        }
      ]
    }
  ]
}

POST /source-storage/stream/marc-record-identifiers

Get a list of Marc Record IDs using post method

POST /source-storage/stream/marc-record-identifiers
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Schema for records search requests",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "leaderSearchExpression": {
      "id": "leaderSearchExpression",
      "description": "Expression to search records by the marc leader",
      "type": "string"
    },
    "fieldsSearchExpression": {
      "id": "fieldsSearchExpression",
      "description": "Expression to search records by the marc fields",
      "type": "string"
    },
    "suppressFromDiscovery": {
      "id": "suppressFromDiscovery",
      "description": "Flag to search by the records that are suppressed from discovery",
      "type": "boolean"
    },
    "deleted": {
      "id": "deleted",
      "description": "Flag to search by deleted records",
      "type": "boolean"
    },
    "offset": {
      "id": "offset",
      "description": "Offset flag",
      "type": "integer"
    },
    "limit": {
      "id": "limit",
      "description": "Limit flag",
      "type": "integer"
    }
  }
}

Response 200

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#",
  "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"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error