DataSources
DataSources
GetAvailableDataSources
Returns all of the data sources, that current user have permission for in a subscription if subscription id is null, returns all data sources, that current user have permission for
Request
GET /api/data/v1/DataSources[?subscriptionId&skip&take]
Parameters
Name | Type | Value | Notes |
---|---|---|---|
subscriptionId | string | subscription id |
|
skip | integer | 0 | how many data sources will be skipped |
take | integer | 10 | how many data sources will be taken |
Responses
Status Code | Description | Samples |
---|---|---|
200 | Success |
|
400 | Bad Request |
|
402 | Client Error |
|
403 | Forbidden |
|
404 | Not Found |
CreateDataSource
Create new data source
Request
POST /api/data/v1/DataSources
Parameters
Name | Type | Value | Notes |
---|---|---|---|
viewModel | create viewmodel |
Responses
Status Code | Description | Samples |
---|---|---|
200 | Success |
|
400 | Bad Request |
|
402 | Client Error |
|
403 | Forbidden |
|
404 | Not Found |
|
500 | Server Error |
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 | Success |
|
400 | Bad Request |
|
402 | Client Error |
|
403 | Forbidden |
|
404 | Not Found |
|
500 | Server Error |
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 | Success |
|
400 | Bad Request |
|
402 | Client Error |
|
403 | Forbidden |
|
404 | Not 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 |
|
renameModel | rename viewmodel |
Responses
Status Code | Description | Samples |
---|---|---|
200 | Success |
|
400 | Bad Request |
|
402 | Client Error |
|
403 | Forbidden |
|
404 | Not Found |
|
500 | Server Error |
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 |
|
updateModel | update viewmodel |
Responses
Status Code | Description | Samples |
---|---|---|
200 | Success |
|
400 | Bad Request |
|
402 | Client Error |
|
403 | Forbidden |
|
404 | Not Found |
|
500 | Server Error |
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 |
---|---|---|
200 | Success |
|
400 | Bad Request |
|
402 | Client Error |
|
403 | Forbidden |
|
404 | Not Found |
|
500 | Server Error |
UpdateSubscriptionDataSource
Update data source's subscription
Request
PUT /api/data/v1/DataSources/{id}/updateSubscription
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*id | string | data source id |
|
updatesubscriptionModel | update subscription viewmodel |
Responses
Status Code | Description | Samples |
---|---|---|
200 | Success |
|
400 | Bad Request |
|
402 | Client Error |
|
403 | Forbidden |
|
404 | Not Found |
|
500 | Server Error |
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 | Success |
|
400 | Bad Request |
|
402 | Client Error |
|
403 | Forbidden |
|
404 | Not Found |
|
500 | Server Error |
UpdatePermissions
Update permissions
Request
POST /api/data/v1/DataSources/{id}/permissions
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*id | string | ||
permissionsVM |
Responses
Status Code | Description | Samples |
---|---|---|
200 | Success |
|
400 | Bad Request |
|
402 | Client Error |
|
403 | Forbidden |
|
404 | Not Found |
|
500 | Server Error |