Skip to content

Latest commit

 

History

History
703 lines (478 loc) · 21.1 KB

DataSourcesApi.md

File metadata and controls

703 lines (478 loc) · 21.1 KB

FastreportCloudSdk.DataSourcesApi

All URIs are relative to http://localhost

Method HTTP request Description
dataSourcesCountDataSourcesAsync GET /api/data/v1/DataSources/{subscriptionId}/count Returns a number of data sources in subscription
dataSourcesCreateDataSource POST /api/data/v1/DataSources Create new data source
dataSourcesDeleteDataSource DELETE /api/data/v1/DataSources/{id} Delete data source by id
dataSourcesFetchData GET /api/data/v1/DataSources/{id}/fetch This should connect to a database and set data structure
dataSourcesGetAvailableDataSources GET /api/data/v1/DataSources 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.
dataSourcesGetDataSource GET /api/data/v1/DataSources/{id} Get data source by id
dataSourcesGetParameterTypes GET /api/data/v1/DataSources/parameterTypes/{dataSourceType} Get data source parameter DataType's
dataSourcesGetPermissions GET /api/data/v1/DataSources/{id}/permissions Get all Data source permissions
dataSourcesRenameDataSource PUT /api/data/v1/DataSources/{id}/rename Rename data source by id
dataSourcesUpdateConnectionString PUT /api/data/v1/DataSources/{id}/connectionString Update data source's connection string by id
dataSourcesUpdatePermissions POST /api/data/v1/DataSources/{id}/permissions Update permissions
dataSourcesUpdateSelectCommands PUT /api/data/v1/DataSources/{id}/selectCommands Update data source's select commands by id
dataSourcesUpdateSubscriptionDataSource PUT /api/data/v1/DataSources/{id}/updateSubscription Update data source's subscription

dataSourcesCountDataSourcesAsync

Number dataSourcesCountDataSourcesAsync(subscriptionId)

