Creating a Tag
API Endpoint
POST /v1/collections/{collectionId}/tagcategories/tags
URL Parameters
collectionIdthe ID of the Collection which will be of the formxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Request Headers
Along with a appropriate authentication headers, you must provide a Content-Type header with a value of application/json
Request Body
There are two required fields for creating a Tag.
valuethe name of the TagcategoryIdthe ID of the Category that will contain the Tag
Sample Request
{
"categoryId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"value":"My Tag"
}
Response
The response will include the value and categoryId that was sent in along with the id of the Tag that was created.
Sample Response
{
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"categoryId" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"value" : "My Tag"
}
Updating a Tag
API Endpoint
PUT /v1/collections/{collectionId}/tagcategories/tags/{tagId}
URL Parameters
collectionIdthe ID of the Collection which will be of the formxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxtagIdthe ID of the Tag to update
Request Headers
Along with a appropriate authentication headers, you must provide a Content-Type header with a value of application/json
Request Body
There are two required fields for updating a Tag.
valuethe name of the TagcategoryIdthe ID of the Category that will contain the Tag. ThecategoryIdcan be changed to move a Tag from one Category to another.
Sample Request
{
"categoryId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"value":"My Updated Tag"
}
Response
The response will include the id, value and categoryId of the Tag that was updated.
Sample Response
{
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"categoryId" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"value" : "My Updated Tag"
}
Deleting a Tag
API Endpoint
DELETE /v1/collections/{collectionId}/tagcategories/tags/{tagId}
URL Parameters
collectionIdthe ID of the Collection which will be of the formxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxtagIdthe ID of the Tag to delete
Request Body
There is no request body for this call.
Response
There is no response body for this call. The response will have the HTTP 204 status code if the Tag is successfully deleted.
Comments
0 comments
Please sign in to leave a comment.