Connections to data warehouses (storages)
Requests
HTTP verb | Endpoint | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new connection to the storage
Request
Field Description: storage entity
POST /rest/v1/domain/storages HTTP/1.1
Content-Type: application/json; charset=utf-8
storage entity
Response
Field Description: storage entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "77544c9c-0178-d0cf-2659-7cd30a921f58",
"instance": "a",
"type": "postgresql",
"params": {
"host": "192.168.0.123",
"port": 5432,
"login": "user01",
"pwd": "PwdOfUser01",
"database": "postgres"
},
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2021-04-14T14:35:39.99Z",
"lwt": "2021-04-14T14:35:39.99Z"
}
}
Getting the list of connections to storages
Request
Name | Type | Description |
---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, type, instance, params, opts.title, opts.comment, ext.lwt, ext.ct. |
|
|
Offset in the list of resources to be issued. |
|
|
The maximum number of resources in the list. |
|
|
The sort order of the resources in the list. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/domain/storages?offset=0&limit=10 HTTP/1.1
Response
Field Description: storage entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "77544c9c-0178-d0cf-2659-7cd30a921f58",
"instance": "a",
"type": "postgresql",
"params": {
"host": "192.168.0.123",
"port": 5432,
"login": "user01",
"pwd": "PwdOfUser01",
"database": "postgres"
},
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2021-04-14T14:35:39.99Z",
"lwt": "2021-04-14T14:35:39.99Z"
}
},
{
"id": "2ee0c204-017b-bf38-52ac-7cd30a921f58",
"instance": "a",
"type": "postgresql",
"params": {
"host": "192.168.0.124",
"port": 5432,
"login": "user01",
"pwd": "PwdOfUser01",
"database": "postgres"
},
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2021-04-14T14:36:15.91Z",
"lwt": "2021-04-14T14:36:15.91Z"
}
},
{
"id": "6dfb0635-0178-ee77-e9e2-7cd30a921f58",
"instance": "b",
"type": "clickhouse",
"params": {
"cluster": "cluster",
"host": "192.168.0.122",
"port": 8123,
"login": "default",
"password": ""
},
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2021-04-20T08:48:59.36Z",
"lwt": "2021-04-22T07:43:21.51Z"
}
},
{
"id": "b26cd0e6-0178-d0f9-5747-7cd30a921f58",
"instance": "b",
"type": "kafka",
"params": {
"endpoints": [
{
"host": "192.168.0.121",
"port": 9092
},
{
"host": "192.168.0.122",
"port": 9092
},
{
"host": "192.168.0.123",
"port": 9092
},
{
"host": "192.168.0.124",
"port": 9092
}
]
},
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2021-04-14T15:21:45.31Z",
"lwt": "2021-04-19T09:04:13.66Z"
}
},
{
"id": "4d0fb97c-0178-ee78-009b-7cd30a921f58",
"instance": "b",
"type": "clickhouse",
"params": {
"cluster": "cluster",
"host": "192.168.0.121",
"port": 8123,
"login": "default",
"password": ""
},
"ext": {
"ct": "2021-04-20T08:49:05.17Z",
"lwt": "2021-04-22T07:42:48.77Z"
},
"opts": {
"comment": "",
"title": ""
}
},
{
"id": "23afc5c0-0178-dba2-e6dd-7cd30a921f58",
"instance": "c",
"type": "kafka",
"params": {
"endpoints": [
{
"host": "192.168.0.121",
"port": 9092
},
{
"host": "192.168.0.121",
"port": 9093
},
{
"host": "192.168.0.122",
"port": 9092
}
]
},
"ext": {
"ct": "2021-04-16T17:03:09.53Z",
"lwt": "2021-04-16T17:03:09.53Z"
},
"opts": {
"comment": "",
"title": ""
}
},
{
"id": "1a2325b6-017b-abab-bba4-7cd30a921f58",
"instance": "fstest",
"type": "fs",
"params": {
"prefix": "fstest_attaches"
},
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2021-09-03T12:39:23.81Z",
"lwt": "2021-09-03T12:43:01.44Z"
}
},
{
"id": "9495206e-017b-bf36-e4e3-7cd30a921f58",
"instance": "s3test",
"type": "s3",
"params": {
"bucket": "my_bucket",
"keyId": "Abc-QwERtYUi-ASDfGh",
"secretKey": "S5FCFt1BDPqPJu5etEECSa8FXP8y4cwG1R5btFjb"
},
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2021-09-05T12:48:51.57Z",
"lwt": "2021-09-05T12:48:51.57Z"
}
}
]
Obtaining connection data to the storage
Request
Name | Type | Description |
---|---|---|
|
|
A list of fields to output. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/domain/storages/77544c9c-0178-d0cf-2659-7cd30a921f58 HTTP/1.1
Response
Field Description: storage entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "77544c9c-0178-d0cf-2659-7cd30a921f58",
"instance": "a",
"type": "postgresql",
"params": {
"host": "192.168.0.123",
"port": 5432,
"login": "user01",
"pwd": "PwdOfUser01",
"database": "postgres"
},
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2021-04-14T14:35:39.99Z",
"lwt": "2021-04-14T14:35:39.99Z"
}
}
Changing storage connection data
Fields prohibited for modification: id
Request
Field Description: storage entity
PATCH /rest/v1/domain/storages/77544c9c-0178-d0cf-2659-7cd30a921f58 HTTP/1.1
Content-Type: application/json; charset=utf-8
storage entity
Response
Field Description: storage entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "77544c9c-0178-d0cf-2659-7cd30a921f58",
"instance": "a",
"type": "postgresql",
"params": {
"host": "192.168.0.123",
"port": 5432,
"login": "user01",
"pwd": "PwdOfUser01",
"database": "postgres"
},
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2021-04-14T15:22:49.35Z",
"lwt": "2021-04-14T15:22:49.35Z"
}
}
Deleting a storage connection
Searching for storage connection ID
Searches the resource for the specified key, returns the identifier(s) to build the endpoint.
Key fields to search for: id, instance
Request
LOOKUP /rest/v1/domain/storages HTTP/1.1
Content-Type: application/json; charset=utf-8
"a"
Response
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
[
"2ee0c204-017b-bf38-52ac-7cd30a921f58"
]
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
{
"error_code": 1404,
"error_message": "Lookup failed"
}