Insight API
|
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... | |
Insight API
void ActivateTenant | ( | Guid | sessionId, |
string | tenantId | ||
) |
Activates tenant.
Only multi-tenant administrator has the right to execute this method.
sessionId | Insight session id. |
tenantId | Tenant ID (required). If the tenant with the same ID does not exist, an exception occurs. |
|
inline |
Runs async data load for the specified execution plan.
sessionId | Insight session id. |
projectId | Project ID. |
planName | Name of an execution plan. |
from | Start date. |
to | End date. |
saveHistoryDate | Saves "To" date as history date. |
useHistoryDate | Uses history date as "From" date. |
tenantId | Tenant ID. |
|
inline |
Cancel selected data load
sessionId | Insight session id. |
projectId | Project ID. |
dataLoadId | Data load identifier |
tenantId | Tenant ID. |
|
inline |
Returns a status of running data load
sessionId | Insight session id. |
projectId | Project ID. |
dataLoadId | Data load identifier |
tenantId | Tenant ID. |
|
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.
sessionId | Insight session id. |
projectName | Project name (required). |
tenantId | Tenant ID. Required for Multi-tenant mode. Ignored in single-tenant mode. |
updateExisting | Update 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. |
metaDatabaseTypeName | Meta Database Type Name ("MS SQL Server", "MySql 5", "Oracle"). |
metaConnectionString | Meta 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. |
metaAdditionalString | Additional string for Meta database connection (optional). |
dataDatabaseTypeName | Data Database Type Name ("MS SQL Server", "MySql 5", "Oracle"). |
dataConnectionString | Data 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. |
dataAdditionalString | Additional string for Data database connection (optional). |
databaseServerName | Database 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). |
|
inline |
Creates a new tenant or updates the existing one.
Only multi-tenant administrator can execute this method.
sessionId | Insight session id. |
tenantId | Tenant ID (required). |
update | Update 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. |
customerName | Customer name (optional). |
dataFolder | Data folder (optional). If the value is empty or not defined, a subfolder with <tenant id> from the Insight root folder is used. |
password | Tenant 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. |
databaseTypeName | Database type ("MS SQL Server", "MySql 5", "Oracle"). |
connectionString | Insight 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. |
additionalString | Additional string for Insight administrator connection (optional). |
databaseServerName | Database 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). |
Type: TenantInfo[]
Tenant information, including the administrator database connection string with the password as plain text.
void DeactivateTenant | ( | Guid | sessionId, |
string | tenantId | ||
) |
Deactivates tenant.
sessionId | Insight session id. |
tenantId | Tenant ID (required). If the tenant with the same ID does not exist, an exception occurs. |
|
inline |
Get all execution plan for selected project
sessionId | Insight session id. |
projectId | Project ID (optional) |
tenantId | Tenant ID. |
|
inline |
Returns a project definition for the specified project ID.
sessionId | Insight session id. |
projectId | Project ID. |
tenantId | Tenant ID. |
|
inline |
Returns a list of projects.
sessionId | Insight session id. |
tenantId | Tenant ID. |
Type: ProjectDescription[]
An array containing project descriptions.
|
inline |
Returns an XML with a project tree.
sessionId | Insight session id. |
projectId | Project ID. |
viewerUri | Base Viewer URl. |
includeCharts | A value that indicates whether the charts should be included in the project tree. |
tenantId | Tenant ID. |
|
inline |
Returns a list of tenants.
sessionId | Insight session id. |
Type: TenantInfo[]
An array containing a list of tenants.
|
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.
sessionId | Insight session id. |
tenantIds | An array of tenants (administrator database) IDs. |
projectNames | Defines a list of projects to be updated for each tenant, The list can be empty. |
data | Import data (binary). Administration settings (xml), a project or a bundle (zip). Can be null. |
updateVersion | Updates 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. |
importData | Import data for a project. The value can be set to True or False. |
overwrite | Overwrites the existing documents. The value can be set to True or False. |
metaDatabaseTypeName | Meta Database Type Name ("MS SQL Server", "MySql 5", "Oracle"). |
metaConnectionString | Meta Database connection string (optional). If import data is null, then the method only applies these settings. |
metaAdditionalString | Additional string for Meta Database connection (optional). |
dataDatabaseTypeName | Data Database Type Name ("MS SQL Server", "MySql 5", "Oracle"). |
dataConnectionString | Data Database connection string (optional). If import data is null, then the method only applies these settings. |
dataAdditionalString | Additional string for Data DB connection (optional). |
databaseServerName | Database 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). |
runPublishAfterImport | Runs the publish operation after import. |
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).
bool IsMultiTenantMode | ( | ) |
Determines that Insight is installed in multi-tenant mode.
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.
login | The login to be validated. |
password | The password for the specified user. |
tenantId | Tenant ID. |
applicationType | Application Type. |
|
inline |
Checks login parameters and creates a new session if the parameters are valid.
parameters | Login Parameters. |
tenantId | Tenant ID. |
applicationType | Application Type. |
void Logout | ( | Guid | sessionId | ) |
Logout using Insight session id.
sessionId | Insight session id. |
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.
userProperties | List of user properties that can be used for logout. |
tenantId | Tenant ID (required). |
|
inline |
Runs data load for the specified execution plan.
sessionId | Insight session id. |
projectId | Project ID. |
planName | Name of an execution plan. |
from | Start date. |
to | End date. |
saveHistoryDate | Saves "To" date as history date. |
useHistoryDate | Uses history date as "From" date. |
tenantId | Tenant ID. |
|
inline |
Save execution plan
sessionId | Insight session id. |
projectId | Project ID |
plan | Plan for save |
tenantId | Tenant ID. |
|
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
sessionId | Insight session id. |
projectId | Project ID (optional) |
tenantId | Tenant ID. |
|
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
sessionId | Insight session id. |
projectId | Project ID (optional) |
tenantId | Tenant ID. |
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.
sessionId | Insight session id. |
edit | True for turn on edit mode and false for turn on view mode |
tenantId | Tenant ID (required). |
|
inline |
Update connection settings for any project data source or global connection.
sessionId | Insight session id. |
projectId | Project ID. If empty, then global connection will be updated |
connectionId | Data source or connection ID. Can be empty, in this case connectionName is used |
connectionName | Data source or connection name by which search object for update connection (if connectionId empty or document with ID is not found) |
connections | List of connection to be updated. Add multiple values to use multiple connections |
tenantId | Tenant ID (required). |
|
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.
sessionId | Insight session id. |
tenantIds | An array of tenants (administrator database) should be updated. |
projectNames | Defines a list of projects to be updated for each tenant. The list can be empty. |
Type: TenantUpdateResult[]
An array containing results of updates for each project and for each tenant (including errors and warnings that occurred during updates).