Skip to content

Commit 4dd8181

Browse files
Merge pull request #2680 from rabbitmq/rabbitmq-managenet-2615
HTTP API reference: add documentation for pagination parameters (cherry picked from commit a28c554)
1 parent 370643a commit 4dd8181

File tree

2 files changed

+93
-16
lines changed

2 files changed

+93
-16
lines changed

deps/rabbitmq_management/.gitignore

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ MnesiaCore.*
2222
rabbitmq_management.d
2323
.rabbitmq_management.plt
2424

25-
# Common Test
26-
ct_run*
27-
all_runs.html
28-
index.html
29-
ct_default.css
30-
ct_log_cache
31-
variables-ct*
32-
3325
*.coverdata
3426

3527
test/config_schema_SUITE_data/schema/

deps/rabbitmq_management/priv/www/api/index.html

Lines changed: 93 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,15 @@ <h2>Reference</h2>
309309
<td></td>
310310
<td></td>
311311
<td class="path">/api/connections</td>
312-
<td>A list of all open connections.</td>
312+
<td>A list of all open connections. Use <a href="#pagination">pagination parameters</a> to filter connections.</td>
313313
</tr>
314314
<tr>
315315
<td>X</td>
316316
<td></td>
317317
<td></td>
318318
<td></td>
319319
<td class="path">/api/vhosts/<i>vhost</i>/connections</td>
320-
<td>A list of all open connections in a specific vhost.</td>
320+
<td>A list of all open connections in a specific virtual host. Use <a href="#pagination">pagination parameters</a> to filter connections.</td>
321321
</tr>
322322
<tr>
323323
<td>X</td>
@@ -347,15 +347,15 @@ <h2>Reference</h2>
347347
<td></td>
348348
<td></td>
349349
<td class="path">/api/channels</td>
350-
<td>A list of all open channels.</td>
350+
<td>A list of all open channels. Use <a href="#pagination">pagination parameters</a> to filter channels.</td>
351351
</tr>
352352
<tr>
353353
<td>X</td>
354354
<td></td>
355355
<td></td>
356356
<td></td>
357357
<td class="path">/api/vhosts/<i>vhost</i>/channels</td>
358-
<td>A list of all open channels in a specific vhost.</td>
358+
<td>A list of all open channels in a specific virtual host. Use <a href="#pagination">pagination parameters</a> to filter channels.</td>
359359
</tr>
360360
<tr>
361361
<td>X</td>
@@ -387,15 +387,15 @@ <h2>Reference</h2>
387387
<td></td>
388388
<td></td>
389389
<td class="path">/api/exchanges</td>
390-
<td>A list of all exchanges.</td>
390+
<td>A list of all exchanges. Use <a href="#pagination">pagination parameters</a> to filter exchanges.</td>
391391
</tr>
392392
<tr>
393393
<td>X</td>
394394
<td></td>
395395
<td></td>
396396
<td></td>
397397
<td class="path">/api/exchanges/<i>vhost</i></td>
398-
<td>A list of all exchanges in a given virtual host.</td>
398+
<td>A list of all exchanges in a given virtual host. Use <a href="#pagination">pagination parameters</a> to filter exchanges.</td>
399399
</tr>
400400
<tr>
401401
<td>X</td>
@@ -466,15 +466,15 @@ <h2>Reference</h2>
466466
<td></td>
467467
<td></td>
468468
<td class="path">/api/queues</td>
469-
<td>A list of all queues.</td>
469+
<td>A list of all queues. Use <a href="#pagination">pagination parameters</a> to filter queues.</td>
470470
</tr>
471471
<tr>
472472
<td>X</td>
473473
<td></td>
474474
<td></td>
475475
<td></td>
476476
<td class="path">/api/queues/<i>vhost</i></td>
477-
<td>A list of all queues in a given virtual host.</td>
477+
<td>A list of all queues in a given virtual host. Use <a href="#pagination">pagination parameters</a> to filter queues.</td>
478478
</tr>
479479
<tr>
480480
<td>X</td>
@@ -2089,5 +2089,90 @@ <h2>/api/vhosts/(name)</h2>
20892089
</td>
20902090
</tr>
20912091
</table>
2092+
2093+
<section id="pagination">
2094+
<h2> Pagination Parameters</h2>
2095+
2096+
The pagination can be applied to the endpoints that list
2097+
2098+
<ul>
2099+
<li>
2100+
queues
2101+
</li>
2102+
<li>
2103+
exchanges
2104+
</li>
2105+
<li>
2106+
connections
2107+
</li>
2108+
<li>
2109+
channels
2110+
</li>
2111+
</ul>
2112+
2113+
<p>
2114+
Below are the query parameters that can be used.
2115+
2116+
<table>
2117+
<thead>
2118+
<tr>Parameter Name</tr>
2119+
<tr>Data Type</tr>
2120+
<tr>Description</tr>
2121+
</thead>
2122+
<tr>
2123+
<td><code>page</code></td>
2124+
<td>Positive integer</td>
2125+
<td>
2126+
Page number
2127+
</td>
2128+
</tr>
2129+
<tr>
2130+
<td><code>page_size</code></td>
2131+
<td>Positive integer</td>
2132+
<td>
2133+
Number of elements for page (default value: 100)
2134+
</td>
2135+
</tr>
2136+
<tr>
2137+
<td><code>name</code></td>
2138+
<td>String</td>
2139+
<td>
2140+
Filter by name, for example queue name, exchange name etc..
2141+
</td>
2142+
</tr>
2143+
<tr>
2144+
<td><code>use_regex</code></td>
2145+
<td>Boolean</td>
2146+
<td>
2147+
Enables regular expression for the param name
2148+
</td>
2149+
</tr>
2150+
</table>
2151+
</p>
2152+
2153+
<p>
2154+
Examples:
2155+
<table>
2156+
<tr>
2157+
<td><code>http://localhost:15672/api/queues?page=1&page_size=50</code></td>
2158+
<td>
2159+
Fetches the first queue page with 50 elements
2160+
</td>
2161+
</tr>
2162+
<tr>
2163+
<td><code>http://localhost:15672/api/queues/my-vhost?page=1&page_size=100&name=&use_regex=false&pagination=true</code></td>
2164+
<td>
2165+
Filter the first queues page for the virtual host "my-vhost"
2166+
</td>
2167+
</tr>
2168+
<tr>
2169+
<td><code>http://localhost:15672/api/exchanges?page=1&page_size=100&name=%5Eamq&use_regex=true&pagination=true</code></td>
2170+
<td>
2171+
Filter the first exchanges page, 100 elements, with named filtered using the regular expression "^amq"
2172+
</td>
2173+
</tr>
2174+
</table>
2175+
</p>
2176+
</section>
20922177
</body>
20932178
</html>

0 commit comments

Comments
 (0)