View | Details | Raw Unified | Return to bug 15126
Collapse All | Expand All

(-)a/Koha/REST/V1.pm (-1 / +1 lines)
Lines 72-78 sub startup { Link Here
72
    $self->types->type(json => 'application/json; charset=utf8');
72
    $self->types->type(json => 'application/json; charset=utf8');
73
73
74
    $self->plugin(Swagger2 => {
74
    $self->plugin(Swagger2 => {
75
        url => $self->home->rel_file("api/v1/swagger.json"),
75
        url => $self->home->rel_file("api/v1/swagger/swagger.min.json"),
76
    });
76
    });
77
}
77
}
78
78
(-)a/api/v1/swagger/definitions.json (+59 lines)
Line 0 Link Here
1
{
2
  "borrower": {
3
    "$ref": "definitions/borrower.json"
4
  },
5
  "listContent": {
6
    "$ref": "definitions/listContent.json"
7
  },
8
  "holds": {
9
    "type": "array",
10
    "items": {"$ref": "definitions/hold.json"}
11
  },
12
  "hold": {
13
    "$ref": "definitions/hold.json"
14
  },
15
  "newBorrowerHoldBody": {
16
    "$ref": "definitions/newBorrowerHoldBody.json"
17
  },
18
  "borrowerStatus": {
19
    "$ref": "definitions/borrowerStatus.json"
20
  },
21
  "session": {
22
    "$ref": "definitions/session.json"
23
  },
24
  "testedSession": {
25
    "$ref": "definitions/testedSession.json"
26
  },
27
  "message": {
28
    "$ref": "definitions/message.json"
29
  },
30
  "error": {
31
    "$ref": "definitions/error.json"
32
  },
33
34
35
  "biblionumber": {
36
    "type": "integer",
37
    "description": "Biblio internal identifier"
38
  },
39
  "borrowernumber": {
40
    "type": "integer",
41
    "description": "Borrower internal identifier"
42
  },
43
  "branchcode": {
44
    "type": "string",
45
    "description": "Code identifying a library"
46
  },
47
  "cardnumber": {
48
    "description": "Library assigned ID number for Borrowers",
49
    "type": "string"
50
  },
51
  "itemnumber": {
52
    "type": "integer",
53
    "description": "Item internal identifier"
54
  },
55
  "listContentNumber": {
56
    "type": "integer",
57
    "description": "The internal identifier for this list article"
58
  }
59
}
(-)a/api/v1/swagger/definitions/borrower.json (+20 lines)
Line 0 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "borrowernumber": {
5
      "$ref": "../definitions.json#/borrowernumber"
6
    },
7
    "cardnumber": {
8
      "description": "library assigned ID number for borrowers",
9
      "type": "string"
10
    },
11
    "surname": {
12
      "description": "borrower's last name",
13
      "type": "string"
14
    },
15
    "firstname": {
16
      "description": "borrower's first name",
17
      "type": "string"
18
    }
19
  }
20
}
(-)a/api/v1/swagger/definitions/borrowerStatus.json (+88 lines)
Line 0 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "borrowernumber": {
5
      "$ref": "../definitions.json#/borrowernumber"
6
    },
7
    "cardnumber": {
8
      "$ref": "../definitions.json#/cardnumber"
9
    },
10
    "surname": {
11
      "description": "Last name",
12
      "type": "string"
13
    },
14
    "firstname": {
15
      "description": "First name",
16
      "type": "string"
17
    },
18
    "homebranch": {
19
      "description": "Home library/branch.",
20
      "type": "string"
21
    },
22
    "fines": {
23
      "description": "Total due fines",
24
      "type": "number",
25
      "format": "double"
26
    },
27
    "language": {
28
      "description": "Desired language of service",
29
      "type": "string"
30
    },
31
    "charge_privileges_denied": {
32
      "description": "",
33
      "type": "boolean"
34
    },
35
    "renewal_privileges_denied": {
36
      "description": "",
37
      "type": "boolean"
38
    },
39
    "recall_privileges_denied": {
40
      "description": "",
41
      "type": "boolean"
42
    },
43
    "hold_privileges_denied": {
44
      "description": "",
45
      "type": "boolean"
46
    },
47
    "card_reported_lost": {
48
      "description": "",
49
      "type": "boolean"
50
    },
51
    "too_many_items_charged": {
52
      "description": "",
53
      "type": "boolean"
54
    },
55
    "too_many_items_overdue": {
56
      "description": "",
57
      "type": "boolean"
58
    },
59
    "too_many_renewals": {
60
      "description": "",
61
      "type": "boolean"
62
    },
63
    "too_many_claims_of_items_returned": {
64
      "description": "",
65
      "type": "boolean"
66
    },
67
    "too_many_items_lost": {
68
      "description": "",
69
      "type": "boolean"
70
    },
71
    "excessive_outstanding_fines": {
72
      "description": "",
73
      "type": "boolean"
74
    },
75
    "excessive_outstanding_fees": {
76
      "description": "",
77
      "type": "boolean"
78
    },
79
    "recall_overdue": {
80
      "description": "",
81
      "type": "boolean"
82
    },
83
    "too_many_items_billed": {
84
      "description": "",
85
      "type": "boolean"
86
    }
87
  }
88
}
(-)a/api/v1/swagger/definitions/error.json (+9 lines)
Line 0 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "error": {
5
      "description": "Error message",
6
      "type": "string"
7
    }
8
  }
9
}
(-)a/api/v1/swagger/definitions/hold.json (+69 lines)
Line 0 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "reserve_id": {
5
      "description": "Internal reserve identifier",
6
      "type": "number"
7
    },
8
    "borrowernumber": { "$ref" : "../definitions.json#/borrowernumber" },
9
    "reservedate": {
10
      "description": "the date the reserve was placed",
11
      "type": "string"
12
    },
13
    "biblionumber": { "$ref": "../definitions.json#/biblionumber" },
14
    "constrainttype": {
15
      "description": "type of constraint",
16
      "type": "string"
17
    },
18
    "branchcode": { "$ref": "../definitions.json#/branchcode" },
19
    "notificationdate": {
20
      "description": "currently unused",
21
      "type": "string"
22
    },
23
    "reminderdate": {
24
      "description": "currently unused",
25
      "type": "string"
26
    },
27
    "cancellationdate": {
28
      "description": "the date the reserve was cancelled",
29
      "type": "string"
30
    },
31
    "reservenotes": {
32
      "description": "notes related to this reserve",
33
      "type": "string"
34
    },
35
    "priority": {
36
      "description": "where in the queue the patron sits",
37
      "type": "string"
38
    },
39
    "found": {
40
      "description": "a one letter code defining what the status of the reserve is after it has been confirmed",
41
      "type": "string"
42
    },
43
    "timestamp": {
44
      "description": "date and time the reserve was last updated",
45
      "type": "string"
46
    },
47
    "itemnumber": { "$ref": "../definitions.json#/itemnumber" },
48
    "waitingdate": {
49
      "description": "the date the item was marked as waiting for the patron at the library",
50
      "type": "string"
51
    },
52
    "expirationdate": {
53
      "description": "the date the reserve expires",
54
      "type": "string"
55
    },
56
    "lowestPriority": {
57
      "description": "",
58
      "type": "string"
59
    },
60
    "suspend": {
61
      "description": "",
62
      "type": "string"
63
    },
64
    "suspend_until": {
65
      "description": "",
66
      "type": "string"
67
    }
68
  }
69
}
(-)a/api/v1/swagger/definitions/listContent.json (+9 lines)
Line 0 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "listContentNumber": { "$ref": "../definitions.json#/listContentNumber" },
5
    "biblionumber": { "$ref": "../definitions.json#/biblionumber" },
6
    "itemnumber": { "$ref": "../definitions.json#/itemnumber" },
7
    "borrowernumber": { "$ref" : "../definitions.json#/borrowernumber" }
8
  }
9
}
(-)a/api/v1/swagger/definitions/message.json (+56 lines)
Line 0 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "message_id": {
5
      "description": "Message internal identifier",
6
      "type": "integer"
7
    },
8
    "time_queued": {
9
      "description": "Date and time of when message was placed in queue",
10
      "type": "string"
11
    },
12
    "borrowernumber": {
13
      "$ref": "../definitions.json#/borrowernumber"
14
    },
15
    "subject": {
16
      "description": "Subject of the message",
17
      "type": "string"
18
    },
19
    "content": {
20
      "description": "Content of the message",
21
      "type": "string"
22
    },
23
    "metadata": {
24
      "description": "",
25
      "type": "string"
26
    },
27
    "letter_code": {
28
      "description": "",
29
      "type": "string"
30
    },
31
    "content_type": {
32
      "description": "Content type",
33
      "type": "string"
34
    },
35
    "message_transport_type": {
36
      "description": "Transport method. Values accepted by default are 'email', 'sms', 'phone' and 'print'",
37
      "type": "string"
38
    },
39
    "status": {
40
      "description": "Delivery status",
41
      "type": "string"
42
    },
43
    "to_address": {
44
      "description": "Destination email address",
45
      "type": "string"
46
    },
47
    "from_address": {
48
      "description": "Source address of email",
49
      "type": "string"
50
    },
51
    "delivery_note": {
52
      "description": "Additional delivery notes",
53
      "type": "string"
54
    }
55
  }
56
}
(-)a/api/v1/swagger/definitions/newBorrowerHoldBody.json (+27 lines)
Line 0 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "biblionumber": {
5
      "description": "Biblio internal identifier",
6
      "type": "integer"
7
    },
8
    "itemnumber": {
9
      "description": "Item internal identifier",
10
      "type": "integer"
11
    },
12
    "branchcode": {
13
      "description": "Pickup location",
14
      "type": "string"
15
    },
16
    "expirationdate": {
17
      "description": "Reserve end date",
18
      "type": "string",
19
      "format": "date"
20
    },
21
    "suspend_until": {
22
      "description": "Suspend the Hold until this date, so the Hold won't get caught but advances in queue.",
23
      "type": "string",
24
      "format": "date"
25
    }
26
  }
27
}
(-)a/api/v1/swagger/definitions/session.json (+17 lines)
Line 0 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "email": {
5
      "description": "borrower's primary email address",
6
      "type": "string"
7
    },
8
    "lastname": {
9
      "description": "borrower's last name",
10
      "type": "string"
11
    },
12
    "firstname": {
13
      "description": "borrower's first name",
14
      "type": "string"
15
    }
16
  }
17
}
(-)a/api/v1/swagger/definitions/testedSession.json (+10 lines)
Line 0 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "sessionid": {
5
      "description": "The Koha sessionid to be tested",
6
      "type": "string"
7
    }
8
  },
9
  "required": ["sessionid"]
10
}
(-)a/api/v1/swagger/info.json (+12 lines)
Line 0 Link Here
1
{
2
  "title": "Koha REST API",
3
  "version": "1",
4
  "license": {
5
    "name": "GPL v3",
6
    "url": "http://www.gnu.org/licenses/gpl.txt"
7
  },
8
  "contact": {
9
    "name": "Koha Team",
10
    "url": "http://koha-community.org/"
11
  }
12
}
(-)a/api/v1/swagger/parameters.json (+133 lines)
Line 0 Link Here
1
{
2
  "biblionumberPathParam": {
3
    "name": "biblionumber",
4
    "in": "path",
5
    "description": "Internal biblio identifier",
6
    "required": true,
7
    "type": "integer"
8
  },
9
  "biblionumberQueryParam": {
10
    "name": "biblionumber",
11
    "in": "query",
12
    "description": "Internal biblio identifier",
13
    "required": true,
14
    "type": "integer"
15
  },
16
  "borrowernumberPathParam": {
17
    "name": "borrowernumber",
18
    "in": "path",
19
    "description": "Internal borrower identifier",
20
    "required": true,
21
    "type": "integer"
22
  },
23
  "listnamePathParam": {
24
    "name": "listname",
25
    "in": "path",
26
    "description": "list name",
27
    "required": true,
28
    "type": "string"
29
  },
30
  "listContent": {
31
    "name": "listContent",
32
    "description": "The list article",
33
    "in": "body",
34
    "required": true,
35
    "schema" : {
36
      "$ref": "definitions/listContent.json"
37
    }
38
  },
39
  "holdingbranchQueryParam": {
40
    "name": "holdingbranch",
41
    "in": "query",
42
    "description": "The code of the branch where the Items have been last seen.",
43
    "required": false,
44
    "type": "string"
45
  },
46
  "messagenumberPathParam": {
47
    "name": "messagenumber",
48
    "in": "path",
49
    "description": "Internal message identifier",
50
    "required": true,
51
    "type": "integer"
52
  },
53
  "sheet_identifierPathParam": {
54
    "name": "sheet_identifier",
55
    "in": "path",
56
    "description": "Internal sheet identifier",
57
    "required": true,
58
    "type": "integer"
59
  },
60
  "sheet_versionPathParam": {
61
    "name": "sheet_version",
62
    "in": "path",
63
    "description": "Sheet version number. If omitted, operations target the newest version. Set to '631373.00' to affect all versions.",
64
    "type": "number",
65
    "format": "float",
66
    "required": true
67
  },
68
  "session": {
69
    "name": "session",
70
    "description": "The CGISESSID Cookie used to authenticate a session",
71
    "in": "body",
72
    "required": true,
73
    "schema" : {
74
      "$ref": "definitions/testedSession.json"
75
    }
76
  },
77
  "borrowernumberQueryParam": {
78
    "name": "borrowernumber",
79
    "in": "query",
80
    "description": "The internal id of the Borrower, unique value",
81
    "required": false,
82
    "type": "integer"
83
  },
84
  "useridQueryParam": {
85
    "name": "userid",
86
    "in": "query",
87
    "description": "The userid of the Borrower, unique value",
88
    "required": false,
89
    "type": "string"
90
  },
91
  "cardnumberQueryParam": {
92
    "name": "cardnumber",
93
    "in": "query",
94
    "description": "The cardnumber of the Borrower, unique value",
95
    "required": false,
96
    "type": "string"
97
  },
98
  "pattern_xQueryParam": {
99
    "name": "pattern_x",
100
    "in": "query",
101
    "description": "The first serial issue enumeration field, typically the year.",
102
    "required": false,
103
    "type": "string"
104
  },
105
  "pattern_yQueryParam": {
106
    "name": "pattern_y",
107
    "in": "query",
108
    "description": "the second enumeration, eg volume.",
109
    "required": false,
110
    "type": "string"
111
  },
112
  "pattern_zQueryParam": {
113
    "name": "pattern_z",
114
    "in": "query",
115
    "description": "the third enumeration field.",
116
    "required": false,
117
    "type": "string"
118
  },
119
  "serialStatusQueryParam": {
120
    "name": "serialStatus",
121
    "in": "query",
122
    "description": "Status of a serial. 1 = Expected, 2 = Received, 3 = Late, 4 = Not issued, 7 = Claimed.",
123
    "required": false,
124
    "type": "integer"
125
  },
126
  "limitQueryParam": {
127
    "name": "limit",
128
    "in": "query",
129
    "description": "Limit the resultset to this many results.",
130
    "required": false,
131
    "type": "integer"
132
  }
133
}
(-)a/api/v1/swagger/paths.json (+50 lines)
Line 0 Link Here
1
{
2
  "/serialitems": {
3
    "$ref": "paths/serials.json#/~1serialitems"
4
  },
5
  "/serials/collection": {
6
    "$ref": "paths/serials.json#/~1serials~1collection"
7
  },
8
  "/biblios/{biblionumber}": {
9
    "$ref": "paths/biblios.json#/~1biblios~1{biblionumber}"
10
  },
11
  "/borrowers": {
12
    "$ref": "paths/borrowers.json#/~1borrowers"
13
  },
14
  "/borrowers/status": {
15
    "$ref": "paths/borrowers.json#/~1borrowers~1status"
16
  },
17
  "/borrowers/{borrowernumber}": {
18
    "$ref": "paths/borrowers.json#/~1borrowers~1{borrowernumber}"
19
  },
20
  "/borrowers/{borrowernumber}/holds": {
21
    "$ref": "paths/borrowers.json#/~1borrowers~1{borrowernumber}~1holds"
22
  },
23
  "/lists/{listname}/contents": {
24
    "$ref": "paths/lists.json#/~1lists~1{listname}~1contents"
25
  },
26
  "/auth/session": {
27
    "$ref": "paths/auth.json#/~1auth~1session"
28
  },
29
  "/messages": {
30
    "$ref": "paths/messages.json#/~1messages"
31
  },
32
  "/messages/{messagenumber}": {
33
    "$ref": "paths/messages.json#/~1messages~1{messagenumber}"
34
  },
35
  "/messages/{messagenumber}/resend": {
36
    "$ref": "paths/messages.json#/~1messages~1{messagenumber}~1resend"
37
  },
38
  "/messages/{messagenumber}/report/labyrintti": {
39
    "$ref": "paths/messages.json#/~1messages~1{messagenumber}~1report~1labyrintti"
40
  },
41
  "/labels/sheets": {
42
    "$ref": "paths/labels.json#/~1labels~1sheets"
43
  },
44
  "/labels/sheets/version": {
45
    "$ref": "paths/labels.json#/~1labels~1sheets~1version"
46
  },
47
  "/labels/sheets/{sheet_identifier}/{sheet_version}": {
48
    "$ref": "paths/labels.json#/~1labels~1sheets~1{sheet_identifier}~1{sheet_version}"
49
  }
50
}
(-)a/api/v1/swagger/paths/auth.json (+34 lines)
Line 0 Link Here
1
{
2
  "/auth/session": {
3
    "get": {
4
      "x-mojo-controller": "Koha::REST::V1::Auth",
5
      "x-koha-permission": {
6
        "auth": "get_session"
7
      },
8
      "operationId": "getSession",
9
      "tags": ["auth"],
10
      "parameters": [
11
        {
12
          "$ref": "../parameters.json#/session"
13
        }
14
      ],
15
      "produces": [
16
        "application/json"
17
      ],
18
      "responses": {
19
        "200": {
20
          "description": "A borrower with SSO-relevant fields",
21
          "schema": {
22
            "$ref": "../definitions/session.json"
23
          }
24
        },
25
        "404": {
26
          "description": "Session not found",
27
          "schema": {
28
            "$ref": "../definitions/error.json"
29
          }
30
        }
31
      }
32
    }
33
  }
34
}
(-)a/api/v1/swagger/paths/biblios.json (+45 lines)
Line 0 Link Here
1
{
2
  "/biblios/{biblionumber}": {
3
    "delete": {
4
      "x-mojo-controller": "Koha::REST::V1::Biblios",
5
      "x-koha-permission": {
6
        "editcatalogue": "delete_catalogue"
7
      },
8
      "operationId": "deleteBiblio",
9
      "tags": ["biblios"],
10
      "summary": "Deletes the given Bibliographic Record",
11
      "description": "Can fail if there are dependecies to the Biblio.",
12
      "produces": [
13
        ""
14
      ],
15
      "parameters": [
16
        {
17
          "$ref": "../parameters.json#/biblionumberPathParam"
18
        }
19
      ],
20
      "responses": {
21
        "204": {
22
          "description": "Deleting the Record succeeded.",
23
          "schema": {
24
            "type": "string"
25
          }
26
        },
27
        "404": {
28
          "description": "No such Bibliographic record found",
29
          "schema": {
30
            "$ref": "../definitions/error.json"
31
          }
32
        },
33
        "400": {
34
          "description": "Cannot delete the Bibliographic Record due to constraints. A constraint can be for example the presence of dependant Items.",
35
          "schema": {
36
            "$ref": "../definitions/error.json"
37
          }
38
        }
39
      },
40
      "security": [
41
        { "multi_key_auth": [] }
42
      ]
43
    }
44
  }
45
}
(-)a/api/v1/swagger/paths/borrowers.json (+180 lines)
Line 0 Link Here
1
{
2
  "/borrowers": {
3
    "get": {
4
      "x-mojo-controller": "Koha::REST::V1::Borrowers",
5
      "x-koha-permission": {
6
        "borrowers": "*"
7
      },
8
      "operationId": "listBorrowers",
9
      "tags": ["borrowers"],
10
      "summary": "Searches for Borrowers",
11
      "description": "Search borrowers from Koha, optionally filter the search with specific parameters. All parameters given, must be present in the returned Borrower-objects. If no search parameters are given, all borrowers are returned! This is certainly not what you want.",
12
      "produces": [
13
        "application/json"
14
      ],
15
      "parameters": [
16
        {  "$ref": "../parameters.json#/cardnumberQueryParam" },
17
        {  "$ref": "../parameters.json#/useridQueryParam" },
18
        {  "$ref": "../parameters.json#/borrowernumberQueryParam" }
19
      ],
20
      "responses": {
21
        "200": {
22
          "description": "A list of borrowers",
23
          "schema": {
24
            "type": "array",
25
            "items": {
26
              "$ref": "../definitions/borrower.json"
27
            }
28
          }
29
        }
30
      },
31
      "security": [
32
        { "multi_key_auth": [] }
33
      ]
34
    }
35
  },
36
  "/borrowers/status": {
37
    "get": {
38
      "x-mojo-controller": "Koha::REST::V1::Borrowers",
39
      "operationId": "status",
40
      "tags": ["borrowers"],
41
      "summary": "Returns the Borrower's details and statuses",
42
      "description": "This endpoint doesn't need other authentication than the proper username and password, and can be used anonymously.<br/>Note: Does not authenticate the Borrower to Koha!",
43
      "produces": [
44
        "application/json",
45
        "application/xml"
46
      ],
47
      "parameters": [
48
        {
49
          "name": "uname",
50
          "description": "The Username the Borrower uses to authenticate",
51
          "in": "formData",
52
          "required": true,
53
          "type": "string"
54
        },
55
        {
56
          "name": "passwd",
57
          "description": "The Password the Borrower uses to authenticate",
58
          "in": "formData",
59
          "required": true,
60
          "type": "string"
61
        }
62
      ],
63
      "responses": {
64
        "200": {
65
          "description": "Borrower information",
66
          "schema": {
67
            "$ref": "../definitions.json#/borrowerStatus"
68
          }
69
        },
70
        "400": {
71
          "description": "Password authentication failed using username or password",
72
          "schema": {
73
            "$ref": "../definitions/error.json"
74
          }
75
        }
76
      }
77
    }
78
  },
79
  "/borrowers/{borrowernumber}": {
80
    "get": {
81
      "x-mojo-controller": "Koha::REST::V1::Borrowers",
82
      "x-koha-permission": {
83
        "borrowers": "*"
84
      },
85
      "operationId": "getBorrower",
86
      "tags": ["borrowers"],
87
      "parameters": [
88
        {
89
          "$ref": "../parameters.json#/borrowernumberPathParam"
90
        }
91
      ],
92
      "produces": [
93
        "application/json"
94
      ],
95
      "responses": {
96
        "200": {
97
          "description": "A borrower",
98
          "schema": {
99
            "$ref": "../definitions/borrower.json"
100
          }
101
        },
102
        "404": {
103
          "description": "Borrower not found",
104
          "schema": {
105
            "$ref": "../definitions/error.json"
106
          }
107
        }
108
      },
109
      "security": [
110
        { "multi_key_auth": [] }
111
      ]
112
    }
113
  },
114
  "/borrowers/{borrowernumber}/holds": {
115
    "get": {
116
      "x-mojo-controller": "Koha::REST::V1::Borrowers::Holds",
117
      "x-koha-permission": {
118
        "borrowers": "*"
119
      },
120
      "operationId": "listBorrowerHolds",
121
      "tags": ["borrowers", "holds"],
122
      "parameters": [
123
        { "$ref": "../parameters.json#/borrowernumberPathParam" }
124
      ],
125
      "produces": ["application/json"],
126
      "responses": {
127
        "200": {
128
          "description": "A list of holds",
129
          "schema": { "$ref": "../definitions.json#/holds" }
130
        },
131
        "404": {
132
          "description": "Borrower not found",
133
          "schema": { "$ref": "../definitions/error.json" }
134
        }
135
      }
136
    },
137
    "post": {
138
      "x-mojo-controller": "Koha::REST::V1::Borrowers::Holds",
139
      "x-koha-permission": {
140
        "circulate": "*"
141
      },
142
      "operationId": "addBorrowerHold",
143
      "tags": ["borrowers", "holds"],
144
      "parameters": [
145
        { "$ref": "../parameters.json#/borrowernumberPathParam" },
146
        {
147
          "name": "body",
148
          "in": "body",
149
          "description": "A Hold-object",
150
          "required": true,
151
          "schema": { "$ref": "../definitions/newBorrowerHoldBody.json" }
152
        }
153
      ],
154
      "consumes": ["application/json"],
155
      "produces": ["application/json"],
156
      "responses": {
157
        "201": {
158
          "description": "Created hold",
159
          "schema": { "$ref": "../definitions/hold.json" }
160
        },
161
        "400": {
162
          "description": "Missing or wrong parameters",
163
          "schema": { "$ref": "../definitions/error.json" }
164
        },
165
        "403": {
166
          "description": "Hold not allowed",
167
          "schema": { "$ref": "../definitions/error.json" }
168
        },
169
        "404": {
170
          "description": "Borrower not found",
171
          "schema": { "$ref": "../definitions/error.json" }
172
        },
173
        "500": {
174
          "description": "Internal error",
175
          "schema": { "$ref": "../definitions/error.json" }
176
        }
177
      }
178
    }
179
  }
180
}
(-)a/api/v1/swagger/paths/labels.json (+241 lines)
Line 0 Link Here
1
{
2
  "/labels/sheets": {
3
    "get": {
4
      "x-mojo-controller": "Koha::REST::V1::Labels::Sheets",
5
      "operationId": "listSheets",
6
      "x-koha-permission": {
7
        "labels": "sheets_get"
8
      },
9
      "tags": ["labels"],
10
      "produces": [
11
        "application/json"
12
      ],
13
      "summary": "Get a list of label positioning sheets.",
14
      "description": "Not designed for external use. Use this to see the structure of the sheet-objects.",
15
      "responses": {
16
        "200": {
17
          "description": "A list of sheets",
18
          "schema": {
19
            "type": "array",
20
            "items": {
21
                "type": "string"
22
            }
23
          }
24
        },
25
        "404": {
26
          "description": "No sheets in Koha",
27
          "schema": {
28
            "$ref": "../definitions/error.json"
29
          }
30
        },
31
        "500": {
32
          "description": "Internal server error",
33
          "schema": {
34
            "$ref": "../definitions/error.json"
35
          }
36
        }
37
      }
38
    },
39
    "post": {
40
      "x-mojo-controller": "Koha::REST::V1::Labels::Sheets",
41
      "operationId": "createSheet",
42
      "x-koha-permission": {
43
        "labels": "sheets_new"
44
      },
45
      "tags": ["labels"],
46
      "produces": [
47
        "text/plain"
48
      ],
49
      "summary": "Create a new label positioning sheet",
50
      "parameters": [
51
        {
52
          "name": "sheet",
53
          "in": "formData",
54
          "description": "A JSON object of the sheet, containing the items, regions and elements.",
55
          "required": true,
56
          "type": "string"
57
        }
58
      ],
59
      "responses": {
60
        "201": {
61
          "description": "The created sheet",
62
          "schema": { "type": "string" }
63
        },
64
        "400": {
65
          "description": "Missing or wrong parameters",
66
          "schema": { "$ref": "../definitions/error.json" }
67
        },
68
        "500": {
69
          "description": "Internal server error",
70
          "schema": {
71
            "$ref": "../definitions/error.json"
72
          }
73
        }
74
      }
75
    },
76
    "put": {
77
      "x-mojo-controller": "Koha::REST::V1::Labels::Sheets",
78
      "operationId": "updateSheet",
79
      "x-koha-permission": {
80
        "labels": "sheets_mod"
81
      },
82
      "tags": ["labels"],
83
      "produces": [
84
        "application/json"
85
      ],
86
      "summary": "Modify a label positioning sheet",
87
      "parameters": [
88
        {
89
          "name": "sheet",
90
          "in": "formData",
91
          "description": "A JSON object of the sheet, containing the items, regions and elements.",
92
          "required": true,
93
          "type": "string"
94
        }
95
      ],
96
      "responses": {
97
        "201": {
98
          "description": "The modified sheet",
99
          "schema": { "type" : "string" }
100
        },
101
        "400": {
102
          "description": "Missing or wrong parameters",
103
          "schema": { "$ref": "../definitions/error.json" }
104
        },
105
        "404": {
106
          "description": "Sheet not found",
107
          "schema": { "$ref": "../definitions/error.json" }
108
        },
109
        "500": {
110
          "description": "Internal server error",
111
          "schema": {
112
            "$ref": "../definitions/error.json"
113
          }
114
        }
115
      }
116
    }
117
  },
118
  "/labels/sheets/version": {
119
    "get": {
120
      "x-mojo-controller": "Koha::REST::V1::Labels::Sheets",
121
      "operationId": "listSheetVersions",
122
      "x-koha-permission": {
123
        "labels": "sheets_get"
124
      },
125
      "tags": ["labels"],
126
      "produces": [
127
        "application/json"
128
      ],
129
      "summary": "Get a list of label positioning sheet ids and versions.",
130
      "responses": {
131
        "200": {
132
          "description": "A list of sheet ids and versions",
133
          "schema": {
134
            "type": "array",
135
            "items": {
136
              "type": "object",
137
              "required": [
138
                "id",
139
                "version"
140
              ],
141
              "properties": {
142
                "id": {
143
                  "type": "integer"
144
                },
145
                "version": {
146
                  "type": "number",
147
                  "format": "float"
148
                }
149
              }
150
            }
151
          }
152
        },
153
        "404": {
154
          "description": "No sheets in Koha",
155
          "schema": { "$ref": "../definitions/error.json" }
156
        },
157
        "500": {
158
          "description": "Internal server error",
159
          "schema": {
160
            "$ref": "../definitions/error.json"
161
          }
162
        }
163
      }
164
    }
165
  },
166
  "/labels/sheets/{sheet_identifier}/{sheet_version}": {
167
    "delete": {
168
      "x-mojo-controller": "Koha::REST::V1::Labels::Sheets",
169
      "operationId": "deleteSheet",
170
      "x-koha-permission": {
171
        "labels": "sheets_del"
172
      },
173
      "tags": ["labels"],
174
      "parameters": [
175
        { "$ref": "../parameters.json#/sheet_identifierPathParam" },
176
        { "$ref": "../parameters.json#/sheet_versionPathParam" }
177
      ],
178
      "produces": [
179
        ""
180
      ],
181
      "summary": "Delete a label positioning sheet",
182
      "description": "By default only deletes the newest version, exposing the older version.",
183
      "responses": {
184
        "204": {
185
          "description": "Deleting the message succeeded.",
186
          "schema": {
187
            "type": "string"
188
          }
189
        },
190
        "404": {
191
          "description": "Sheet not found",
192
          "schema": {
193
            "$ref": "../definitions/error.json"
194
          }
195
        },
196
        "500": {
197
          "description": "Internal server error",
198
          "schema": {
199
            "$ref": "../definitions/error.json"
200
          }
201
        }
202
      }
203
    },
204
    "get": {
205
      "x-mojo-controller": "Koha::REST::V1::Labels::Sheets",
206
      "operationId": "getSheet",
207
      "x-koha-permission": {
208
        "labels": "sheets_get"
209
      },
210
      "tags": ["labels"],
211
      "parameters": [
212
        { "$ref": "../parameters.json#/sheet_identifierPathParam" },
213
        { "$ref": "../parameters.json#/sheet_versionPathParam" }
214
      ],
215
      "produces": [
216
        "application/json"
217
      ],
218
      "summary": "Get a label positioning sheet",
219
      "responses": {
220
        "200": {
221
          "description": "The sheet",
222
          "schema": {
223
            "type" : "object"
224
          }
225
        },
226
        "404": {
227
          "description": "Sheet not found",
228
          "schema": {
229
            "$ref": "../definitions/error.json"
230
          }
231
        },
232
        "500": {
233
          "description": "Internal server error",
234
          "schema": {
235
            "$ref": "../definitions/error.json"
236
          }
237
        }
238
      }
239
    }
240
  }
241
}
(-)a/api/v1/swagger/paths/lists.json (+50 lines)
Line 0 Link Here
1
{
2
  "/lists/{listname}/contents": {
3
    "post": {
4
      "x-mojo-controller": "Koha::REST::V1::Lists::Contents",
5
      "x-koha-permission": {
6
        "catalogue": "*"
7
      },
8
      "operationId": "addToList",
9
      "tags": ["lists"],
10
      "parameters": [
11
        { "$ref": "../parameters.json#/listnamePathParam" },
12
        { "$ref": "../parameters.json#/listContent" }
13
      ],
14
      "produces": ["application/json"],
15
      "responses": {
16
        "200": {
17
          "description": "The list article",
18
          "schema": { "$ref": "../definitions/listContent.json" }
19
        },
20
        "404": {
21
          "description": "The given list doesn't exist",
22
          "schema": { "$ref": "../definitions/error.json" }
23
        }
24
      }
25
    },
26
    "delete": {
27
      "x-mojo-controller": "Koha::REST::V1::Lists::Contents",
28
      "x-koha-permission": {
29
        "catalogue": "*"
30
      },
31
      "operationId": "deleteContents",
32
      "tags": ["lists"],
33
      "parameters": [
34
        { "$ref": "../parameters.json#/listnamePathParam" },
35
        { "$ref": "../parameters.json#/listContent" }
36
      ],
37
      "produces": ["application/json"],
38
      "responses": {
39
        "200": {
40
          "description": "All list articles are deleted",
41
          "schema": { "$ref": "../definitions/listContent.json" }
42
        },
43
        "404": {
44
          "description": "The given list doesn't exist",
45
          "schema": { "$ref": "../definitions/error.json" }
46
        }
47
      }
48
    }
49
  }
50
}
(-)a/api/v1/swagger/paths/messages.json (+244 lines)
Line 0 Link Here
1
{
2
  "/messages": {
3
    "get": {
4
      "x-mojo-controller": "Koha::REST::V1::Messages",
5
      "operationId": "listMessages",
6
      "x-koha-permission": {
7
        "messages": "get_message"
8
      },
9
      "tags": ["messages"],
10
      "produces": [
11
        "application/json"
12
      ],
13
      "responses": {
14
        "200": {
15
          "description": "A list of messages",
16
          "schema": {
17
            "type": "array",
18
            "items": {
19
              "$ref" : "../definitions/message.json"
20
            }
21
          }
22
        },
23
        "404": {
24
          "description": "Messages not found",
25
          "schema": {
26
            "$ref": "../definitions/error.json"
27
          }
28
        }
29
      }
30
    },
31
    "post": {
32
      "x-mojo-controller": "Koha::REST::V1::Messages",
33
      "operationId": "createMessage",
34
      "x-koha-permission": {
35
        "messages": "create_message"
36
      },
37
      "tags": ["messages"],
38
      "parameters": [
39
        {
40
          "name": "body",
41
          "in": "body",
42
          "description": "A JSON object containing informations about the new message",
43
          "required": true,
44
          "schema": { "$ref": "../definitions/message.json" }
45
        }
46
      ],
47
      "produces": [
48
        "application/json"
49
      ],
50
      "responses": {
51
        "201": {
52
          "description": "A message",
53
          "schema": {
54
              "$ref": "../definitions/message.json"
55
          }
56
        },
57
        "400": {
58
          "description": "Missing or wrong parameters",
59
          "schema": { "$ref": "../definitions/error.json" }
60
        }
61
      }
62
    }
63
  },
64
  "/messages/{messagenumber}": {
65
    "put": {
66
      "x-mojo-controller": "Koha::REST::V1::Messages",
67
      "operationId": "updateMessage",
68
      "x-koha-permission": {
69
        "messages": "update_message"
70
      },
71
      "tags": ["messages"],
72
      "parameters": [
73
        {
74
          "name": "body",
75
          "in": "body",
76
          "description": "A JSON object containing informations about the new message",
77
          "required": false,
78
          "schema": { "$ref": "../definitions/message.json" }
79
        },
80
        {
81
          "$ref": "../parameters.json#/messagenumberPathParam"
82
        }
83
      ],
84
      "produces": [
85
        "application/json"
86
      ],
87
      "responses": {
88
        "200": {
89
          "description": "A message",
90
          "schema": {
91
            "$ref" : "../definitions/message.json"
92
          }
93
        },
94
        "400": {
95
          "description": "Missing or wrong parameters",
96
          "schema": { "$ref": "../definitions/error.json" }
97
        },
98
        "404": {
99
          "description": "Message not found",
100
          "schema": {
101
            "$ref": "../definitions/error.json"
102
          }
103
        }
104
      }
105
    },
106
    "delete": {
107
      "x-mojo-controller": "Koha::REST::V1::Messages",
108
      "operationId": "deleteMessage",
109
      "x-koha-permission": {
110
        "messages": "delete_message"
111
      },
112
      "tags": ["messages"],
113
      "parameters": [
114
        {
115
          "$ref": "../parameters.json#/messagenumberPathParam"
116
        }
117
      ],
118
      "produces": [
119
        "application/json"
120
      ],
121
      "responses": {
122
        "204": {
123
          "description": "Deleting the message succeeded.",
124
          "schema": {
125
            "type": "string"
126
          }
127
        },
128
        "404": {
129
          "description": "Message not found.",
130
          "schema": {
131
            "$ref": "../definitions/error.json"
132
          }
133
        }
134
      }
135
    },
136
    "get": {
137
      "x-mojo-controller": "Koha::REST::V1::Messages",
138
      "operationId": "getMessage",
139
      "x-koha-permission": {
140
        "messages": "get_message"
141
      },
142
      "tags": ["messages"],
143
      "parameters": [
144
        {
145
          "$ref": "../parameters.json#/messagenumberPathParam"
146
        }
147
      ],
148
      "produces": [
149
        "application/json"
150
      ],
151
      "responses": {
152
        "200": {
153
          "description": "A message",
154
          "schema": {
155
            "$ref" : "../definitions/message.json"
156
          }
157
        },
158
        "404": {
159
          "description": "Message not found",
160
          "schema": {
161
            "$ref": "../definitions/error.json"
162
          }
163
        }
164
      }
165
    }
166
  },
167
  "/messages/{messagenumber}/resend": {
168
    "post": {
169
      "x-mojo-controller": "Koha::REST::V1::Messages",
170
      "operationId": "createResend",
171
      "description": "Resends a message.",
172
      "x-koha-permission": {
173
        "messages": "resend_message"
174
      },
175
      "tags": ["messages"],
176
      "parameters": [
177
        {
178
          "$ref": "../parameters.json#/messagenumberPathParam"
179
        }
180
      ],
181
      "produces": [
182
        "application/json"
183
      ],
184
      "responses": {
185
        "204": {
186
          "description": "Resending the message succeeded.",
187
          "schema": {
188
            "type": "string"
189
          }
190
        },
191
        "404": {
192
          "description": "Message not found",
193
          "schema": {
194
            "$ref": "../definitions/error.json"
195
          }
196
        }
197
      }
198
    }
199
  },
200
  "/messages/{messagenumber}/report/labyrintti": {
201
    "post": {
202
      "x-mojo-controller": "Koha::REST::V1::Messages::Reports",
203
      "operationId": "createLabyrinttiReport",
204
      "tags": ["messages"],
205
      "parameters": [
206
        {
207
          "$ref": "../parameters.json#/messagenumberPathParam"
208
        },
209
        {
210
          "name": "status",
211
          "in": "formData",
212
          "type": "string",
213
          "description": "Status of the delivery",
214
          "required": true
215
        },
216
        {
217
          "name": "message",
218
          "in": "formData",
219
          "type": "string",
220
          "description": "Delivery notes",
221
          "required": true
222
        }
223
      ],
224
      "consumes": ["application/x-www-form-urlencoded"],
225
      "produces": [
226
        "application/json"
227
      ],
228
      "responses": {
229
        "200": {
230
          "description": "Response for receiving the report.",
231
          "schema": {
232
            "type": "string"
233
          }
234
        },
235
        "404": {
236
          "description": "Message not found",
237
          "schema": {
238
            "$ref": "../definitions/error.json"
239
          }
240
        }
241
      }
242
    }
243
  }
244
}
(-)a/api/v1/swagger/paths/serials.json (+74 lines)
Line 0 Link Here
1
{
2
  "/serialitems": {
3
    "get": {
4
      "x-mojo-controller": "Koha::REST::V1::Serials",
5
      "operationId": "getSerialItems",
6
      "tags": ["serials"],
7
      "summary": "Fetches SerialItems representing Serials (without an Item-object) and Magazines (with an Item-object)",
8
      "description": "You cannot return all SerialItems, but you must filter your search with GET-parameters.",
9
      "produces": [
10
        "application/json"
11
      ],
12
      "parameters": [
13
        {
14
          "name": "biblionumber",
15
          "in": "query",
16
          "description": "Internal biblio identifier",
17
          "required": true,
18
          "type": "integer"
19
        }
20
      ],
21
      "responses": {
22
        "200": {
23
          "description": "Fetching the objects succeeded.",
24
          "schema": {
25
            "type": "object"
26
          }
27
        }
28
      }
29
    }
30
  },
31
  "/serials/collection": {
32
    "get": {
33
      "x-mojo-controller": "Koha::REST::V1::Serials",
34
      "operationId": "getCollection",
35
      "tags": ["serials"],
36
      "summary": "Fetches a volume overview of all serials in the system, and a count of how many have been received.",
37
      "description": "Fetches a volume overview of all serials in the system, and a count of how many have been received.",
38
      "produces": [
39
        "application/json"
40
      ],
41
      "parameters": [
42
        {  "$ref": "../parameters.json#/biblionumberQueryParam" },
43
        {  "$ref": "../parameters.json#/holdingbranchQueryParam" },
44
        {  "$ref": "../parameters.json#/serialStatusQueryParam" }
45
      ],
46
      "responses": {
47
        "200": {
48
          "description": "Fetching the objects succeeded.",
49
          "schema": {
50
            "type": "object"
51
          }
52
        },
53
        "404": {
54
          "description": "No objects match the search request",
55
          "schema": {
56
            "$ref": "../definitions/error.json"
57
          }
58
        },
59
        "400": {
60
          "description": "Bad search parameters.",
61
          "schema": {
62
            "$ref": "../definitions/error.json"
63
          }
64
        },
65
        "500": {
66
          "description": "Server-side error. I am sorry :(",
67
          "schema": {
68
            "$ref": "../definitions/error.json"
69
          }
70
        }
71
      }
72
    }
73
  }
74
}
(-)a/api/v1/swagger/securityDefinitions.json (+8 lines)
Line 0 Link Here
1
{
2
  "multi_key_auth": {
3
    "type": "apiKey",
4
    "name": "Authorization",
5
    "in": "header",
6
    "description": "Example: 'Authorization: Koha 1:0f049b5ba2f04da7e719b7166dd9e1b0efacf23747798f19efe51eb6e437f84c'\n\nConstructing the Authorization header\n\n-You brand the authorization header with 'Koha'\n-Then you give the userid/cardnumber of the user authenticating.\n-Then the hashed signature.\n\nThe signature is a HMAC-SHA256-HEX hash of several elements of the request,\nseparated by spaces:\n - HTTP method (uppercase)\n - userid/cardnumber\n - X-Koha-Date-header\nSigned with the Borrowers API key\n\n\nPseudocode example:\n\nSignature = HMAC-SHA256-HEX('HTTPS' + ' ' +\n                            '/api/v1/borrowers/12?howdoyoudo=voodoo' + ' ' +\n                            'admin69' + ' ' +\n                            '760818212' + ' ' +\n                            'frJIUN8DYpKDtOLCwo//yllqDzg='\n                           );\n"
7
  }
8
}
(-)a/api/v1/swagger/swagger.json (+20 lines)
Line 0 Link Here
1
{
2
  "swagger": "2.0",
3
  "info": {
4
    "$ref": "info.json"
5
  },
6
  "x-mojo-around-action": "Koha::REST::V1::koha_authenticate",
7
  "basePath": "/api/v1",
8
  "paths": {
9
    "$ref": "paths.json"
10
  },
11
  "definitions": {
12
    "$ref": "definitions.json"
13
  },
14
  "parameters": {
15
    "$ref": "parameters.json"
16
  },
17
  "securityDefinitions": {
18
    "$ref": "securityDefinitions.json"
19
  }
20
}
(-)a/api/v1/swagger/swagger.min.json (+1 lines)
Line 0 Link Here
1
{"basePath":"\/api\/v1","swagger":"2.0","id":"swagger\/swagger.json","x-mojo-around-action":"Koha::REST::V1::koha_authenticate","info":{"contact":{"name":"Koha Team","url":"http:\/\/koha-community.org\/"},"title":"Koha REST API","license":{"name":"GPL v3","url":"http:\/\/www.gnu.org\/licenses\/gpl.txt"},"version":"1"},"parameters":{"holdingbranchQueryParam":{"type":"string","in":"query","name":"holdingbranch","description":"The code of the branch where the Items have been last seen.","required":false},"borrowernumberPathParam":{"description":"Internal borrower identifier","required":true,"type":"integer","in":"path","name":"borrowernumber"},"borrowernumberQueryParam":{"name":"borrowernumber","in":"query","type":"integer","required":false,"description":"The internal id of the Borrower, unique value"},"pattern_yQueryParam":{"type":"string","in":"query","name":"pattern_y","description":"the second enumeration, eg volume.","required":false},"biblionumberPathParam":{"description":"Internal biblio identifier","required":true,"type":"integer","in":"path","name":"biblionumber"},"sheet_identifierPathParam":{"required":true,"description":"Internal sheet identifier","name":"sheet_identifier","type":"integer","in":"path"},"listContent":{"in":"body","name":"listContent","schema":{"type":"object","properties":{"listContentNumber":{"type":"integer","description":"The internal identifier for this list article"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"itemnumber":{"type":"integer","description":"Item internal identifier"},"biblionumber":{"description":"Biblio internal identifier","type":"integer"}}},"description":"The list article","required":true},"messagenumberPathParam":{"name":"messagenumber","in":"path","type":"integer","required":true,"description":"Internal message identifier"},"useridQueryParam":{"name":"userid","type":"string","in":"query","required":false,"description":"The userid of the Borrower, unique value"},"pattern_zQueryParam":{"type":"string","in":"query","name":"pattern_z","description":"the third enumeration field.","required":false},"session":{"description":"The CGISESSID Cookie used to authenticate a session","schema":{"required":["sessionid"],"properties":{"sessionid":{"type":"string","description":"The Koha sessionid to be tested"}},"type":"object"},"required":true,"in":"body","name":"session"},"serialStatusQueryParam":{"description":"Status of a serial. 1 = Expected, 2 = Received, 3 = Late, 4 = Not issued, 7 = Claimed.","required":false,"in":"query","type":"integer","name":"serialStatus"},"sheet_versionPathParam":{"name":"sheet_version","in":"path","type":"number","format":"float","required":true,"description":"Sheet version number. If omitted, operations target the newest version. Set to '631373.00' to affect all versions."},"listnamePathParam":{"type":"string","in":"path","name":"listname","description":"list name","required":true},"pattern_xQueryParam":{"name":"pattern_x","type":"string","in":"query","required":false,"description":"The first serial issue enumeration field, typically the year."},"cardnumberQueryParam":{"description":"The cardnumber of the Borrower, unique value","required":false,"type":"string","in":"query","name":"cardnumber"},"biblionumberQueryParam":{"name":"biblionumber","in":"query","type":"integer","required":true,"description":"Internal biblio identifier"},"limitQueryParam":{"required":false,"description":"Limit the resultset to this many results.","name":"limit","type":"integer","in":"query"}},"definitions":{"listContent":{"properties":{"listContentNumber":{"type":"integer","description":"The internal identifier for this list article"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"itemnumber":{"type":"integer","description":"Item internal identifier"},"biblionumber":{"description":"Biblio internal identifier","type":"integer"}},"type":"object"},"borrower":{"properties":{"cardnumber":{"type":"string","description":"library assigned ID number for borrowers"},"firstname":{"type":"string","description":"borrower's first name"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"surname":{"type":"string","description":"borrower's last name"}},"type":"object"},"biblionumber":{"description":"Biblio internal identifier","type":"integer"},"message":{"type":"object","properties":{"letter_code":{"type":"string","description":""},"to_address":{"type":"string","description":"Destination email address"},"message_transport_type":{"type":"string","description":"Transport method. Values accepted by default are 'email', 'sms', 'phone' and 'print'"},"from_address":{"description":"Source address of email","type":"string"},"metadata":{"description":"","type":"string"},"time_queued":{"description":"Date and time of when message was placed in queue","type":"string"},"content":{"type":"string","description":"Content of the message"},"content_type":{"description":"Content type","type":"string"},"subject":{"description":"Subject of the message","type":"string"},"status":{"description":"Delivery status","type":"string"},"message_id":{"type":"integer","description":"Message internal identifier"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"delivery_note":{"description":"Additional delivery notes","type":"string"}}},"session":{"type":"object","properties":{"lastname":{"type":"string","description":"borrower's last name"},"email":{"description":"borrower's primary email address","type":"string"},"firstname":{"description":"borrower's first name","type":"string"}}},"cardnumber":{"type":"string","description":"Library assigned ID number for Borrowers"},"holds":{"items":{"type":"object","properties":{"notificationdate":{"description":"currently unused","type":"string"},"found":{"description":"a one letter code defining what the status of the reserve is after it has been confirmed","type":"string"},"itemnumber":{"type":"integer","description":"Item internal identifier"},"timestamp":{"description":"date and time the reserve was last updated","type":"string"},"lowestPriority":{"description":"","type":"string"},"priority":{"description":"where in the queue the patron sits","type":"string"},"reservedate":{"type":"string","description":"the date the reserve was placed"},"waitingdate":{"description":"the date the item was marked as waiting for the patron at the library","type":"string"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"cancellationdate":{"type":"string","description":"the date the reserve was cancelled"},"branchcode":{"type":"string","description":"Code identifying a library"},"constrainttype":{"description":"type of constraint","type":"string"},"reserve_id":{"type":"number","description":"Internal reserve identifier"},"reminderdate":{"type":"string","description":"currently unused"},"expirationdate":{"type":"string","description":"the date the reserve expires"},"suspend_until":{"description":"","type":"string"},"biblionumber":{"description":"Biblio internal identifier","type":"integer"},"reservenotes":{"description":"notes related to this reserve","type":"string"},"suspend":{"description":"","type":"string"}}},"type":"array"},"branchcode":{"type":"string","description":"Code identifying a library"},"error":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"testedSession":{"required":["sessionid"],"properties":{"sessionid":{"type":"string","description":"The Koha sessionid to be tested"}},"type":"object"},"listContentNumber":{"description":"The internal identifier for this list article","type":"integer"},"hold":{"properties":{"notificationdate":{"description":"currently unused","type":"string"},"found":{"description":"a one letter code defining what the status of the reserve is after it has been confirmed","type":"string"},"itemnumber":{"type":"integer","description":"Item internal identifier"},"timestamp":{"description":"date and time the reserve was last updated","type":"string"},"lowestPriority":{"description":"","type":"string"},"priority":{"description":"where in the queue the patron sits","type":"string"},"reservedate":{"type":"string","description":"the date the reserve was placed"},"waitingdate":{"description":"the date the item was marked as waiting for the patron at the library","type":"string"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"cancellationdate":{"type":"string","description":"the date the reserve was cancelled"},"branchcode":{"type":"string","description":"Code identifying a library"},"constrainttype":{"description":"type of constraint","type":"string"},"reserve_id":{"type":"number","description":"Internal reserve identifier"},"reminderdate":{"type":"string","description":"currently unused"},"expirationdate":{"type":"string","description":"the date the reserve expires"},"suspend_until":{"description":"","type":"string"},"biblionumber":{"description":"Biblio internal identifier","type":"integer"},"reservenotes":{"description":"notes related to this reserve","type":"string"},"suspend":{"description":"","type":"string"}},"type":"object"},"borrowerStatus":{"type":"object","properties":{"too_many_renewals":{"description":"","type":"boolean"},"too_many_items_lost":{"description":"","type":"boolean"},"fines":{"format":"double","description":"Total due fines","type":"number"},"recall_overdue":{"type":"boolean","description":""},"borrowernumber":{"description":"Borrower internal identifier","type":"integer"},"homebranch":{"description":"Home library\/branch.","type":"string"},"too_many_items_billed":{"description":"","type":"boolean"},"excessive_outstanding_fees":{"type":"boolean","description":""},"language":{"type":"string","description":"Desired language of service"},"too_many_items_charged":{"type":"boolean","description":""},"firstname":{"description":"First name","type":"string"},"hold_privileges_denied":{"type":"boolean","description":""},"card_reported_lost":{"type":"boolean","description":""},"surname":{"type":"string","description":"Last name"},"recall_privileges_denied":{"description":"","type":"boolean"},"cardnumber":{"type":"string","description":"Library assigned ID number for Borrowers"},"too_many_items_overdue":{"type":"boolean","description":""},"excessive_outstanding_fines":{"type":"boolean","description":""},"too_many_claims_of_items_returned":{"description":"","type":"boolean"},"charge_privileges_denied":{"description":"","type":"boolean"},"renewal_privileges_denied":{"description":"","type":"boolean"}}},"newBorrowerHoldBody":{"properties":{"expirationdate":{"type":"string","format":"date","description":"Reserve end date"},"itemnumber":{"description":"Item internal identifier","type":"integer"},"branchcode":{"description":"Pickup location","type":"string"},"biblionumber":{"type":"integer","description":"Biblio internal identifier"},"suspend_until":{"type":"string","description":"Suspend the Hold until this date, so the Hold won't get caught but advances in queue.","format":"date"}},"type":"object"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"itemnumber":{"type":"integer","description":"Item internal identifier"}},"securityDefinitions":{"multi_key_auth":{"name":"Authorization","type":"apiKey","in":"header","description":"Example: 'Authorization: Koha 1:0f049b5ba2f04da7e719b7166dd9e1b0efacf23747798f19efe51eb6e437f84c'\n\nConstructing the Authorization header\n\n-You brand the authorization header with 'Koha'\n-Then you give the userid\/cardnumber of the user authenticating.\n-Then the hashed signature.\n\nThe signature is a HMAC-SHA256-HEX hash of several elements of the request,\nseparated by spaces:\n - HTTP method (uppercase)\n - userid\/cardnumber\n - X-Koha-Date-header\nSigned with the Borrowers API key\n\n\nPseudocode example:\n\nSignature = HMAC-SHA256-HEX('HTTPS' + ' ' +\n                            '\/api\/v1\/borrowers\/12?howdoyoudo=voodoo' + ' ' +\n                            'admin69' + ' ' +\n                            '760818212' + ' ' +\n                            'frJIUN8DYpKDtOLCwo\/\/yllqDzg='\n                           );\n"}},"paths":{"\/borrowers\/{borrowernumber}\/holds":{"get":{"operationId":"listBorrowerHolds","produces":["application\/json"],"x-mojo-controller":"Koha::REST::V1::Borrowers::Holds","responses":{"404":{"description":"Borrower not found","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}},"200":{"schema":{"items":{"type":"object","properties":{"notificationdate":{"description":"currently unused","type":"string"},"found":{"description":"a one letter code defining what the status of the reserve is after it has been confirmed","type":"string"},"itemnumber":{"type":"integer","description":"Item internal identifier"},"timestamp":{"description":"date and time the reserve was last updated","type":"string"},"lowestPriority":{"description":"","type":"string"},"priority":{"description":"where in the queue the patron sits","type":"string"},"reservedate":{"type":"string","description":"the date the reserve was placed"},"waitingdate":{"description":"the date the item was marked as waiting for the patron at the library","type":"string"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"cancellationdate":{"type":"string","description":"the date the reserve was cancelled"},"branchcode":{"type":"string","description":"Code identifying a library"},"constrainttype":{"description":"type of constraint","type":"string"},"reserve_id":{"type":"number","description":"Internal reserve identifier"},"reminderdate":{"type":"string","description":"currently unused"},"expirationdate":{"type":"string","description":"the date the reserve expires"},"suspend_until":{"description":"","type":"string"},"biblionumber":{"description":"Biblio internal identifier","type":"integer"},"reservenotes":{"description":"notes related to this reserve","type":"string"},"suspend":{"description":"","type":"string"}}},"type":"array"},"description":"A list of holds"}},"parameters":[{"in":"path","type":"integer","name":"borrowernumber","description":"Internal borrower identifier","required":true}],"tags":["borrowers","holds"],"x-koha-permission":{"borrowers":"*"}},"post":{"responses":{"404":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"description":"Borrower not found"},"201":{"schema":{"properties":{"notificationdate":{"description":"currently unused","type":"string"},"found":{"description":"a one letter code defining what the status of the reserve is after it has been confirmed","type":"string"},"itemnumber":{"type":"integer","description":"Item internal identifier"},"timestamp":{"description":"date and time the reserve was last updated","type":"string"},"lowestPriority":{"description":"","type":"string"},"priority":{"description":"where in the queue the patron sits","type":"string"},"reservedate":{"type":"string","description":"the date the reserve was placed"},"waitingdate":{"description":"the date the item was marked as waiting for the patron at the library","type":"string"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"cancellationdate":{"type":"string","description":"the date the reserve was cancelled"},"branchcode":{"type":"string","description":"Code identifying a library"},"constrainttype":{"description":"type of constraint","type":"string"},"reserve_id":{"type":"number","description":"Internal reserve identifier"},"reminderdate":{"type":"string","description":"currently unused"},"expirationdate":{"type":"string","description":"the date the reserve expires"},"suspend_until":{"description":"","type":"string"},"biblionumber":{"description":"Biblio internal identifier","type":"integer"},"reservenotes":{"description":"notes related to this reserve","type":"string"},"suspend":{"description":"","type":"string"}},"type":"object"},"description":"Created hold"},"500":{"description":"Internal error","schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"}},"403":{"schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"},"description":"Hold not allowed"},"400":{"description":"Missing or wrong parameters","schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"}}},"parameters":[{"required":true,"description":"Internal borrower identifier","name":"borrowernumber","in":"path","type":"integer"},{"in":"body","name":"body","schema":{"properties":{"expirationdate":{"type":"string","format":"date","description":"Reserve end date"},"itemnumber":{"description":"Item internal identifier","type":"integer"},"branchcode":{"description":"Pickup location","type":"string"},"biblionumber":{"type":"integer","description":"Biblio internal identifier"},"suspend_until":{"type":"string","description":"Suspend the Hold until this date, so the Hold won't get caught but advances in queue.","format":"date"}},"type":"object"},"description":"A Hold-object","required":true}],"x-koha-permission":{"circulate":"*"},"operationId":"addBorrowerHold","consumes":["application\/json"],"x-mojo-controller":"Koha::REST::V1::Borrowers::Holds","produces":["application\/json"],"tags":["borrowers","holds"]}},"\/labels\/sheets\/version":{"get":{"operationId":"listSheetVersions","x-mojo-controller":"Koha::REST::V1::Labels::Sheets","responses":{"500":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"description":"Internal server error"},"404":{"description":"No sheets in Koha","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}},"200":{"description":"A list of sheet ids and versions","schema":{"type":"array","items":{"required":["id","version"],"properties":{"version":{"format":"float","type":"number"},"id":{"type":"integer"}},"type":"object"}}}},"produces":["application\/json"],"tags":["labels"],"x-koha-permission":{"labels":"sheets_get"},"summary":"Get a list of label positioning sheet ids and versions."}},"\/auth\/session":{"get":{"x-koha-permission":{"auth":"get_session"},"tags":["auth"],"parameters":[{"in":"body","name":"session","description":"The CGISESSID Cookie used to authenticate a session","schema":{"required":["sessionid"],"properties":{"sessionid":{"type":"string","description":"The Koha sessionid to be tested"}},"type":"object"},"required":true}],"operationId":"getSession","x-mojo-controller":"Koha::REST::V1::Auth","produces":["application\/json"],"responses":{"200":{"description":"A borrower with SSO-relevant fields","schema":{"properties":{"lastname":{"type":"string","description":"borrower's last name"},"email":{"description":"borrower's primary email address","type":"string"},"firstname":{"description":"borrower's first name","type":"string"}},"type":"object"}},"404":{"description":"Session not found","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}}}},"\/biblios\/{biblionumber}":{"delete":{"x-koha-permission":{"editcatalogue":"delete_catalogue"},"summary":"Deletes the given Bibliographic Record","description":"Can fail if there are dependecies to the Biblio.","parameters":[{"required":true,"description":"Internal biblio identifier","name":"biblionumber","in":"path","type":"integer"}],"security":[{"multi_key_auth":[]}],"responses":{"204":{"schema":{"type":"string"},"description":"Deleting the Record succeeded."},"400":{"description":"Cannot delete the Bibliographic Record due to constraints. A constraint can be for example the presence of dependant Items.","schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"}},"404":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"description":"No such Bibliographic record found"}},"tags":["biblios"],"operationId":"deleteBiblio","x-mojo-controller":"Koha::REST::V1::Biblios","produces":[""]}},"\/messages\/{messagenumber}\/resend":{"post":{"operationId":"createResend","produces":["application\/json"],"x-mojo-controller":"Koha::REST::V1::Messages","tags":["messages"],"responses":{"204":{"description":"Resending the message succeeded.","schema":{"type":"string"}},"404":{"description":"Message not found","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}},"parameters":[{"required":true,"description":"Internal message identifier","name":"messagenumber","in":"path","type":"integer"}],"description":"Resends a message.","x-koha-permission":{"messages":"resend_message"}}},"\/messages":{"get":{"operationId":"listMessages","x-mojo-controller":"Koha::REST::V1::Messages","responses":{"200":{"schema":{"type":"array","items":{"properties":{"letter_code":{"type":"string","description":""},"to_address":{"type":"string","description":"Destination email address"},"message_transport_type":{"type":"string","description":"Transport method. Values accepted by default are 'email', 'sms', 'phone' and 'print'"},"from_address":{"description":"Source address of email","type":"string"},"metadata":{"description":"","type":"string"},"time_queued":{"description":"Date and time of when message was placed in queue","type":"string"},"content":{"type":"string","description":"Content of the message"},"content_type":{"description":"Content type","type":"string"},"subject":{"description":"Subject of the message","type":"string"},"status":{"description":"Delivery status","type":"string"},"message_id":{"type":"integer","description":"Message internal identifier"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"delivery_note":{"description":"Additional delivery notes","type":"string"}},"type":"object"}},"description":"A list of messages"},"404":{"schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"},"description":"Messages not found"}},"produces":["application\/json"],"tags":["messages"],"x-koha-permission":{"messages":"get_message"}},"post":{"x-koha-permission":{"messages":"create_message"},"parameters":[{"in":"body","name":"body","schema":{"properties":{"letter_code":{"type":"string","description":""},"to_address":{"type":"string","description":"Destination email address"},"message_transport_type":{"type":"string","description":"Transport method. Values accepted by default are 'email', 'sms', 'phone' and 'print'"},"from_address":{"description":"Source address of email","type":"string"},"metadata":{"description":"","type":"string"},"time_queued":{"description":"Date and time of when message was placed in queue","type":"string"},"content":{"type":"string","description":"Content of the message"},"content_type":{"description":"Content type","type":"string"},"subject":{"description":"Subject of the message","type":"string"},"status":{"description":"Delivery status","type":"string"},"message_id":{"type":"integer","description":"Message internal identifier"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"delivery_note":{"description":"Additional delivery notes","type":"string"}},"type":"object"},"description":"A JSON object containing informations about the new message","required":true}],"tags":["messages"],"produces":["application\/json"],"x-mojo-controller":"Koha::REST::V1::Messages","responses":{"201":{"schema":{"properties":{"letter_code":{"type":"string","description":""},"to_address":{"type":"string","description":"Destination email address"},"message_transport_type":{"type":"string","description":"Transport method. Values accepted by default are 'email', 'sms', 'phone' and 'print'"},"from_address":{"description":"Source address of email","type":"string"},"metadata":{"description":"","type":"string"},"time_queued":{"description":"Date and time of when message was placed in queue","type":"string"},"content":{"type":"string","description":"Content of the message"},"content_type":{"description":"Content type","type":"string"},"subject":{"description":"Subject of the message","type":"string"},"status":{"description":"Delivery status","type":"string"},"message_id":{"type":"integer","description":"Message internal identifier"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"delivery_note":{"description":"Additional delivery notes","type":"string"}},"type":"object"},"description":"A message"},"400":{"description":"Missing or wrong parameters","schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"}}},"operationId":"createMessage"}},"\/borrowers":{"get":{"x-koha-permission":{"borrowers":"*"},"summary":"Searches for Borrowers","description":"Search borrowers from Koha, optionally filter the search with specific parameters. All parameters given, must be present in the returned Borrower-objects. If no search parameters are given, all borrowers are returned! This is certainly not what you want.","parameters":[{"in":"query","type":"string","name":"cardnumber","description":"The cardnumber of the Borrower, unique value","required":false},{"in":"query","type":"string","name":"userid","description":"The userid of the Borrower, unique value","required":false},{"description":"The internal id of the Borrower, unique value","required":false,"in":"query","type":"integer","name":"borrowernumber"}],"security":[{"multi_key_auth":[]}],"responses":{"200":{"schema":{"items":{"properties":{"cardnumber":{"type":"string","description":"library assigned ID number for borrowers"},"firstname":{"type":"string","description":"borrower's first name"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"surname":{"type":"string","description":"borrower's last name"}},"type":"object"},"type":"array"},"description":"A list of borrowers"}},"tags":["borrowers"],"produces":["application\/json"],"x-mojo-controller":"Koha::REST::V1::Borrowers","operationId":"listBorrowers"}},"\/lists\/{listname}\/contents":{"delete":{"parameters":[{"required":true,"description":"list name","name":"listname","type":"string","in":"path"},{"name":"listContent","in":"body","required":true,"schema":{"type":"object","properties":{"listContentNumber":{"type":"integer","description":"The internal identifier for this list article"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"itemnumber":{"type":"integer","description":"Item internal identifier"},"biblionumber":{"description":"Biblio internal identifier","type":"integer"}}},"description":"The list article"}],"tags":["lists"],"operationId":"deleteContents","responses":{"404":{"schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"},"description":"The given list doesn't exist"},"200":{"schema":{"properties":{"listContentNumber":{"type":"integer","description":"The internal identifier for this list article"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"itemnumber":{"type":"integer","description":"Item internal identifier"},"biblionumber":{"description":"Biblio internal identifier","type":"integer"}},"type":"object"},"description":"All list articles are deleted"}},"x-mojo-controller":"Koha::REST::V1::Lists::Contents","produces":["application\/json"],"x-koha-permission":{"catalogue":"*"}},"post":{"produces":["application\/json"],"x-mojo-controller":"Koha::REST::V1::Lists::Contents","responses":{"404":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"description":"The given list doesn't exist"},"200":{"schema":{"type":"object","properties":{"listContentNumber":{"type":"integer","description":"The internal identifier for this list article"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"itemnumber":{"type":"integer","description":"Item internal identifier"},"biblionumber":{"description":"Biblio internal identifier","type":"integer"}}},"description":"The list article"}},"operationId":"addToList","tags":["lists"],"parameters":[{"name":"listname","type":"string","in":"path","required":true,"description":"list name"},{"required":true,"description":"The list article","schema":{"type":"object","properties":{"listContentNumber":{"type":"integer","description":"The internal identifier for this list article"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"itemnumber":{"type":"integer","description":"Item internal identifier"},"biblionumber":{"description":"Biblio internal identifier","type":"integer"}}},"name":"listContent","in":"body"}],"x-koha-permission":{"catalogue":"*"}}},"\/borrowers\/{borrowernumber}":{"get":{"x-koha-permission":{"borrowers":"*"},"parameters":[{"required":true,"description":"Internal borrower identifier","name":"borrowernumber","in":"path","type":"integer"}],"security":[{"multi_key_auth":[]}],"responses":{"404":{"schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"},"description":"Borrower not found"},"200":{"schema":{"type":"object","properties":{"cardnumber":{"type":"string","description":"library assigned ID number for borrowers"},"firstname":{"type":"string","description":"borrower's first name"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"surname":{"type":"string","description":"borrower's last name"}}},"description":"A borrower"}},"tags":["borrowers"],"x-mojo-controller":"Koha::REST::V1::Borrowers","produces":["application\/json"],"operationId":"getBorrower"}},"\/messages\/{messagenumber}":{"delete":{"produces":["application\/json"],"x-mojo-controller":"Koha::REST::V1::Messages","responses":{"204":{"schema":{"type":"string"},"description":"Deleting the message succeeded."},"404":{"schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"},"description":"Message not found."}},"operationId":"deleteMessage","parameters":[{"required":true,"description":"Internal message identifier","name":"messagenumber","type":"integer","in":"path"}],"tags":["messages"],"x-koha-permission":{"messages":"delete_message"}},"put":{"x-koha-permission":{"messages":"update_message"},"parameters":[{"name":"body","in":"body","required":false,"description":"A JSON object containing informations about the new message","schema":{"properties":{"letter_code":{"type":"string","description":""},"to_address":{"type":"string","description":"Destination email address"},"message_transport_type":{"type":"string","description":"Transport method. Values accepted by default are 'email', 'sms', 'phone' and 'print'"},"from_address":{"description":"Source address of email","type":"string"},"metadata":{"description":"","type":"string"},"time_queued":{"description":"Date and time of when message was placed in queue","type":"string"},"content":{"type":"string","description":"Content of the message"},"content_type":{"description":"Content type","type":"string"},"subject":{"description":"Subject of the message","type":"string"},"status":{"description":"Delivery status","type":"string"},"message_id":{"type":"integer","description":"Message internal identifier"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"delivery_note":{"description":"Additional delivery notes","type":"string"}},"type":"object"}},{"name":"messagenumber","type":"integer","in":"path","required":true,"description":"Internal message identifier"}],"tags":["messages"],"x-mojo-controller":"Koha::REST::V1::Messages","responses":{"200":{"schema":{"type":"object","properties":{"letter_code":{"type":"string","description":""},"to_address":{"type":"string","description":"Destination email address"},"message_transport_type":{"type":"string","description":"Transport method. Values accepted by default are 'email', 'sms', 'phone' and 'print'"},"from_address":{"description":"Source address of email","type":"string"},"metadata":{"description":"","type":"string"},"time_queued":{"description":"Date and time of when message was placed in queue","type":"string"},"content":{"type":"string","description":"Content of the message"},"content_type":{"description":"Content type","type":"string"},"subject":{"description":"Subject of the message","type":"string"},"status":{"description":"Delivery status","type":"string"},"message_id":{"type":"integer","description":"Message internal identifier"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"delivery_note":{"description":"Additional delivery notes","type":"string"}}},"description":"A message"},"400":{"description":"Missing or wrong parameters","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}},"404":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"description":"Message not found"}},"produces":["application\/json"],"operationId":"updateMessage"},"get":{"x-koha-permission":{"messages":"get_message"},"parameters":[{"description":"Internal message identifier","required":true,"type":"integer","in":"path","name":"messagenumber"}],"tags":["messages"],"x-mojo-controller":"Koha::REST::V1::Messages","responses":{"404":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"description":"Message not found"},"200":{"description":"A message","schema":{"type":"object","properties":{"letter_code":{"type":"string","description":""},"to_address":{"type":"string","description":"Destination email address"},"message_transport_type":{"type":"string","description":"Transport method. Values accepted by default are 'email', 'sms', 'phone' and 'print'"},"from_address":{"description":"Source address of email","type":"string"},"metadata":{"description":"","type":"string"},"time_queued":{"description":"Date and time of when message was placed in queue","type":"string"},"content":{"type":"string","description":"Content of the message"},"content_type":{"description":"Content type","type":"string"},"subject":{"description":"Subject of the message","type":"string"},"status":{"description":"Delivery status","type":"string"},"message_id":{"type":"integer","description":"Message internal identifier"},"borrowernumber":{"type":"integer","description":"Borrower internal identifier"},"delivery_note":{"description":"Additional delivery notes","type":"string"}}}}},"produces":["application\/json"],"operationId":"getMessage"}},"\/serialitems":{"get":{"tags":["serials"],"operationId":"getSerialItems","produces":["application\/json"],"x-mojo-controller":"Koha::REST::V1::Serials","summary":"Fetches SerialItems representing Serials (without an Item-object) and Magazines (with an Item-object)","description":"You cannot return all SerialItems, but you must filter your search with GET-parameters.","parameters":[{"type":"integer","in":"query","name":"biblionumber","description":"Internal biblio identifier","required":true}],"responses":{"200":{"description":"Fetching the objects succeeded.","schema":{"type":"object"}}}}},"\/serials\/collection":{"get":{"summary":"Fetches a volume overview of all serials in the system, and a count of how many have been received.","description":"Fetches a volume overview of all serials in the system, and a count of how many have been received.","parameters":[{"name":"biblionumber","type":"integer","in":"query","required":true,"description":"Internal biblio identifier"},{"description":"The code of the branch where the Items have been last seen.","required":false,"in":"query","type":"string","name":"holdingbranch"},{"description":"Status of a serial. 1 = Expected, 2 = Received, 3 = Late, 4 = Not issued, 7 = Claimed.","required":false,"in":"query","type":"integer","name":"serialStatus"}],"responses":{"400":{"description":"Bad search parameters.","schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"}},"200":{"description":"Fetching the objects succeeded.","schema":{"type":"object"}},"404":{"description":"No objects match the search request","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}},"500":{"description":"Server-side error. I am sorry :(","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}},"tags":["serials"],"produces":["application\/json"],"x-mojo-controller":"Koha::REST::V1::Serials","operationId":"getCollection"}},"\/borrowers\/status":{"get":{"summary":"Returns the Borrower's details and statuses","description":"This endpoint doesn't need other authentication than the proper username and password, and can be used anonymously.<br\/>Note: Does not authenticate the Borrower to Koha!","parameters":[{"in":"formData","type":"string","name":"uname","description":"The Username the Borrower uses to authenticate","required":true},{"description":"The Password the Borrower uses to authenticate","required":true,"in":"formData","type":"string","name":"passwd"}],"responses":{"200":{"description":"Borrower information","schema":{"type":"object","properties":{"too_many_renewals":{"description":"","type":"boolean"},"too_many_items_lost":{"description":"","type":"boolean"},"fines":{"format":"double","description":"Total due fines","type":"number"},"recall_overdue":{"type":"boolean","description":""},"borrowernumber":{"description":"Borrower internal identifier","type":"integer"},"homebranch":{"description":"Home library\/branch.","type":"string"},"too_many_items_billed":{"description":"","type":"boolean"},"excessive_outstanding_fees":{"type":"boolean","description":""},"language":{"type":"string","description":"Desired language of service"},"too_many_items_charged":{"type":"boolean","description":""},"firstname":{"description":"First name","type":"string"},"hold_privileges_denied":{"type":"boolean","description":""},"card_reported_lost":{"type":"boolean","description":""},"surname":{"type":"string","description":"Last name"},"recall_privileges_denied":{"description":"","type":"boolean"},"cardnumber":{"type":"string","description":"Library assigned ID number for Borrowers"},"too_many_items_overdue":{"type":"boolean","description":""},"excessive_outstanding_fines":{"type":"boolean","description":""},"too_many_claims_of_items_returned":{"description":"","type":"boolean"},"charge_privileges_denied":{"description":"","type":"boolean"},"renewal_privileges_denied":{"description":"","type":"boolean"}}}},"400":{"description":"Password authentication failed using username or password","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}},"tags":["borrowers"],"operationId":"status","produces":["application\/json","application\/xml"],"x-mojo-controller":"Koha::REST::V1::Borrowers"}},"\/messages\/{messagenumber}\/report\/labyrintti":{"post":{"operationId":"createLabyrinttiReport","consumes":["application\/x-www-form-urlencoded"],"produces":["application\/json"],"x-mojo-controller":"Koha::REST::V1::Messages::Reports","responses":{"404":{"description":"Message not found","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}},"200":{"schema":{"type":"string"},"description":"Response for receiving the report."}},"tags":["messages"],"parameters":[{"required":true,"description":"Internal message identifier","name":"messagenumber","type":"integer","in":"path"},{"name":"status","in":"formData","type":"string","required":true,"description":"Status of the delivery"},{"description":"Delivery notes","required":true,"in":"formData","type":"string","name":"message"}]}},"\/labels\/sheets\/{sheet_identifier}\/{sheet_version}":{"get":{"tags":["labels"],"produces":["application\/json"],"x-mojo-controller":"Koha::REST::V1::Labels::Sheets","operationId":"getSheet","summary":"Get a label positioning sheet","x-koha-permission":{"labels":"sheets_get"},"parameters":[{"required":true,"description":"Internal sheet identifier","name":"sheet_identifier","in":"path","type":"integer"},{"name":"sheet_version","in":"path","type":"number","format":"float","required":true,"description":"Sheet version number. If omitted, operations target the newest version. Set to '631373.00' to affect all versions."}],"responses":{"200":{"description":"The sheet","schema":{"type":"object"}},"404":{"schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"},"description":"Sheet not found"},"500":{"description":"Internal server error","schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"}}}},"delete":{"tags":["labels"],"operationId":"deleteSheet","produces":[""],"x-mojo-controller":"Koha::REST::V1::Labels::Sheets","parameters":[{"name":"sheet_identifier","in":"path","type":"integer","required":true,"description":"Internal sheet identifier"},{"description":"Sheet version number. If omitted, operations target the newest version. Set to '631373.00' to affect all versions.","format":"float","required":true,"in":"path","type":"number","name":"sheet_version"}],"responses":{"204":{"schema":{"type":"string"},"description":"Deleting the message succeeded."},"404":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"description":"Sheet not found"},"500":{"description":"Internal server error","schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"}}},"x-koha-permission":{"labels":"sheets_del"},"summary":"Delete a label positioning sheet","description":"By default only deletes the newest version, exposing the older version."}},"\/labels\/sheets":{"put":{"x-koha-permission":{"labels":"sheets_mod"},"summary":"Modify a label positioning sheet","responses":{"400":{"schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"},"description":"Missing or wrong parameters"},"201":{"schema":{"type":"string"},"description":"The modified sheet"},"500":{"schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"},"description":"Internal server error"},"404":{"description":"Sheet not found","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}},"parameters":[{"required":true,"description":"A JSON object of the sheet, containing the items, regions and elements.","name":"sheet","in":"formData","type":"string"}],"operationId":"updateSheet","x-mojo-controller":"Koha::REST::V1::Labels::Sheets","produces":["application\/json"],"tags":["labels"]},"post":{"parameters":[{"in":"formData","type":"string","name":"sheet","description":"A JSON object of the sheet, containing the items, regions and elements.","required":true}],"responses":{"400":{"description":"Missing or wrong parameters","schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"}},"201":{"schema":{"type":"string"},"description":"The created sheet"},"500":{"description":"Internal server error","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}},"summary":"Create a new label positioning sheet","x-koha-permission":{"labels":"sheets_new"},"tags":["labels"],"operationId":"createSheet","x-mojo-controller":"Koha::REST::V1::Labels::Sheets","produces":["text\/plain"]},"get":{"operationId":"listSheets","x-mojo-controller":"Koha::REST::V1::Labels::Sheets","produces":["application\/json"],"tags":["labels"],"description":"Not designed for external use. Use this to see the structure of the sheet-objects.","x-koha-permission":{"labels":"sheets_get"},"summary":"Get a list of label positioning sheets.","responses":{"404":{"schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"},"description":"No sheets in Koha"},"500":{"schema":{"properties":{"error":{"type":"string","description":"Error message"}},"type":"object"},"description":"Internal server error"},"200":{"schema":{"type":"array","items":{"type":"string"}},"description":"A list of sheets"}}}}}}
(-)a/etc/koha-httpd.conf (-7 / +4 lines)
Lines 28-40 Link Here
28
   # SetEnv OVERRIDE_SYSPREF_PrefName Value
