Preceding/succeeding Titles API (v0.2)

http://localhost

Table of contents

Preceding/succeeding Titles API

Storage for preceding/succeeding titles in the inventory

Preceding/Succeeding titles

Collection of preceding-succeeding-title items.

GET /preceding-succeeding-titles

Return a list of preceding succeeding titles

GET /preceding-succeeding-titles
Query Parameters
  • 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. Using limit=0 will return totalRecords with the exact value. For details about totalRecords see https://github.com/folio-org/raml-module-builder#estimated-totalrecords

    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 preceding instance ID or by succeeding instance ID (using CQL))

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    precedingInstanceId==83a50dc6-b887-43d9-93ee-28b2c4cd11f8 succeedingInstanceId==30fcc8e7-a019-43f4-b642-2edc389f4501
    

Response 200

The new preceding/succeeding title has been successfully returned

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A collection of InstanceRelationship records",
  "type": "object",
  "properties": {
    "precedingSucceedingTitles": {
      "description": "List of instance relationships",
      "id": "precedingSucceedingTitles",
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "A relationship of a given type between a super-instance and a sub-instance",
        "properties": {
          "id": {
            "description": "unique ID of the preceding-succeeding title",
            "type": "string",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          },
          "precedingInstanceId": {
            "description": "ID (a UUID) of the preceding instance",
            "type": "string",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          },
          "succeedingInstanceId": {
            "description": "ID (a UUID) of the succeeding instance",
            "type": "string",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          },
          "title": {
            "type": "string",
            "description": "The primary title (or label) associated with the resource"
          },
          "hrid": {
            "type": "string",
            "description": "The human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID"
          },
          "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": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)",
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
                }
              },
              "additionalProperties": false,
              "required": [
                "value",
                "identifierTypeId"
              ]
            }
          },
          "metadata": {
            "type": "object",
            "readonly": true,
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "metadata.schema",
            "title": "Metadata Schema",
            "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
            "properties": {
              "createdDate": {
                "description": "Date and time when the record was created",
                "type": "string",
                "format": "date-time"
              },
              "createdByUserId": {
                "description": "ID of the user who created the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "createdByUsername": {
                "description": "Username of the user who created the record (when available)",
                "type": "string"
              },
              "updatedDate": {
                "description": "Date and time when the record was last updated",
                "type": "string",
                "format": "date-time"
              },
              "updatedByUserId": {
                "description": "ID of the user who last updated the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "updatedByUsername": {
                "description": "Username of the user who last updated the record (when available)",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "createdDate"
            ]
          }
        },
        "additionalProperties": false
      }
    },
    "totalRecords": {
      "description": "Estimated or exact total number of records",
      "type": "integer"
    }
  },
  "required": [
    "precedingSucceedingTitles",
    "totalRecords"
  ]
}

Example:

{
  "precedingSucceedingTitles": [
    {
      "id": "4b8093b8-8de9-41be-ad9a-0fbccb99052b",
      "precedingInstanceId": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
      "succeedingInstanceId": "83a50dc6-b887-43d9-93ee-28b2c4cd11f8",
      "title": "A semantic web primer",
      "hrid": "inst000000000022",
      "identifiers": [
        {
          "identifierTypeId": "8261054f-be78-422d-bd51-4ed9f33c3422",
          "value": "0262012103"
        }
      ]
    }
  ],
  "totalRecords": 1
}

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

unable to list preceding-succeeding-titles -- 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 preceding-succeeding-titles -- unauthorized

Response 422

Unprocessable Entity

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

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

POST /preceding-succeeding-titles

Create a new preceding/succeeding title

POST /preceding-succeeding-titles
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A relationship of a given type between a super-instance and a sub-instance",
  "type": "object",
  "properties": {
    "id": {
      "description": "unique ID of the preceding-succeeding title",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "precedingInstanceId": {
      "description": "ID (a UUID) of the preceding instance",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "succeedingInstanceId": {
      "description": "ID (a UUID) of the succeeding instance",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "title": {
      "type": "string",
      "description": "The primary title (or label) associated with the resource"
    },
    "hrid": {
      "type": "string",
      "description": "The human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID"
    },
    "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": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          }
        },
        "additionalProperties": false,
        "required": [
          "value",
          "identifierTypeId"
        ]
      }
    },
    "metadata": {
      "type": "object",
      "readonly": true,
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    }
  },
  "additionalProperties": false
}

