"Fossies" - the Fresh Open Source Software Archive

Member "zaqar-9.0.0/api-ref/source/subscription.inc" (16 Oct 2019, 4293 Bytes) of package /linux/misc/openstack/zaqar-9.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) fasm source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "subscription.inc" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 5.0.0_vs_7.0.0.

    1 ============================
    2 Subscriptions(subscriptions)
    3 ============================
    4 Subscriptions are relationships between queue/topic and the targeted
    5 subscribers. After created subscriptions for a particular subscriber, like an
    6 email or a webhook, then when new messages posted to the queue, the subscriber
    7 will be notified automatically.
    8 
    9 List Subscriptions
   10 ==================
   11 
   12 .. rest_method:: GET /v2/queues/{queue_name}/subscriptions
   13 
   14 Lists a queue's subscriptions.
   15 
   16 This operation lists subscriptions for a queue. The subscriptions are sorted
   17 alphabetically by name.
   18 
   19 
   20 Response codes
   21 --------------
   22 
   23 .. rest_status_code:: success status.yaml
   24 
   25    - 200
   26 
   27 .. rest_status_code:: error status.yaml
   28 
   29    - 400
   30    - 401
   31    - 503
   32 
   33 
   34 Request Parameters
   35 ------------------
   36 
   37 .. rest_parameters:: parameters.yaml
   38 
   39   - queue_name: queue_name
   40 
   41 
   42 Query Parameters
   43 ~~~~~~~~~~~~~~~~
   44 
   45 .. rest_parameters:: parameters.yaml
   46 
   47   - limit: limit
   48   - marker: marker
   49 
   50 
   51 Response Parameters
   52 -------------------
   53 
   54 .. rest_parameters:: parameters.yaml
   55 
   56   - subscriptions: subscriptions
   57   - links: links
   58 
   59 
   60 Response Example
   61 ----------------
   62 
   63 .. literalinclude:: samples/subscriptions-list-response.json
   64    :language: javascript
   65 
   66 
   67 Create Subscription
   68 ===================
   69 
   70 .. rest_method:: POST /v2/queues/{queue_name}/subscriptions
   71 
   72 Creates a subscription.
   73 
   74 This operation creates a new subscription.
   75 
   76 
   77 Response codes
   78 --------------
   79 
   80 .. rest_status_code:: success status.yaml
   81 
   82    - 201
   83 
   84 .. rest_status_code:: error status.yaml
   85 
   86    - 400
   87    - 401
   88    - 503
   89 
   90 
   91 Request Parameters
   92 ------------------
   93 
   94 .. rest_parameters:: parameters.yaml
   95 
   96   - queue_name: queue_name
   97   - subscriber: subscriber
   98   - ttl: subscription_ttl
   99   - options: subscription_options
  100 
  101 
  102 Request Example
  103 ---------------
  104 
  105 .. literalinclude:: samples/subscription-create-request-http.json
  106    :language: javascript
  107 
  108 .. literalinclude:: samples/subscription-create-request-mail.json
  109    :language: javascript
  110 
  111 
  112 Response Parameters
  113 -------------------
  114 
  115 .. rest_parameters:: parameters.yaml
  116 
  117   - subscription_id: subscription_id
  118 
  119 
  120 Response Example
  121 ----------------
  122 
  123 .. literalinclude:: samples/subscription-create-response.json
  124    :language: javascript
  125 
  126 
  127 Update Subscription
  128 ===================
  129 
  130 .. rest_method:: PATCH /v2/queues/{queue_name}/subscriptions/{subscription_id}
  131 
  132 Updates a subscription.
  133 
  134 Response codes
  135 --------------
  136 
  137 .. rest_status_code:: success status.yaml
  138 
  139    - 204
  140 
  141 .. rest_status_code:: error status.yaml
  142 
  143    - 400
  144    - 401
  145    - 404
  146    - 409
  147    - 503
  148 
  149 
  150 Request Parameters
  151 ------------------
  152 
  153 .. rest_parameters:: parameters.yaml
  154 
  155   - queue_name: queue_name
  156   - subscription_id: subscription_id_path
  157   - subscriber: subscriber
  158   - ttl: subscription_ttl
  159   - options: subscription_options
  160 
  161 
  162 Request Example
  163 ---------------
  164 
  165 .. literalinclude:: samples/subscription-update-request.json
  166    :language: javascript
  167 
  168 
  169 This operation does not return a response body.
  170 
  171 
  172 Show Subscription Details
  173 =========================
  174 
  175 .. rest_method:: GET /v2/queues/{queue_name}/subscriptions/{subscription_id}
  176 
  177 Shows details for a subscription.
  178 
  179 Response codes
  180 --------------
  181 
  182 .. rest_status_code:: success status.yaml
  183 
  184    - 200
  185 
  186 .. rest_status_code:: error status.yaml
  187 
  188    - 400
  189    - 401
  190    - 503
  191 
  192 
  193 Request Parameters
  194 ------------------
  195 
  196 .. rest_parameters:: parameters.yaml
  197 
  198   - queue_name: queue_name
  199   - subscription_id: subscription_id_path
  200 
  201 
  202 Response Parameters
  203 -------------------
  204 
  205 .. rest_parameters:: parameters.yaml
  206 
  207   - age: subscription_age
  208   - id: subscription_id
  209   - subscriber: subscriber
  210   - source: subscription_source
  211   - ttl: subscription_ttl
  212   - options: subscription_options
  213 
  214 
  215 Response Example
  216 ----------------
  217 
  218 .. literalinclude:: samples/subscription-show-response.json
  219    :language: javascript
  220 
  221 
  222 Delete Subscription
  223 ===================
  224 
  225 .. rest_method:: DELETE /v2/queues/{queue_name}/subscriptions/{subscription_id}
  226 
  227 Deletes the specified subscription.
  228 
  229 
  230 Response codes
  231 --------------
  232 
  233 .. rest_status_code:: success status.yaml
  234 
  235    - 204
  236 
  237 .. rest_status_code:: error status.yaml
  238 
  239    - 400
  240    - 401
  241    - 503
  242 
  243 
  244 Request Parameters
  245 ------------------
  246 
  247 .. rest_parameters:: parameters.yaml
  248 
  249   - queue_name: queue_name
  250   - subscription_id: subscription_id_path
  251 
  252 
  253 This operation does not accept a request body and does not return a response
  254 body.