From 61f5afaf0f3889255ee49f214ae0945e47e9424b Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Wed, 13 Nov 2019 10:11:52 -0500 Subject: [PATCH] document the new properties (some from previous PRs) --- docs/source/interface.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/source/interface.rst b/docs/source/interface.rst index 74da5a8..0ec7d39 100644 --- a/docs/source/interface.rst +++ b/docs/source/interface.rst @@ -32,10 +32,16 @@ If the voucher is not known then the response is **NOT FOUND**. For any voucher which has previously been submitted, the response is **OK** with an ``application/json`` content-type response body like:: - {"value": <string>} + {"value": <string>, "created": <iso8601 timestamp>, "redeemed": bool, "version": 1} The ``value`` property merely indicates the voucher which was requested. -Further properties will be added to this response in the near future. +The ``created`` property indicates when the voucher was first added to the node. +The ``redeemed`` property indicates whether or not the voucher has successfully been redeemed with a payment server yet. + +The ``version`` property indicates the semantic version of the data being returned. +When properties are removed or the meaning of a property is changed, +the value of the ``version`` property will be incremented. +The addition of new properties is **not** accompanied by a bumped version number. ``GET /storage-plugins/privatestorageio-zkapauthz-v1/voucher`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- GitLab