User Tools

Site Tools


api2:tag_system:taggings

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 or tag_uid* String The tag this tagging belongs to
taggable_id or taggable_uid* 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)
{
	tag_id: 1279,
	taggable_id: 2749,
	taggable_type: "Content",
	value: "30"
}
Get the response (JSON output example)
{
    "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"
}

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

{
    "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"
}

Without ID provided

[
    {
        "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
    }
]
api2/tag_system/taggings.txt · Last modified: 2018/07/23 09:54 by maries