Подключения к хранилищам данных (storages)
Запросы
HTTP verb | Endpoint | Описание |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Создание нового подключения к хранилищу
Запрос
Описание полей: storage entity
POST /rest/v1/domain/storages HTTP/1.1
Content-Type: application/json; charset=utf-8
storage entity
Ответ
Описание полей: 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, type, instance, params, opts.title, opts.comment, ext.lwt, ext.ct. |
|
|
Смещение в списке ресурсов, подлежащих выдаче. |
|
|
Максимальное количество ресурсов в списке. |
|
|
Порядок сортировки ресурсов в списке. |
|
|
Преобразование в плоский вид составных полей. |
GET /rest/v1/domain/storages?offset=0&limit=10 HTTP/1.1
Ответ
Описание полей: 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"
}
}
]
Получение данных подключения к хранилищу
Запрос
Имя | Тип | Описание |
---|---|---|
|
|
Список полей для вывода. |
|
|
Преобразование в плоский вид составных полей. |
GET /rest/v1/domain/storages/77544c9c-0178-d0cf-2659-7cd30a921f58 HTTP/1.1
Ответ
Описание полей: 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
Запрос
Описание полей: storage entity
PATCH /rest/v1/domain/storages/77544c9c-0178-d0cf-2659-7cd30a921f58 HTTP/1.1
Content-Type: application/json; charset=utf-8
storage entity
Ответ
Описание полей: 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"
}
}