Exago .NET API Documentation
Api Class
Members  Example 
WebReports.Api Namespace : Api Class

The Api class is the main interaction class between Exago BI and the host application. All API session parameters are accessed through this class.

An Api object should be the first thing that is created to interact with Exago BI.

Object Model
Api ClassDataSourceCollection ClassEntityCollection ClassGeneral ClassJoinCollection ClassParameterCollection ClassReportMgmtBase ClassReportObjectFactory ClassReportScheduler ClassRoleCollection ClassSetupData Class
Syntax
public class Api 
Example
Example of how an Api object could be used for creating a user session
using WebReports.Api;
using WebReports.Api.Reports;

public class Example
{
    string appPath = "http://localhost/exago/";
    string configFn = "WebReports.xml";
    string homePage = "ExagoHome";
    string userId = "Alex";
    string companyId = "Exago";
    string roleId = "restricted";
    string reportName = "Example Reports\\Client Report";

    public static void Main()
    {
        // Instantiate the Api object
        Api api = new Api(appPath, configFn)
        {
            ShowTabs = false,
            Action = wrApiAction.ExecuteReport,
        };

        // Set userId and companyId parameters
        api.Parameters.Add("userId", userId);
        api.Parameters.Add("companyId", companyId);

        // Activate a role
        api.Roles.GetRole(roleId).Activate();

        // Load a report for execution
        Report report = (Report)api.ReportObjectFactory.LoadFromRepository(reportName);
        api.ReportObjectFactory.SaveToApi(report);

        // Get the paramString; this should be the last call made to the Api object
        string paramString = api.GetUrlParamString(homePage);
        
        // Redirect the browser
        Frame.Redirect(appPath + paramString);
    }
}
Inheritance Hierarchy

System.Object
   WebReports.Api.Api

See Also

Reference

Api Members
WebReports.Api Namespace