TaggableSections
Introduction
TaggableSections
define the different areas or modules in the system where tags can be assigned and managed. They are used to restrict, group, or organize tags for specific use cases.
A TaggableSection
can have restrictions on which Tags or TagGroups are allowed, and can define a default TagGroup to use when creating Tags for that section.
Model Definition
Alias
taggableSection
Relations
restrictedTags
Morph to many
taggable_section_restrictbale.restrictable_type
, taggable_section_restrictbale.restrictable_id
restrictedTagGroups
Morph to many
taggable_section_restrictbale.restrictable_type
, taggable_section_restrictbale.restrictable_id
Available Sections
departments
- The allowed Tags for Departments.infoboard
- The allowed Tags for InfoboardPosts.manual
- The allowed Tags for ManualChapters and ManualEntries.
List
Get a list of all TaggableSections
the current authenticated User is allowed to view.
Definition
GET
/api/tags/sections
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tags/sections', [
'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
Example Response
[
{
"id": "departments",
"allow_all": true,
"default_tag_group_id": null,
"created_at": "2019-06-15 12:00:00",
"updated_at": "2019-06-15 12:00:00"
},
{
"id": "infoboard",
"allow_all": true,
"default_tag_group_id": null,
"created_at": "2019-06-15 12:00:00",
"updated_at": "2019-06-15 12:00:00"
},
{
"id": "manual",
"allow_all": true,
"default_tag_group_id": null,
"created_at": "2019-06-15 12:00:00",
"updated_at": "2019-06-15 12:00:00"
},
{
"id": "roles",
"allow_all": true,
"default_tag_group_id": null,
"created_at": "2019-06-15 12:00:00",
"updated_at": "2019-06-15 12:00:00"
}
]
Show
Show a single TaggableSection
by id
.
Definition
GET
/api/tags/sections/{taggableSection}
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tags/sections/infoboard', [
'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
Example Response
{
"id": "infoboard",
"allow_all": true,
"default_tag_group_id": null,
"created_at": "2019-06-15 12:00:00",
"updated_at": "2019-06-15 12:00:00"
}
[Adm.] List
Get a list of all TaggableSections
.
Definition
GET
/api/administration/tags/sections
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/tags/sections', [
'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
Example Response
[
{
"id": "departments",
"allow_all": true,
"default_tag_group_id": null,
"created_at": "2019-06-15 12:00:00",
"updated_at": "2019-06-15 12:00:00"
},
{
"id": "infoboard",
"allow_all": true,
"default_tag_group_id": null,
"created_at": "2019-06-15 12:00:00",
"updated_at": "2019-06-15 12:00:00"
},
{
"id": "manual",
"allow_all": true,
"default_tag_group_id": null,
"created_at": "2019-06-15 12:00:00",
"updated_at": "2019-06-15 12:00:00"
},
{
"id": "roles",
"allow_all": true,
"default_tag_group_id": null,
"created_at": "2019-06-15 12:00:00",
"updated_at": "2019-06-15 12:00:00"
}
]
[Adm.] Show
Get a single TaggableSection
by id
.
Definition
GET
/api/administration/tags/sections/{taggableSection}
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/tags/sections/departments', [
'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
Example Response
{
"id": "departments",
"allow_all": true,
"default_tag_group_id": null,
"created_at": "2019-06-15 12:00:00",
"updated_at": "2019-06-15 12:00:00"
}
Update
Update a TaggableSection
by id
.
Definition
PUT
/api/administration/tags/sections/{taggableSection}
Request Keys
restricted_tag_group_ids
array
Array of objects with id
(TagGroup ID) and recursive
(boolean) for group restrictions.
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/administration/tags/sections/infoboard', [
'headers' => ['Authorization' => "Bearer {accessToken}"],
'json' => [
'allow_all' => false,
'default_tag_group_id' => 2,
'restricted_tag_ids' => [1, 2],
'restricted_tag_group_ids' => [
['id' => 2, 'recursive' => true]
]
]
]);
Example Response
{
"status": "success",
"data": {
"id": "infoboard",
"allow_all": false,
"default_tag_group_id": 2,
"created_at": "2019-06-15 12:00:00",
"updated_at": "2019-06-15 12:30:00"
}
}
Last updated