5c5fc3b01ea1611927b9953dab6d215b2d47ab32
[koha.git] / api / v1 / swagger / paths / rotas.json
1 {
2     "/rotas/{rota_id}/stages/{stage_id}/position": {
3         "put": {
4             "x-mojo-to": "Stage#move",
5             "operationId": "moveStage",
6             "tags": ["rotas"],
7             "parameters": [{
8                 "name": "rota_id",
9                 "in": "path",
10                 "required": true,
11                 "description": "A rotas ID",
12                 "type": "integer"
13             }, {
14                 "name": "stage_id",
15                 "in": "path",
16                 "required": true,
17                 "description": "A stages ID",
18                 "type": "integer"
19             }, {
20                 "name": "position",
21                 "in": "body",
22                 "required": true,
23                 "description": "A stages position in the rota",
24                 "schema": {
25                     "type": "integer"
26                 }
27             }],
28             "produces": [
29                 "application/json"
30             ],
31             "responses": {
32                 "200": {
33                     "description": "OK"
34                 },
35                 "400": {
36                     "description": "Bad request",
37                     "schema": {
38                         "$ref": "../definitions.json#/error"
39                     }
40                 },
41                 "401": {
42                     "description": "Authentication required",
43                     "schema": {
44                         "$ref": "../definitions.json#/error"
45                     }
46                 },
47                 "403": {
48                     "description": "Access forbidden",
49                     "schema": {
50                         "$ref": "../definitions.json#/error"
51                     }
52                 },
53                 "404": {
54                     "description": "Position not found",
55                     "schema": {
56                         "$ref": "../definitions.json#/error"
57                     }
58                 },
59                 "500": {
60                     "description": "Internal server error",
61                     "schema": {
62                         "$ref": "../definitions.json#/error"
63                     }
64                 },
65                 "503": {
66                     "description": "Under maintenance",
67                     "schema": {
68                         "$ref": "../definitions.json#/error"
69                     }
70                 }
71             },
72             "x-koha-authorization": {
73                 "permissions": {
74                     "stockrotation": "1"
75                 }
76             }
77         }
78     }
79 }