Tomas Cohen Arazi
2ae0cc83f3
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
128 lines
2.9 KiB
JSON
128 lines
2.9 KiB
JSON
{
|
|
"/items": {
|
|
"get": {
|
|
"x-mojo-to": "Items#list",
|
|
"operationId": "listItems",
|
|
"tags": [
|
|
"items"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "external_id",
|
|
"in": "query",
|
|
"description": "Search on the item's barcode",
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"$ref": "../parameters.json#/match"
|
|
},
|
|
{
|
|
"$ref": "../parameters.json#/order_by"
|
|
},
|
|
{
|
|
"$ref": "../parameters.json#/page"
|
|
},
|
|
{
|
|
"$ref": "../parameters.json#/per_page"
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of item",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "../definitions.json#/item"
|
|
}
|
|
}
|
|
},
|
|
"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": {
|
|
"catalogue": "1"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/items/{item_id}": {
|
|
"get": {
|
|
"x-mojo-to": "Items#get",
|
|
"operationId": "getItem",
|
|
"tags": ["items"],
|
|
"parameters": [{
|
|
"$ref": "../parameters.json#/item_id_pp"
|
|
}
|
|
],
|
|
"consumes": ["application/json"],
|
|
"produces": ["application/json"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "An item",
|
|
"schema": {
|
|
"$ref": "../definitions.json#/item"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Missing or wrong parameters",
|
|
"schema": {
|
|
"$ref": "../definitions.json#/error"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Item 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": {
|
|
"permissions": {
|
|
"catalogue": "1"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|