commit 6fbfb504d8a6bd3d2b5841521f8ffbdbef58499b
parent f032f46c73f37efb02a230ebcd6e741d0a2960d0
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date: Wed, 19 Oct 2022 14:50:11 +0900
NAMESTORE: Update GET REST API with more options
Diffstat:
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/developers/rest/namestore.rst b/developers/rest/namestore.rst
@@ -75,6 +75,12 @@ Requests
This endpoint returns all namestore entries for one zone identified by ``$ZNAME``.
+ **Request**
+
+ :query record_type: *Optional*. The string representation of a DNS or GNS record type. If given, only record sets including record with this type will be returned.
+ :query omit_private: *Optional*. If set, private records are omitted from the results.
+ :query include_maintenance: *Optional*. If set, maintenance records are included in the results.
+
**Response**
:http:statuscode:`200 Ok`:
@@ -82,6 +88,24 @@ Requests
:http:statuscode:`404 Not found`:
The zone was not found.
+.. http:get:: /namestore/$ZNAME/$LABEL
+
+ This endpoint returns the record set under label ``$LABEL`` of the zone
+ identified by ``$ZNAME``.
+
+ **Request**
+
+ :query record_type: *Optional*. The string representation of a DNS or GNS record type. If given, only record sets including record with this type will be returned.
+ :query omit_private: *Optional*. If set, private records are omitted from the results.
+ :query include_maintenance: *Optional*. If set, maintenance records are included in the results.
+
+ **Response**
+
+ :http:statuscode:`200 Ok`:
+ The body is a `RecordSet`_.
+ :http:statuscode:`404 Not found`:
+ The zone or label was not found.
+
.. http:post:: /namestore/$ZNAME
@@ -113,9 +137,9 @@ Requests
-.. http:delete:: /namestore/$ZNAME?record_name=$RNAME
+.. http:delete:: /namestore/$ZNAME?record_name=$LABEL
- Delete all records under name ``$RNAME`` in the zone identified by ``$ZNAME``.
+ Delete all records under name ``$LABEL`` in the zone identified by ``$ZNAME``.
**Response**