Insight API
Public Member Functions | List of all members
InsightApi Class Reference

Insight API More...

Inherits IInsightApi.

Public Member Functions

bool IsMultiTenantMode ()
 Determines that Insight is installed in multi-tenant mode. More...
 
Guid Login (string login, string password, string tenantId=null, EApplicationType applicationType=EApplicationType.Admin)
 Checks user credentials and creates a new session if the credentials are valid. More...
 
Guid LoginEx (Dictionary< string, List< string >> parameters, string tenantId=null, EApplicationType applicationType=EApplicationType.Admin)
 Checks login parameters and creates a new session if the parameters are valid. More...
 
TenantInfo [] GetTenants (Guid sessionId)
 Returns a list of tenants. More...
 
void Logout (Guid sessionId)
 Logout using Insight session id. More...
 
void LogoutByUserProperties (Dictionary< string, string > userProperties, string tenantId=null)
 Logout using user properties. This method can be used to log out from external application using any user property, such as external session id. The user property name should match Insight user filter name. Only user filters with enabled "Logout property" option can be used for user logout. For details, see Admin help. More...
 
void SwitchMode (Guid sessionId, bool edit, string tenantId=null)
 Switch mode between edit and view. More...
 
void UpdateConnection (Guid sessionId, Guid projectId, Guid connectionId, string connectionName, ConnInfo[] connections, string tenantId=null)
 Update connection settings for any project data source or global connection. More...
 
TenantInfo CreateUpdateTenant (Guid sessionId, string tenantId, bool update=false, string customerName=null, string dataFolder=null, string password=null, string databaseTypeName=null, string connectionString=null, string additionalString=null, string databaseServerName="Default")
 Creates a new tenant or updates the existing one. More...
 
void ActivateTenant (Guid sessionId, string tenantId)
 Activates tenant. More...
 
void DeactivateTenant (Guid sessionId, string tenantId)
 Deactivates tenant. More...
 
string CreateUpdateProject (Guid sessionId, string projectName, string tenantId=null, bool updateExisting=false, string metaDatabaseTypeName=null, string metaConnectionString=null, string metaAdditionalString=null, string dataDatabaseTypeName=null, string dataConnectionString=null, string dataAdditionalString=null, string databaseServerName="Default")
 Creates a new project or updates the existing one. More...
 
TenantUpdateResult [] UpdateTenantsAndProjects (Guid sessionId, string[] tenantIds, string[] projectNames=null)
 Updates the selected tenant's administrator databases and projects to the latest Insight version. More...
 
TenantUpdateResult [] ImportAdminSettingsAndProject (Guid sessionId, string[] tenantIds=null, string[] projectNames=null, byte[] data=null, bool updateVersion=false, bool importData=true, bool overwrite=true, string metaDatabaseTypeName=null, string metaConnectionString=null, string metaAdditionalString=null, string dataDatabaseTypeName=null, string dataConnectionString=null, string dataAdditionalString=null, string databaseServerName="Default", bool runPublishAfterImport=true)
 Imports administration settings, or a project, or both of them (bundle). More...
 
ProjectDescription [] GetProjectsDescriptions (Guid sessionId, string tenantId=null)
 Returns a list of projects. More...
 
ProjectDef GetProjectDefinition (Guid sessionId, Guid projectId, string tenantId=null)
 Returns a project definition for the specified project ID. More...
 
string GetProjectsTreeXml (Guid sessionId, Guid projectId, string viewerUri, bool includeCharts, string tenantId=null)
 Returns an XML with a project tree. More...
 
void RunDataLoad (Guid sessionId, Guid projectId, string planName, DateTime from, DateTime to, bool saveHistoryDate, bool useHistoryDate, string tenantId=null)
 Runs data load for the specified execution plan. More...
 
Guid AsyncRunDataLoad (Guid sessionId, Guid projectId, string planName, DateTime from, DateTime to, bool saveHistoryDate, bool useHistoryDate, string tenantId=null)
 Runs async data load for the specified execution plan. More...
 
