Skip to content

Commit 8b62dbc

Browse files
committed
[A] Add support for POST to manifest endpoint (#5918)
1 parent d86aa6d commit 8b62dbc

File tree

6 files changed

+2799
-80
lines changed

6 files changed

+2799
-80
lines changed

lambdas/service/app.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,8 +1279,8 @@ def manifest_route(*, fetch: bool, initiate: bool):
12791279
# want to complicate the API with this detail
12801280
('/fetch' if fetch else '')
12811281
+ ('/manifest/files' if initiate else '/manifest/files/{token}'),
1282-
# The initial PUT request is idempotent.
1283-
methods=['PUT' if initiate else 'GET'],
1282+
# The initial request is idempotent.
1283+
methods=['POST', 'PUT'] if initiate else ['GET'],
12841284
interactive=fetch,
12851285
cors=True,
12861286
path_spec=None if initiate else {
@@ -1308,9 +1308,9 @@ def manifest_route(*, fetch: bool, initiate: bool):
13081308
- a 302 redirect to the URL of an already prepared manifest.
13091309
13101310
This endpoint is not suitable for interactive use via the
1311-
Swagger UI. Please use [PUT /fetch/manifest/files][1] instead.
1311+
Swagger UI. Please use [POST /fetch/manifest/files][1] instead.
13121312
1313-
[1]: #operations-Manifests-put_fetch_manifest_files
1313+
[1]: #operations-Manifests-post_fetch_manifest_files
13141314
''') + parameter_hoisting_note if initiate and not fetch else fd('''
13151315
Check on the status of an ongoing manifest preparation job,
13161316
returning either
@@ -1328,12 +1328,12 @@ def manifest_route(*, fetch: bool, initiate: bool):
13281328
''') if not initiate and not fetch else fd('''
13291329
Create a manifest preparation job, returning a 200 status
13301330
response whose JSON body emulates the HTTP headers that would be
1331-
found in a response to an equivalent request to the [PUT
1331+
found in a response to an equivalent request to the [POST
13321332
/manifest/files][1] endpoint.
13331333
13341334
Whenever client-side JavaScript code is used in a web
13351335
application to request the preparation of a manifest from Azul,
1336-
this endpoint should be used instead of [PUT
1336+
this endpoint should be used instead of [POST
13371337
/manifest/files][1]. This way, the client can use XHR to make
13381338
the request, retaining full control over the handling of
13391339
redirects and enabling the client to bypass certain limitations
@@ -1343,7 +1343,7 @@ def manifest_route(*, fetch: bool, initiate: bool):
13431343
upper limit on the number of consecutive redirects, before the
13441344
manifest generation job is done.
13451345
1346-
[1]: #operations-Manifests-put_manifest_files
1346+
[1]: #operations-Manifests-post_manifest_files
13471347
''') + parameter_hoisting_note if initiate and fetch else fd('''
13481348
Check on the status of an ongoing manifest preparation job,
13491349
returning a 200 status response whose JSON body emulates the
@@ -1465,7 +1465,7 @@ def manifest_route(*, fetch: bool, initiate: bool):
14651465
'410': {
14661466
'description': fd('''
14671467
The manifest preparation job has expired. Request a
1468-
new preparation using the `PUT /manifest/files`
1468+
new preparation using the `POST /manifest/files`
14691469
endpoint.
14701470
''')
14711471
}
@@ -1481,9 +1481,9 @@ def manifest_route(*, fetch: bool, initiate: bool):
14811481
For a detailed description of these properties see the
14821482
documentation for the respective response headers
14831483
documented under ''') + (fd('''
1484-
[PUT /manifest/files][1].
1484+
[POST /manifest/files][1].
14851485
1486-
[1]: #operations-Manifests-put_manifest_files
1486+
[1]: #operations-Manifests-post_manifest_files
14871487
''') if initiate else fd('''
14881488
[GET /manifest/files/{token}][1].
14891489

0 commit comments

Comments
 (0)