<html>
<head>
<title>RabbitMQ Management HTTP API</title>
<style>
body { font: 12px Verdana,sans-serif; color: #444; padding: 8px 35px; }
td, th { font: 12px Verdana,sans-serif; color: #444; }
h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
td.path { font-family: monospace; }
th { font-size 1em; font-weight: bold; }
table { border-collapse: collapse; }
table th, table td { vertical-align: top; border: 1px solid #bbb; padding: 5px; }
code { background: #ffa; }
pre { background: black; color: #0f0; padding: 10px; word-wrap: break-word;}
table pre { background: #ffa; color: black; }
</style>
</head>
<body>
<h1>RabbitMQ Management HTTP API</h1>
<h2>Introduction</h2>
<p>Apart from this help page, all URIs will serve only resources
of type <code>application/json</code>, and will require HTTP basic
authentication (using the standard RabbitMQ user database). The
default user is guest/guest.</p>
<p>Many URIs require the name of a virtual host as part of the
path, since names only uniquely identify objects within a virtual
host. As the default virtual host is called "<code>/</code>", this
will need to be encoded as "<code>%2f</code>".</p>
<p>PUTing a resource creates it. The JSON object you upload must
have certain mandatory keys (documented below) and may have
optional keys. Other keys are ignored. Missing mandatory keys
constitute an error.</p>
<p>Since bindings do not have names or IDs in AMQP we synthesise
one based on all its properties. Since predicting this name is
hard in the general case, you can also create bindings by POSTing
to a factory URI. See the example below.</p>
<p>Many URIs return lists. Such URIs can have the query string
parameters <code>sort</code> and <code>sort_reverse</code>
added. <code>sort</code> allows you to select a primary field to
sort by, and <code>sort_reverse</code> will reverse the sort order
if set to <code>true</code>. The <code>sort</code> parameter can
contain subfields separated by dots. This allows you to sort by a
nested component of the listed items; it does not allow you to
sort by more than one field. See the example below.</p>
<p>You can also restrict what information is returned per item
with the <code>columns</code> parameter. This is a comma-separated
list of subfields separated by dots. See the example below.</p>
<h2>Examples</h2>
<p>A few quick examples, using the Unix command line
tool <code>curl</code>:</p>
<ul>
<li>
Get a list of vhosts:
<pre>$ curl -i -u guest:guest http://localhost:15672/api/vhosts
HTTP/1.1 200 OK
Server: MochiWeb/1.1 WebMachine/1.7 (participate in the frantic)
Date: Tue, 31 Aug 2010 15:46:59 GMT
Content-Type: application/json
Content-Length: 5
[{"name":"/"}]</pre>
</li>
<li>
Get a list of channels, fast publishers first, restricting the info
items we get back:
<pre>$ curl -i -u guest:guest 'http://localhost:15672/api/channels?sort=message_stats.publish_details.rate&sort_reverse=true&columns=name,message_stats.publish_details.rate,message_stats.deliver_get_details.rate'
HTTP/1.1 200 OK
Server: MochiWeb/1.1 WebMachine/1.7 (participate in the frantic)
Date: Tue, 12 Oct 2010 10:03:21 GMT
Content-Type: application/json
Content-Length: 6078
Cache-Control: no-cache
[{"connection_details":{"peer_address":"127.0.0.1","peer_port":47340<i>... (remainder elided)</i></pre>
</li>
<li>
Create a new vhost:
<pre>$ curl -i -u guest:guest -H "content-type:application/json" \
-XPUT http://localhost:15672/api/vhosts/foo
HTTP/1.1 204 No Content
Server: MochiWeb/1.1 WebMachine/1.7 (participate in the frantic)
Date: Fri, 27 Aug 2010 16:56:00 GMT
Content-Type: application/json
Content-Length: 0</pre>
<p>Note: you must specify <code>application/json</code> as the
mime type.</p>
<p>Note: the name of the object is not needed in the JSON
object uploaded, since it is in the URI. As a virtual host
has no properties apart from its name, this means you do not
need to specify a body at all!</p>
</li>
<li>
Create a new exchange in the default virtual host:
<pre>$ curl -i -u guest:guest -H "content-type:application/json" \
-XPUT -d'{"type":"direct","durable":true}' \
http://localhost:15672/api/exchanges/%2f/my-new-exchange
HTTP/1.1 204 No Content
Server: MochiWeb/1.1 WebMachine/1.7 (participate in the frantic)
Date: Fri, 27 Aug 2010 17:04:29 GMT
Content-Type: application/json
Content-Length: 0</pre>
<p>Note: we never return a body in response to a PUT or
DELETE, unless it fails.</p>
</li>
<li>
And delete it again:
<pre>$ curl -i -u guest:guest -H "content-type:application/json" \
-XDELETE http://localhost:15672/api/exchanges/%2f/my-new-exchange
HTTP/1.1 204 No Content
Server: MochiWeb/1.1 WebMachine/1.7 (participate in the frantic)
Date: Fri, 27 Aug 2010 17:05:30 GMT
Content-Type: application/json
Content-Length: 0</pre>
</li>
</ul>
<h2>Reference</h2>
<table>
<tr>
<th>GET</th>
<th>PUT</th>
<th>DELETE</th>
<th>POST</th>
<th>Path</th>
<th>Description</th>
</tr>
<tr>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td class="path">/api/overview</td>
<td>Various random bits of information that describe the whole
system.</td>
</tr>
<tr>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td class="path">/api/nodes</td>
<td>A list of nodes in the RabbitMQ cluster.</td>
</tr>
<tr>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td class="path">/api/nodes/<i>name</i></td>
<td>
An individual node in the RabbitMQ cluster. Add
"?memory=true" to get memory statistics.
</td>
</tr>
<tr>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td class="path">/api/extensions</td>
<td>A list of extensions to the management plugin.</td>
</tr>
<tr>
<td>X</td>
<td></td>
<td></td>
<td>X</td>
<td class="path">/api/definitions<br/>
/api/all-configuration <em>(deprecated)</em>
</td>
<td>
The server definitions - exchanges, queues, bindings, users,
virtual hosts, permissions and parameters. Everything apart from
messages. POST to upload an existing set of definitions. Note
that:
<ul>
<li>The definitions are merged. Anything already existing is
untouched.</li>
<li>Conflicts will cause an error.</li>
<li>In the event of an error you will be left with a
part-applied set of definitions.</li>
</ul>
For convenience you may upload a file from a browser to this
URI (i.e. you can use <code>multipart/form-data</code> as
well as <code>application/json</code>) in which case the
definitions should be uploaded as a form field named
"file".
</td>
</tr>
<tr>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td class="path">/api/connections</td>
<td>A list of all open connections.</td>
</tr>
<tr>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td class="path">/api/connections/<i>name</i></td>
<td>An individual connection. DELETEing it will close the
connection.</td>
</tr>
<tr>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td class="path">/api/channels</td>
<td>A list of all open channels.</td>
</tr>
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
rabbitmq_server-3.0.4.tar.gz (440个子文件)
rabbitmq_work_queues_demo-with-rabbit-c-client-lib-master.7z 362KB
rabbit.app 4KB
rabbitmq_management.app 2KB
rabbitmq_auth_backend_ldap.app 994B
amqp_client.app 877B
rabbitmq_federation.app 799B
webmachine.app 615B
rabbitmq_web_dispatch.app 510B
rabbitmq_management_agent.app 458B
rabbitmq_federation_management.app 309B
mochiweb.app 252B
eldap.app 194B
mochiweb_charref.beam 184KB
rabbit_tests.beam 121KB
ELDAPv3.beam 96KB
rabbit_framing_amqp_0_8.beam 71KB
rabbit_channel.beam 66KB
rabbit_amqqueue_process.beam 65KB
rabbit_msg_store.beam 64KB
rabbit_variable_queue.beam 55KB
rabbit_framing_amqp_0_9_1.beam 49KB
rabbit_reader.beam 47KB
rabbit_misc.beam 44KB
webmachine_request.beam 41KB
file_handle_cache.beam 40KB
rabbit.beam 39KB
gm.beam 38KB
rabbit_queue_index.beam 37KB
supervisor2.beam 36KB
eldap.beam 36KB
rabbit_mgmt_db.beam 36KB
mochiweb_html.beam 36KB
rabbit_amqqueue.beam 35KB
gen_server2.beam 33KB
rabbit_federation_link.beam 33KB
rabbit_mirror_queue_slave.beam 32KB
amqp_channel.beam 32KB
rabbit_control_main.beam 32KB
mochiweb_request.beam 30KB
rabbit_mgmt_util.beam 28KB
rabbit_mnesia.beam 27KB
mochijson2.beam 25KB
webmachine_decision_core.beam 24KB
rabbit_binding.beam 23KB
rabbit_exchange.beam 22KB
amqp_network_connection.beam 20KB
rabbit_mgmt_format.beam 20KB
mochijson.beam 20KB
rabbit_mgmt_wm_definitions.beam 20KB
mochiweb_util.beam 19KB
pmod_pt.beam 19KB
rabbit_mirror_queue_master.beam 19KB
rabbit_auth_backend_ldap.beam 18KB
amqp_gen_connection.beam 17KB
wmtrace_resource.beam 17KB
rabbit_networking.beam 17KB
amqp_channels_manager.beam 16KB
rabbit_mirror_queue_misc.beam 16KB
mirrored_supervisor.beam 16KB
amqp_uri.beam 15KB
mochifmt.beam 15KB
rabbit_ssl.beam 15KB
rabbit_policy.beam 15KB
rabbit_binary_generator.beam 14KB
rabbit_table.beam 14KB
mirrored_supervisor_tests.beam 14KB
pg2_fixed.beam 14KB
rabbit_basic.beam 14KB
vm_memory_monitor.beam 14KB
rabbit_plugins_main.beam 14KB
mochiweb_socket_server.beam 13KB
webmachine_util.beam 13KB
webmachine_resource.beam 13KB
rabbit_writer.beam 13KB
mochiweb_multipart.beam 13KB
amqp_selective_consumer.beam 13KB
rabbit_auth_backend_internal.beam 13KB
rabbit_plugins.beam 13KB
rabbit_exchange_type_topic.beam 13KB
rabbit_upgrade_functions.beam 13KB
rabbit_mgmt_external_stats.beam 12KB
rabbit_mgmt_wm_bindings.beam 12KB
amqp_direct_connection.beam 12KB
rabbit_federation_upstream.beam 12KB
wrq.beam 12KB
mochiweb_mime.beam 12KB
rabbit_mgmt_wm_binding.beam 12KB
rabbit_file.beam 11KB
rabbit_mgmt_app.beam 11KB
rabbit_mgmt_wm_queue_get.beam 11KB
rabbit_node_monitor.beam 11KB
rabbit_federation_util.beam 11KB
rabbit_mgmt_wm_exchange_publish.beam 11KB
amqp_gen_consumer.beam 10KB
rabbit_trace.beam 10KB
amqp_rpc_client.beam 10KB
rabbit_upgrade.beam 10KB
webmachine_logger.beam 10KB
rabbit_limiter.beam 10KB
rabbit_federation_status.beam 10KB
共 440 条
- 1
- 2
- 3
- 4
- 5
资源评论
caishiming1
- 粉丝: 16
- 资源: 33
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功