DataLoadInformation CheckDataLoad (Guid sessionId, Guid projectId, Guid dataLoadId, string tenantId=null)
 Returns a status of running data load More...
 
void CancelDataLoad (Guid sessionId, Guid projectId, Guid dataLoadId, string tenantId=null)
 Cancel selected data load More...
 
void StopProcessingTasks (Guid sessionId, Guid? projectId, string tenantId=null)
 Stop processing for all task. If the project identifier is not specified, then for all projects, if it is specified only for the selected More...
 
void StartProcessingTasks (Guid sessionId, Guid? projectId, string tenantId=null)
 Start processing for all task. If the project identifier is not specified, then for all projects, if it is specified only for the selected More...
 
ExecPlan [] GetExecutionPlans (Guid sessionId, Guid projectId, string tenantId=null)
 Get all execution plan for selected project More...
 
void SaveSchedulingForPlan (Guid sessionId, Guid projectId, ExecPlan plan, string tenantId=null)
 Save execution plan More...
 

Detailed Description

Insight API

Member Function Documentation

◆ ActivateTenant()

void ActivateTenant ( Guid  sessionId,
string  tenantId 
)

Activates tenant.

Only multi-tenant administrator has the right to execute this method.

Parameters
sessionIdInsight session id.
tenantIdTenant ID (required). If the tenant with the same ID does not exist, an exception occurs.

◆ AsyncRunDataLoad()

Guid AsyncRunDataLoad ( Guid  sessionId,
Guid  projectId,
string  planName,
DateTime  from,
DateTime  to,
bool  saveHistoryDate,
bool  useHistoryDate,
string  tenantId = null 
)
inline

Runs async data load for the specified execution plan.

Parameters
sessionIdInsight session id.
projectIdProject ID.
planNameName of an execution plan.
fromStart date.
toEnd date.
saveHistoryDateSaves "To" date as history date.
useHistoryDateUses history date as "From" date.
tenantIdTenant ID.
Returns
Data load identifier

◆ CancelDataLoad()

void CancelDataLoad ( Guid  sessionId,
Guid  projectId,
Guid  dataLoadId,
string  tenantId = null 
)
inline

Cancel selected data load

Parameters
sessionIdInsight session id.
projectIdProject ID.
dataLoadIdData load identifier
tenantIdTenant ID.

◆ CheckDataLoad()

DataLoadInformation CheckDataLoad ( Guid  sessionId,
Guid  projectId,
Guid  dataLoadId,
string  tenantId = null 
)
inline

Returns a status of running data load

Parameters
sessionIdInsight session id.
projectIdProject ID.
dataLoadIdData load identifier
tenantIdTenant ID.
Returns
Type: DataLoadInformation Information about data load

◆ CreateUpdateProject()

string CreateUpdateProject ( Guid  sessionId,
string  projectName,
string  tenantId = null,
bool  updateExisting = false,
string  metaDatabaseTypeName = null,
string  metaConnectionString = null,
string  metaAdditionalString = null,
string  dataDatabaseTypeName = null,
string  dataConnectionString = null,
string  dataAdditionalString = null,
string  databaseServerName = "Default" 
)
inline

Creates a new project or updates the existing one.

This method can be executed by the following users: Multi-tenant administrator, tenant user logged in to the Admin Console, or the user logged in to the Admin Console in single-tenant mode.

