GitHub user dosubot[bot] added a comment to the discussion: Is there any 
possibility to filter datasets via tags (or some parameter) using API ?

<!-- Answer -->
You can tag a dataset via the API, but the payload must be formatted as:

```json
{
  "properties": {
    "tags": ["your-tag-name"]
  }
}
```

and the endpoint should be:

```
POST /api/v1/tag/4/{dataset_id}/
```

If you send just the tag name or use the wrong structure, the API will create 
the tag but not associate it with the dataset. The backend supports this, but 
the frontend and some API clients do not expose dataset tagging, so you must 
use a direct API call with the correct payload. There are no recent changes or 
fixes for this in the codebase, and this is a known limitation in the UI for 
datasets. More details and examples are available in the backend implementation 
and related discussionsĀ 
([source](https://github.com/apache/superset/blob/master/superset/tags/api.py), 
[discussion](https://github.com/apache/superset/issues/34688)).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/2c5cdcbc-62fa-407b-9371-08f93d0d3371?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/2c5cdcbc-62fa-407b-9371-08f93d0d3371?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/2c5cdcbc-62fa-407b-9371-08f93d0d3371?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/2c5cdcbc-62fa-407b-9371-08f93d0d3371?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/2c5cdcbc-62fa-407b-9371-08f93d0d3371?feedback_type=hallucination)
 | [Report 
šŸ›](https://app.dosu.dev/response-feedback/2c5cdcbc-62fa-407b-9371-08f93d0d3371?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/2c5cdcbc-62fa-407b-9371-08f93d0d3371?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=You%20can%20tag%20a%20dataset%20via%20the%20API%2C%20but%20the%20payload%20must%20be%20formatted%20as%3A%0A%0A%60%60%60json%0A%7B%0A%20%20%22properties%22%3A%20%7B%0A%20%20%20%20%22tags%22%3A%20%5B%22your-tag-name%22%5D%0A%20%20%7D%0A%7D%0A%60%60%60%0A%0Aand%20the%20endpoint%20should%20be%3A%0A%0A%60%60%60%0APOST%20/api/v1/tag/4/%7Bdataset_id%7D/%0A%60%60%60%0A%0AIf%20you%20send%20just%20the%20tag%20name%20or%20use%20the%20wrong%20structure%2C%20the%20API%20will%20create%20the%20tag%20but%20not%20associate%20it%20with%20the%20dataset.%20The%20backend%20supports%20this%2C%20but%20the%20frontend%20and%20some%20API%20clients%20do%20not%20expose%20dataset%20tagging%2C%20so%20you%20must%20use%20a%20direct%20API%20call%20with%20the%20correct%20payload.%20Th
 
ere%20are%20no%20recent%20changes%20or%20fixes%20for%20this%20in%20the%20codebase%2C%20and%20this%20is%20a%20known%20limitation%20in%20the%20UI%20for%20datasets.%20More%20details%20and%20examples%20are%20available%20in%20the%20backend%20implementation%20and%20related%20discussions%C2%A0%28%5Bsource%5D%28https%3A//github.com/apache/superset/blob/master/superset/tags/api.py%29%2C%20%5Bdiscussion%5D%28https%3A//github.com/apache/superset/issues/34688%29%29.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/37137)

GitHub link: 
https://github.com/apache/superset/discussions/37137#discussioncomment-15499369

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to