Returns a number of data sources in subscription

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.DataSourcesApi();
let subscriptionId = "subscriptionId_example"; // String | subscripiton id
apiInstance.dataSourcesCountDataSourcesAsync(subscriptionId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
subscriptionId String subscripiton id

Return type

Number

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

dataSourcesCreateDataSource

DataSourceVM dataSourcesCreateDataSource(opts)

Create new data source

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.DataSourcesApi();
let opts = {
  'createDataSourceVM': new FastreportCloudSdk.CreateDataSourceVM() // CreateDataSourceVM | create viewmodel
};
apiInstance.dataSourcesCreateDataSource(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
createDataSourceVM CreateDataSourceVM create viewmodel [optional]

Return type

DataSourceVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

dataSourcesDeleteDataSource

dataSourcesDeleteDataSource(id)

Delete data source by id

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.DataSourcesApi();
let id = "id_example"; // String | data source id
apiInstance.dataSourcesDeleteDataSource(id).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String data source id

Return type

null (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

dataSourcesFetchData

dataSourcesFetchData(id)

This should connect to a database and set data structure

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.DataSourcesApi();
let id = "id_example"; // String | datasource's id
apiInstance.dataSourcesFetchData(id).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String datasource's id

Return type

null (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

dataSourcesGetAvailableDataSources

DataSourcesVM dataSourcesGetAvailableDataSources(opts)

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.

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.DataSourcesApi();
let opts = {
  'subscriptionId': "subscriptionId_example", // String | id of subscription where the datasources are located
  'skip': 0, // Number | how many data sources will be skipped
  'take': 10, // Number | how many data sources will be taken
  'orderBy': new FastreportCloudSdk.DataSourceSorting(), // DataSourceSorting | field to order by
  'desc': false // Boolean | descending sort
};
apiInstance.dataSourcesGetAvailableDataSources(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
subscriptionId String id of subscription where the datasources are located [optional]
skip Number how many data sources will be skipped [optional] [default to 0]
take Number how many data sources will be taken [optional] [default to 10]
orderBy DataSourceSorting field to order by [optional]
desc Boolean descending sort [optional] [default to false]

Return type

DataSourcesVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

dataSourcesGetDataSource

DataSourceVM dataSourcesGetDataSource(id)

Get data source by id

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.DataSourcesApi();
let id = "id_example"; // String | data source id
apiInstance.dataSourcesGetDataSource(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String data source id

Return type

DataSourceVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

dataSourcesGetParameterTypes

DataSourceParameterTypesVM dataSourcesGetParameterTypes(dataSourceType)

Get data source parameter DataType's

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.DataSourcesApi();
let dataSourceType = new FastreportCloudSdk.DataSourceConnectionType(); // DataSourceConnectionType | data source type (MsSql, MySql, etc.)
apiInstance.dataSourcesGetParameterTypes(dataSourceType).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
dataSourceType DataSourceConnectionType data source type (MsSql, MySql, etc.)

Return type

DataSourceParameterTypesVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

dataSourcesGetPermissions

DataSourcePermissionsVM dataSourcesGetPermissions(id)

Get all Data source permissions

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.DataSourcesApi();
let id = "id_example"; // String | data source id
apiInstance.dataSourcesGetPermissions(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String data source id

Return type

DataSourcePermissionsVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

dataSourcesRenameDataSource

DataSourceVM dataSourcesRenameDataSource(id, opts)

Rename data source by id

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.DataSourcesApi();
let id = "id_example"; // String | data source id
let opts = {
  'renameDataSourceVM': new FastreportCloudSdk.RenameDataSourceVM() // RenameDataSourceVM | rename viewmodel
};
apiInstance.dataSourcesRenameDataSource(id, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String data source id
renameDataSourceVM RenameDataSourceVM rename viewmodel [optional]

Return type

DataSourceVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

dataSourcesUpdateConnectionString

DataSourceVM dataSourcesUpdateConnectionString(id, opts)

Update data source's connection string by id

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.DataSourcesApi();
let id = "id_example"; // String | data source id
let opts = {
  'updateDataSourceConnectionStringVM': new FastreportCloudSdk.UpdateDataSourceConnectionStringVM() // UpdateDataSourceConnectionStringVM | update viewmodel
};
apiInstance.dataSourcesUpdateConnectionString(id, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String data source id
updateDataSourceConnectionStringVM UpdateDataSourceConnectionStringVM update viewmodel [optional]

Return type

DataSourceVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

dataSourcesUpdatePermissions

dataSourcesUpdatePermissions(id, opts)

Update permissions

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.DataSourcesApi();
let id = "id_example"; // String | 
let opts = {
  'updateDataSourcePermissionsVM': new FastreportCloudSdk.UpdateDataSourcePermissionsVM() // UpdateDataSourcePermissionsVM | 
};
apiInstance.dataSourcesUpdatePermissions(id, opts).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String
updateDataSourcePermissionsVM UpdateDataSourcePermissionsVM [optional]

Return type

null (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

dataSourcesUpdateSelectCommands

DataSourceVM dataSourcesUpdateSelectCommands(id, opts)

Update data source's select commands by id

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.DataSourcesApi();
let id = "id_example"; // String | data source id
let opts = {
  'updateDataSourceSelectCommandsVM': new FastreportCloudSdk.UpdateDataSourceSelectCommandsVM() // UpdateDataSourceSelectCommandsVM | update viewmodel
};
apiInstance.dataSourcesUpdateSelectCommands(id, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String data source id
updateDataSourceSelectCommandsVM UpdateDataSourceSelectCommandsVM update viewmodel [optional]

Return type

DataSourceVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

dataSourcesUpdateSubscriptionDataSource

dataSourcesUpdateSubscriptionDataSource(id, opts)

Update data source's subscription

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.DataSourcesApi();
let id = "id_example"; // String | data source id
let opts = {
  'updateDataSourceSubscriptionVM': new FastreportCloudSdk.UpdateDataSourceSubscriptionVM() // UpdateDataSourceSubscriptionVM | update subscription viewmodel
};
apiInstance.dataSourcesUpdateSubscriptionDataSource(id, opts).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String data source id
updateDataSourceSubscriptionVM UpdateDataSourceSubscriptionVM update subscription viewmodel [optional]

Return type

null (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json