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)

    Filter by Record Type

    Example:

    MARC
  • state: (string)

    Filter by State

    Example:

    ACTUAL
  • orderBy: (array of string)

    Sort Records

    Example:

    [
      "order,ASC"
    ]
  • 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
  • instanceId: (string)

    Filter by Instance Id

    Example:

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

    Filter by Instance Hrid

    Example:

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

    Filter by Record Type

    Example:

    MARC
  • 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"
    ]
  • 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"
        }
      ]
    }
  ]
}