List tags
GET/v1/default/banks/{bank_id}/tagsList all unique tags in a memory bank with usage counts. Supports wildcard search using '' (e.g., 'user:', '-fred', 'tag-2'). Case-insensitive. Use source=mental_models to list tags used on mental models instead of memories.
Authentication required — include an
Authorization: Bearer hsk_...header. See Authentication for details.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
bank_id | string | Yes |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
q | string | null | No | Wildcard pattern to filter tags (e.g., 'user:' for user:alice, '-admin' for role-admin). Use '*' as wildcard. Case-insensitive. |
source | enum("memories", "mental_models") | No | Where to read tags from: 'memories' (memory_units, default) or 'mental_models'. |
limit | integer | No | Maximum number of tags to return |
offset | integer | No | Offset for pagination |
Example Request
bash
curl -X GET 'https://api.hindsight.vectorize.io/v1/default/banks/your-bank-id/tags' \
-H 'Authorization: Bearer hsk_your_api_key'Responses
200 — Successful Response
json
{
"items": [
{
"count": 42,
"tag": "user:alice"
},
{
"count": 15,
"tag": "user:bob"
},
{
"count": 8,
"tag": "session:abc123"
}
],
"limit": 100,
"offset": 0,
"total": 25
}422 — Validation Error
json
{
"detail": [
{
"loc": [
null
],
"msg": "Message",
"type": "Error Type",
"input": null,
"ctx": {},
"url": "URL"
}
]
}Source: /v1/default/banks/{bank_id}/tags