User Tools

Site Tools


api2:tag_system:taggings

**This is an old revision of the document!** ----

A PCRE internal error occured. This might be caused by a faulty plugin

At this point, your Tags are structured and set. You will want to start tagging your objects. ===Object resources=== ^ Property ^ Type ^ Description ^ | id | Integer | Identifier for the database of Domoscio's API | | value | String | The value attached to the tagging | | tag_id | String | The tag this tagging belongs to | | taggable_id | Integer | The taggable object ID this tagging belongs to | | taggable_type | String | The taggable object type this tagging belongs to | | created_at | DateTime | Date of creation of the object | | updated_at | DateTime | LAst time the object has been modified | ===Create (POST)=== ^ Method | POST | ^ URL | /taggings | ==Parameters (*Requiered parameters)== ^ Property ^ Type ^ Description ^ | value | String | The value attached to the tagging | | tag_id* | String | The tag this tagging belongs to | | taggable_id* | Integer | The taggable object ID this tagging belongs to | | taggable_type* | String | The taggable object type this tagging belongs to | ==Send the request (JSON input example)== <code> { tag_id: 1279, taggable_id: 2749, taggable_type: "Content", value: "30" } </code> ==Get the response (JSON output example)== <code> { "id": 2079, "tag_id": 1279, "taggable_id": 2749, "taggable_type": "Content", "created_at": "2017-11-24T10:30:18.715Z", "updated_at": "2017-11-24T10:30:18.715Z", "value": "30" } </code> ===Fetch (GET)=== ^ Method | GET| ^ URL | /taggings/{tagging_id} | If no tagging_id is provided it will fetch all Taggings for your instance. You can choose to filter the taggings by either the tag_id or the taggable_id and the taggable_type. ==Get the response (JSON output example)== **With ID provided**\\ <code> { "id": 2079, "tag_id": 1279, "taggable_id": 2749, "taggable_type": "Content", "created_at": "2017-11-24T10:30:18.715Z", "updated_at": "2017-11-24T10:30:18.715Z", "value": "30" } </code> **Without ID provided**\\ <code> [ { "id": 2079, "tag_id": 1279, "taggable_id": 2749, "taggable_type": "Content", "created_at": "2017-11-24T10:30:18.715Z", "updated_at": "2017-11-24T10:30:18.715Z", "value": "30" }, { "id": 2075, "tag_id": 1229, "taggable_id": 2749, "taggable_type": "Content", "created_at": "2017-11-22T16:31:45.291Z", "updated_at": "2017-11-24T10:48:42.132Z", "value": null } ] </code>

api2/tag_system/taggings.1511520858.txt.gz · Last modified: 2017/11/24 11:54 by maries