Parameters
sessionIdInsight session id.
projectNameProject name (required).
tenantIdTenant ID. Required for Multi-tenant mode. Ignored in single-tenant mode.
updateExistingUpdate the existing project (optional, the value is set to false by default). If the value is false and a project with the same name already exists, an error occurs.
metaDatabaseTypeNameMeta Database Type Name ("MS SQL Server", "MySql 5", "Oracle").
metaConnectionStringMeta Database connection string (optional). If the value is not defined, the database server is used in multi-tenant mode. In single-tenant mode, an error occurs.
metaAdditionalStringAdditional string for Meta database connection (optional).
dataDatabaseTypeNameData Database Type Name ("MS SQL Server", "MySql 5", "Oracle").
dataConnectionStringData database connection string (optional). If the value is not defined, the database server is used in multi-tenant mode. In single-tenant mode, an error occurs.
dataAdditionalStringAdditional string for Data database connection (optional).
databaseServerNameDatabase server name (optional). If Meta and/or Data connection is not defined and the project with the selected name does not exist, this database server is used in multi-tenant mode to create new project databases (if possible).
Returns

◆ CreateUpdateTenant()

TenantInfo CreateUpdateTenant ( Guid  sessionId,
string  tenantId,
bool  update = false,
string  customerName = null,
string  dataFolder = null,
string  password = null,
string  databaseTypeName = null,
string  connectionString = null,
string  additionalString = null,
string  databaseServerName = "Default" 
)
inline

Creates a new tenant or updates the existing one.

Only multi-tenant administrator can execute this method.

Parameters
sessionIdInsight session id.
tenantIdTenant ID (required).
updateUpdate the existing tenant (optional, the value is set to false by default). If the value is false and a tenant with the same name already exists, an error occurs. If the value is true and a tenant with the same ID already exists, it is updated.
customerNameCustomer name (optional).
dataFolderData folder (optional). If the value is empty or not defined, a subfolder with <tenant id> from the Insight root folder is used.
passwordTenant administrator password (optional). Cannot be empty. Password is required for a new tenant. If a tenant is updated and a new password is not defined, then current password is used.
databaseTypeNameDatabase type ("MS SQL Server", "MySql 5", "Oracle").
connectionStringInsight administrator connection (connection string) (optional). If the value is not defined, database server parameters can be used. If the value is not defined and a tenant with the same ID already exists, then current connection is used.
additionalStringAdditional string for Insight administrator connection (optional).
databaseServerNameDatabase server name (optional). Use the selected database server to create a new tenant administrator database (if possible) for a new tenant. If an administrator connection is not defined and a tenant with the selected tenant ID does not exist, the selected database server is used in multi-tenant mode to create new tenant databases (if possible).
Returns

Type: TenantInfo[]

Tenant information, including the administrator database connection string with the password as plain text.

◆ DeactivateTenant()

void DeactivateTenant ( Guid  sessionId,
string  tenantId 
)

Deactivates tenant.

Parameters
sessionIdInsight session id.
tenantIdTenant ID (required). If the tenant with the same ID does not exist, an exception occurs.

◆ GetExecutionPlans()

ExecPlan [] GetExecutionPlans ( Guid  sessionId,
Guid  projectId,
string  tenantId = null 
)
inline

Get all execution plan for selected project

Parameters
sessionIdInsight session id.
projectIdProject ID (optional)
tenantIdTenant ID.
Returns
Type: ExecPlan[] Information about Execution plans

◆ GetProjectDefinition()

ProjectDef GetProjectDefinition ( Guid  sessionId,
Guid  projectId,
string  tenantId = null 
)
inline

Returns a project definition for the specified project ID.

Parameters
sessionIdInsight session id.
projectIdProject ID.
tenantIdTenant ID.
Returns
Type: ProjectDef

◆ GetProjectsDescriptions()

ProjectDescription [] GetProjectsDescriptions ( Guid  sessionId,
string  tenantId = null 
)
inline

Returns a list of projects.

Parameters
sessionIdInsight session id.
tenantIdTenant ID.
Returns

Type: ProjectDescription[]

An array containing project descriptions.

◆ GetProjectsTreeXml()

string GetProjectsTreeXml ( Guid  sessionId,
Guid  projectId,
string  viewerUri,
bool  includeCharts,
string  tenantId = null 
)
inline

Returns an XML with a project tree.

