Adding a tag¶
Note
If the optional attributes are not set, the system adds a default value.
Note
The body does not contain the attributes id, created, and modified. The system sets the values of these attributes after the entry is created.
Sends a POST request to the endpoint /tags.
Description¶
The Add-Tag request allows the user to add one or more tags to the organisation.
Requirements¶
Values of the request: none
Objects: TagVO, TagAssignmentVOgAssignmentVO
Request¶
To add a tag, no additional information needs to be added to the path of the HTTP request.
For a detailed specification of which information is required to change a tag, the objects TagVO and TagAssignmentVO with the following attributes need to be defined in the body:
TagVO¶
| Attributes | Description | Values |
|---|---|---|
name |
The name of the tag. | string |
type |
The type of the tag. |
|
assignments |
One or more objects TagAssignmentVO. |
TagAssignmentVO¶
| Attributes | Description | Values |
|---|---|---|
type |
The type of the tag assignment. |
|
subDomainName |
The name of the subdomain, if the value of the attribute type is SUBDOMAIN. |
string |
title |
The title of the tag assignment. | string |
The following attributes are optional:
TagVO¶
| Attributes | Description | Values |
|---|---|---|
label |
A keyword for the tag. | string |
comment |
An individual comment for the entry. | string |
TagAssignmentVO¶
| Attributes | Description | Values |
|---|---|---|
comment |
An individual comment for the entry. | string |
The system responds by returning the objects TagVO and TagAssignmentVO with the information about the new entry.
Example¶
Example request body:
{
"objectType": "string",
"name": "string",
"type": "string",
"global": true,
"assignments": [
{
"objectType": "string",
"type": "string",
"subDomainName": "string",
"title": "string",
"comment": "string"
}
],
"organizationId": 0,
"sort": 0,
"comment": "string",
"label": "string"
}
Responses¶
The following responses are available:
| STATUS CODE | DESCRIPTION |
|---|---|
| 201 | The request has succeeded and a new object has been created. |
| 400 | The request was unsuccessful. The request was invalid or information is missing. |
| 401 | The request has not succeeded because the user authentication was incorrect. |
| 403 | The request has not succeeded because the user does not have the right permissions. |