Instance Storage (v6.0)

http://localhost

Table of contents

Instance Storage API

Storage for instances in the inventory

/instance-storage

GET /instance-storage/instance-relationships

Retrieve a list of instance-relationship items.

GET /instance-storage/instance-relationships
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.

    by parent ID or by child ID (using CQL)

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    subInstanceId==83a50dc6-b887-43d9-93ee-28b2c4cd11f8 superInstanceId==30fcc8e7-a019-43f4-b642-2edc389f4501 instanceRelationshipTypeId==758f13db-ffb4-440e-bb10-8a364aa6cb4a AND superInstanceId=30fcc8e7-a019-43f4-b642-2edc389f4501
    
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns a list of instance-relationship items

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "instanceRelationships": {
      "id": "instanceRelationships",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "instancerelationship.json"
      }
    },
    "totalRecords": {
      "type": "integer"
    }
  },
  "required": [
    "instanceRelationships",
    "totalRecords"
  ]
}

Example:

{
  "instanceRelationships": [
    {
     "id": "4b8093b8-8de9-41be-ad9a-0fbccb99052b",
     "superInstanceId": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
     "subInstanceId": "83a50dc6-b887-43d9-93ee-28b2c4cd11f8",
     "instanceRelationshipTypeId": "758f13db-ffb4-440e-bb10-8a364aa6cb4a"
    },
    {
     "id": "b87c7c37-b8a4-432f-9d76-f9d215602776",
     "superInstanceId": "60e89ae2-9c93-4819-bbbe-dd8e0ec78177",
     "subInstanceId": "6a3aa70f-0204-41a0-ab58-06a42cb5032c",
     "instanceRelationshipTypeId": "30773a27-b485-4dab-aeb6-b8c04fa3cb17"
    }
  ],
  "totalRecords": 2
}

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 instance-relationships -- 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 instance-relationships -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /instance-storage/instance-relationships

Create a new instance-relationship item.

POST /instance-storage/instance-relationships
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#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "superInstanceId": {
      "type": "string"
    },
    "subInstanceId": {
      "type": "string"
    },
    "instanceRelationshipTypeId": {
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "superInstanceId",
    "subInstanceId",
    "instanceRelationshipTypeId"
  ]
}

Example:

{
  "id": "4b8093b8-8de9-41be-ad9a-0fbccb99052b",
  "superInstanceId": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
  "subInstanceId": "83a50dc6-b887-43d9-93ee-28b2c4cd11f8",
  "instanceRelationshipTypeId": "758f13db-ffb4-440e-bb10-8a364aa6cb4a"
}

Response 201

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

Headers
  • Location: required (string)

    URI to the created instance-relationship item

Body

Media type: application/json

Type: any

Example:

{
  "id": "4b8093b8-8de9-41be-ad9a-0fbccb99052b",
  "superInstanceId": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
  "subInstanceId": "83a50dc6-b887-43d9-93ee-28b2c4cd11f8",
  "instanceRelationshipTypeId": "758f13db-ffb4-440e-bb10-8a364aa6cb4a"
}

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 add instance-relationship -- malformed JSON at 13:3"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create instance-relationships -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

GET /instance-storage/instance-relationships/{relationshipId}

Get Instance Relationship

GET /instance-storage/instance-relationships/{relationshipId}
URI Parameters
  • relationshipId: required (string)
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#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "superInstanceId": {
      "type": "string"
    },
    "subInstanceId": {
      "type": "string"
    },
    "instanceRelationshipTypeId": {
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "superInstanceId",
    "subInstanceId",
    "instanceRelationshipTypeId"
  ]
}

Example:

{
  "id": "4b8093b8-8de9-41be-ad9a-0fbccb99052b",
  "superInstanceId": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
  "subInstanceId": "83a50dc6-b887-43d9-93ee-28b2c4cd11f8",
  "instanceRelationshipTypeId": "758f13db-ffb4-440e-bb10-8a364aa6cb4a"
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"instance-relationship 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

DELETE /instance-storage/instance-relationships/{relationshipId}

Delete instance-relationship item with given {instance-relationshipId}

DELETE /instance-storage/instance-relationships/{relationshipId}
URI Parameters
  • relationshipId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 204

Item deleted successfully

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 delete instance-relationship -- constraint violation"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"instance-relationship 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

PUT /instance-storage/instance-relationships/{relationshipId}

Update instance-relationship item with given {instance-relationshipId}

PUT /instance-storage/instance-relationships/{relationshipId}
URI Parameters
  • relationshipId: required (string)
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#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "superInstanceId": {
      "type": "string"
    },
    "subInstanceId": {
      "type": "string"
    },
    "instanceRelationshipTypeId": {
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "superInstanceId",
    "subInstanceId",
    "instanceRelationshipTypeId"
  ]
}

Example:

{
  "id": "4b8093b8-8de9-41be-ad9a-0fbccb99052b",
  "superInstanceId": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
  "subInstanceId": "83a50dc6-b887-43d9-93ee-28b2c4cd11f8",
  "instanceRelationshipTypeId": "758f13db-ffb4-440e-bb10-8a364aa6cb4a"
}