Parameters
sessionIdInsight session id.
projectIdProject ID.
viewerUriBase Viewer URl.
includeChartsA value that indicates whether the charts should be included in the project tree.
tenantIdTenant ID.
Returns

◆ GetTenants()

TenantInfo [] GetTenants ( Guid  sessionId)
inline

Returns a list of tenants.

Parameters
sessionIdInsight session id.
Returns

Type: TenantInfo[]

An array containing a list of tenants.

◆ ImportAdminSettingsAndProject()

TenantUpdateResult [] ImportAdminSettingsAndProject ( Guid  sessionId,
string []  tenantIds = null,
string []  projectNames = null,
byte []  data = null,
bool  updateVersion = false,
bool  importData = true,
bool  overwrite = true,
string  metaDatabaseTypeName = null,
string  metaConnectionString = null,
string  metaAdditionalString = null,
string  dataDatabaseTypeName = null,
string  dataConnectionString = null,
string  dataAdditionalString = null,
string  databaseServerName = "Default",
bool  runPublishAfterImport = true 
)
inline

Imports administration settings, or a project, or both of them (bundle).

This method can be executed by the following users. 1) Multi-tenant Administrator, 2) Tenant user, who logged in to the Admin Console, can execute this method only for the assigned tenants, 3) User, who logged in to the Admin Console, in single-tenant mode.

Parameters
sessionIdInsight session id.
tenantIdsAn array of tenants (administrator database) IDs.
projectNamesDefines a list of projects to be updated for each tenant, The list can be empty.
dataImport data (binary). Administration settings (xml), a project or a bundle (zip). Can be null.
updateVersionUpdates project version (optional, false by default). If the value is true and Administrator and/or project databases use an old Insight version, it is updated automatically. If the value is false and the version is incorrect, the update is skipped.
importDataImport data for a project. The value can be set to True or False.
overwriteOverwrites the existing documents. The value can be set to True or False.
metaDatabaseTypeNameMeta Database Type Name ("MS SQL Server", "MySql 5", "Oracle").
metaConnectionStringMeta Database connection string (optional). If import data is null, then the method only applies these settings.
metaAdditionalStringAdditional string for Meta Database connection (optional).
dataDatabaseTypeNameData Database Type Name ("MS SQL Server", "MySql 5", "Oracle").
dataConnectionStringData Database connection string (optional). If import data is null, then the method only applies these settings.
dataAdditionalStringAdditional string for Data DB connection (optional).
databaseServerNameDatabase server name (optional). If Meta and/or Data connection is not defined and a project with the selected name does not exist, this database server is used in multi-tenant mode to create new project databases (if possible).
runPublishAfterImportRuns the publish operation after import.
Returns

Type: TenantUpdateResult[]

An array containing results of update and import for each project and each tenant administration settings (including all errors and warnings that occurred during updates).

◆ IsMultiTenantMode()

bool IsMultiTenantMode ( )

Determines that Insight is installed in multi-tenant mode.

Returns

◆ Login()

Guid Login ( string  login,
string  password,
string  tenantId = null,
EApplicationType  applicationType = EApplicationType.Admin 
)

Checks user credentials and creates a new session if the credentials are valid.

Parameters
loginThe login to be validated.
passwordThe password for the specified user.
tenantIdTenant ID.
applicationTypeApplication Type.
Returns
Insight session id if user credentials are valid; otherwise, an exception occurs.

◆ LoginEx()

Guid LoginEx ( Dictionary< string, List< string >>  parameters,
string  tenantId = null,
EApplicationType  applicationType = EApplicationType.Admin 
)
inline

Checks login parameters and creates a new session if the parameters are valid.

Parameters
parametersLogin Parameters.
tenantIdTenant ID.
applicationTypeApplication Type.
Returns
Insight session id if user credentials are valid; otherwise, an exception occurs.

◆ Logout()

void Logout ( Guid  sessionId)

Logout using Insight session id.

