Tags
Introduction
Tags
are used to categorize and organize various entities within the system. They help in filtering, searching, and managing content efficiently across modules.
Tags
can be grouped into TagGroups and are assignable to different TaggableSections.
Model Definition
Alias
tag
Relations
restrictedTaggableSections
Morph to many
taggable_section_restrictbale.restrictable_type, taggable_section_restrictbale.restrictable_id
List by section
Get a list of all Tags
by TaggableSection.
Definition
GET
/api/tags/allowed/{taggableSection}
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tags/allowed/infoboard', [
'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
Example Response
[
{
"id": 1,
"user_id": 2,
"title": "Tag 1",
"color": "#061da4",
"created_at": "2019-06-15 12:00:00",
"updated_at": "2019-06-15 12:00:00",
"deleted_at": null
},
{
"id": 2,
"user_id": 2,
"title": "Tag 2",
"color": "#1098b3",
"created_at": "2019-06-15 13:00:00",
"updated_at": "2019-06-15 13:00:00",
"deleted_at": null
}
]
[Adm.] List
Get a list of all Tags
.
Definition
GET
/api/administration/tags
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/tags', [
'headers' => ['Authorization' => 'Bearer {accessToken}'],
]);
Example Response
[
{
"id": 1,
"title": "Important",
"color": "#ff0000",
"user_id": 2,
"created_at": "2019-06-16 12:00:00",
"updated_at": "2019-06-16 12:00:00",
"deleted_at": null
},
{
"id": 2,
"title": "Internal",
"color": "#00ff00",
"user_id": 3,
"created_at": "2019-06-16 13:00:00",
"updated_at": "2019-06-16 13:00:00",
"deleted_at": null
}
]
[Adm.] Show
Show a single Tag
by id
.
Definition
GET
/api/administration/tags/{id}
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/tags/1', [
'headers' => ['Authorization' => 'Bearer {accessToken}'],
]);
Example Response
{
"id": 1,
"title": "Important",
"color": "#ff0000",
"user_id": 2,
"created_at": "2019-06-16 12:00:00",
"updated_at": "2019-06-16 12:00:00",
"deleted_at": null
}
Create
Create a new Tag
.
Definition
POST
/api/administration/tags
Request Keys
title
*
string
–
The name of the Tag
.
color
*
string
–
The color code (HEX) for the Tag
.
Keys with *
are required.
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/administration/tags', [
'headers' => ['Authorization' => 'Bearer {accessToken}'],
'json' => [
'title' => 'Urgent',
'color' => '#ffa500',
'tag_group_ids' => [1, 2],
'taggable_section_id' => 3
],
]);
Example Response
{
"status": "success",
"data": {
"id": 3,
"title": "Urgent",
"color": "#ffa500",
"user_id": 2,
"created_at": "2019-06-16 14:00:00",
"updated_at": "2019-06-16 14:00:00",
"deleted_at": null
}
}
Update
Update an existing Tag
by id
.
Definition
PUT
/api/administration/tags/{id}
Request Keys
title
string
The name of the Tag
.
color
string
The color code (HEX) for the Tag
.
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/administration/tags/3', [
'headers' => ['Authorization' => 'Bearer {accessToken}'],
'json' => [
'color' => '#ffb700'
],
]);
Example Response
{
"status": "success",
"data": {
"id": 3,
"title": "Urgent",
"color": "#ffb700",
"user_id": 2,
"created_at": "2019-06-16 14:00:00",
"updated_at": "2019-06-16 14:30:00",
"deleted_at": null
}
}
Delete
Delete an existing Tag
by id
.
Definition
DELETE
/api/administration/tags/{id}
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('DELETE', '/api/administration/tags/3', [
'headers' => ['Authorization' => 'Bearer {accessToken}'],
]);
Example Response
{
"status": "success",
"data": null
}
Last updated