Response 204

Item successfully updated

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 update instance-relationship -- malformed JSON at 13:4"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"instance-relationship 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

GET /instance-storage/instances

Retrieve a list of instance items.

GET /instance-storage/instances
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.

    by title (using CQL)

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    title="*uproot*"
    
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns a list of instance items

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A collection of instance records",
  "type": "object",
  "properties": {
    "instances": {
      "description": "List of instance records",
      "id": "instances",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "instance.json"
      }
    },
    "totalRecords": {
      "type": "integer"
    }
  },
  "required": [
    "instances",
    "totalRecords"
  ]
}

Example:

{
  "instances": [
    {
      "id": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
      "title": "ADVANCING LIBRARY EDUCATION: TECHNOLOGICAL INNOVATION AND INSTRUCTIONAL DESIGN",
      "source": "Local: MARC",
      "contributors": [
        {
          "name": "Sigal, Ari",
          "contributorNameTypeId": "2b94c631-fca9-4892-a730-03ee529ffe2a",
          "primary": true
        }
      ],
      "identifiers": [
        {
          "identifierTypeId": "2e48e713-17f3-4c13-a9f8-23845bb210af",
          "value": "9781466636897"
        },
        {
          "identifierTypeId": "6051f95c-028e-4c6a-8a9e-ee689dd51453",
          "value": "1"
        }
      ],
      "instanceTypeId": "2b94c631-fca9-4892-a730-03ee529ffe2c"
    },
    {
      "id": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
      "title": "ADVANCING RESEARCH METHODS WITH NEW TECHNOLOGIES.",
      "source": "Local: MARC",
      "contributors": [
        {
          "name": "Sappleton, Natalie",
          "contributorNameTypeId": "2b94c631-fca9-4892-a730-03ee529ffe2a",
          "primary": true
        }
      ],
      "identifiers": [
        {
          "identifierTypeId": "2e48e713-17f3-4c13-a9f8-23845bb210af",
          "value": "9781466639195"
        },
        {
          "identifierTypeId": "6051f95c-028e-4c6a-8a9e-ee689dd51453",
          "value": "2"
        }
      ],
      "instanceTypeId": "2b94c631-fca9-4892-a730-03ee529ffe2c"
    }
  ],
  "totalRecords": 2
}

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 instances -- 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 instances -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /instance-storage/instances

Create a new instance item.

