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... | |
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... | |
Insight API
void ActivateTenant | ( | Guid | sessionId, |
string | tenantId | ||
) |
Activates tenant.
Only multi-tenant administrator has the right to execute this method.
sessionId | Session ID. |
tenantId | Tenant ID (required). If the tenant with the same ID does not exist, an exception occurs. |
|
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 | 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 | 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 | Session ID. |
tenantId | Tenant ID (required). If the tenant with the same ID does not exist, an exception occurs. |
|
inline |
Returns a project definition for the specified project ID.
sessionId | Session ID. |
projectId | Project ID. |
tenantId | Tenant ID. |
|
inline |
Returns a list of projects.
sessionId | Session ID. |
tenantId | Tenant ID. |
Type: ProjectDescription[]
An array containing project descriptions.
|
inline |
Returns an XML with a project tree.
sessionId | 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 | 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 | 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.
|
inline |
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. |
|
inline |
Runs data load for the specified execution plan.
sessionId | 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 |
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 | 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).