Entity Tags
In Create Entity request it is possible to set tags for an entity. This page described tags-related functionality on more granular level.
Add Tags
This operation add tags to entity object.
Request
POST {TenantURL}/{entity object URI}/tags
Parameters | Name | Required | Details |
---|---|---|---|
Headers |
Authorization |
Yes |
Information about authentication access token in format
"Bearer
|
Content-Type |
Yes |
" |
|
Query |
|
Yes |
Specifies if response should contain created objects. Note: Default value is true |
Body |
Yes |
JSON array with tags to be added. |
Response
JSON Object representing result of a add operation. Result contains:
status
- result of operation; possible values are "OK
" or "failed
"array
- JSON array of entity tags that were created.
Example Request
POST /entities/1/tags
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512, Content-Type: application/json
Body
["golf", "tennis"]
Example Response
POST /entities/1/tags
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512, Content-Type: application/json
Body
["golf", "tennis"]
Delete Tags
Deletes a tag from an entity
Request
DELETE {TenantURL}/{entity object URI}/tags
Parameters |
Name |
Required |
Details |
---|---|---|---|
Headers |
Authorization |
Yes |
Information about authentication access token in format
"Bearer
|
Query |
element |
Yes |
Passes an element from tags array to be deleted |
JSON Object representing result of a delete operation. Result contains:
status
- result of operation; possible values are "OK
" or "failed
"
Example Request
DELETE {TenantURL}/entities/1/tags?element='tennis'
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512
Example Response
DELETE {TenantURL}/entities/1/roles?element='tennis'
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512
Body
{
"status": "OK"
}
Get Entity Tags
Return all tags for an entity.
Request
GET {TenantURL}/{entity object URI}/tags
Parameters |
Name |
Required |
Details |
---|---|---|---|
Headers |
Authorization |
Yes |
Information about authentication access token in format
"Bearer
|
Query |
element |
Yes |
Passes an element from tags array to be deleted |
Response
An array of tags that an entity has.
Example Request
GET {TenantURL}/entities/1/tags
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512
Example Response
GET {TenantURL}/entities/1/tags
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512
["skiing", "golf", "tennis"]