You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "EuphoriaCelestial (via GitHub)" <gi...@apache.org> on 2025/10/22 17:07:41 UTC

[D] Unable to get dashboard info when using API [superset]

GitHub user EuphoriaCelestial created a discussion: Unable to get dashboard info when using API

### Bug description

The bug is I can not get any information on dashboards using API, I tried to use endpoint `/api/v1/dashboard `to get list of all dashboard, and `/api/v1/dashboard/{id}` to get detail of a dashboard
I logged in using Superset admin credential, I also double check ab_user_role table to make sure it has Admin role, I used the access_token in authorization header in every request after login
The list all dashboard returned:
```
    "count": 0,
    "description_columns": {},
    "ids": [],
```
meanwhile, there are over 200 dashboards in database. The UI still be able to show all of them, but API return 0

The `/api/v1/dashboard/{id}` endpoint return 404, as the dashboard I am requesting does not exist

### Screenshots/recordings

_No response_

### Superset version

master / latest-dev

### Python version

3.9

### Node version

16

### Browser

Chrome

### Additional context

_No response_

### Checklist

- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

GitHub link: https://github.com/apache/superset/discussions/35802

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Unable to get dashboard info when using API [superset]

Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
GitHub user sadpandajoe added a comment to the discussion: Unable to get dashboard info when using API

Seems like there may be issues with your request. @dosubot point us to how to generate a request for the dashboard api with examples.

GitHub link: https://github.com/apache/superset/discussions/35802#discussioncomment-14753557

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Unable to get dashboard info when using API [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Unable to get dashboard info when using API

<!-- Answer -->
To generate requests for the Superset dashboard API:

- To list dashboards, send a GET request to `/api/v1/dashboard/` with your access token in the Authorization header. Example:

```bash
curl -X GET 'http://<superset_host>/api/v1/dashboard/' \
  -H 'Authorization: Bearer <access_token>'
```

- To get details for a specific dashboard, use its numeric ID or slug:

```bash
curl -X GET 'http://<superset_host>/api/v1/dashboard/<id_or_slug>' \
  -H 'Authorization: Bearer <access_token>'
```

- You can filter, sort, or paginate results using the `q` query parameter with a JSON-encoded value. For example, to filter dashboards whose title starts with "Sales":

```bash
curl -G 'http://<superset_host>/api/v1/dashboard/' \
  --data-urlencode 'q={"filters":[{"col":"dashboard_title","opr":"sw","value":"Sales"}]}' \
  -H 'Authorization: Bearer <access_token>'
```

- The API only returns dashboards the authenticated user has access to. If a dashboard is missing or you get a 404, it may be due to permissions or the dashboard not existing. The UI and API may use different permission checks, so ensure the token has the right access.

- For more endpoints (like getting charts or datasets for a dashboard), see `/api/v1/dashboard/<id_or_slug>/charts` and `/api/v1/dashboard/<id_or_slug>/datasets` [cite](https://github.com/apache/superset/blob/master/tests/integration_tests/dashboards/api_tests.py).

- All requests must include the `Authorization: Bearer <access_token>` header [cite](https://github.com/apache/superset/blob/master/superset/dashboards/api.py).

If you need to use filters, ordering, or pagination, encode them as JSON in the `q` parameter. The API supports a wide range of filters (title, slug, tags, favorites, created by, certification, etc.) [cite](https://github.com/apache/superset/blob/master/tests/integration_tests/dashboards/api_tests.py).

Let me know if you need more specific examples!


<!-- 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/1e0ec559-5f19-4fb9-9cd4-f904f26b022f?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/1e0ec559-5f19-4fb9-9cd4-f904f26b022f?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/1e0ec559-5f19-4fb9-9cd4-f904f26b022f?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/1e0ec559-5f19-4fb9-9cd4-f904f26b022f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/1e0ec559-5f19-4fb9-9cd4-f904f26b022f?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/1e0ec559-5f19-4fb9-9cd4-f904f26b022f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/1e0ec559-5f19-4fb9-9cd4-f904f26b022f?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
 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/issues/35714)

GitHub link: https://github.com/apache/superset/discussions/35802#discussioncomment-14753558

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Unable to get dashboard info when using API [superset]

Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
GitHub user sadpandajoe added a comment to the discussion: Unable to get dashboard info when using API

@EuphoriaCelestial do other get api calls work or is it the same as the dashboard get api response? 


GitHub link: https://github.com/apache/superset/discussions/35802#discussioncomment-14753559

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org