-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathapi.yaml
246 lines (222 loc) · 11.3 KB
/
api.yaml
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
# Swagger specification for the Open edX API
# Note: not all API endpoints need to be listed here, just those that
# are part of your Open edX installation's "public API".
---
swagger: "2.0"
info:
version: "1.0.0"
title: "Open edX"
host: "your-open-edx-site.org"
basePath: "/"
schemes:
- "https"
# Complete set of whitelisted routes.
# Upstream API owners: provide an fixed URI ref for each route.
paths:
# Index
"/":
$ref: "./index.yaml#/endpoints/index"
# Heartbeat
"/heartbeat":
$ref: "./heartbeat.yaml#/endpoints/heartbeat"
# OAuth2
"/oauth2/v1/access_token":
$ref: "./oauth.yaml#/endpoints/request_access_token"
# Catalog IDA
"/catalog/v1/catalogs":
$ref: "https://raw.githubusercontent.com/edx/course-discovery/b5c52c8/api.yaml#/endpoints/v1/catalogs"
"/catalog/v1/catalogs/{id}":
$ref: "https://raw.githubusercontent.com/edx/course-discovery/b5c52c8/api.yaml#/endpoints/v1/catalogById"
"/catalog/v1/catalogs/{id}/courses":
$ref: "https://raw.githubusercontent.com/edx/course-discovery/b5c52c8/api.yaml#/endpoints/v1/catalogCourses"
# Enterprise IDA
"/enterprise/v1/enterprise-catalogs":
$ref: "https://raw.githubusercontent.com/edx/edx-enterprise/260055b/api.yaml#/endpoints/v1/enterpriseCustomerCatalogs"
"/enterprise/v1/enterprise-catalogs/{uuid}":
$ref: "https://raw.githubusercontent.com/edx/edx-enterprise/260055b/api.yaml#/endpoints/v1/enterpriseCustomerCatalogByUuid"
"/enterprise/v1/enterprise-catalogs/{uuid}/course-runs/{course_run_id}":
$ref: "https://raw.githubusercontent.com/edx/edx-enterprise/260055b/api.yaml#/endpoints/v1/enterpriseCustomerCatalogCourseRunByUuid"
"/enterprise/v1/enterprise-catalogs/{uuid}/courses/{course_key}":
$ref: "https://raw.githubusercontent.com/edx/edx-enterprise/260055b/api.yaml#/endpoints/v1/enterpriseCustomerCatalogCourseByKey"
"/enterprise/v1/enterprise-catalogs/{uuid}/programs/{program_uuid}":
$ref: "https://raw.githubusercontent.com/edx/edx-enterprise/260055b/api.yaml#/endpoints/v1/enterpriseCustomerCatalogProgramByUuid"
"/enterprise/v1/enterprise-customer/{uuid}/course-enrollments":
$ref: "https://raw.githubusercontent.com/edx/edx-enterprise/260055b/api.yaml#/endpoints/v1/enterpriseCustomerCourseEnrollments"
"/enterprise/v1/enterprise-customer/{uuid}/learner-summary":
$ref: "https://raw.githubusercontent.com/edx/edx-enterprise-data/eb793cf/api.yaml#/endpoints/v1/enterpriseCustomerLearnerSummary"
# License Manager IDA
# These are served from the license manager IDA, but we surface them with the rest of the enterprise endpoints
"/enterprise/v1/subscriptions":
$ref: "https://raw.githubusercontent.com/edx/license-manager/b7dc6e0/api.yaml#/endpoints/v1/subscriptionsList"
"/enterprise/v1/subscriptions/{uuid}/licenses/assign":
$ref: "https://raw.githubusercontent.com/edx/license-manager/ef94bee/api.yaml#/endpoints/v1/assignLicenses"
"/enterprise/v1/subscriptions/{uuid}/licenses/bulk-revoke":
$ref: "https://raw.githubusercontent.com/edx/license-manager/b9e9ec9/api.yaml#/endpoints/v1/revokeLicenses"
"/enterprise/v1/bulk-license-enrollment":
$ref: "https://raw.githubusercontent.com/edx/license-manager/b9e9ec9/api.yaml#/endpoints/v1/bulkLicenseEnrollment"
# Enterprise Access IDA
# These are served from the enterprise-access IDA, but we surface them with the rest of the enterprise endpoints
"/enterprise/v1/assignment-configurations/{assignment_configuration_uuid}/admin/assignments/":
$ref: "https://raw.githubusercontent.com/openedx/enterprise-access/b2d181e/api.yaml#/endpoints/v1/learnerContentAssignmentListRequest"
"/enterprise/v1/assignment-configurations/{assignment_configuration_uuid}/admin/assignments/cancel/":
$ref: "https://raw.githubusercontent.com/openedx/enterprise-access/7b79f45/api.yaml#/endpoints/v1/learnerContentAssignmentCancelRequest"
"/enterprise/v1/assignment-configurations/{assignment_configuration_uuid}/admin/assignments/remind/":
$ref: "https://raw.githubusercontent.com/openedx/enterprise-access/7b79f45/api.yaml#/endpoints/v1/learnerContentAssignmentRemindRequest"
"/enterprise/v1/policy-allocation/{policy_uuid}/allocate/":
$ref: "https://raw.githubusercontent.com/openedx/enterprise-access/7b79f45/api.yaml#/endpoints/v1/subsidyAccessPolicyAllocation"
"/enterprise/v1/subsidy-access-policies/":
$ref: "https://raw.githubusercontent.com/openedx/enterprise-access/5a8ea18/api.yaml#/endpoints/v1/subsidyAccessPolicies"
# Enterprise Catalog IDA
# These are served from the enterprise catalog IDA, but we surface them with the rest of the enterprise endpoints
"/enterprise/v2/enterprise-catalogs":
$ref: "https://raw.githubusercontent.com/edx/enterprise-catalog/2877ad7/api.yaml#/endpoints/v2/enterpriseCatalogs"
"/enterprise/v2/enterprise-catalogs/{uuid}":
$ref: "https://raw.githubusercontent.com/edx/enterprise-catalog/2877ad7/api.yaml#/endpoints/v2/enterpriseCatalogByUuid"
# Add the following v1 endpoints to v2 with the same implementation for ease of use by the ECS team
"/enterprise/v2/enterprise-catalogs/{uuid}/course-runs/{course_run_id}":
$ref: "https://raw.githubusercontent.com/edx/edx-enterprise/260055b/api.yaml#/endpoints/v1/enterpriseCustomerCatalogCourseRunByUuid"
"/enterprise/v2/enterprise-catalogs/{uuid}/courses/{course_key}":
$ref: "https://raw.githubusercontent.com/edx/edx-enterprise/260055b/api.yaml#/endpoints/v1/enterpriseCustomerCatalogCourseByKey"
"/enterprise/v2/enterprise-catalogs/{uuid}/programs/{program_uuid}":
$ref: "https://raw.githubusercontent.com/edx/edx-enterprise/260055b/api.yaml#/endpoints/v1/enterpriseCustomerCatalogProgramByUuid"
"/enterprise/v2/enterprise-customer/{uuid}/course-enrollments":
$ref: "https://raw.githubusercontent.com/edx/edx-enterprise/260055b/api.yaml#/endpoints/v1/enterpriseCustomerCourseEnrollments"
"/enterprise/v2/enterprise-customer/{uuid}/learner-summary":
$ref: "https://raw.githubusercontent.com/edx/edx-enterprise-data/eb793cf/api.yaml#/endpoints/v1/enterpriseCustomerLearnerSummary"
# Learner Summary endpoint powered by Learner Progress Report V1 API
"/enterprise/v3/enterprise-customer/{uuid}/learner-summary":
$ref: "https://raw.githubusercontent.com/edx/edx-enterprise-data/eb793cf/api.yaml#/endpoints/v2/enterpriseCustomerLearnerSummary"
# Registrar API Proxy
# Note: There's an unresolved issue involving trailing slashes with proxy integrations in API Gateway.
# Apparently all trailing slashes included in the value of {proxy} are trimmed, see this AWS
# support forum thread: https://forums.aws.amazon.com/thread.jspa?messageID=749625
# Our registrar API endpoint paths require trailing slashes, but other registrar paths, like those
# under /static, cannot have them. Thus, we've broken apart the different path types under registrar.
# This means that this specification must be updated each time a new version of the
# registrar API is released.
"/registrar/api-docs":
x-amazon-apigateway-any-method:
x-amazon-apigateway-integration:
type: "http_proxy"
uri: "https://${stageVariables.registrar_host}/api-docs/"
httpMethod: "ANY"
"/registrar/login":
x-amazon-apigateway-any-method:
x-amazon-apigateway-integration:
type: "http_proxy"
uri: "https://${stageVariables.registrar_host}/login/"
httpMethod: "ANY"
"/registrar/logout":
x-amazon-apigateway-any-method:
x-amazon-apigateway-integration:
type: "http_proxy"
uri: "https://${stageVariables.registrar_host}/logout/"
httpMethod: "ANY"
"/registrar/static/{proxy+}":
x-amazon-apigateway-any-method:
parameters:
- name: "proxy"
in: "path"
x-amazon-apigateway-integration:
type: "http_proxy"
uri: "https://${stageVariables.registrar_host}/static/{proxy}"
httpMethod: "ANY"
requestParameters:
integration.request.path.proxy: "method.request.path.proxy"
"/registrar/v1/{proxy+}":
x-amazon-apigateway-any-method:
parameters:
- name: "proxy"
in: "path"
x-amazon-apigateway-integration:
type: "http_proxy"
uri: "https://${stageVariables.registrar_host}/api/v1/{proxy}/"
httpMethod: "ANY"
requestParameters:
integration.request.path.proxy: "method.request.path.proxy"
"/registrar/v2/{proxy+}":
x-amazon-apigateway-any-method:
parameters:
- name: "proxy"
in: "path"
x-amazon-apigateway-integration:
type: "http_proxy"
uri: "https://${stageVariables.registrar_host}/api/v2/{proxy}/"
httpMethod: "ANY"
requestParameters:
integration.request.path.proxy: "method.request.path.proxy"
# Authoring Domain API (e.g. content ingestion via CMS)
"/authoring/v0/file_assets/{proxy+}":
x-amazon-apigateway-any-method:
parameters:
- name: "proxy"
in: "path"
x-amazon-apigateway-integration:
type: "http_proxy"
uri: "https://${stageVariables.authoring_host}/api/contentstore/v0/file_assets/{proxy}"
httpMethod: "ANY"
requestParameters:
integration.request.path.proxy: "method.request.path.proxy"
"/authoring/v0/videos/uploads/{proxy+}":
x-amazon-apigateway-any-method:
parameters:
- name: "proxy"
in: "path"
x-amazon-apigateway-integration:
type: "http_proxy"
uri: "https://${stageVariables.authoring_host}/api/contentstore/v0/videos/uploads/{proxy}"
httpMethod: "ANY"
requestParameters:
integration.request.path.proxy: "method.request.path.proxy"
"/authoring/v0/videos/images/{proxy+}":
x-amazon-apigateway-any-method:
parameters:
- name: "proxy"
in: "path"
x-amazon-apigateway-integration:
type: "http_proxy"
uri: "https://${stageVariables.authoring_host}/api/contentstore/v0/videos/images/{proxy}"
httpMethod: "ANY"
requestParameters:
integration.request.path.proxy: "method.request.path.proxy"
"/authoring/v0/video_transcripts/{proxy+}":
x-amazon-apigateway-any-method:
parameters:
- name: "proxy"
in: "path"
x-amazon-apigateway-integration:
type: "http_proxy"
uri: "https://${stageVariables.authoring_host}/api/contentstore/v0/video_transcripts/{proxy}"
httpMethod: "ANY"
requestParameters:
integration.request.path.proxy: "method.request.path.proxy"
"/authoring/v0/xblock/{proxy+}":
x-amazon-apigateway-any-method:
parameters:
- name: "proxy"
in: "path"
x-amazon-apigateway-integration:
type: "http_proxy"
uri: "https://${stageVariables.authoring_host}/api/contentstore/v0/xblock/{proxy}"
httpMethod: "ANY"
requestParameters:
integration.request.path.proxy: "method.request.path.proxy"
# edX extension point. Lists the vendors in use and their specific
# parameters that are expected by upstream refs.
# Upstream API owners: document your dependencies in this index file to
# avoid conflicts with other upstreams.
x-edx-api-vendors:
aws_apigateway:
stage_variables:
- "id"
- "landing_page"
- "edxapp_host"
- "discovery_host"
- "enterprise_host"
- "gateway_host"
- "analytics_api_host"
- "registrar_host"
- "enterprise_catalog_host"
- "authoring_host"
- "license_manager_host"
- "enterprise_access_host"