diff options
Diffstat (limited to 'subplot')
-rw-r--r-- | subplot/server.py | 8 | ||||
-rw-r--r-- | subplot/server.yaml | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/subplot/server.py b/subplot/server.py index de63836..1f4506f 100644 --- a/subplot/server.py +++ b/subplot/server.py @@ -53,7 +53,7 @@ def stop_chunk_server(ctx, env=None): def post_file(ctx, filename=None, path=None, header=None, json=None): - url = f"{ctx['server_url']}/chunks" + url = f"{ctx['server_url']}/v1/chunks" headers = {header: json} data = open(filename, "rb").read() _request(ctx, requests.post, url, headers=headers, data=data) @@ -65,12 +65,12 @@ def get_chunk_via_var(ctx, var=None): def get_chunk_by_id(ctx, chunk_id=None): - url = f"{ctx['server_url']}/chunks/{chunk_id}" + url = f"{ctx['server_url']}/v1/chunks/{chunk_id}" _request(ctx, requests.get, url) def find_chunks_with_label(ctx, sha=None): - url = f"{ctx['server_url']}/chunks?label={sha}" + url = f"{ctx['server_url']}/v1/chunks?label={sha}" _request(ctx, requests.get, url) @@ -80,7 +80,7 @@ def delete_chunk_via_var(ctx, var=None): def delete_chunk_by_id(ctx, chunk_id=None): - url = f"{ctx['server_url']}/chunks/{chunk_id}" + url = f"{ctx['server_url']}/v1/chunks/{chunk_id}" _request(ctx, requests.delete, url) diff --git a/subplot/server.yaml b/subplot/server.yaml index 7b7d461..ac45cac 100644 --- a/subplot/server.yaml +++ b/subplot/server.yaml @@ -21,28 +21,28 @@ python: function: post_file -- when: "I GET /chunks/<{var}>" +- when: "I GET /v1/chunks/<{var}>" impl: python: function: get_chunk_via_var -- when: "I try to GET /chunks/{chunk_id}" +- when: "I try to GET /v1/chunks/{chunk_id}" impl: python: function: get_chunk_by_id -- when: "I GET /chunks?label={sha}" +- when: "I GET /v1/chunks?label={sha}" regex: false impl: python: function: find_chunks_with_label -- when: "I DELETE /chunks/<{var}>" +- when: "I DELETE /v1/chunks/<{var}>" impl: python: function: delete_chunk_via_var -- when: "I try to DELETE /chunks/{chunk_id}" +- when: "I try to DELETE /v1/chunks/{chunk_id}" impl: python: function: delete_chunk_by_id |