Table of Contents

DataSources

DataSources

CountDataSourcesAsync

Returns a number of data sources in subscription

Request
GET /api/data/v1/DataSources/{subscriptionId}/count
Parameters
Name Type Value Notes
*subscriptionId string

subscripiton id

Responses
Status Code Description Samples
200

Everything is all right

400

id is not hex24

402

Subscription is outdated

403

You don't have permission to get data sources from this subscription (or in your default (1st) subscription)

404

there is no subscription with provided id found, or user don't even have a subscription

CreateDataSource

Create new data source

Request
POST /api/data/v1/DataSources
Parameters
Name Type Value Notes
body

create viewmodel

Responses
Status Code Description Samples
200

Everything is all right

400

VM is not valid

402

Subscription is outdated or have not enough limits

403

You don't have permission to create data sources from this subscription (or in your default (1st) subscription)

404

There is no subscription with provided id found, or user don't even have a subscription

500

Try again, if error still here - text our support

GetAvailableDataSources

Returns all of the data sources, that current user have permission for in a subscription
The method will return minimal infomration about the datasources:
id, name, editedTime, status.

Request
GET /api/data/v1/DataSources[?subscriptionId&skip&take&orderBy&desc]
Parameters
Name Type Value Notes
subscriptionId string

id of subscription where the datasources are located

skip integer 0

how many data sources will be skipped

take integer 10

how many data sources will be taken

orderBy

field to order by

desc boolean False

descending sort

Responses
Status Code Description Samples
200

Everything is all right

400

One of params is not valid

402

Subscription is outdated or have not enough limits

403

You don't have permission to get data sources from this subscription (or in your default (1st) subscription)

404

There is no subscription with provided id found

DeleteDataSource

Delete data source by id

Request
DELETE /api/data/v1/DataSources/{id}
Parameters
Name Type Value Notes
*id string

data source id

Responses
Status Code Description Samples
204

Everything is all right

400

id is not hex24

402

Subscription is outdated or have not enough limits

403

You don't have permission to delete data sources from this subscription (or in your default (1st) subscription)

404

There is no data source or subscription with provided id found

500

Try again, if error still here - text our support

GetDataSource

Get data source by id

Request
GET /api/data/v1/DataSources/{id}
Parameters
Name Type Value Notes
*id string

data source id

Responses
Status Code Description Samples
200

Everything is all right

400

id is not hex24

402

Subscription is outdated or have not enough limits

403

You don't have permission to get data sources from this subscription (or in your default (1st) subscription)

404

There is no data source or subscription with provided id found

500

Try again, if error still here - text our support

FetchData

This should connect to a database and set data structure

Request
GET /api/data/v1/DataSources/{id}/fetch
Parameters
Name Type Value Notes
*id string

datasource's id

Responses
Status Code Description Samples
204

Everything is all right

400

id is not hex24

402

Subscription is outdated or have not enough limits

403

You don't have permission to fetch data sources from this subscription (or in your default (1st) subscription)

404

There is no data source or subscription with provided id found

500

Try again, if error still here - text our support

GetParameterTypes

Get data source parameter DataType's

Request
GET /api/data/v1/DataSources/parameterTypes/{dataSourceType}
Parameters
Name Type Value Notes
*dataSourceType

data source type (MsSql, MySql, etc.)

Responses
Status Code Description Samples
200

Everything is all right

400

Data source doesn't support parameters or wrong data source name

500

Try again, if error still here - text our support

GetPermissions

Get all Data source permissions

Request
GET /api/data/v1/DataSources/{id}/permissions
Parameters
Name Type Value Notes
*id string

data source id

Responses
Status Code Description Samples
200

Everything is all right

400

id is not hex24

402

Subscription is outdated or have not enough limits

403

You don't have permission to get data sources' permissions from this subscription (or in your default (1st) subscription)

404

There is no data source or subscription with provided id found

500

Try again, if error still here - text our support

UpdatePermissions

Update permissions

Request
POST /api/data/v1/DataSources/{id}/permissions
Parameters
Name Type Value Notes
*id string
body
Responses
Status Code Description Samples
204

Everything is all right

400

id is not hex24 or VM is not valid

402

Subscription is outdated or have not enough limits

403

You don't have permission to update data sources' permissions from this subscription (or in your default (1st) subscription)

404

There is no data source or subscription with provided id found

500

Try again, if error still here - text our support

GetMyPermissions

Get current user's permissions to Data source

Request
GET /api/data/v1/DataSources/{id}/mypermissions
Parameters
Name Type Value Notes
*id string

data source id

Responses
Status Code Description Samples
200

got permissions successfully

400

The request is wrong

404

There is no data source or subscription with provided id found

500

Server Error

RenameDataSource

Rename data source by id

