0b47d4138952114f5302db55827e202b9b2850e3
[srvgit] / api / v1 / swagger / paths / authorities.yaml
1 ---
2 "/authorities/{authority_id}":
3   get:
4     x-mojo-to: Authorities#get
5     operationId: getAuthority
6     tags:
7       - authorities
8     summary: Get authority
9     parameters:
10       - $ref: "../swagger.yaml#/parameters/authority_id_pp"
11     produces:
12       - application/json
13       - application/marcxml+xml
14       - application/marc-in-json
15       - application/marc
16       - text/plain
17     responses:
18       "200":
19         description: An authority
20       "401":
21         description: Authentication required
22         schema:
23           $ref: "../swagger.yaml#/definitions/error"
24       "403":
25         description: Access forbidden
26         schema:
27           $ref: "../swagger.yaml#/definitions/error"
28       "404":
29         description: Authority not found
30         schema:
31           $ref: "../swagger.yaml#/definitions/error"
32       "406":
33         description: Not acceptable
34         schema:
35           type: array
36           description: Accepted content-types
37           items:
38             type: string
39       "500":
40         description: |
41           Internal server error. Possible `error_code` attribute values:
42
43           * `internal_server_error`
44         schema:
45           $ref: "../swagger.yaml#/definitions/error"
46       "503":
47         description: Under maintenance
48         schema:
49           $ref: "../swagger.yaml#/definitions/error"
50     x-koha-authorization:
51       permissions:
52         catalogue: "1"
53   delete:
54     x-mojo-to: Authorities#delete
55     operationId: deleteAuthority
56     tags:
57       - authorities
58     summary: Delete authority
59     parameters:
60       - $ref: "../swagger.yaml#/parameters/authority_id_pp"
61     produces:
62       - application/json
63     responses:
64       "204":
65         description: Authority deleted
66         schema:
67           type: string
68       "401":
69         description: Authentication required
70         schema:
71           $ref: "../swagger.yaml#/definitions/error"
72       "403":
73         description: Access forbidden
74         schema:
75           $ref: "../swagger.yaml#/definitions/error"
76       "404":
77         description: Biblio not found
78         schema:
79           $ref: "../swagger.yaml#/definitions/error"
80       "409":
81         description: Unable to perform action on biblio
82         schema:
83           $ref: "../swagger.yaml#/definitions/error"
84       "500":
85         description: Internal error
86         schema:
87           $ref: "../swagger.yaml#/definitions/error"
88       "503":
89         description: Under maintenance
90         schema:
91           $ref: "../swagger.yaml#/definitions/error"
92     x-koha-authorization:
93       permissions:
94         editcatalogue: edit_catalogue