Interface IDataSourcesClient
Namespace: FastReport.Cloud
Assembly: FastReport.Cloud.SDK.dll
Syntax
public interface IDataSourcesClient
Methods
CountDataSources(String)
Returns a number of data sources in subscription
Declaration
long CountDataSources(string subscriptionId)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | subscripiton id |
Returns
Type | Description |
---|---|
System.Int64 | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
CountDataSourcesAsync(String, System.Threading.CancellationToken)
Returns a number of data sources in subscription
Declaration
System.Threading.Tasks.Task<long> CountDataSourcesAsync(string subscriptionId, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | subscripiton id |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int64> | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
CreateDataSource(CreateDataSourceVM)
Create new data source
Declaration
DataSourceVM CreateDataSource(CreateDataSourceVM body = null)
Parameters
Type | Name | Description |
---|---|---|
CreateDataSourceVM | body | create viewmodel |
Returns
Type | Description |
---|---|
DataSourceVM | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
CreateDataSourceAsync(CreateDataSourceVM, System.Threading.CancellationToken)
Create new data source
Declaration
System.Threading.Tasks.Task<DataSourceVM> CreateDataSourceAsync(CreateDataSourceVM body = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CreateDataSourceVM | body | create viewmodel |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DataSourceVM> | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
DeleteDataSource(String)
Delete data source by id
Declaration
void DeleteDataSource(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
DeleteDataSourceAsync(String, System.Threading.CancellationToken)
Delete data source by id
Declaration
System.Threading.Tasks.Task DeleteDataSourceAsync(string id, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
FetchData(String)
This should connect to a database and set data structure
Declaration
void FetchData(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | datasource's id |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
FetchDataAsync(String, System.Threading.CancellationToken)
This should connect to a database and set data structure
Declaration
System.Threading.Tasks.Task FetchDataAsync(string id, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | datasource's id |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetAvailableDataSources(String, Nullable<Int32>, Nullable<Int32>, Nullable<DataSourceSorting>, Nullable<Boolean>)
Returns all of the data sources, that current user have permission for in a subscription <br />
The method will return minimal infomration about the datasources: <br />
id, name, editedTime, status.
Declaration
DataSourcesVM GetAvailableDataSources(string subscriptionId = null, int? skip = null, int? take = null, DataSourceSorting? orderBy = null, bool? desc = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | id of subscription where the datasources are located |
System.Nullable<System.Int32> | skip | how many data sources will be skipped |
System.Nullable<System.Int32> | take | how many data sources will be taken |
System.Nullable<DataSourceSorting> | orderBy | field to order by |
System.Nullable<System.Boolean> | desc | descending sort |
Returns
Type | Description |
---|---|
DataSourcesVM | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetAvailableDataSourcesAsync(String, Nullable<Int32>, Nullable<Int32>, Nullable<DataSourceSorting>, Nullable<Boolean>, System.Threading.CancellationToken)
Returns all of the data sources, that current user have permission for in a subscription <br />
The method will return minimal infomration about the datasources: <br />
id, name, editedTime, status.
Declaration
System.Threading.Tasks.Task<DataSourcesVM> GetAvailableDataSourcesAsync(string subscriptionId = null, int? skip = null, int? take = null, DataSourceSorting? orderBy = null, bool? desc = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | id of subscription where the datasources are located |
System.Nullable<System.Int32> | skip | how many data sources will be skipped |
System.Nullable<System.Int32> | take | how many data sources will be taken |
System.Nullable<DataSourceSorting> | orderBy | field to order by |
System.Nullable<System.Boolean> | desc | descending sort |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DataSourcesVM> | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetDataSource(String)
Get data source by id
Declaration
DataSourceVM GetDataSource(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
Returns
Type | Description |
---|---|
DataSourceVM | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetDataSourceAsync(String, System.Threading.CancellationToken)
Get data source by id
Declaration
System.Threading.Tasks.Task<DataSourceVM> GetDataSourceAsync(string id, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DataSourceVM> | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetMyPermissions(String)
Get current user's permissions to Data source
Declaration
DataSourcePermissionCRUDVM GetMyPermissions(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
Returns
Type | Description |
---|---|
DataSourcePermissionCRUDVM | got permissions successfully |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetMyPermissionsAsync(String, System.Threading.CancellationToken)
Get current user's permissions to Data source
Declaration
System.Threading.Tasks.Task<DataSourcePermissionCRUDVM> GetMyPermissionsAsync(string id, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DataSourcePermissionCRUDVM> | got permissions successfully |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetParameterTypes(DataSourceConnectionType)
Get data source parameter DataType's
Declaration
DataSourceParameterTypesVM GetParameterTypes(DataSourceConnectionType dataSourceType)
Parameters
Type | Name | Description |
---|---|---|
DataSourceConnectionType | dataSourceType | data source type (MsSql, MySql, etc.) |
Returns
Type | Description |
---|---|
DataSourceParameterTypesVM | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetParameterTypesAsync(DataSourceConnectionType, System.Threading.CancellationToken)
Get data source parameter DataType's
Declaration
System.Threading.Tasks.Task<DataSourceParameterTypesVM> GetParameterTypesAsync(DataSourceConnectionType dataSourceType, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
DataSourceConnectionType | dataSourceType | data source type (MsSql, MySql, etc.) |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DataSourceParameterTypesVM> | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetPermissions(String)
Get all Data source permissions
Declaration
DataSourcePermissionsVM GetPermissions(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
Returns
Type | Description |
---|---|
DataSourcePermissionsVM | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetPermissionsAsync(String, System.Threading.CancellationToken)
Get all Data source permissions
Declaration
System.Threading.Tasks.Task<DataSourcePermissionsVM> GetPermissionsAsync(string id, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DataSourcePermissionsVM> | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
RenameDataSource(String, RenameDataSourceVM)
Rename data source by id
Declaration
DataSourceVM RenameDataSource(string id, RenameDataSourceVM body = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
RenameDataSourceVM | body | rename viewmodel |
Returns
Type | Description |
---|---|
DataSourceVM | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
RenameDataSourceAsync(String, RenameDataSourceVM, System.Threading.CancellationToken)
Rename data source by id
Declaration
System.Threading.Tasks.Task<DataSourceVM> RenameDataSourceAsync(string id, RenameDataSourceVM body = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
RenameDataSourceVM | body | rename viewmodel |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DataSourceVM> | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
UpdateConnectionString(String, UpdateDataSourceConnectionStringVM)
Update data source's connection string by id
Declaration
DataSourceVM UpdateConnectionString(string id, UpdateDataSourceConnectionStringVM body = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
UpdateDataSourceConnectionStringVM | body | update viewmodel |
Returns
Type | Description |
---|---|
DataSourceVM | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
UpdateConnectionStringAsync(String, UpdateDataSourceConnectionStringVM, System.Threading.CancellationToken)
Update data source's connection string by id
Declaration
System.Threading.Tasks.Task<DataSourceVM> UpdateConnectionStringAsync(string id, UpdateDataSourceConnectionStringVM body = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
UpdateDataSourceConnectionStringVM | body | update viewmodel |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DataSourceVM> | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
UpdatePermissions(String, UpdateDataSourcePermissionsVM)
Update permissions
Declaration
void UpdatePermissions(string id, UpdateDataSourcePermissionsVM body = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | |
UpdateDataSourcePermissionsVM | body |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
UpdatePermissionsAsync(String, UpdateDataSourcePermissionsVM, System.Threading.CancellationToken)
Update permissions
Declaration
System.Threading.Tasks.Task UpdatePermissionsAsync(string id, UpdateDataSourcePermissionsVM body = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | |
UpdateDataSourcePermissionsVM | body | |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
UpdateSelectCommands(String, UpdateDataSourceSelectCommandsVM)
Update data source's select commands by id
Declaration
DataSourceVM UpdateSelectCommands(string id, UpdateDataSourceSelectCommandsVM body = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
UpdateDataSourceSelectCommandsVM | body | update viewmodel |
Returns
Type | Description |
---|---|
DataSourceVM | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
UpdateSelectCommandsAsync(String, UpdateDataSourceSelectCommandsVM, System.Threading.CancellationToken)
Update data source's select commands by id
Declaration
System.Threading.Tasks.Task<DataSourceVM> UpdateSelectCommandsAsync(string id, UpdateDataSourceSelectCommandsVM body = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
UpdateDataSourceSelectCommandsVM | body | update viewmodel |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DataSourceVM> | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
UpdateSubscriptionDataSource(String, UpdateDataSourceSubscriptionVM)
Update data source's subscription
Declaration
void UpdateSubscriptionDataSource(string id, UpdateDataSourceSubscriptionVM body = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
UpdateDataSourceSubscriptionVM | body | update subscription viewmodel |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
UpdateSubscriptionDataSourceAsync(String, UpdateDataSourceSubscriptionVM, System.Threading.CancellationToken)
Update data source's subscription
Declaration
System.Threading.Tasks.Task UpdateSubscriptionDataSourceAsync(string id, UpdateDataSourceSubscriptionVM body = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | data source id |
UpdateDataSourceSubscriptionVM | body | update subscription viewmodel |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Everything is all right |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |