Fetching tags
A Tag is a meaningful label you can assign to your content items, customers and assets to differentiate between them while filtering.
The Tag object
{
"id": "df7c1544-bad0-4c9d-928f-0c9f684c9ceb",
"created_on": "2023-01-23T14:34:59+00:00",
"changed_on": "2023-01-23T14:34:59+00:00",
"label": "Tag",
"body": "Amsterdam",
"slug": "amsterdam"
}
FIELD | DESCRIPTION |
---|---|
id | Unique identifier for each item. |
created_on | UTC time at which the segment was created. |
changed_on | UTC time at which the segment was last updated. |
label | Identifier for the object. |
body | Name of the tag. |
slug | Custom tag API ID. |
Fetching all tags
GET: /tags
The pagination of the tags endpoint is identical to the content items endpoints.
Query by ID
Since IDs are unique in Prepr, you can find the tag you want using the id argument. Here is an example that demonstrates how to query a tag with the ID "535c1e-...":
GET: /tags/535c1e-4d52-4794-9136-71e28f2ce4c1
Managing tags
Fields
argument | type | required | description |
---|---|---|---|
body | String | true | Defines the tag. |
{
"body": "Dog"
}
Create
To create a tag.
POST: /tags
Update
To update a tag.
PUT: /tags/{id}
Destroy
To destroy a tag.
DELETE: /tags/{id}
Tag Groups (deprecated)
Fetching all tag groups
GET: /tag_groups
Managing tag groups
Fields
argument | type | required | description |
---|---|---|---|
body | String | true | Defines the name of the tag group. |
tags | Object | false | Defines the tags inside of the tag group. |
{
"body": "Taggroup 1",
"tags": {
"items": [
{
"id": "00a92e60-24bd-4908-a36c-96268465111f",
"body" : "Amsterdam"
}
]
}
}
Create
To create a tag group.
POST: /tag_groups
Update
To update a tag group.
PUT: /tag_groups/{id}
Destroy
To destroy a tag group.
DELETE: /tag_groups/{id}
Was this article helpful?
We’d love to learn from your feedback