Document the HTTP API.

This commit is contained in:
Simon MacMullen 2012-05-09 10:52:25 +01:00
parent f8e83acd65
commit b4a90400d6
1 changed files with 18 additions and 1 deletions

View File

@ -24,4 +24,21 @@ messages that can't be logged are queued.
The code to serve up the log files over HTTP is pretty dumb, it loads
the whole log into memory. If you have large log files you may wish
to transfer them off the server in some other way.
to transfer them off the server in some other way.
HTTP API
========
GET /api/traces
GET /api/traces/<vhost>
GET PUT DELETE /api/traces/<vhost>/<name>
GET /api/trace-files
GET DELETE /api/trace-files/<name> (GET returns the file as text/plain,
not JSON describing it.)
Example for how to create a trace:
$ curl -i -u guest:guest -H "content-type:application/json" -XPUT \
http://localhost:55672/api/traces/%2f/my-trace \
-d'{"format":"text","pattern":"#"}'