diff --git a/API.md b/API.md index 7d3dcbc..2b2754f 100644 --- a/API.md +++ b/API.md @@ -7,14 +7,14 @@ All JSON-API requests need to be sent with the HTTP header `X-Requested-With: JS Action | Type | Query String | Data to send | Result ([JSON-LD](http://json-ld.org/)) ----------------------------------|------|--------------|--------------|------------------- retrieve paste (and its comments) | GET | `[pasteID]` | (no data) | [paste.jsonld](https://raw.githubusercontent.com/elrido/ZeroBin/master/js/paste.jsonld) -create paste | PUT | `[pasteID]` | `data=[cipherdata]&expire=[expireID]& formatter=[formatID]&burnafterreading=[1/0]& opendiscussion=[1/0]` | [paste.jsonld](https://raw.githubusercontent.com/elrido/ZeroBin/master/js/paste.jsonld) (including deletetoken) -create paste | POST | (empty query string) | `data=[cipherdata]&expire=[expireID]& formatter=[formatID]&burnafterreading=[1/0]& opendiscussion=[1/0]` | [paste.jsonld](https://raw.githubusercontent.com/elrido/ZeroBin/master/js/paste.jsonld) (including deletetoken) -create comment | PUT | `[commentID]` | `data=[cipherdata]&parentid=[parentID]& pasteid=[pasteID]&nickname=[cipherdata]` | `{"status":0, "id":"[commentID]"}` -create comment |d POST | (empty query string) | `data=[cipherdata]&parentid=[parentID]& pasteid=[pasteID]&nickname=[cipherdata]` | `{"status":0, "id":"[commentID]"}` -delete paste (burn after reading) | DELETE | (empty query string) | `pasteid=[pasteID]&deletetoken=burnafterreading` | `{"status":0, "id":"[pasteID]"}` -delete paste (burn after reading) | POST | (empty query string) | `pasteid=[pasteID]&deletetoken=burnafterreading` | `{"status":0, "id":"[pasteID]"}` -delete paste | DELETE | (empty query string) | `pasteid=[pasteID]&deletetoken=[deletetoken]` | `{"status":0, "id":"[pasteID]"}` -delete paste | POST | (empty query string) | `pasteid=[pasteID]&deletetoken=[deletetoken]` | `{"status":0, "id":"[pasteID]"}` +create paste | PUT | `[pasteID]` | `data=[cipherdata]& expire=[expireID]& formatter=[formatID]& burnafterreading=[1/0]& opendiscussion=[1/0]` | [paste.jsonld](https://raw.githubusercontent.com/elrido/ZeroBin/master/js/paste.jsonld) (including deletetoken) +create paste | POST | (empty query string) | `data=[cipherdata]& expire=[expireID]& formatter=[formatID]& burnafterreading=[1/0]& opendiscussion=[1/0]` | [paste.jsonld](https://raw.githubusercontent.com/elrido/ZeroBin/master/js/paste.jsonld) (including deletetoken) +create comment | PUT | `[commentID]` | `data=[cipherdata]& parentid=[parentID]& pasteid=[pasteID]& nickname=[cipherdata]` | `{"status":0, "id":"[commentID]"}` +create comment |d POST | (empty query string) | `data=[cipherdata]& parentid=[parentID]& pasteid=[pasteID]& nickname=[cipherdata]` | `{"status":0, "id":"[commentID]"}` +delete paste (burn after reading) | DELETE | (empty query string) | `pasteid=[pasteID]& deletetoken=burnafterreading` | `{"status":0, "id":"[pasteID]"}` +delete paste (burn after reading) | POST | (empty query string) | `pasteid=[pasteID]& deletetoken=burnafterreading` | `{"status":0, "id":"[pasteID]"}` +delete paste | DELETE | (empty query string) | `pasteid=[pasteID]& deletetoken=[deletetoken]` | `{"status":0, "id":"[pasteID]"}` +delete paste | POST | (empty query string) | `pasteid=[pasteID]& deletetoken=[deletetoken]` | `{"status":0, "id":"[pasteID]"}` Error on any of the above | N/A | N/A | N/A | `{"status":1, "message":"[errormessage]"}` ## Until Version 0.21.1