From 210976fbae06cd864139ed0fb1d208aa43ea618b Mon Sep 17 00:00:00 2001 From: wangxiyuan Date: Fri, 13 Oct 2017 15:44:48 +0800 Subject: [PATCH] Update message api-ref The message get_all and delete_all api-ref is a litte misleading. Update it to be more clear. Change-Id: I7e94bc89bc41ad85199f5664ee92ce001a4835fe --- api-ref/source/messages.inc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/api-ref/source/messages.inc b/api-ref/source/messages.inc index d26fbac95..8bdb8e34a 100644 --- a/api-ref/source/messages.inc +++ b/api-ref/source/messages.inc @@ -150,10 +150,10 @@ Response Example :language: javascript -Get A Set Of Messages By Id -=========================== +Get A Set Of Messages +===================== -.. rest_method:: GET /v2/queues/{queue_name}/messages?ids={ids} +.. rest_method:: GET /v2/queues/{queue_name}/messages Gets a specified set of messages from the specified queue. @@ -208,16 +208,20 @@ Response Example :language: javascript -Delete A Set Of Messages By Id -============================== +Delete A Set Of Messages +======================== -.. rest_method:: DELETE /v2/queues/{queue_name}/messages?ids={ids} +.. rest_method:: DELETE /v2/queues/{queue_name}/messages Provides a bulk delete for messages. This operation immediately deletes the specified messages. If any of the message IDs are malformed or non-existent, they are ignored. The remaining -valid messages IDs are deleted. +valid messages IDs are deleted. Please note that users should input either +``ids`` or ``pop`` parameter, otherwise this API will delete nothing. If +``pop`` is provided, the value must be at least 1 and may not be greater than +``max_messages_per_claim_or_pop`` in conf. If ``ids`` is provided, it should +contain at least one id and not greater than ``max_messages_per_page`` in conf.