From 96d9c97e556e21fd969432c67472dbcc21013927 Mon Sep 17 00:00:00 2001 From: wanghao Date: Fri, 9 Jul 2021 10:01:20 +0800 Subject: [PATCH] Fix confirmation api doc missing Zaqar didn't update the api doc after supporting the confirmation feature. Change-Id: Iff1e39b4b9d89ff925f5b21774265ea1bc9a0b5f --- api-ref/source/parameters.yaml | 7 +++ .../samples/subscription-confirm-request.json | 3 ++ api-ref/source/subscription.inc | 44 +++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 api-ref/source/samples/subscription-confirm-request.json diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index c2fd14719..0c64b56f0 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -329,6 +329,13 @@ claim_ttl: the claim. The ttl value must be between 60 and 43200 seconds (12 hours). You must include a value for this attribute in your request. +confirmed: + type: boolean + in: body + required: true + description: | + The ``confirmed`` attribute specifies whether to confirm a subscription. + count: type: integer in: body diff --git a/api-ref/source/samples/subscription-confirm-request.json b/api-ref/source/samples/subscription-confirm-request.json new file mode 100644 index 000000000..614c40503 --- /dev/null +++ b/api-ref/source/samples/subscription-confirm-request.json @@ -0,0 +1,3 @@ +{ + "confirmed": true +} \ No newline at end of file diff --git a/api-ref/source/subscription.inc b/api-ref/source/subscription.inc index dc09762d2..43c4e4da9 100644 --- a/api-ref/source/subscription.inc +++ b/api-ref/source/subscription.inc @@ -252,3 +252,47 @@ Request Parameters This operation does not accept a request body and does not return a response body. + + +Confirm Subscription +==================== + +.. rest_method:: POST /v2/queues/{queue_name}/subscriptions/{subscription_id}/confirm + +Confirm a subscription. + +This operation can confirm or cancel a subscription. + + +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 201 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 503 + + +Request Parameters +------------------ + +.. rest_parameters:: parameters.yaml + + - queue_name: queue_name + - subscription_id: subscription_id_path + - confirmed: confirmed + + +Request Example +--------------- + +.. literalinclude:: samples/subscription-confirm-request.json + :language: javascript + + +This operation does not return a response body.