From c072f8d0e7ca973053f0abacee5d4754dd32095b Mon Sep 17 00:00:00 2001 From: Raja Nadar Date: Sun, 26 Aug 2018 02:07:02 -0700 Subject: [PATCH 1/2] docs: add return info for update and delete apis * Update Token API returns the ID of the token updated. * Delete Token API returns a raw text which is true for successful deletions --- website/source/api/acl.html.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/website/source/api/acl.html.md b/website/source/api/acl.html.md index 909ef412eeb..fb49b00366e 100644 --- a/website/source/api/acl.html.md +++ b/website/source/api/acl.html.md @@ -158,6 +158,14 @@ $ curl \ https://consul.rocks/v1/acl/update ``` +### Sample Response + +```json +{ + "ID": "adf4238a-882b-9ddc-4a9d-5b6758e4159e" +} +``` + ## Delete ACL Token This endpoint deletes an ACL token with the given ID. @@ -188,6 +196,14 @@ $ curl \ https://consul.rocks/v1/acl/destroy/8f246b77-f3e1-ff88-5b48-8ec93abf3e05 ``` +### Sample Response + +- The response is not JSON. It is raw text. + +```json +true +``` + ## Read ACL Token This endpoint reads an ACL token with the given ID. From 8c303d99b4d43bf460acf681f06c4f6f51d609a8 Mon Sep 17 00:00:00 2001 From: Raja Nadar Date: Sun, 26 Aug 2018 13:25:15 -0700 Subject: [PATCH 2/2] consistent docs --- website/source/api/acl.html.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/source/api/acl.html.md b/website/source/api/acl.html.md index fb49b00366e..004f33a0c80 100644 --- a/website/source/api/acl.html.md +++ b/website/source/api/acl.html.md @@ -174,6 +174,8 @@ This endpoint deletes an ACL token with the given ID. | ------ | ---------------------------- | -------------------------- | | `PUT` | `/acl/destroy/:uuid` | `application/json` | +Even though the return type is application/json, the value is either true or false, indicating whether the delete succeeded. + The table below shows this endpoint's support for [blocking queries](/api/index.html#blocking-queries), [consistency modes](/api/index.html#consistency-modes), and @@ -198,12 +200,11 @@ $ curl \ ### Sample Response -- The response is not JSON. It is raw text. - ```json true ``` + ## Read ACL Token This endpoint reads an ACL token with the given ID.