public System.string GetApiKey()
Return Value
The Api Key portion of the URL for use with the JavaScript Api
Returns the Api Key for use with the JavaScript API. This method is used instead of the GetUrlParamString Method for returning the session identifier to the client when embedding Exago BI components into divs instead of iframes.
See JavaScript API for more information.
public System.string GetApiKey()
Exception | Description |
---|---|
ApiReportOptions is only valid for NewAdvancedReport or NewExpressView | Preloading report SQL is only possible when the ApiAction is to create a new Advanced Report or ExpressView. |
using WebReports.Api; public class Example { string appPath = "http://localhost/exago/"; string configFn = "WebReports.xml"; string reportName = "Example Reports\\Client Report"; public static void Main() { // Instantiate the Api object Api api = new Api(appPath, configFn); // Load a report for execution api.ReportObjectFactory.SaveToApi(api.ReportObjectFactory.LoadFromRepository(reportName)); // Get the ApiKey for loading the JavaScript Api object string apiKey = api.GetApiKey(); // Send the ApiKey to the client web page /* implementations will vary */ } }