Tags API

Endpoint

GET /api/data/tags

Description

The Tags API allows you to fetch and filter tags in the database. Tags can be filtered by type (USE_CASE, TOOL) and paginated using cursor-based pagination.


Query Parameters

Parameter Type Default Description
type string null Filter tags by type (USE_CASE, TOOL).
cursorId string null Cursor ID to fetch the next page of results.
pageSize integer 10 Number of records to fetch per page.

Example Requests

  1. Fetch all tags:

    GET /api/data/tags
    
    
  2. Fetch tags filtered by type (USE_CASE):

    GET /api/data/tags?type=USE_CASE
    
    
  3. Paginate through tags (page size of 5 starting from a specific cursor):

    GET /api/data/tags?pageSize=5&cursorId=abc123
    
    

Response Format

Success Response (200 OK)

{
  "tags": [
    {
      "id": "b43fcf75-b272-4537-aa5d-9cae1dda3c62",
      "name": "Grow Hair",
      "slug": "grow_hair",
      "type": "USE_CASE"
    },
    {
      "id": "2a3116c6-e07f-4ba4-9e0d-4ab51734b7b8",
      "name": "Gut Health",
      "slug": "gut_health",
      "type": "USE_CASE"
    },
    {
      "id": "e682e733-b99b-485f-8469-60728e3054a0",
      "name": "Heart",
      "slug": "heart",
      "type": "USE_CASE"
    },
    {
      "id": "5351453d-d4a5-4208-8245-1d9b79bf16ee",
      "name": "Home",
      "slug": "home",
      "type": "TOOL"
    },
    {
      "id": "01132c90-0ad4-4ec4-8b20-b45f493168c7",
      "name": "Hormones",
      "slug": "hormones",
      "type": "USE_CASE"
    },
    {
      "id": "91dbc2a7-4d57-45f6-a4ec-b1870ac394e5",
      "name": "Immunity",
      "slug": "immunity",
      "type": "USE_CASE"
    },
    {
      "id": "c37487a4-7526-4893-8dda-9133dcb942f2",
      "name": "Lifestyle",
      "slug": "lifestyle",
      "type": "TOOL"
    },
    {
      "id": "7739b285-71fa-4b8a-ac77-01ad548aeea0",
      "name": "Lose Weight",
      "slug": "lose_weight",
      "type": "USE_CASE"
    },
    {
      "id": "fa7101b4-95db-44b1-a5f9-d24055690d85",
      "name": "Medical",
      "slug": "medical",
      "type": "TOOL"
    },
    {
      "id": "d993ecbf-978f-4389-add4-f7c9549a3f73",
      "name": "Menopause",
      "slug": "menopause",
      "type": "USE_CASE"
    }
  ],
  "nextCursor": "d993ecbf-978f-4389-add4-f7c9549a3f73",
  "hasMore": true
}