Skip to content

Latest commit

 

History

History
685 lines (512 loc) · 20.8 KB

DataSourcesApi.md

File metadata and controls

685 lines (512 loc) · 20.8 KB

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

kotlin.Long dataSourcesCountDataSourcesAsync(subscriptionId)

Returns a number of data sources in subscription

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import cloud.fastreport.model.*

val apiInstance = DataSourcesApi()
val subscriptionId : kotlin.String = subscriptionId_example // kotlin.String | subscripiton id
try {
    val result : kotlin.Long = apiInstance.dataSourcesCountDataSourcesAsync(subscriptionId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DataSourcesApi#dataSourcesCountDataSourcesAsync")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DataSourcesApi#dataSourcesCountDataSourcesAsync")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
subscriptionId kotlin.String subscripiton id

Return type

kotlin.Long

Authorization

Configure ApiKey: ApiClient.username = "" ApiClient.password = "" Configure JWT: ApiClient.accessToken = ""

HTTP request headers

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

dataSourcesCreateDataSource

DataSourceVM dataSourcesCreateDataSource(createDataSourceVM)

Create new data source

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import cloud.fastreport.model.*

val apiInstance = DataSourcesApi()
val createDataSourceVM : CreateDataSourceVM =  // CreateDataSourceVM | create viewmodel
try {
    val result : DataSourceVM = apiInstance.dataSourcesCreateDataSource(createDataSourceVM)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DataSourcesApi#dataSourcesCreateDataSource")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DataSourcesApi#dataSourcesCreateDataSource")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
createDataSourceVM CreateDataSourceVM create viewmodel [optional]

Return type

DataSourceVM

Authorization

Configure ApiKey: ApiClient.username = "" ApiClient.password = "" Configure JWT: ApiClient.accessToken = ""

HTTP request headers

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

dataSourcesDeleteDataSource

dataSourcesDeleteDataSource(id)

Delete data source by id

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import cloud.fastreport.model.*

val apiInstance = DataSourcesApi()
val id : kotlin.String = id_example // kotlin.String | data source id
try {
    apiInstance.dataSourcesDeleteDataSource(id)
} catch (e: ClientException) {
    println("4xx response calling DataSourcesApi#dataSourcesDeleteDataSource")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DataSourcesApi#dataSourcesDeleteDataSource")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
id kotlin.String data source id

Return type

null (empty response body)

Authorization

Configure ApiKey: ApiClient.username = "" ApiClient.password = "" Configure JWT: ApiClient.accessToken = ""

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 classes:
//import org.openapitools.client.infrastructure.*
//import cloud.fastreport.model.*

val apiInstance = DataSourcesApi()
val id : kotlin.String = id_example // kotlin.String | datasource's id
try {
    apiInstance.dataSourcesFetchData(id)
} catch (e: ClientException) {
    println("4xx response calling DataSourcesApi#dataSourcesFetchData")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DataSourcesApi#dataSourcesFetchData")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
id kotlin.String datasource's id

Return type

null (empty response body)

Authorization

Configure ApiKey: ApiClient.username = "" ApiClient.password = "" Configure JWT: ApiClient.accessToken = ""

HTTP request headers

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

dataSourcesGetAvailableDataSources

DataSourcesVM dataSourcesGetAvailableDataSources(subscriptionId, skip, take, orderBy, desc)

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 classes:
//import org.openapitools.client.infrastructure.*
//import cloud.fastreport.model.*

val apiInstance = DataSourcesApi()
val subscriptionId : kotlin.String = subscriptionId_example // kotlin.String | id of subscription where the datasources are located
val skip : kotlin.Int = 56 // kotlin.Int | how many data sources will be skipped
val take : kotlin.Int = 56 // kotlin.Int | how many data sources will be taken
val orderBy : DataSourceSorting =  // DataSourceSorting | field to order by
val desc : kotlin.Boolean = true // kotlin.Boolean | descending sort
try {
    val result : DataSourcesVM = apiInstance.dataSourcesGetAvailableDataSources(subscriptionId, skip, take, orderBy, desc)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DataSourcesApi#dataSourcesGetAvailableDataSources")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DataSourcesApi#dataSourcesGetAvailableDataSources")
    e.printStackTrace()
}

Parameters

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

Return type

DataSourcesVM

Authorization

Configure ApiKey: ApiClient.username = "" ApiClient.password = "" Configure JWT: ApiClient.accessToken = ""

HTTP request headers

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

dataSourcesGetDataSource

DataSourceVM dataSourcesGetDataSource(id)

Get data source by id

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import cloud.fastreport.model.*

val apiInstance = DataSourcesApi()
val id : kotlin.String = id_example // kotlin.String | data source id
try {
    val result : DataSourceVM = apiInstance.dataSourcesGetDataSource(id)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DataSourcesApi#dataSourcesGetDataSource")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DataSourcesApi#dataSourcesGetDataSource")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
id kotlin.String data source id

Return type

DataSourceVM

Authorization

Configure ApiKey: ApiClient.username = "" ApiClient.password = "" Configure JWT: ApiClient.accessToken = ""

HTTP request headers

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

dataSourcesGetParameterTypes

DataSourceParameterTypesVM dataSourcesGetParameterTypes(dataSourceType)

Get data source parameter DataType's

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import cloud.fastreport.model.*

val apiInstance = DataSourcesApi()
val dataSourceType : DataSourceConnectionType =  // DataSourceConnectionType | data source type (MsSql, MySql, etc.)
try {
    val result : DataSourceParameterTypesVM = apiInstance.dataSourcesGetParameterTypes(dataSourceType)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DataSourcesApi#dataSourcesGetParameterTypes")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DataSourcesApi#dataSourcesGetParameterTypes")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
dataSourceType DataSourceConnectionType data source type (MsSql, MySql, etc.) [enum: JSON, MSSQL, CSV, XML, MySQL, Postgres, OracleDB, FirebirdDB, MongoDB, ClickHouse]

Return type

DataSourceParameterTypesVM

Authorization

Configure ApiKey: ApiClient.username = "" ApiClient.password = "" Configure JWT: ApiClient.accessToken = ""

HTTP request headers

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

dataSourcesGetPermissions

DataSourcePermissionsVM dataSourcesGetPermissions(id)

Get all Data source permissions

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import cloud.fastreport.model.*

val apiInstance = DataSourcesApi()
val id : kotlin.String = id_example // kotlin.String | data source id
try {
    val result : DataSourcePermissionsVM = apiInstance.dataSourcesGetPermissions(id)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DataSourcesApi#dataSourcesGetPermissions")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DataSourcesApi#dataSourcesGetPermissions")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
id kotlin.String data source id

Return type

DataSourcePermissionsVM

Authorization

Configure ApiKey: ApiClient.username = "" ApiClient.password = "" Configure JWT: ApiClient.accessToken = ""

HTTP request headers

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

dataSourcesRenameDataSource

DataSourceVM dataSourcesRenameDataSource(id, renameDataSourceVM)

Rename data source by id

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import cloud.fastreport.model.*

val apiInstance = DataSourcesApi()
val id : kotlin.String = id_example // kotlin.String | data source id
val renameDataSourceVM : RenameDataSourceVM =  // RenameDataSourceVM | rename viewmodel
try {
    val result : DataSourceVM = apiInstance.dataSourcesRenameDataSource(id, renameDataSourceVM)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DataSourcesApi#dataSourcesRenameDataSource")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DataSourcesApi#dataSourcesRenameDataSource")
    e.printStackTrace()
}

Parameters

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

Return type

DataSourceVM

Authorization

Configure ApiKey: ApiClient.username = "" ApiClient.password = "" Configure JWT: ApiClient.accessToken = ""

HTTP request headers

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

dataSourcesUpdateConnectionString

DataSourceVM dataSourcesUpdateConnectionString(id, updateDataSourceConnectionStringVM)

Update data source's connection string by id

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import cloud.fastreport.model.*

val apiInstance = DataSourcesApi()
val id : kotlin.String = id_example // kotlin.String | data source id
val updateDataSourceConnectionStringVM : UpdateDataSourceConnectionStringVM =  // UpdateDataSourceConnectionStringVM | update viewmodel
try {
    val result : DataSourceVM = apiInstance.dataSourcesUpdateConnectionString(id, updateDataSourceConnectionStringVM)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DataSourcesApi#dataSourcesUpdateConnectionString")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DataSourcesApi#dataSourcesUpdateConnectionString")
    e.printStackTrace()
}

Parameters

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

Return type

DataSourceVM

Authorization

Configure ApiKey: ApiClient.username = "" ApiClient.password = "" Configure JWT: ApiClient.accessToken = ""

HTTP request headers

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

dataSourcesUpdatePermissions

dataSourcesUpdatePermissions(id, updateDataSourcePermissionsVM)

Update permissions

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import cloud.fastreport.model.*

val apiInstance = DataSourcesApi()
val id : kotlin.String = id_example // kotlin.String | 
val updateDataSourcePermissionsVM : UpdateDataSourcePermissionsVM =  // UpdateDataSourcePermissionsVM | 
try {
    apiInstance.dataSourcesUpdatePermissions(id, updateDataSourcePermissionsVM)
} catch (e: ClientException) {
    println("4xx response calling DataSourcesApi#dataSourcesUpdatePermissions")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DataSourcesApi#dataSourcesUpdatePermissions")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
id kotlin.String
updateDataSourcePermissionsVM UpdateDataSourcePermissionsVM [optional]

Return type

null (empty response body)

Authorization

Configure ApiKey: ApiClient.username = "" ApiClient.password = "" Configure JWT: ApiClient.accessToken = ""

HTTP request headers

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

dataSourcesUpdateSelectCommands

DataSourceVM dataSourcesUpdateSelectCommands(id, updateDataSourceSelectCommandsVM)

Update data source's select commands by id

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import cloud.fastreport.model.*

val apiInstance = DataSourcesApi()
val id : kotlin.String = id_example // kotlin.String | data source id
val updateDataSourceSelectCommandsVM : UpdateDataSourceSelectCommandsVM =  // UpdateDataSourceSelectCommandsVM | update viewmodel
try {
    val result : DataSourceVM = apiInstance.dataSourcesUpdateSelectCommands(id, updateDataSourceSelectCommandsVM)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DataSourcesApi#dataSourcesUpdateSelectCommands")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DataSourcesApi#dataSourcesUpdateSelectCommands")
    e.printStackTrace()
}

Parameters

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

Return type

DataSourceVM

Authorization

Configure ApiKey: ApiClient.username = "" ApiClient.password = "" Configure JWT: ApiClient.accessToken = ""

HTTP request headers

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

dataSourcesUpdateSubscriptionDataSource

dataSourcesUpdateSubscriptionDataSource(id, updateDataSourceSubscriptionVM)

Update data source's subscription

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import cloud.fastreport.model.*

val apiInstance = DataSourcesApi()
val id : kotlin.String = id_example // kotlin.String | data source id
val updateDataSourceSubscriptionVM : UpdateDataSourceSubscriptionVM =  // UpdateDataSourceSubscriptionVM | update subscription viewmodel
try {
    apiInstance.dataSourcesUpdateSubscriptionDataSource(id, updateDataSourceSubscriptionVM)
} catch (e: ClientException) {
    println("4xx response calling DataSourcesApi#dataSourcesUpdateSubscriptionDataSource")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DataSourcesApi#dataSourcesUpdateSubscriptionDataSource")
    e.printStackTrace()
}

Parameters

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

Return type

null (empty response body)

Authorization

Configure ApiKey: ApiClient.username = "" ApiClient.password = "" Configure JWT: ApiClient.accessToken = ""

HTTP request headers

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