Tableau通过REST API上传数据源后无法在列表中查看的问题
Let's break down why your Blobcsv.csv datasource isn't showing up in your REST API results, even though you've uploaded it to the new-project-by-mayank project:
1. First, Verify the Datasource Actually Exists & Is Accessible
Before diving into API issues, confirm the basics:
- Log into your Tableau Server/Web UI, navigate directly to the
new-project-by-mayankproject, and check ifBlobcsv.csvis listed there with a "Success" status (not pending/processing). If it's still processing, Tableau might not expose it via API yet—wait a few minutes and try again. - Make sure your API user account has the necessary permissions to view this datasource. If you're not using a site admin account, check the project's permission settings to ensure your role has "View" or higher access to datasources.
2. Your API Request Might Be Missing Project Filtering
By default, the GET /api/<version>/sites/<site-id>/datasources endpoint only returns datasources in the site root project unless you specify a project filter. Since your datasource lives in a sub-project, you need to narrow down the query:
- Option 1: Filter by project name (works in Tableau Server 2021.1+):
Add this query parameter to your request:?filter=projectName:eq:new-project-by-mayank - Option 2: Filter by project ID (more reliable for all versions):
First, fetch the project ID with this request:
Then use the returnedGET /api/<version>/sites/<site-id>/projects?filter=name:eq:new-project-by-mayankidvalue to filter your datasource query:GET /api/<version>/sites/<site-id>/datasources?projectId=<your-project-id>
3. Check Your API Version Compatibility
Older Tableau API versions might have limited filtering capabilities. Ensure you're using an API version matching your Tableau Server/Online version. For example, project name filtering wasn't available before 2021.1, so you'd need to use the project ID method if you're on an older version.
4. Confirm the Datasource Is Not Embedded in a Workbook
If you uploaded the datasource as part of a workbook (instead of as a standalone datasource), it won't appear in the site-wide datasource list. Double-check in the Web UI: standalone datasources are listed under the "Datasources" tab of the project, while embedded ones are tied directly to the workbook.
If you still don't see it after these steps, try checking the API response for any error messages or warnings—sometimes subtle issues like typos in project names or expired auth tokens can cause unexpected results.
内容的提问来源于stack exchange,提问作者Mayank Patel

