TagGroups
Introduction
TagGroups
are used to organize and group Tags within the system. They allow for hierarchical structuring of Tags, assignment of Tags to groups, and restriction of Tag usage in specific TaggableSections.
A TagGroup
can have a parent group, child groups, and can be assigned to one or more TaggableSections.
Model Definition
Alias
tagGroup
Relations
restrictedTaggableSections
Morph to many
taggable_section_restrictbale.restrictable_type, taggable_section_restrictbale.restrictable_id
List by section
Get a list of all TagGroups
by TaggableSection.
Definition
GET
/api/tags/groups/allowed/{taggableSection}
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tags/groups/allowed/infoboard', [
'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
Example Response
[
{
"id": 1,
"user_id": 2,
"title": "General",
"parent_id": null,
"sort_number": 1,
"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": "Important",
"parent_id": 1,
"sort_number": 2,
"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 TagGroups
.
Definition
GET
/api/administration/tags/groups
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/tags/groups', [
'headers' => ['Authorization' => 'Bearer {accessToken}'],
]);
Example Response
[
{
"id": 1,
"user_id": 2,
"title": "General",
"parent_id": null,
"sort_number": 1,
"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": "Important",
"parent_id": null,
"sort_number": 2,
"created_at": "2019-06-15 13:00:00",
"updated_at": "2019-06-15 13:00:00",
"deleted_at": null
}
]
[Adm.] Show
Show a single TagGroup
by id
.
Definition
GET
/api/administration/tags/groups/{id}
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/tags/groups/1', [
'headers' => ['Authorization' => 'Bearer {accessToken}'],
]);
Example Response
{
"id": 1,
"user_id": 2,
"title": "General",
"parent_id": null,
"sort_number": 1,
"created_at": "2019-06-15 12:00:00",
"updated_at": "2019-06-15 12:00:00",
"deleted_at": null
}
Create
Create a new TagGroup
.
Definition
POST
/api/administration/tags/groups
Request Keys
title
*
string
-
The name of the TagGroup
.
parent_id
int
-
The ID of the parent TagGroup
.
sort_number
integer
Current highest +1
The index of the TagGroup
related to the parent TagGroup
.
Keys with *
are required.
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/administration/tags/groups', [
'headers' => ['Authorization' => 'Bearer {accessToken}'],
'json' => [
'title' => 'Common',
'tag_ids' => [5, 6]
],
]);
Example Response
{
"status": "success",
"data": {
"id": 3,
"user_id": 2,
"title": "Common",
"parent_id": null,
"sort_number": 3,
"created_at": "2019-06-15 14:00:00",
"updated_at": "2019-06-15 14:00:00",
"deleted_at": null
}
}
Update
Update an existing TagGroup
by id
.
Definition
PUT
/api/administration/tags/groups/{id}
Request Keys
title
string
The name of the TagGroup
.
parent_id
int
The ID of the parent TagGroup
.
sort_number
int
The index of the TagGroup
related to the parent TagGroup
.
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/administration/tags/groups/3', [
'headers' => ['Authorization' => 'Bearer {accessToken}'],
'json' => [
'tag_ids' => [5, 6, 7]
],
]);
Example Response
{
"status": "success",
"data": {
"id": 3,
"user_id": 2,
"title": "Common",
"parent_id": null,
"sort_number": 3,
"created_at": "2019-06-15 14:00:00",
"updated_at": "2019-06-15 14:30:00",
"deleted_at": null
}
}
Delete
Delete an existing TagGroup
by id
.
Definition
DELETE
/api/administration/tags/groups/{id}
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('DELETE', '/api/administration/tags/groups/3', [
'headers' => ['Authorization' => 'Bearer {accessToken}'],
]);
Example Response
{
"status": "success",
"data": null
}
Last updated