Circulation Rules Storage (v1.0)

http://localhost:9130

Table of contents

Circulation Rules Storage API

Storage for circulation rules

/circulation-rules-storage

GET /circulation-rules-storage

Get the circulation rules

GET /circulation-rules-storage

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Circulation Rules Schema",
  "description": "Circulation rules, described in a bespoke syntax",
  "type": "object",
  "properties": {
    "id": {
      "description": "ID of the circulation rules (should only ever be a single record)",
      "type": "string"
    },
    "rulesAsText": {
      "description": "Circulation rules represented in text using the bespoke format",
      "type": "string"
    }
  },
  "additionalProperties": false,
  "required": [
    "rulesAsText"
  ]
}

Example:

{
  "rulesAsText": "priority: t, s, c, b, a, m, g\\nfallback-policy: l ffffffff-2222-4b5e-a7bd-064b8d177231 r ffffffff-3333-4ccf-b0f0-13db36bc1668 n ffffffff-4444-4da6-beae-73cb39e27cf1\\nm aaaaaaaa-1111-4b5e-a7bd-064b8d177231: l ffffffff-5555-4b5e-a7bd-064b8d177231 r ffffffff-6666-4c7a-a2cb-289d0aad2539 n ffffffff-7777-48ca-bd3a-90a0520068d7\\n    g cccccccc-1111-4b5e-a7bd-064b8d177231: l ffffffff-8888-4b5e-a7bd-064b8d177231 r ffffffff-9999-4f5a-b338-3a7e8d49b802 n ffffffff-0000-4cb8-a010-e589f8958eb5\\n"
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

PUT /circulation-rules-storage

Set the circulation rules

PUT /circulation-rules-storage
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Circulation Rules Schema",
  "description": "Circulation rules, described in a bespoke syntax",
  "type": "object",
  "properties": {
    "id": {
      "description": "ID of the circulation rules (should only ever be a single record)",
      "type": "string"
    },
    "rulesAsText": {
      "description": "Circulation rules represented in text using the bespoke format",
      "type": "string"
    }
  },
  "additionalProperties": false,
  "required": [
    "rulesAsText"
  ]
}

Example:

{
  "rulesAsText": "priority: t, s, c, b, a, m, g\\nfallback-policy: l ffffffff-2222-4b5e-a7bd-064b8d177231 r ffffffff-3333-4ccf-b0f0-13db36bc1668 n ffffffff-4444-4da6-beae-73cb39e27cf1\\nm aaaaaaaa-1111-4b5e-a7bd-064b8d177231: l ffffffff-5555-4b5e-a7bd-064b8d177231 r ffffffff-6666-4c7a-a2cb-289d0aad2539 n ffffffff-7777-48ca-bd3a-90a0520068d7\\n    g cccccccc-1111-4b5e-a7bd-064b8d177231: l ffffffff-8888-4b5e-a7bd-064b8d177231 r ffffffff-9999-4f5a-b338-3a7e8d49b802 n ffffffff-0000-4cb8-a010-e589f8958eb5\\n"
}

Response 204

Circulation rules have been saved.

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error