- Example AspNetCore server demonstrating private embed for dashboards with programmatic filtering
- Download the source code.
- Open up the solution file in Visual Studio named ProgrammaticFiltering.sln.
- Edit the ProgrammaticFilteringService.cs file and replace the following items:
- CLIENT_ID with your client id
- CLIENT_SECRET with your client secret
- EMBED_ID with the embedded id of your dashboard e.g. "ej73t"
- Modify the filter each user receives by replacing [] with any filtering you want to do such as "[{"column": "Region", "operator": "IN", "values": ["West"]}]".
The complete list of available operators for use in filters are as follows: "IN", "NOT_IN", "EQUALS", "NOT_EQUALS", "GREATER_THAN", "GREAT_THAN_EQUALS_TO", "LESS_THAN", "LESS_THAN_EQUALS_TO".
Specify different filters for each user to see the ability of programmatic filtering in action.
- Start the IIS Express server in Visual Studio and go to the page that loads in your browser.
- The possible logins are [email protected], [email protected], and [email protected]. The password for all the users is "test".
The EMBED_ID represents the public or private identifier for the dashboard. The CLIENT_ID and CLIENT_SECRET is used to create the access token which will be used to then create an embed token for use with the private embed. For more information about creating the CLIENT_ID and CLIENT_SECRET see https://developer.domo.com/docs/authentication/overview-4.