Koha/api/v1/swagger/paths/patrons.json
Jonathan Druart 5c8365e4a7 Bug 18403: REST API - patrons endpoint
There is something wrond here, the userenv is no set and so we cannot
user search_limited.
Should we set the userenv or filter on the libraries using
libraries_where_can_see_patrons?
WAITING FOR FEEDBACK HERE.

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-12 15:41:42 -03:00

111 lines
2.6 KiB
JSON

{
"/patrons": {
"get": {
"x-mojo-to": "Patron#list",
"operationId": "listPatrons",
"tags": ["patrons"],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "A list of patrons",
"schema": {
"type": "array",
"items": {
"$ref": "../definitions.json#/patron"
}
}
},
"401": {
"description": "Authentication required",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"403": {
"description": "Access forbidden",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"503": {
"description": "Under maintenance",
"schema": {
"$ref": "../definitions.json#/error"
}
}
},
"x-koha-authorization": {
"permissions": {
"borrowers": "edit_borrowers"
}
}
}
},
"/patrons/{borrowernumber}": {
"get": {
"x-mojo-to": "Patron#get",
"operationId": "getPatron",
"tags": ["patrons"],
"parameters": [{
"$ref": "../parameters.json#/borrowernumberPathParam"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "A patron",
"schema": {
"$ref": "../definitions.json#/patron"
}
},
"401": {
"description": "Authentication required",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"403": {
"description": "Access forbidden",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"404": {
"description": "Patron not found",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"503": {
"description": "Under maintenance",
"schema": {
"$ref": "../definitions.json#/error"
}
}
},
"x-koha-authorization": {
"allow-owner": true,
"allow-guarantor": true,
"permissions": {
"borrowers": "edit_borrowers"
}
}
}
}
}