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/17 10:16:09 UTC

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

EuphoriaCelestial opened a new issue, #35714:
URL: https://github.com/apache/superset/issues/35714

   ### 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
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [ ] 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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


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

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #35714:
URL: https://github.com/apache/superset/issues/35714#issuecomment-3428013348

   <!-- 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=githu
 b)&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)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


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

Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe commented on issue #35714:
URL: https://github.com/apache/superset/issues/35714#issuecomment-3427946591

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


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

Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe commented on issue #35714:
URL: https://github.com/apache/superset/issues/35714#issuecomment-3433365188

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


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

Posted by "konuch (via GitHub)" <gi...@apache.org>.
konuch commented on issue #35714:
URL: https://github.com/apache/superset/issues/35714#issuecomment-3431637610

   @dosu It seems that without providing session cookie of the authenticated user to request the that returns empty, eg ```"count": 0,
       "description_columns": {},
       "ids": [],```.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


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

Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe closed issue #35714: Unable to get dashboard info when using API
URL: https://github.com/apache/superset/issues/35714


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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