Listing, Creating, Updating, and Deleting Tag Categories
Listing Tag Categories
API Endpoint
Get all tag categories
GET /v1/teams/{teamId}/tagcategories
URL Parameters
teamId
the ID of the Team which will be of the formxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Request Body
There is no request body, this is a GET
request.
Response
The response will include an array of Tag Categories, including that category's id
, name
and whether it is the Collection's defaultCategory
. Additionally, there will be an array of tags
that are part of the Tag Category.
Sample Response
[
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"dateCreated": "2016-01-01T00:00:00.000+0000",
"createdBy": {
"email": "[email protected]"
},
"defaultCategory": true,
"name": "Fruits",
"tags": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"value": "Apple"
},
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"value": "Banana"
}
]
},
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"dateCreated": "2016-01-01T00:00:00.000+0000",
"createdBy": {
"email": "[email protected]"
},
"name": "Colors",
"tags": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"value": "Orange"
}
]
}
]
Creating a Tag Category
API Endpoint
Add a tag category
POST /v1/teams/{teamId}/tagcategories
URL Parameters
teamId
the ID of the Team which will be of the formxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Request Body
There one required field for creating a Tag Category...
name
the name of the tag category
Sample Request
{
"name":"My Tag Category"
}
Response
The response will include the name
along with the id
of the Tag Category that was created.
Sample Response
{
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"value" : "My Tag Category"
}
Updating a Tag Category
API Endpoint
Update a tag category
PUT /v1/teams/{teamId}/tagcategories/{tagCategoryId}
URL Parameters
-
teamId
the ID of the Team which will be of the formxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
-
tagCategoryId
the ID of the Tag Category to update
Request Body
There is one required fields for updating a Tag Category.
name
the name of the tag
Sample Request
{
"value":"My Updated Tag Category"
}
Response
The response will include the id
and the name
of the Tag Category that was updated.
Sample Response
{
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name" : "My Updated Tag Category"
}
Deleting a Tag Category
API Endpoint
Delete a tag category
DELETE /v1/teams/{teamId}/tagcategories/{tagCategoryId}
URL Parameters
-
teamId
the ID of the Team which will be of the formxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
-
tagCategoryId
the ID of the Tag Category 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 Category is successfully deleted.
Updated 12 months ago