POST /instance-storage/instances
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": "An instance record",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The system assigned unique ID of the instance record; UUID"
    },
    "hrid": {
      "type": "string",
      "description": "The human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID"
    },
    "source": {
      "type": "string",
      "description": "The metadata source and its format of the underlying record to the instance record. (e.g. FOLIO if it's a record created in Inventory;  MARC if it's a MARC record created in MARCcat or EPKB if it's a record coming from eHoldings)"
    },
    "title": {
      "type": "string",
      "description": "The primary title (or label) associated with the resource"
    },
    "indexTitle": {
      "type": "string",
      "description": "Title normalized for browsing and searching; based on the title with articles removed"
    },
    "alternativeTitles": {
      "type": "array",
      "description": "List of alternative titles for the resource (e.g. original language version title of a movie)",
      "items": {
        "type": "object",
        "properties": {
          "alternativeTitleTypeId": {
            "type": "string",
            "description": "ID for an alternative title qualifier"
          },
          "alternativeTitle": {
            "type": "string",
            "description": "An alternative title for the resource"
          }
        }
      },
      "uniqueItems": true
    },
    "editions": {
      "type": "array",
      "description": "The edition statement, imprint and other publication source information",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "series": {
      "type": "array",
      "description": "List of series titles associated with the resource (e.g. Harry Potter)",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "identifiers": {
      "type": "array",
      "description": "An extensible set of name-value pairs of identifiers associated with the resource",
      "minItems": 0,
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "Resource identifier value"
          },
          "identifierTypeId": {
            "type": "string",
            "description": "Resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)"
          }
        },
        "additionalProperties": false,
        "required": [
          "value",
          "identifierTypeId"
        ]
      }
    },
    "contributors": {
      "type": "array",
      "description": "List of contributors",
      "minItems": 0,
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Personal name, corporate name, meeting name"
          },
          "contributorTypeId": {
            "type": "string",
            "description": "ID for the contributor type term defined as a referencetable in settings"
          },
          "contributorTypeText": {
            "type": "string",
            "description": "Free text element for adding contributor type terms other that defined by the MARC code list for relators"
          },
          "contributorNameTypeId": {
            "type": "string",
            "description": "Contributor type terms defined by the MARC code list for relators"
          },
          "primary": {
            "type": "boolean",
            "description": "Whether this is the primary contributor"
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "contributorNameTypeId"
        ]
      }
    },
    "subjects": {
      "type": "array",
      "description": "List of subject headings",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "classifications": {
      "type": "array",
      "description": "List of classifications",
      "minItems": 0,
      "items": {
        "type": "object",
        "properties": {
          "classificationNumber": {
            "type": "string",
            "description": "Classification (e.g. classification scheme, classification schedule)"
          },
          "classificationTypeId": {
            "type": "string",
            "description": "List of classification schemas (e.g. LC, Canadian Classification, NLM, National Agricultural Library, UDC, and Dewey)"
          }
        },
        "additionalProperties": false,
        "required": [
          "classificationNumber",
          "classificationTypeId"
        ]
      }
    },
    "publication": {
      "type": "array",
      "description": "List of publication items",
      "items": {
        "type": "object",
        "properties": {
          "publisher": {
            "type": "string",
            "description": "Name of publisher, distributor, etc."
          },
          "place": {
            "type": "string",
            "description": "Place of publication, distribution, etc."
          },
          "dateOfPublication": {
            "type": "string",
            "description": "Date (year YYYY) of publication, distribution, etc."
          },
          "role": {
            "type": "string",
            "description": "The role of the publisher, distributor, etc."
          }
        }
      }
    },
    "publicationFrequency": {
      "type": "array",
      "description": "List of intervals at which a serial appears (e.g. daily, weekly, monthly, quarterly, etc.)",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "publicationRange": {
      "type": "array",
      "description": "The range of sequential designation/chronology of publication, or date range",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "electronicAccess": {
      "type": "array",
      "description": "List of electronic access items",
      "items": {
        "type": "object",
        "properties": {
          "uri": {
            "type": "string",
            "description": "Uniform Resource Identifier (URI) is a string of characters designed for unambiguous identification of resources"
          },
          "linkText": {
            "type": "string",
            "description": "The value of the MARC tag field 856 2nd indicator, where the values are: no information provided, resource, version of resource, related resource, no display constant generated"
          },
          "materialsSpecification": {
            "type": "string",
            "description": "Materials specified is used to specify to what portion or aspect of the resource the electronic location and access information applies (e.g. a portion or subset of the item is electronic, or a related electronic resource is being linked to the record)"
          },
          "publicNote": {
            "type": "string",
            "description": "URL public note to be displayed in the discovery"
          },
          "relationshipId": {
            "type": "string",
            "description": "Relationship between the electronic resource at the location identified and the item described in the record as a whole"
          }
        },
        "additionalProperties": false,
        "required": [
          "uri"
        ]
      }
    },
    "instanceTypeId": {
      "type": "string",
      "description": "The unique term for the resource type whether it's from the RDA content term list of locally defined"
    },
    "instanceFormatIds": {
      "type": "array",
      "description": "The unique term for the format whether it's from the RDA carrier term list of locally defined",
      "items": {
        "type": "string"
      }
    },
    "physicalDescriptions": {
      "type": "array",
      "description": "Physical description of the described resource, including its extent, dimensions, and such other physical details as a description of any accompanying materials and unit type and size",
      "items": {
        "type": "string"
      }
    },
    "languages": {
      "type": "array",
      "description": "The set of languages used by the resource",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "notes": {
      "type": "array",
      "description": "Bibliographic notes (e.g. general notes, specialized notes), and administrative notes",
      "items": {
        "type": "string"
      }
    },
    "modeOfIssuanceId": {
      "type": "string",
      "description": "RDA mode of issuance is a categorization reflecting whether a resource is issued in one or more parts, the way it is updated, and whether its termination is predetermined or not (e.g. monograph,  sequential monograph, serial; integrating Resource, other)"
    },
    "catalogedDate": {
      "type": "string",
      "description": "Date or timestamp on an instance for when is was considered cataloged"
    },
    "previouslyHeld": {
      "type": "boolean",
      "description": "Records the fact that the resource was previously held by the library for things like Hathi access, etc."
    },
    "staffSuppress": {
      "type": "boolean",
      "description": "Records the fact that the record should not be displayed for others than catalogers"
    },
    "discoverySuppress": {
      "type": "boolean",
      "description": "Records the fact that the record should not be displayed in a discovery system"
    },
    "statisticalCodeIds": {
      "type": "array",
      "description": "List of statistical code IDs",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "sourceRecordFormat": {
      "type": "string",
      "description": "Format of the instance source record, if a source record exists (e.g. FOLIO if it's a record created in Inventory,  MARC if it's a MARC record created in MARCcat or EPKB if it's a record coming from eHoldings)",
      "enum": ["MARC-JSON"],
      "readonly": true
    },
    "statusId": {
      "type": "string",
      "description": "Instance status term (e.g. cataloged, uncatalogued, batch loaded, temporary, other, not yet assigned)"
    },
    "statusUpdatedDate": {
      "type": "string",
      "description": "Date [or timestamp] for when the instance status was updated"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    },
    "holdingsRecords2": {
      "type": "array",
      "description": "List of holdings records",
      "items": {
        "type": "object",
        "$ref": "holdingsrecord.json"
      },
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "holdings-storage/holdings",
      "folio:linkFromField": "id",
      "folio:linkToField": "instanceId",
      "folio:includedElement": "holdingsRecords"
    }
  },
  "additionalProperties": false,
  "required": [
    "source",
    "title",
    "instanceTypeId"
  ]
}

Example:

{
  "id": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
  "source": "Local: MARC",
  "title": "ADVANCING LIBRARY EDUCATION: TECHNOLOGICAL INNOVATION AND INSTRUCTIONAL DESIGN",
  "contributors": [
    {
      "name": "Sigal, Ari",
      "contributorNameTypeId": "2b94c631-fca9-4892-a730-03ee529ffe2a",
      "primary": true
    }
  ],
  "identifiers": [
    {
      "identifierTypeId": "2e48e713-17f3-4c13-a9f8-23845bb210af",
      "value": "9781466636897"
    },
    {
      "identifierTypeId": "6051f95c-028e-4c6a-8a9e-ee689dd51453",
      "value": "1"
    }
  ],
  "instanceTypeId": "2b94c631-fca9-4892-a730-03ee529ffe2c"
}

Response 201

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

Headers
  • Location: required (string)

    URI to the created instance item

Body

Media type: application/json

Type: any

Example:

{
  "id": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
  "source": "Local: MARC",
  "title": "ADVANCING LIBRARY EDUCATION: TECHNOLOGICAL INNOVATION AND INSTRUCTIONAL DESIGN",
  "contributors": [
    {
      "name": "Sigal, Ari",
      "contributorNameTypeId": "2b94c631-fca9-4892-a730-03ee529ffe2a",
      "primary": true
    }
  ],
  "identifiers": [
    {
      "identifierTypeId": "2e48e713-17f3-4c13-a9f8-23845bb210af",
      "value": "9781466636897"
    },
    {
      "identifierTypeId": "6051f95c-028e-4c6a-8a9e-ee689dd51453",
      "value": "1"
    }
  ],
  "instanceTypeId": "2b94c631-fca9-4892-a730-03ee529ffe2c"
}

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 add instance -- malformed JSON at 13:3"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create instances -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

DELETE /instance-storage/instances

DELETE /instance-storage/instances
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 204

All instances deleted

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

GET /instance-storage/instances/{instanceId}

Get Instance by InstanceId Instances are stored and accessed by a hash of key properties. The rules which govern how instance hashes are computed are business rules and defined in the service layer. the storage layer only knows how to insert or retrieve instance records by ID.

GET /instance-storage/instances/{instanceId}
URI Parameters
  • instanceId: required (string)
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": "An instance record",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The system assigned unique ID of the instance record; UUID"
    },
    "hrid": {
      "type": "string",
      "description": "The human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID"
    },
    "source": {
      "type": "string",
      "description": "The metadata source and its format of the underlying record to the instance record. (e.g. FOLIO if it's a record created in Inventory;  MARC if it's a MARC record created in MARCcat or EPKB if it's a record coming from eHoldings)"
    },
    "title": {
      "type": "string",
      "description": "The primary title (or label) associated with the resource"
    },
    "indexTitle": {
      "type": "string",
      "description": "Title normalized for browsing and searching; based on the title with articles removed"
    },
    "alternativeTitles": {
      "type": "array",
      "description": "List of alternative titles for the resource (e.g. original language version title of a movie)",
      "items": {
        "type": "object",
        "properties": {
          "alternativeTitleTypeId": {
            "type": "string",
            "description": "ID for an alternative title qualifier"
          },
          "alternativeTitle": {
            "type": "string",
            "description": "An alternative title for the resource"
          }
        }
      },
      "uniqueItems": true
    },
    "editions": {
      "type": "array",
      "description": "The edition statement, imprint and other publication source information",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "series": {
      "type": "array",
      "description": "List of series titles associated with the resource (e.g. Harry Potter)",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "identifiers": {
      "type": "array",
      "description": "An extensible set of name-value pairs of identifiers associated with the resource",
      "minItems": 0,
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "Resource identifier value"
          },
          "identifierTypeId": {
            "type": "string",
            "description": "Resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)"
          }
        },
        "additionalProperties": false,
        "required": [
          "value",
          "identifierTypeId"
        ]
      }
    },
    "contributors": {
      "type": "array",
      "description": "List of contributors",
      "minItems": 0,
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Personal name, corporate name, meeting name"
          },
          "contributorTypeId": {
            "type": "string",
            "description": "ID for the contributor type term defined as a referencetable in settings"
          },
          "contributorTypeText": {
            "type": "string",
            "description": "Free text element for adding contributor type terms other that defined by the MARC code list for relators"
          },
          "contributorNameTypeId": {
            "type": "string",
            "description": "Contributor type terms defined by the MARC code list for relators"
          },
          "primary": {
            "type": "boolean",
            "description": "Whether this is the primary contributor"
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "contributorNameTypeId"
        ]
      }
    },
    "subjects": {
      "type": "array",
      "description": "List of subject headings",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "classifications": {
      "type": "array",
      "description": "List of classifications",
      "minItems": 0,
      "items": {
        "type": "object",
        "properties": {
          "classificationNumber": {
            "type": "string",
            "description": "Classification (e.g. classification scheme, classification schedule)"
          },
          "classificationTypeId": {
            "type": "string",
            "description": "List of classification schemas (e.g. LC, Canadian Classification, NLM, National Agricultural Library, UDC, and Dewey)"
          }
        },
        "additionalProperties": false,
        "required": [
          "classificationNumber",
          "classificationTypeId"
        ]
      }
    },
    "publication": {
      "type": "array",
      "description": "List of publication items",
      "items": {
        "type": "object",
        "properties": {
          "publisher": {
            "type": "string",
            "description": "Name of publisher, distributor, etc."
          },
          "place": {
            "type": "string",
            "description": "Place of publication, distribution, etc."
          },
          "dateOfPublication": {
            "type": "string",
            "description": "Date (year YYYY) of publication, distribution, etc."
          },
          "role": {
            "type": "string",
            "description": "The role of the publisher, distributor, etc."
          }
        }
      }
    },
    "publicationFrequency": {
      "type": "array",
      "description": "List of intervals at which a serial appears (e.g. daily, weekly, monthly, quarterly, etc.)",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "publicationRange": {
      "type": "array",
      "description": "The range of sequential designation/chronology of publication, or date range",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "electronicAccess": {
      "type": "array",
      "description": "List of electronic access items",
      "items": {
        "type": "object",
        "properties": {
          "uri": {
            "type": "string",
            "description": "Uniform Resource Identifier (URI) is a string of characters designed for unambiguous identification of resources"
          },
          "linkText": {
            "type": "string",
            "description": "The value of the MARC tag field 856 2nd indicator, where the values are: no information provided, resource, version of resource, related resource, no display constant generated"
          },
          "materialsSpecification": {
            "type": "string",
            "description": "Materials specified is used to specify to what portion or aspect of the resource the electronic location and access information applies (e.g. a portion or subset of the item is electronic, or a related electronic resource is being linked to the record)"
          },
          "publicNote": {
            "type": "string",
            "description": "URL public note to be displayed in the discovery"
          },
          "relationshipId": {
            "type": "string",
            "description": "Relationship between the electronic resource at the location identified and the item described in the record as a whole"
          }
        },
        "additionalProperties": false,
        "required": [
          "uri"
        ]
      }
    },
    "instanceTypeId": {
      "type": "string",
      "description": "The unique term for the resource type whether it's from the RDA content term list of locally defined"
    },
    "instanceFormatIds": {
      "type": "array",
      "description": "The unique term for the format whether it's from the RDA carrier term list of locally defined",
      "items": {
        "type": "string"
      }
    },
    "physicalDescriptions": {
      "type": "array",
      "description": "Physical description of the described resource, including its extent, dimensions, and such other physical details as a description of any accompanying materials and unit type and size",
      "items": {
        "type": "string"
      }
    },
    "languages": {
      "type": "array",
      "description": "The set of languages used by the resource",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "notes": {
      "type": "array",
      "description": "Bibliographic notes (e.g. general notes, specialized notes), and administrative notes",
      "items": {
        "type": "string"
      }
    },
    "modeOfIssuanceId": {
      "type": "string",
      "description": "RDA mode of issuance is a categorization reflecting whether a resource is issued in one or more parts, the way it is updated, and whether its termination is predetermined or not (e.g. monograph,  sequential monograph, serial; integrating Resource, other)"
    },
    "catalogedDate": {
      "type": "string",
      "description": "Date or timestamp on an instance for when is was considered cataloged"
    },
    "previouslyHeld": {
      "type": "boolean",
      "description": "Records the fact that the resource was previously held by the library for things like Hathi access, etc."
    },
    "staffSuppress": {
      "type": "boolean",
      "description": "Records the fact that the record should not be displayed for others than catalogers"
    },
    "discoverySuppress": {
      "type": "boolean",
      "description": "Records the fact that the record should not be displayed in a discovery system"
    },
    "statisticalCodeIds": {
      "type": "array",
      "description": "List of statistical code IDs",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "sourceRecordFormat": {
      "type": "string",
      "description": "Format of the instance source record, if a source record exists (e.g. FOLIO if it's a record created in Inventory,  MARC if it's a MARC record created in MARCcat or EPKB if it's a record coming from eHoldings)",
      "enum": ["MARC-JSON"],
      "readonly": true
    },
    "statusId": {
      "type": "string",
      "description": "Instance status term (e.g. cataloged, uncatalogued, batch loaded, temporary, other, not yet assigned)"
    },
    "statusUpdatedDate": {
      "type": "string",
      "description": "Date [or timestamp] for when the instance status was updated"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    },
    "holdingsRecords2": {
      "type": "array",
      "description": "List of holdings records",
      "items": {
        "type": "object",
        "$ref": "holdingsrecord.json"
      },
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "holdings-storage/holdings",
      "folio:linkFromField": "id",
      "folio:linkToField": "instanceId",
      "folio:includedElement": "holdingsRecords"
    }
  },
  "additionalProperties": false,
  "required": [
    "source",
    "title",
    "instanceTypeId"
  ]
}

Example:

{
  "id": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
  "source": "Local: MARC",
  "title": "ADVANCING LIBRARY EDUCATION: TECHNOLOGICAL INNOVATION AND INSTRUCTIONAL DESIGN",
  "contributors": [
    {
      "name": "Sigal, Ari",
      "contributorNameTypeId": "2b94c631-fca9-4892-a730-03ee529ffe2a",
      "primary": true
    }
  ],
  "identifiers": [
    {
      "identifierTypeId": "2e48e713-17f3-4c13-a9f8-23845bb210af",
      "value": "9781466636897"
    },
    {
      "identifierTypeId": "6051f95c-028e-4c6a-8a9e-ee689dd51453",
      "value": "1"
    }
  ],
  "instanceTypeId": "2b94c631-fca9-4892-a730-03ee529ffe2c"
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"instance 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

DELETE /instance-storage/instances/{instanceId}

Delete instance item with given {instanceId}

DELETE /instance-storage/instances/{instanceId}
URI Parameters
  • instanceId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 204

Item deleted successfully

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 delete instance -- constraint violation"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"instance 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

PUT /instance-storage/instances/{instanceId}

Update instance item with given {instanceId}

PUT /instance-storage/instances/{instanceId}
URI Parameters
  • instanceId: required (string)
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": "An instance record",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The system assigned unique ID of the instance record; UUID"
    },
    "hrid": {
      "type": "string",
      "description": "The human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID"
    },
    "source": {
      "type": "string",
      "description": "The metadata source and its format of the underlying record to the instance record. (e.g. FOLIO if it's a record created in Inventory;  MARC if it's a MARC record created in MARCcat or EPKB if it's a record coming from eHoldings)"
    },
    "title": {
      "type": "string",
      "description": "The primary title (or label) associated with the resource"
    },
    "indexTitle": {
      "type": "string",
      "description": "Title normalized for browsing and searching; based on the title with articles removed"
    },
    "alternativeTitles": {
      "type": "array",
      "description": "List of alternative titles for the resource (e.g. original language version title of a movie)",
      "items": {
        "type": "object",
        "properties": {
          "alternativeTitleTypeId": {
            "type": "string",
            "description": "ID for an alternative title qualifier"
          },
          "alternativeTitle": {
            "type": "string",
            "description": "An alternative title for the resource"
          }
        }
      },
      "uniqueItems": true
    },
    "editions": {
      "type": "array",
      "description": "The edition statement, imprint and other publication source information",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "series": {
      "type": "array",
      "description": "List of series titles associated with the resource (e.g. Harry Potter)",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "identifiers": {
      "type": "array",
      "description": "An extensible set of name-value pairs of identifiers associated with the resource",
      "minItems": 0,
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "Resource identifier value"
          },
          "identifierTypeId": {
            "type": "string",
            "description": "Resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)"
          }
        },
        "additionalProperties": false,
        "required": [
          "value",
          "identifierTypeId"
        ]
      }
    },
    "contributors": {
      "type": "array",
      "description": "List of contributors",
      "minItems": 0,
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Personal name, corporate name, meeting name"
          },
          "contributorTypeId": {
            "type": "string",
            "description": "ID for the contributor type term defined as a referencetable in settings"
          },
          "contributorTypeText": {
            "type": "string",
            "description": "Free text element for adding contributor type terms other that defined by the MARC code list for relators"
          },
          "contributorNameTypeId": {
            "type": "string",
            "description": "Contributor type terms defined by the MARC code list for relators"
          },
          "primary": {
            "type": "boolean",
            "description": "Whether this is the primary contributor"
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "contributorNameTypeId"
        ]
      }
    },
    "subjects": {
      "type": "array",
      "description": "List of subject headings",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "classifications": {
      "type": "array",
      "description": "List of classifications",
      "minItems": 0,
      "items": {
        "type": "object",
        "properties": {
          "classificationNumber": {
            "type": "string",
            "description": "Classification (e.g. classification scheme, classification schedule)"
          },
          "classificationTypeId": {
            "type": "string",
            "description": "List of classification schemas (e.g. LC, Canadian Classification, NLM, National Agricultural Library, UDC, and Dewey)"
          }
        },
        "additionalProperties": false,
        "required": [
          "classificationNumber",
          "classificationTypeId"
        ]
      }
    },
    "publication": {
      "type": "array",
      "description": "List of publication items",
      "items": {
        "type": "object",
        "properties": {
          "publisher": {
            "type": "string",
            "description": "Name of publisher, distributor, etc."
          },
          "place": {
            "type": "string",
            "description": "Place of publication, distribution, etc."
          },
          "dateOfPublication": {
            "type": "string",
            "description": "Date (year YYYY) of publication, distribution, etc."
          },
          "role": {
            "type": "string",
            "description": "The role of the publisher, distributor, etc."
          }
        }
      }
    },
    "publicationFrequency": {
      "type": "array",
      "description": "List of intervals at which a serial appears (e.g. daily, weekly, monthly, quarterly, etc.)",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "publicationRange": {
      "type": "array",
      "description": "The range of sequential designation/chronology of publication, or date range",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "electronicAccess": {
      "type": "array",
      "description": "List of electronic access items",
      "items": {
        "type": "object",
        "properties": {
          "uri": {
            "type": "string",
            "description": "Uniform Resource Identifier (URI) is a string of characters designed for unambiguous identification of resources"
          },
          "linkText": {
            "type": "string",
            "description": "The value of the MARC tag field 856 2nd indicator, where the values are: no information provided, resource, version of resource, related resource, no display constant generated"
          },
          "materialsSpecification": {
            "type": "string",
            "description": "Materials specified is used to specify to what portion or aspect of the resource the electronic location and access information applies (e.g. a portion or subset of the item is electronic, or a related electronic resource is being linked to the record)"
          },
          "publicNote": {
            "type": "string",
            "description": "URL public note to be displayed in the discovery"
          },
          "relationshipId": {
            "type": "string",
            "description": "Relationship between the electronic resource at the location identified and the item described in the record as a whole"
          }
        },
        "additionalProperties": false,
        "required": [
          "uri"
        ]
      }
    },
    "instanceTypeId": {
      "type": "string",
      "description": "The unique term for the resource type whether it's from the RDA content term list of locally defined"
    },
    "instanceFormatIds": {
      "type": "array",
      "description": "The unique term for the format whether it's from the RDA carrier term list of locally defined",
      "items": {
        "type": "string"
      }
    },
    "physicalDescriptions": {
      "type": "array",
      "description": "Physical description of the described resource, including its extent, dimensions, and such other physical details as a description of any accompanying materials and unit type and size",
      "items": {
        "type": "string"
      }
    },
    "languages": {
      "type": "array",
      "description": "The set of languages used by the resource",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "notes": {
      "type": "array",
      "description": "Bibliographic notes (e.g. general notes, specialized notes), and administrative notes",
      "items": {
        "type": "string"
      }
    },
    "modeOfIssuanceId": {
      "type": "string",
      "description": "RDA mode of issuance is a categorization reflecting whether a resource is issued in one or more parts, the way it is updated, and whether its termination is predetermined or not (e.g. monograph,  sequential monograph, serial; integrating Resource, other)"
    },
    "catalogedDate": {
      "type": "string",
      "description": "Date or timestamp on an instance for when is was considered cataloged"
    },
    "previouslyHeld": {
      "type": "boolean",
      "description": "Records the fact that the resource was previously held by the library for things like Hathi access, etc."
    },
    "staffSuppress": {
      "type": "boolean",
      "description": "Records the fact that the record should not be displayed for others than catalogers"
    },
    "discoverySuppress": {
      "type": "boolean",
      "description": "Records the fact that the record should not be displayed in a discovery system"
    },
    "statisticalCodeIds": {
      "type": "array",
      "description": "List of statistical code IDs",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "sourceRecordFormat": {
      "type": "string",
      "description": "Format of the instance source record, if a source record exists (e.g. FOLIO if it's a record created in Inventory,  MARC if it's a MARC record created in MARCcat or EPKB if it's a record coming from eHoldings)",
      "enum": ["MARC-JSON"],
      "readonly": true
    },
    "statusId": {
      "type": "string",
      "description": "Instance status term (e.g. cataloged, uncatalogued, batch loaded, temporary, other, not yet assigned)"
    },
    "statusUpdatedDate": {
      "type": "string",
      "description": "Date [or timestamp] for when the instance status was updated"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    },
    "holdingsRecords2": {
      "type": "array",
      "description": "List of holdings records",
      "items": {
        "type": "object",
        "$ref": "holdingsrecord.json"
      },
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "holdings-storage/holdings",
      "folio:linkFromField": "id",
      "folio:linkToField": "instanceId",
      "folio:includedElement": "holdingsRecords"
    }
  },
  "additionalProperties": false,
  "required": [
    "source",
    "title",
    "instanceTypeId"
  ]
}

Example:

{
  "id": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
  "source": "Local: MARC",
  "title": "ADVANCING LIBRARY EDUCATION: TECHNOLOGICAL INNOVATION AND INSTRUCTIONAL DESIGN",
  "contributors": [
    {
      "name": "Sigal, Ari",
      "contributorNameTypeId": "2b94c631-fca9-4892-a730-03ee529ffe2a",
      "primary": true
    }
  ],
  "identifiers": [
    {
      "identifierTypeId": "2e48e713-17f3-4c13-a9f8-23845bb210af",
      "value": "9781466636897"
    },
    {
      "identifierTypeId": "6051f95c-028e-4c6a-8a9e-ee689dd51453",
      "value": "1"
    }
  ],
  "instanceTypeId": "2b94c631-fca9-4892-a730-03ee529ffe2c"
}

Response 204

Item successfully updated

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 update instance -- malformed JSON at 13:4"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"instance 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

DELETE /instance-storage/instances/{instanceId}/source-record

Delete the source record. Note: The source records gets automatically deleted when its instance record is deleted.

DELETE /instance-storage/instances/{instanceId}/source-record
URI Parameters
  • instanceId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 204

Source record deleted

Response 404

There is no source record for that instanceId

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

GET /instance-storage/instances/{instanceId}/source-record/marc-json

Retrieve marc-json item with given {marc-jsonId}

GET /instance-storage/instances/{instanceId}/source-record/marc-json
URI Parameters
  • instanceId: required (string)
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": "MARC record representation, compatible with MarcEdit's JSON export and import",
  "type": "object",
  "properties": {
    "leader": {
      "type": "string",
      "minLength": 24,
      "maxLength": 24
    },
    "fields": {
      "type": "array",
      "minItems": 2
    }
  },
  "additionalProperties": false,
  "required": [
    "leader",
    "fields"
  ]
}

Example:

{
  "leader":"00452nam a2200169 ca4500",
  "fields":[
    {"001":"029857716"},
    {"003":"DE-601"},
    {"005":"20180511131518.0"},
    {"008":"900626m19799999xxk\\\\\\\\\\\\\\\\\\\\\\000\\0\\eng\\d"},
    {"035":{"ind1":"\\",
            "ind2":"\\",
            "subfields":[{"a":"(DE-599)GBV029857716"}]}},
    {"040":{"ind1":"\\",
            "ind2":"\\",
            "subfields":[{"b":"ger"},
                         {"c":"GBVCP"}]}},
    {"041":{"ind1":"0",
            "ind2":"\\",
            "subfields":[{"a":"eng"}]}},
    {"044":{"ind1":"\\",
            "ind2":"\\",
            "subfields":[{"a":"xxk"},
                         {"a":"at"}]}},
    {"100":{"ind1":"1",
            "ind2":"\\",
            "subfields":[{"a":"Adams, Douglas"}]}},
    {"245":{"ind1":"1",
            "ind2":"4",
            "subfields":[{"a":"The Hitch Hiker's guide to the Galaxy"},
                         {"c":"Douglas Adams"}]}},
    {"246":{"ind1":"1",
            "ind2":"3",
            "subfields":[{"i":"Nebent."},
                         {"a":"The hitchhiker series"}]}},
    {"264":{"ind1":"3",
            "ind2":"1",
            "subfields":[{"a":"London [u.a.]"},
                         {"b":"Pan Books"},
                         {"c":"1979-"}]}}
  ]
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"marc-json 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

DELETE /instance-storage/instances/{instanceId}/source-record/marc-json

Delete marc-json item with given {marc-jsonId}

DELETE /instance-storage/instances/{instanceId}/source-record/marc-json
URI Parameters
  • instanceId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 204

Item deleted successfully

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 delete marc-json -- constraint violation"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"marc-json 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

PUT /instance-storage/instances/{instanceId}/source-record/marc-json

Update marc-json item with given {marc-jsonId}

PUT /instance-storage/instances/{instanceId}/source-record/marc-json
URI Parameters
  • instanceId: required (string)
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": "MARC record representation, compatible with MarcEdit's JSON export and import",
  "type": "object",
  "properties": {
    "leader": {
      "type": "string",
      "minLength": 24,
      "maxLength": 24
    },
    "fields": {
      "type": "array",
      "minItems": 2
    }
  },
  "additionalProperties": false,
  "required": [
    "leader",
    "fields"
  ]
}

Example:

{
  "leader":"00452nam a2200169 ca4500",
  "fields":[
    {"001":"029857716"},
    {"003":"DE-601"},
    {"005":"20180511131518.0"},
    {"008":"900626m19799999xxk\\\\\\\\\\\\\\\\\\\\\\000\\0\\eng\\d"},
    {"035":{"ind1":"\\",
            "ind2":"\\",
            "subfields":[{"a":"(DE-599)GBV029857716"}]}},
    {"040":{"ind1":"\\",
            "ind2":"\\",
            "subfields":[{"b":"ger"},
                         {"c":"GBVCP"}]}},
    {"041":{"ind1":"0",
            "ind2":"\\",
            "subfields":[{"a":"eng"}]}},
    {"044":{"ind1":"\\",
            "ind2":"\\",
            "subfields":[{"a":"xxk"},
                         {"a":"at"}]}},
    {"100":{"ind1":"1",
            "ind2":"\\",
            "subfields":[{"a":"Adams, Douglas"}]}},
    {"245":{"ind1":"1",
            "ind2":"4",
            "subfields":[{"a":"The Hitch Hiker's guide to the Galaxy"},
                         {"c":"Douglas Adams"}]}},
    {"246":{"ind1":"1",
            "ind2":"3",
            "subfields":[{"i":"Nebent."},
                         {"a":"The hitchhiker series"}]}},
    {"264":{"ind1":"3",
            "ind2":"1",
            "subfields":[{"a":"London [u.a.]"},
                         {"b":"Pan Books"},
                         {"c":"1979-"}]}}
  ]
}

Response 204

Item successfully updated

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 update marc-json -- malformed JSON at 13:4"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"marc-json 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

GET /instance-storage/instances/{instanceId}/source-record/mods

GET /instance-storage/instances/{instanceId}/source-record/mods
URI Parameters
  • instanceId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 500

Not implemented yet

Body

Media type: text/plain

Type: any

Example:

Not implemented yet

PUT /instance-storage/instances/{instanceId}/source-record/mods

PUT /instance-storage/instances/{instanceId}/source-record/mods
URI Parameters
  • instanceId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 500

Not implemented yet

Body

Media type: text/plain

Type: any

Example:

Not implemented yet