Dataset Switching
Hi,
Does DOMO offer API to embed Dashboard? Is there any API like below?
https://api.domo.com/v1/dashboards/{dashboardId}/embed
I could not find any details about this API in documentation. So, if this API exists can you please share the URL of Documentation?
GPT suggested below code to switch dataset and load Dashboard with Dataset Switching. Can you please confirm if this is possible?
public async Task<string> GetEmbedUrl(string accessToken, string dashboardId, string datasetId)
{
using var httpClient = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"https://api.domo.com/v1/dashboards/{dashboardId}/embed"); request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", accessToken);
var payload = new { datasetId = datasetId }; // Pass dynamic dataset ID
request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(payload), Encoding.UTF8, "application/json");
var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
var json = Newtonsoft.Json.Linq.JObject.Parse(result);
return json["url"].ToString(); // Embedded URL }
Comments
-
Domo supports embedding dashboards, but it is done through Publish Dashboard or Domo Everywhere. (I'm not familiar with any API endpoint.)
The Domo API does not provide functionality to dynamically switch datasets within an embedded dashboard. Dashboard views in Domo are tied to specific datasets as defined during dashboard creation.
No, the code you show does not work with Domo's API. There's no POST endpoint.
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 101 SQL DataFlows
- 622 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 746 Beast Mode
- 58 App Studio
- 41 Variables
- 686 Automate
- 176 Apps
- 453 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 395 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 6 Software Integrations
- 125 Manage
- 122 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive