From f09ed91ab6a981d529f51ab74ee71debf6149b40 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Fri, 18 May 2018 13:01:57 -0400 Subject: [PATCH] collapse these two APIs, they are the same also add mutable .../shares listing --- docs/proposed/http-storage-node-protocol.rst | 22 +++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/proposed/http-storage-node-protocol.rst b/docs/proposed/http-storage-node-protocol.rst index 644eb294f..00754bbe9 100644 --- a/docs/proposed/http-storage-node-protocol.rst +++ b/docs/proposed/http-storage-node-protocol.rst @@ -297,21 +297,29 @@ For example:: Reading ~~~~~~~ -``GET /v1/mutable/:storage_index?share=s0&share=sN`` -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +``GET /v1/mutable/:storage_index/shares`` +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -Read mutable shares (like the immutable version). +Retrieve a list indicating all shares available for the indicated storage index. +For example:: -``GET /v1/mutable/:storage_index?share=:s1&share=:sN&offset=o1&size=z1&offset=oN&size=zN`` + [1, 5] + +``GET /v1/mutable/:storage_index?share=:s0&share=:sN&offset=o1&size=z0&offset=oN&size=zN`` !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -Read a vector from the numbered shares associated with the given storage index. +Read some data from some shares associated with the given storage index. +If ``share`` query parameters are given, only data from those shares is read. +Otherwise, data from all shares is read. +If ``size`` and ``offset`` query parameters are given, +only the portions of the selected shares thus identified are returned. + The response body contains a mapping giving the read data. For example:: { - 3: ["foo"], - 7: ["bar"] + 3: ["foo", "bar"], + 7: ["baz", "quux"] } ``POST /v1/mutable/:storage_index/:share_number/corrupt``