From b86f58d9d04c7042934088234512210a7676df93 Mon Sep 17 00:00:00 2001 From: Weryques Date: Fri, 8 Dec 2017 15:41:48 -0200 Subject: [PATCH] Create tainacan-api.md --- docs/tainacan-api.md | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 docs/tainacan-api.md diff --git a/docs/tainacan-api.md b/docs/tainacan-api.md new file mode 100644 index 000000000..314946930 --- /dev/null +++ b/docs/tainacan-api.md @@ -0,0 +1,50 @@ +# Tainacan Application Programming Interface + +### Brief Description + +A REST API for Tainacan Plugin. This API uses the Wordpress REST API. + +### Routes and Endpoints + +#### Collections + +1. Route `wp-json/tainacan/v2/collections/(?P[\d]+)` + + 1.1. Endpoints supported: + + 1.1.1 GET (Fetch a collection) + + 1.1.2 DELETE (Delete or Trash a collection and all your dependencies) + ``` + To delete pass in body of a requisition the parameter is_permanently as true. + To only trash pass false. + ``` +2. Route `wp-json/tainacan/v2/collections` + + 2.1. Endpoints supported: + + 2.1.1 GET (Fetch all collections) + + 2.1.2 POST (Create a collection). + +#### Items + +1. Route `wp-json/tainacan/v2/items/collection/(?P[\d]+)` + + 1.1. Endpoints supported: + + 1.1.1 GET (Fetch all items from a collection) + + 1.1.2 POST (Create a item in a collection) + +2. Route `wp-json/tainacan/v2/items/(?P[\d]+)` + + 2.1. Endpoints supported: + + 2.1.1 GET (Fetch a item) + + 2.1.2 DELETE (Delete or Trash a item and all your dependencies) + ``` + To delete pass in body of a requisition the parameter is_permanently as true. + To only trash pass false. + ```