Bug 17314: OpenAPI spec
[koha.git] / api / v1 / swagger / swagger.yaml
1 ---
2 swagger: "2.0"
3 basePath: /api/v1
4 paths:
5   $ref: paths.json
6 definitions:
7   $ref: definitions.json
8 parameters:
9   $ref: parameters.json
10 x-primitives:
11   $ref: x-primitives.json
12 info:
13   title: Koha REST API
14   version: "1"
15   license:
16     name: GPL v3,
17     url: http://www.gnu.org/licenses/gpl.txt
18   contact:
19     name: Koha Development Team
20     url: https://koha-community.org/
21   description: |
22     ## Introduction
23
24     This API is documented in **OpenAPI format**.
25
26     ## Authentication
27
28     The API supports the following authentication mechanisms
29
30     * HTTP Basic authentication
31     * OAuth2 (client credentials grant)
32     * Cookie-based
33
34     Both _Basic authentication_ and the _OAuth2_ flow, need to be enabled
35     by system preferences.
36
37     ## Errors
38
39     The API uses standard HTTP status codes to indicate the success or failure
40     of the API call. The body of the response will be JSON in the following format:
41
42     ```
43     {
44       "error": "patron not found"
45     }
46     ```
47
48     Note: Some routes might offer additional attributes in their error responses but that's
49     subject to change and thus not documented.
50
51     ## Special headers
52
53     ### x-koha-library
54
55     This optional header should be passed to give your api request a library
56     context; If it is not included in the request, then the request context
57     will default to using your api comsumer's assigned home library.
58 tags:
59   - name: "article_requests"
60     x-displayName: Article requests
61     description: |
62       Manage article requests
63   - name: "biblios"
64     x-displayName: Biblios
65     description: |
66       Manage bibliographic records
67   - name: "cashups"
68     x-displayName: Cashups
69     description: |
70       Manage cash register cashups
71   - name: "checkouts"
72     x-displayName: Checkouts
73     description: |
74       Manage checkouts
75   - name: "circulation_rules"
76     x-displayName: Circulation rules
77     description: |
78       Manage circulation rules
79   - name: "cities"
80     x-displayName: Cities
81     description: |
82       Manage cities
83   - name: "clubs"
84     x-displayName: Clubs
85     description: |
86       Manage patron clubs
87   - name: "funds"
88     x-displayName: Funds
89     description: |
90       Manage funds for the acquisitions module
91   - name: "holds"
92     x-displayName: Holds
93     description: |
94       Manage holds
95   - name: "illbackends"
96     x-displayName: ILL backends
97     description: |
98       Manage ILL module backends
99   - name: "illrequests"
100     x-displayName: ILL requests
101     description: |
102       Manage ILL requests
103   - name: "items"
104     x-displayName: Items
105     description: |
106       Manage items
107   - name: "library"
108     x-displayName: Libraries
109     description: |
110       Manage libraries
111   - name: "macros"
112     x-displayName: Macros
113     description: |
114       Manage macros
115   - name: "orders"
116     x-displayName: Orders
117     description: |
118       Manage acquisition orders
119   - name: "oauth"
120     x-displayName: "OAuth"
121     description: |
122       Handle OAuth flows
123   - name: "patrons"
124     x-displayName: Patrons
125     description: |
126       Manage patrons
127   - name: "quotes"
128     x-displayName: Quotes
129     description: |
130       Manage quotes
131   - name: "return_claims"
132     x-displayName: Return claims
133     description: |
134       Manage return claims
135   - name: "rotas"
136     x-displayName: Rotas
137     description: |
138       Manage rotas
139   - name: "smtp_servers"
140     x-displayName: SMTP servers
141     description: |
142       Manage SMTP servers configurations
143   - name: "transfer"
144     x-displayName: Transfer limits
145     description: |
146       Manage transfer limits
147   - name: "suggestions"
148     x-displayName: "Purchase suggestions"
149     description: |
150       Manage purchase suggestions
151   - name: "vendors"
152     x-displayName: "Vendors"
153     description: |
154       Manage vendors for the acquisitions module
155   - name: "batch_import_profiles"
156     x-displayName: Batch import profiles
157     description: |
158       Manage batch import profiles