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.
 
 
 
 
 
 

557 lines
14 KiB

{
"/advanced_editor/macros": {
"get": {
"x-mojo-to": "AdvancedEditorMacro#list",
"operationId": "listMacro",
"tags": ["macros"],
"summary": "List advanced editor macros",
"produces": [
"application/json"
],
"parameters": [
{
"name": "name",
"in": "query",
"description": "Case insensative search on macro name",
"required": false,
"type": "string"
},
{
"name": "macro_text",
"in": "query",
"description": "Case insensative search on macro text",
"required": false,
"type": "string"
},
{
"name": "patron_id",
"in": "query",
"description": "Search on internal patron_id",
"required": false,
"type": "string"
},
{
"name": "shared",
"in": "query",
"description": "Search on shared macros",
"required": false,
"type": "string"
},
{
"$ref": "../parameters.json#/match"
},
{
"$ref": "../parameters.json#/order_by"
},
{
"$ref": "../parameters.json#/page"
},
{
"$ref": "../parameters.json#/per_page"
},
{
"$ref": "../parameters.json#/q_param"
},
{
"$ref": "../parameters.json#/q_body"
},
{
"$ref": "../parameters.json#/q_header"
}
],
"responses": {
"200": {
"description": "A list of macros",
"schema": {
"type": "array",
"items": {
"$ref": "../definitions.json#/advancededitormacro"
}
}
},
"403": {
"description": "Access forbidden",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"503": {
"description": "Under maintenance",
"schema": {
"$ref": "../definitions.json#/error"
}
}
},
"x-koha-authorization": {
"permissions": {
"editcatalogue": "advanced_editor"
}
}
},
"post": {
"x-mojo-to": "AdvancedEditorMacro#add",
"operationId": "addAdvancedEditorMacro",
"tags": ["macros"],
"summary": "Add advanced editor macros",
"parameters": [{
"name": "body",
"in": "body",
"description": "A JSON object containing informations about the new macro",
"required": true,
"schema": {
"$ref": "../definitions.json#/advancededitormacro"
}
}],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "Macro added",
"schema": {
"$ref": "../definitions.json#/advancededitormacro"
}
},
"401": {
"description": "Authentication required",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"403": {
"description": "Access forbidden",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"503": {
"description": "Under maintenance",
"schema": {
"$ref": "../definitions.json#/error"
}
}
},
"x-koha-authorization": {
"permissions": {
"editcatalogue": "advanced_editor"
}
}
}
},
"/advanced_editor/macros/shared": {
"post": {
"x-mojo-to": "AdvancedEditorMacro#add_shared",
"operationId": "addsharedAdvancedEditorMacro",
"tags": ["macros"],
"summary": "Add shared advanced editor macros",
"parameters": [{
"name": "body",
"in": "body",
"description": "A JSON object containing informations about the new macro",
"required": true,
"schema": {
"$ref": "../definitions.json#/advancededitormacro"
}
}],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "Macro added",
"schema": {
"$ref": "../definitions.json#/advancededitormacro"
}
},
"401": {
"description": "Authentication required",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"403": {
"description": "Access forbidden",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"503": {
"description": "Under maintenance",
"schema": {
"$ref": "../definitions.json#/error"
}
}
},
"x-koha-authorization": {
"permissions": {
"editcatalogue": {
"advanced_editor": 1,
"create_shared_macros": 1
}
}
}
}
},
"/advanced_editor/macros/{advancededitormacro_id}": {
"get": {
"x-mojo-to": "AdvancedEditorMacro#get",
"operationId": "getAdvancedEditorMacro",
"tags": ["macros"],
"summary": "Get advanced editor macro",
"parameters": [{
"$ref": "../parameters.json#/advancededitormacro_id_pp"
}],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "A macro",
"schema": {
"$ref": "../definitions.json#/advancededitormacro"
}
},
"403": {
"description": "Access forbidden",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"404": {
"description": "AdvancedEditorMacro not found",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"503": {
"description": "Under maintenance",
"schema": {
"$ref": "../definitions.json#/error"
}
}
},
"x-koha-authorization": {
"permissions": {
"editcatalogue": "advanced_editor"
}
}
},
"put": {
"x-mojo-to": "AdvancedEditorMacro#update",
"operationId": "updateAdvancedEditorMacro",
"tags": ["macros"],
"summary": "Update advanced editor macro",
"parameters": [{
"$ref": "../parameters.json#/advancededitormacro_id_pp"
}, {
"name": "body",
"in": "body",
"description": "An advanced editor macro object",
"required": true,
"schema": {
"$ref": "../definitions.json#/advancededitormacro"
}
}],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "An advanced editor macro",
"schema": {
"$ref": "../definitions.json#/advancededitormacro"
}
},
"401": {
"description": "Authentication required",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"403": {
"description": "Access forbidden",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"404": {
"description": "Macro not found",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"503": {
"description": "Under maintenance",
"schema": {
"$ref": "../definitions.json#/error"
}
}
},
"x-koha-authorization": {
"permissions": {
"editcatalogue": "advanced_editor"
}
}
},
"delete": {
"x-mojo-to": "AdvancedEditorMacro#delete",
"operationId": "deleteAdvancedEditorMacro",
"tags": ["macros"],
"summary": "Delete advanced editor macro",
"parameters": [{
"$ref": "../parameters.json#/advancededitormacro_id_pp"
}],
"produces": [
"application/json"
],
"responses": {
"204": {
"description": "Advanced editor macro deleted",
"schema": {
"type": "string"
}
},
"401": {
"description": "Authentication required",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"403": {
"description": "Access forbidden",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"404": {
"description": "Macro not found",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"503": {
"description": "Under maintenance",
"schema": {
"$ref": "../definitions.json#/error"
}
}
},
"x-koha-authorization": {
"permissions": {
"editcatalogue": "advanced_editor"
}
}
}
},
"/advanced_editor/macros/shared/{advancededitormacro_id}": {
"get": {
"x-mojo-to": "AdvancedEditorMacro#get_shared",
"operationId": "getsharedAdvancedEditorMacro",
"tags": ["macros"],
"summary": "Get shared advanced editor macro",
"parameters": [{
"$ref": "../parameters.json#/advancededitormacro_id_pp"
}],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "A macro",
"schema": {
"$ref": "../definitions.json#/advancededitormacro"
}
},
"403": {
"description": "Access forbidden",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"404": {
"description": "AdvancedEditorMacro not found",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"503": {
"description": "Under maintenance",
"schema": {
"$ref": "../definitions.json#/error"
}
}
},
"x-koha-authorization": {
"permissions": {
"editcatalogue": "advanced_editor"
}
}
},
"put": {
"x-mojo-to": "AdvancedEditorMacro#update_shared",
"operationId": "updatesharedAdvancedEditorMacro",
"tags": ["macros"],
"summary": "Update shared advanced editor macro",
"parameters": [{
"$ref": "../parameters.json#/advancededitormacro_id_pp"
}, {
"name": "body",
"in": "body",
"description": "An advanced editor macro object",
"required": true,
"schema": {
"$ref": "../definitions.json#/advancededitormacro"
}
}],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "An advanced editor macro",
"schema": {
"$ref": "../definitions.json#/advancededitormacro"
}
},
"401": {
"description": "Authentication required",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"403": {
"description": "Access forbidden",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"404": {
"description": "Macro not found",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"503": {
"description": "Under maintenance",
"schema": {
"$ref": "../definitions.json#/error"
}
}
},
"x-koha-authorization": {
"permissions": {
"editcatalogue": {
"advanced_editor": 1,
"create_shared_macros": 1
}
}
}
},
"delete": {
"x-mojo-to": "AdvancedEditorMacro#delete_shared",
"operationId": "deletesharedAdvancedEditorMacro",
"tags": ["macros"],
"summary": "Delete shared advanced editor macro",
"parameters": [{
"$ref": "../parameters.json#/advancededitormacro_id_pp"
}],
"produces": [
"application/json"
],
"responses": {
"204": {
"description": "Advanced editor macro deleted",
"schema": {
"type": "string"
}
},
"401": {
"description": "Authentication required",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"403": {
"description": "Access forbidden",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"404": {
"description": "Macro not found",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"503": {
"description": "Under maintenance",
"schema": {
"$ref": "../definitions.json#/error"
}
}
},
"x-koha-authorization": {
"permissions": {
"editcatalogue": {
"advanced_editor": 1,
"delete_shared_macros": 1
}
}
}
}
}
}