diff options
| author | Francois Perrad <francois.perrad@gadz.org> | 2010-10-28 20:00:16 +0200 |
|---|---|---|
| committer | Francois Perrad <francois.perrad@gadz.org> | 2010-10-28 20:00:16 +0200 |
| commit | 5ee435e295ab8d09571e9c670e3cdaf7fc28c789 (patch) | |
| tree | ec8d8c6e166571d83a17bd3b5c68287543dd383d /apps/couchdb/document.json | |
| parent | spore2dot: add a detailed generation (diff) | |
| download | api-description-5ee435e295ab8d09571e9c670e3cdaf7fc28c789.tar.gz | |
CouchDB: an alternate description
(still incomplete)
Diffstat (limited to '')
| -rw-r--r-- | apps/couchdb/document.json | 155 |
1 files changed, 155 insertions, 0 deletions
diff --git a/apps/couchdb/document.json b/apps/couchdb/document.json new file mode 100644 index 0000000..12e5afb --- /dev/null +++ b/apps/couchdb/document.json @@ -0,0 +1,155 @@ +{ + "version" : "0.1", + "methods" : { + "insert_document" : { + "path" : "/:db", + "method" : "POST", + "required_params" : [ + "db" + ], + "required_payload" : true, + "expected_status" : [ 201, 409 ] + }, + "get_document" : { + "path" : "/:db/:id", + "method" : "GET", + "required_params" : [ + "db", + "id" + ], + "optional_params" : [ + "rev", + "revs" + ] + }, + "add_document" : { + "path" : "/:db/:id", + "method" : "PUT", + "required_params" : [ + "db", + "id" + ], + "required_payload" : true, + "expected_status" : [ 201, 409 ] + }, + "delete_document" : { + "path" : "/:db/:id", + "method" : "DELETE", + "required_params" : [ + "db", + "id", + "rev" + ], + "expected_status" : [ 200, 409 ] + }, + "copy_document" : { + "path" : "/:db/:id", + "method" : "COPY", + "headers" : { + "Destination" : ":dest" + }, + "required_params" : [ + "db", + "id", + "dest" + ], + "optional_params" : [ + "rev" + ], + "expected_status" : [ 201 ] + }, + "get_attachment" : { + "path" : "/:db/:id/:file", + "method" : "GET", + "required_params" : [ + "db", + "id", + "file" + ] + }, + "add_attachment" : { + "path" : "/:db/:id/:file", + "method" : "PUT", + "headers" : { + "Content-Type" : ":content_type" + }, + "required_params" : [ + "db", + "id", + "rev", + "file", + "content_type" + ], + "required_payload" : true, + "expected_status" : [ 201, 409 ] + }, + "delete_attachment" : { + "path" : "/:db/:id/:file", + "method" : "DELETE", + "required_params" : [ + "db", + "id", + "file" + ] + }, + "get_local_document" : { + "path" : "/:db/_local/:id", + "method" : "GET", + "required_params" : [ + "db", + "id" + ], + "optional_params" : [ + "rev", + "revs" + ] + }, + "add_local_document" : { + "path" : "/:db/_local/:id", + "method" : "PUT", + "required_params" : [ + "db", + "id" + ], + "required_payload" : true, + "expected_status" : [ 201, 409 ] + }, + "delete_local_document" : { + "path" : "/:db/_local/:id", + "method" : "DELETE", + "required_params" : [ + "db", + "id", + "rev" + ], + "expected_status" : [ 200, 409 ] + }, + "copy_local_document" : { + "path" : "/:db/_local/:id", + "method" : "COPY", + "headers" : { + "Destination" : ":dest" + }, + "required_params" : [ + "db", + "id", + "dest" + ], + "optional_params" : [ + "rev" + ], + "expected_status" : [ 201 ] + } + }, + "formats" : [ + "json" + ], + "expected_status" : [ 200, 404 ], + "name" : "CouchDB", + "authority" : "http://github.com/SPORE", + "meta" : { + "documentation" : "http://wiki.apache.org/couchdb/Complete_HTTP_API_Reference", + "module" : "document", + "enable_if" : "get_attachment" + } +} |