Example:

{
  "id": "4b8093b8-8de9-41be-ad9a-0fbccb99052b",
  "precedingInstanceId": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
  "succeedingInstanceId": "83a50dc6-b887-43d9-93ee-28b2c4cd11f8",
  "title": "A semantic web primer",
  "hrid": "inst000000000022",
  "identifiers": [
    {
      "identifierTypeId": "8261054f-be78-422d-bd51-4ed9f33c3422",
      "value": "0262012103"
    }
  ]
}

Response 201

The new preceding/succeeding title has been successfully created

Headers
  • Location: required (string)

    URI to the created preceding-succeeding-title item

Body

Media type: application/json

Type: any

Example:

{
  "id": "4b8093b8-8de9-41be-ad9a-0fbccb99052b",
  "precedingInstanceId": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
  "succeedingInstanceId": "83a50dc6-b887-43d9-93ee-28b2c4cd11f8",
  "title": "A semantic web primer",
  "hrid": "inst000000000022",
  "identifiers": [
    {
      "identifierTypeId": "8261054f-be78-422d-bd51-4ed9f33c3422",
      "value": "0262012103"
    }
  ]
}

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 preceding-succeeding-title -- malformed JSON at 13:3"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create preceding-succeeding-titles -- unauthorized

Response 422

Unprocessable Entity

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, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

GET /preceding-succeeding-titles/{precedingSucceedingTitleId}

Get a preceding/succeeding title by id

GET /preceding-succeeding-titles/{precedingSucceedingTitleId}
URI Parameters
  • precedingSucceedingTitleId: required (string)

Response 200

The preceding/succeeding title has been returned

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A relationship of a given type between a super-instance and a sub-instance",
  "type": "object",
  "properties": {
    "id": {
      "description": "unique ID of the preceding-succeeding title",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "precedingInstanceId": {
      "description": "ID (a UUID) of the preceding instance",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "succeedingInstanceId": {
      "description": "ID (a UUID) of the succeeding instance",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "title": {
      "type": "string",
      "description": "The primary title (or label) associated with the resource"
    },
    "hrid": {
      "type": "string",
      "description": "The human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID"
    },
    "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": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          }
        },
        "additionalProperties": false,
        "required": [
          "value",
          "identifierTypeId"
        ]
      }
    },
    "metadata": {
      "type": "object",
      "readonly": true,
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    }
  },
  "additionalProperties": false
}

Example:

{
  "id": "4b8093b8-8de9-41be-ad9a-0fbccb99052b",
  "precedingInstanceId": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
  "succeedingInstanceId": "83a50dc6-b887-43d9-93ee-28b2c4cd11f8",
  "title": "A semantic web primer",
  "hrid": "inst000000000022",
  "identifiers": [
    {
      "identifierTypeId": "8261054f-be78-422d-bd51-4ed9f33c3422",
      "value": "0262012103"
    }
  ]
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"preceding-succeeding-title not found"

Response 422

Unprocessable Entity

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

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

PUT /preceding-succeeding-titles/{precedingSucceedingTitleId}

Update a preceding/succeeding title by id

PUT /preceding-succeeding-titles/{precedingSucceedingTitleId}
URI Parameters
  • precedingSucceedingTitleId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A relationship of a given type between a super-instance and a sub-instance",
  "type": "object",
  "properties": {
    "id": {
      "description": "unique ID of the preceding-succeeding title",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "precedingInstanceId": {
      "description": "ID (a UUID) of the preceding instance",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "succeedingInstanceId": {
      "description": "ID (a UUID) of the succeeding instance",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "title": {
      "type": "string",
      "description": "The primary title (or label) associated with the resource"
    },
    "hrid": {
      "type": "string",
      "description": "The human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID"
    },
    "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": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          }
        },
        "additionalProperties": false,
        "required": [
          "value",
          "identifierTypeId"
        ]
      }
    },
    "metadata": {
      "type": "object",
      "readonly": true,
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    }
  },
  "additionalProperties": false
}

Example:

{
  "id": "4b8093b8-8de9-41be-ad9a-0fbccb99052b",
  "precedingInstanceId": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
  "succeedingInstanceId": "83a50dc6-b887-43d9-93ee-28b2c4cd11f8",
  "title": "A semantic web primer",
  "hrid": "inst000000000022",
  "identifiers": [
    {
      "identifierTypeId": "8261054f-be78-422d-bd51-4ed9f33c3422",
      "value": "0262012103"
    }
  ]
}

Response 204

The preceding/succeeding title has been 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 preceding-succeeding-title -- malformed JSON at 13:4"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"preceding-succeeding-title not found"

Response 409

Optimistic locking version conflict

Body

Media type: text/plain

Type: any

Example:

version conflict

Response 422

Unprocessable Entity

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, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

DELETE /preceding-succeeding-titles/{precedingSucceedingTitleId}

Delete a preceding/succeeding title by id

DELETE /preceding-succeeding-titles/{precedingSucceedingTitleId}
URI Parameters
  • precedingSucceedingTitleId: required (string)

Response 204

The preceding/succeeding title has been deleted

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

"unable to delete preceding-succeeding-title -- constraint violation"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"preceding-succeeding-title 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 /preceding-succeeding-titles/instances/{instanceId}

Update preceding/succeeding titles related to the instance

PUT /preceding-succeeding-titles/instances/{instanceId}
URI Parameters
  • instanceId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A collection of InstanceRelationship records",
  "type": "object",
  "properties": {
    "precedingSucceedingTitles": {
      "description": "List of instance relationships",
      "id": "precedingSucceedingTitles",
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "A relationship of a given type between a super-instance and a sub-instance",
        "properties": {
          "id": {
            "description": "unique ID of the preceding-succeeding title",
            "type": "string",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          },
          "precedingInstanceId": {
            "description": "ID (a UUID) of the preceding instance",
            "type": "string",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          },
          "succeedingInstanceId": {
            "description": "ID (a UUID) of the succeeding instance",
            "type": "string",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          },
          "title": {
            "type": "string",
            "description": "The primary title (or label) associated with the resource"
          },
          "hrid": {
            "type": "string",
            "description": "The human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID"
          },
          "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": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)",
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
                }
              },
              "additionalProperties": false,
              "required": [
                "value",
                "identifierTypeId"
              ]
            }
          },
          "metadata": {
            "type": "object",
            "readonly": true,
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "metadata.schema",
            "title": "Metadata Schema",
            "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
            "properties": {
              "createdDate": {
                "description": "Date and time when the record was created",
                "type": "string",
                "format": "date-time"
              },
              "createdByUserId": {
                "description": "ID of the user who created the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "createdByUsername": {
                "description": "Username of the user who created the record (when available)",
                "type": "string"
              },
              "updatedDate": {
                "description": "Date and time when the record was last updated",
                "type": "string",
                "format": "date-time"
              },
              "updatedByUserId": {
                "description": "ID of the user who last updated the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "updatedByUsername": {
                "description": "Username of the user who last updated the record (when available)",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "createdDate"
            ]
          }
        },
        "additionalProperties": false
      }
    },
    "totalRecords": {
      "description": "Estimated or exact total number of records",
      "type": "integer"
    }
  },
  "required": [
    "precedingSucceedingTitles",
    "totalRecords"
  ]
}

Example:

{
  "precedingSucceedingTitles": [
    {
      "id": "4b8093b8-8de9-41be-ad9a-0fbccb99052b",
      "precedingInstanceId": "601a8dc4-dee7-48eb-b03f-d02fdf0debd0",
      "succeedingInstanceId": "83a50dc6-b887-43d9-93ee-28b2c4cd11f8",
      "title": "A semantic web primer",
      "hrid": "inst000000000022",
      "identifiers": [
        {
          "identifierTypeId": "8261054f-be78-422d-bd51-4ed9f33c3422",
          "value": "0262012103"
        }
      ]
    }
  ],
  "totalRecords": 1
}

Response 204

Successfully updated

Response 400

Bad request: malformed request body

Body

Media type: text/plain

Type: any

Example:

"unable to update preceding/succeeding titles"

Response 404

Instance with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"Instance with a given ID not found"

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, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator