Main Koha release repository
https://koha-community.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
108 lines
2.4 KiB
108 lines
2.4 KiB
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "Koha REST API",
|
|
"version": "1",
|
|
"license": {
|
|
"name": "GPL v3",
|
|
"url": "http://www.gnu.org/licenses/gpl.txt"
|
|
},
|
|
"contact": {
|
|
"name": "Koha Team",
|
|
"url": "http://koha-community.org/"
|
|
}
|
|
},
|
|
"basePath": "/api/v1",
|
|
"paths": {
|
|
"/borrowers": {
|
|
"get": {
|
|
"x-mojo-controller": "Koha::REST::V1::Borrowers",
|
|
"operationId": "listBorrowers",
|
|
"tags": ["borrowers"],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of borrowers",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/borrower"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/borrowers/{borrowernumber}": {
|
|
"get": {
|
|
"x-mojo-controller": "Koha::REST::V1::Borrowers",
|
|
"operationId": "getBorrower",
|
|
"tags": ["borrowers"],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/parameters/borrowernumberPathParam"
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A borrower",
|
|
"schema": {
|
|
"$ref": "#/definitions/borrower"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Borrower not found",
|
|
"schema": {
|
|
"$ref": "#/definitions/error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"borrower": {
|
|
"type": "object",
|
|
"properties": {
|
|
"borrowernumber": {
|
|
"$ref": "#/definitions/borrowernumber"
|
|
},
|
|
"cardnumber": {
|
|
"description": "library assigned ID number for borrowers"
|
|
},
|
|
"surname": {
|
|
"description": "borrower's last name"
|
|
},
|
|
"firstname": {
|
|
"description": "borrower's first name"
|
|
}
|
|
}
|
|
},
|
|
"borrowernumber": {
|
|
"description": "Borrower internal identifier"
|
|
},
|
|
"error": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"description": "Error message",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": {
|
|
"borrowernumberPathParam": {
|
|
"name": "borrowernumber",
|
|
"in": "path",
|
|
"description": "Internal borrower identifier",
|
|
"required": "true",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
|