Basic embedded dashboard JavaScript parameters and examples
This section explains the dashboard URL parameters with examples.
Using the JavaScript API
You can use a single JavaScript URL to load a report or dashboard on your HTML page. You can also customize the report or dashboard to display and load content on demand from other scripts.
On your HTML page, include a script tag that points to your Remedy Smart Reporting server. Include the report or dashboard identifier as a parameter in the URL, for example:
<!-- report example -->
<script type="text/javascript" src="http://reporting.example.com/JsAPI?reportUUID=e5e5aaf3-c3b8-4f9b-8280-e21e4d848e63"></script>
<!-- dashboard example -->
<script type="text/javascript" src="http://reporting.example.com/JsAPI?dashUUID=3b0b6c9a-9dfb-41f0-b85a-eb17bb8aeeb9"></script>
The URL to the API is based on the URL used to access the Remedy Smart Reporting front end. For example, if you access Remedy Smart Reporting through http://reporting.example.com:8080/, the JavaScript API URL is http://reporting.example.com:8080/JsAPI. The URL is accessible from anywhere (internal network, external, VPN, and so on).
Dashboard URL parameters
The dashUUID
parameter identifies a dashboard. You can add other parameters, which can affect the way the dashboard is displayed. The available parameters are:
Parameter | Description |
---|---|
| (Required) The unique ID identifying the dashboard to load. |
| The API version to use. If the server does not support the requested version, an error message is displayed. If the |
| The ID of the html element in which to load the dashboard. If this parameter is not included, a container element is created when the script tag is included. |
| Displays the title bar at the top of the dashboard. The default is |
| Displays the Info button in the title bar. The default is |
| Displays the Filters button in the title bar. The default is |
| Displays the Export button in the title bar. The default is |
| Overrides the dashboard height. Enter a numeric value. If this parameter is not specified, the dashboard height is set large enough to show all reports without scrolling. |
| Overrides the dashboard width. Enter a numeric value. To expand the dashboard to fill the parent element, set this parameter to If this parameter is not specified, the dashboard width is set based on the preference setting of the logged-in user, or the system configuration setting. |
| (Required) The Remedy Smart Reporting user name to authenticate when loading the dashboard. Set this parameter with the Setting this parameter avoids the need for users to enter their login details before viewing restricted dashboards. |
| (Required) The password of the user in Remedy Smart Reporting. Set this parameter with the |
| A web service token to authenticate a user when loading the dashboard. |
| The name of the client org. |
Examples
The following example includes a dashboard, and sets the dimensions of the dashboard:
<script src="http://localhost/JsAPI?dashUUID=3b0b6c9a-9dfb-41f0-b85a-eb17bb8aeeb9&width=auto&height=500&username=<reportingUser>.com.au&password=test&clientOrg=bmc" type="text/javascript"></script>
The following example uses an existing element in which to display the dashboard:
<div id="myDashDiv" style="background: blue; width: 900px; height: 500px">
<script src="http://localhost/JsAPI?dashUUID=3b0b6c9a-9dfb-41f0-b85a-eb17bb8aeeb9&elementId=myDashDiv&username=<reportingUser>.au&password=test&clientOrg=bmc"type="text/javascript"></script>
</div>
The following example uses an existing element in which to display the dashboard, overrides the dashboard dimensions, and changes some of the initial display options:
<div id="myDashDiv" style="background: blue; width: 900px; height: 500px">
<script src="http://localhost/JsAPI?dashUUID=3b0b6c9a-9dfb-41f0-b85a-eb17bb8aeeb9&elementId=myDashDiv&width=800&height=400&showFilters=false&username=<reportingUser>.com.au&password=test&clientOrg=bmc"type="text/javascript"></script>
</div>
Comments
Log in or register to comment.