Request
PUT /api/data/v1/DataSources/{id}/rename
Parameters
Name Type Value Notes
*id string

data source id

body

rename viewmodel

Responses
Status Code Description Samples
200

Everything is all right

400

id is not hex24 or VM is not valid

402

Subscription is outdated or have not enough limits

403

You don't have permission to update data sources' name from this subscription (or in your default (1st) subscription)

404

There is no data source or subscription with provided id found

500

Try again, if error still here - text our support

UpdateConnectionString

Update data source's connection string by id

Request
PUT /api/data/v1/DataSources/{id}/connectionString
Parameters
Name Type Value Notes
*id string

data source id

body

update viewmodel

Responses
Status Code Description Samples
200

Everything is all right

400

id is not hex24 or VM is not valid

402

Subscription is outdated or have not enough limits

403

You don't have permission to update data sources' connection string from this subscription (or in your default (1st) subscription)

404

There is no data source or subscription with provided id found

500

Try again, if error still here - text our support

UpdateSubscriptionDataSource

Update data source's subscription

Request
PUT /api/data/v1/DataSources/{id}/updateSubscription
Parameters
Name Type Value Notes
*id string

data source id

body

update subscription viewmodel

Responses
Status Code Description Samples
200

Everything is all right

400

id is not hex24 or VM is not valid

402

Subscription is outdated or have not enough limits

403

You don't have permission to get data sources or create them in new subscription

404

There is no data source or subscription with provided id found

500

Try again, if error still here - text our support

UpdateSelectCommands

Update data source's select commands by id

Request
PUT /api/data/v1/DataSources/{id}/selectCommands
Parameters
Name Type Value Notes
*id string

data source id

body

update viewmodel

Responses
Status Code Description Samples
200

Everything is all right

400

id is not hex24 or VM is not valid

402

Subscription is outdated or have not enough limits

403

You don't have permission to update data sources' connection string from this subscription (or in your default (1st) subscription)

404

There is no data source or subscription with provided id found

500

Try again, if error still here - text our support

Definitions

ProblemDetails

Name Type Notes
type string
title string
status integer (int32)
detail string
instance string

CreateDataSourceVM

Name Type Notes
name string
connectionString string
subscriptionId string
connectionType DataSourceConnectionType
selectCommands DataSourceSelectCommandVM[]
$t string

DataSourceConnectionType

Enum Values
JSON
MSSQL
CSV
XML
MySQL
Postgres
OracleDB
FirebirdDB
MongoDB
ClickHouse

DataSourceSelectCommandVM

Name Type Notes
name string
command string
parameters DataSourceSelectCommandParameterVM[]
$t string

DataSourceSelectCommandParameterVM

Name Type Notes
name string
dataType string
defaultValue string
size integer (int32)
$t string

DataSourceVM

Name Type Notes
id string
name string
connectionType DataSourceConnectionType
connectionString string
dataStructure string
subscriptionId string
editedTime string (date-time)
editorUserId string
createdTime string (date-time)
creatorUserId string
status DataSourceStatus
errorMessage string
selectCommands DataSourceSelectCommandVM[]
$t string

DataSourceStatus

Enum Values
Connected
Error
Updating

DataSourcesVM

Name Type Notes
dataSources DataSourceVM[]
count integer (int64)
skip integer (int32)
take integer (int32)
$t string

DataSourceParameterTypesVM

Name Type Notes
dataTypes DataSourceParameterTypeVM[]
$t string

DataSourceParameterTypeVM

Name Type Notes
name string
value integer (int32)
$t string

DataSourcePermissionsVM

Name Type Notes
permissions DataSourcePermissionsCRUDVM[]
$t string

DataSourcePermissionsCRUDVM

Name Type Notes
ownerId string
owner DataSourcePermissionCRUDVM[]
groups object
other DataSourcePermissionCRUDVM[]
anon DataSourcePermissionCRUDVM[]
$t string

DataSourcePermissionCRUDVM

Name Type Notes
create DataSourceCreate
delete DataSourceDelete
execute DataSourceExecute
get DataSourceGet
update DataSourceUpdate
administrate DataSourceAdministrate
$t string

DataSourceCreate

DataSourceDelete

DataSourceExecute

DataSourceGet

DataSourceUpdate

DataSourceAdministrate

UpdateDataSourcePermissionsVM

Name Type Notes
newPermissions DataSourcePermissionsCRUDVM[]
administrate DataSourceAdministrate
$t string

RenameDataSourceVM

Name Type Notes
name string
$t string

UpdateDataSourceConnectionStringVM

Name Type Notes
connectionString string
$t string

UpdateDataSourceSubscriptionVM

Name Type Notes
subscriptionId string
$t string

UpdateDataSourceSelectCommandsVM

Name Type Notes
selectCommands DataSourceSelectCommandVM[]
$t string