28
   # SetEnv OVERRIDE_SYSPREF_PrefName Value
29
29
30
   ##REVERSE PROXY REQUESTS TO THE KOHA API DAEMON
30
   ##REVERSE PROXY REQUESTS TO THE KOHA API DAEMON
31
   Alias /api/v1/doc __INTRANET_CGI_DIR__/api/v1/doc
31
   Alias /api/v1 __INTRANET_CGI_DIR__/api/v1
32
   Alias /api/v1/swagger.json "__INTRANET_CGI_DIR__/api/v1/swagger.json"
33
32
34
   ProxyRequests Off #Disable anonymous forward proxying
33
   ProxyRequests Off #Disable anonymous forward proxying
35
   ProxyPreserveHost On
34
   ProxyPreserveHost On
36
   ProxyPass        /api/v1/doc !
35
   ProxyPass        /api/v1/doc !
37
   ProxyPass        /api/v1/swagger.json !
36
   ProxyPass        /api/v1/swagger !
38
   ProxyPass        /api/v1/  http://localhost:8081/api/v1/ keepalive=On
37
   ProxyPass        /api/v1/  http://localhost:8081/api/v1/ keepalive=On
39
   ProxyPassReverse /api/v1/  http://localhost:8081/api/v1/
38
   ProxyPassReverse /api/v1/  http://localhost:8081/api/v1/
40
   ##REVERSE PROXYING OK
39
   ##REVERSE PROXYING OK
Lines 166-178 Link Here
166
   ErrorDocument 500 /cgi-bin/koha/errors/500.pl
165
   ErrorDocument 500 /cgi-bin/koha/errors/500.pl
167
166
168
   ##REVERSE PROXY REQUESTS TO THE KOHA API DAEMON
167
   ##REVERSE PROXY REQUESTS TO THE KOHA API DAEMON
169
   Alias /api/v1/doc __INTRANET_CGI_DIR__/api/v1/doc
168
   Alias /api/v1 __INTRANET_CGI_DIR__/api/v1
170
   Alias /api/v1/swagger.json "__INTRANET_CGI_DIR__/api/v1/swagger.json"
171
169
172
   ProxyRequests Off #Disable anonymous forward proxying
170
   ProxyRequests Off #Disable anonymous forward proxying
173
   ProxyPreserveHost On
171
   ProxyPreserveHost On
174
   ProxyPass        /api/v1/doc !
172
   ProxyPass        /api/v1/doc !
175
   ProxyPass        /api/v1/swagger.json !
173
   ProxyPass        /api/v1/swagger !
176
   ProxyPass        /api/v1/  http://localhost:8081/api/v1/ keepalive=On
174
   ProxyPass        /api/v1/  http://localhost:8081/api/v1/ keepalive=On
177
   ProxyPassReverse /api/v1/  http://localhost:8081/api/v1/
175
   ProxyPassReverse /api/v1/  http://localhost:8081/api/v1/
178
   ##REVERSE PROXYING OK
176
   ##REVERSE PROXYING OK
179
- 

Return to bug 15126