Repository navigation
Expand file tree
/
Copy pathedge-courses.yaml
More file actions
273 lines (263 loc) · 9.04 KB
/
Copy pathedge-courses.yaml
File metadata and controls
273 lines (263 loc) · 9.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
openapi: 3.0.0
info:
title: Courses API
version: v1
servers:
- url: /courses/
paths:
/courses/courses:
get:
operationId: getCoursesByQuery
summary: Retrieve courses associated with the keyword query from folio mod-courses
description: Retrieve courses associated with the keyword query
parameters:
- $ref: '#/components/parameters/x-okapi-tenant-header'
- $ref: '#/components/parameters/x-okapi-token-header'
- $ref: '#/components/parameters/request-query-parameters'
responses:
'200':
description: |
Calls the mod-courses GET /coursereserves/courses API and returns the result as-is. \
The example of response: https://github.com/folio-org/mod-courses/blob/master/ramls/examples/reserves.json
content:
application/json:
schema:
type: string
'400':
$ref: '#/components/responses/badRequestResponse'
'500':
$ref: '#/components/responses/internalServerErrorResponse'
/courses/reserves:
get:
operationId: getReservesByQuery
summary: Retrieve reserves associated with the keyword query from folio mod-courses
description: Retrieve reserves associated with the keyword query
parameters:
- $ref: '#/components/parameters/x-okapi-tenant-header'
- $ref: '#/components/parameters/x-okapi-token-header'
- $ref: '#/components/parameters/request-query-parameters'
responses:
'200':
description: |
Calls the mod-courses GET /coursereserves/reserves API and returns the result as-is. \
The example of response: https://github.com/folio-org/mod-courses/blob/master/ramls/examples/reserves.json
content:
application/json:
schema:
type: string
'400':
$ref: '#/components/responses/badRequestResponse'
'500':
$ref: '#/components/responses/internalServerErrorResponse'
/courses/departments:
get:
operationId: getDepartments
summary: Retrieve course departments
description: Retrieve course departments
parameters:
- $ref: '#/components/parameters/x-okapi-tenant-header'
- $ref: '#/components/parameters/x-okapi-token-header'
- $ref: '#/components/parameters/request-query-parameters'
responses:
'200':
description: |
Calls the mod-courses GET /coursereserves/departments API and returns the result as-is. \
The example of response: https://github.com/folio-org/mod-courses/blob/master/ramls/examples/departments.json
content:
application/json:
schema:
type: string
'400':
$ref: '#/components/responses/badRequestResponse'
'500':
$ref: '#/components/responses/internalServerErrorResponse'
/courses/instructors:
get:
operationId: getInstructors
summary: Retrieve course instructors
description: Retrieve course instructors
parameters:
- $ref: '#/components/parameters/x-okapi-tenant-header'
- $ref: '#/components/parameters/x-okapi-token-header'
- $ref: '#/components/parameters/request-query-parameters'
- $ref: '#/components/parameters/sort-by'
responses:
'200':
description: 'Calls the mod-courses GET /coursereserves/courselistings API and returns instructorObjects'
content:
application/json:
schema:
$ref: 'schemas/instructors.json'
'400':
$ref: '#/components/responses/badRequestResponse'
'500':
$ref: '#/components/responses/internalServerErrorResponse'
/courses/courselistings/{instanceId}/reserves:
get:
operationId: getReservesByInstanceId
summary: Retrieve reserves associated with the course instance id from folio mod-courses
description: Retrieve reserves associated with course instance id
parameters:
- $ref: '#/components/parameters/instance-id-path'
- $ref: '#/components/parameters/x-okapi-tenant-header'
- $ref: '#/components/parameters/x-okapi-token-header'
- $ref: '#/components/parameters/request-query-parameters'
responses:
'200':
description: |
Calls the mod-courses GET /coursereserves/courselistings/{listing_id}/courses API and returns the result as-is. \
The example of response: https://github.com/folio-org/mod-courses/blob/master/ramls/examples/reserves.json
content:
application/json:
schema:
type: string
'400':
$ref: '#/components/responses/badRequestResponse'
'500':
$ref: '#/components/responses/internalServerErrorResponse'
components:
schemas:
errorResponse:
$ref: 'schemas/error.json#/Error'
requestQueryParameters:
$ref: 'schemas/requestQueryParameters.json#/RequestQueryParameters'
courses:
$ref: 'schemas/courses.json'
parameters:
request-query-parameters:
name: requestQueryParameters
in: query
description: Request query parameters(query, limit, offset and etc.) as object.
schema:
$ref: '#/components/schemas/requestQueryParameters'
query-parameter:
name: query
in: query
description: The keyword query in CQL format
schema:
type: string
lang:
name: lang
in: query
description: Requested language
required: false
example: en
schema:
pattern: "[a-zA-Z]{2}"
default: en
type: string
type:
name: type
in: query
description: Indicates how to route the request
required: true
schema:
type: string
x-okapi-tenant-header:
name: x-okapi-tenant
in: header
description: x-okapi-tenant header value
required: false
schema:
type: string
x-okapi-url-header:
name: x-okapi-url
in: header
description: x-okapi-url header value
required: false
schema:
type: string
x-okapi-token-header:
name: x-okapi-token
in: header
description: x-okapi-token header value
required: false
schema:
type: string
authorization:
name: authorization
in: header
description: apikey for authorization
required: false
schema:
type: string
apiKey:
name: apiKey
in: query
description: apikey for authorization
required: false
schema:
type: string
instance-id-path:
name: instanceId
in: path
description: Course Instance's UUID
required: true
schema:
type: string
pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$'
sort-by:
name: sortBy
in: query
description: Param to sort collection results by a specific field
required: false
example: sortBy=name/sort.descending
schema:
type: string
pattern: ^(name|id)\/sort\.(ascending|descending)$
responses:
badRequestResponse:
description: Validation errors
content:
application/json:
example:
$ref: ./examples/error/badRequestErrorResponse.json
schema:
$ref: "#/components/schemas/errorResponse"
internalServerErrorResponse:
description: When unhandled exception occurred during code execution, e.g. NullPointerException
content:
application/json:
example:
$ref: ./examples/error/internalErrorResponse.json
schema:
$ref: "#/components/schemas/errorResponse"
notAuthorizedResponse:
description: Not authorized to perform requested action
content:
application/json:
example:
$ref: examples/error/unauthorizedErrorResponse.json
schema:
$ref: "#/components/schemas/errorResponse"
accessDeniedResponse:
description: Access Denied
content:
application/json:
example:
$ref: examples/error/accessDeniedErrorResponse.json
schema:
$ref: "#/components/schemas/errorResponse"
notFoundResponse:
description: Item with a given ID not found
content:
application/json:
example:
$ref: examples/error/notFoundErrorResponse.json
schema:
$ref: "#/components/schemas/errorResponse"
unprocessableEntityErrorResponse:
description: Item with a given ID not found
content:
application/json:
example:
$ref: examples/error/unprocessableEntityErrorResponse.json
schema:
$ref: "#/components/schemas/errorResponse"
notImplementedResponse:
description: The server does not support the functionality required to fulfill the request
content:
application/json:
example: "the method that is unavailable"
schema:
$ref: "#/components/schemas/errorResponse"