Parameters
sessionIdInsight session id.

◆ LogoutByUserProperties()

void LogoutByUserProperties ( Dictionary< string, string >  userProperties,
string  tenantId = null 
)

Logout using user properties. This method can be used to log out from external application using any user property, such as external session id. The user property name should match Insight user filter name. Only user filters with enabled "Logout property" option can be used for user logout. For details, see Admin help.

Parameters
userPropertiesList of user properties that can be used for logout.
tenantIdTenant ID (required).

◆ RunDataLoad()

void RunDataLoad ( Guid  sessionId,
Guid  projectId,
string  planName,
DateTime  from,
DateTime  to,
bool  saveHistoryDate,
bool  useHistoryDate,
string  tenantId = null 
)
inline

Runs data load for the specified execution plan.

Parameters
sessionIdInsight session id.
projectIdProject ID.
planNameName of an execution plan.
fromStart date.
toEnd date.
saveHistoryDateSaves "To" date as history date.
useHistoryDateUses history date as "From" date.
tenantIdTenant ID.
Returns

◆ SaveSchedulingForPlan()

void SaveSchedulingForPlan ( Guid  sessionId,
Guid  projectId,
ExecPlan  plan,
string  tenantId = null 
)
inline

Save execution plan

Parameters
sessionIdInsight session id.
projectIdProject ID
planPlan for save
tenantIdTenant ID.

◆ StartProcessingTasks()

void StartProcessingTasks ( Guid  sessionId,
Guid?  projectId,
string  tenantId = null 
)
inline

Start processing for all task. If the project identifier is not specified, then for all projects, if it is specified only for the selected

Parameters
sessionIdInsight session id.
projectIdProject ID (optional)
tenantIdTenant ID.

◆ StopProcessingTasks()

void StopProcessingTasks ( Guid  sessionId,
Guid?  projectId,
string  tenantId = null 
)
inline

Stop processing for all task. If the project identifier is not specified, then for all projects, if it is specified only for the selected

Parameters
sessionIdInsight session id.
projectIdProject ID (optional)
tenantIdTenant ID.

◆ SwitchMode()

void SwitchMode ( Guid  sessionId,
bool  edit,
string  tenantId = null 
)

Switch mode between edit and view.

This method can be executed by the following users: Multi-tenant administrator, tenant logged in to the Admin Console, or the user logged in to the Admin Console in single-tenant mode.

Parameters
sessionIdInsight session id.
editTrue for turn on edit mode and false for turn on view mode
tenantIdTenant ID (required).

◆ UpdateConnection()

void UpdateConnection ( Guid  sessionId,
Guid  projectId,
Guid  connectionId,
string  connectionName,
ConnInfo []  connections,
string  tenantId = null 
)
inline

Update connection settings for any project data source or global connection.

Parameters
sessionIdInsight session id.
projectIdProject ID. If empty, then global connection will be updated
connectionIdData source or connection ID. Can be empty, in this case connectionName is used
connectionNameData source or connection name by which search object for update connection (if connectionId empty or document with ID is not found)
connectionsList of connection to be updated. Add multiple values to use multiple connections
tenantIdTenant ID (required).

◆ UpdateTenantsAndProjects()

TenantUpdateResult [] UpdateTenantsAndProjects ( Guid  sessionId,
string []  tenantIds,
string []  projectNames = null 
)
inline

Updates the selected tenant's administrator databases and projects to the latest Insight version.

This method can be executed by the following users: Multi-tenant administrator, tenant logged in to the Admin Console, or the user logged in to the Admin Console in single-tenant mode.

Parameters
sessionIdInsight session id.
tenantIdsAn array of tenants (administrator database) should be updated.
projectNamesDefines a list of projects to be updated for each tenant. The list can be empty.
Returns

Type: TenantUpdateResult[]

An array containing results of updates for each project and for each tenant (including errors and warnings that occurred during updates).


The documentation for this class was generated from the following file: