Download OpenAPI specification:Download
The public ByteHouse API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
X-Account-ID required | string Example: 2100042608 accountID for subscribing |
X-User-ID required | string Example: 2100042608 user ID |
X-Bytehouse-Token required | string Example: eyJhbGciOiJSUzI1Ni bytehouse token |
{- "message": "Success"
}
X-Account-ID required | string Example: 2100042608 accountID for subscribing |
X-User-ID required | string Example: 2100042608 user ID |
X-Bytehouse-Token required | string Example: eyJhbGciOiJSUzI1Ni bytehouse token |
{- "message": "Success"
}
filter | string |
offset | integer Example: offset=200 skip specified number of elements, offset shuold be >= 0 |
limit | integer Example: limit=100 |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "data": [
- {
- "name": "db_name",
- "type": "DATABASE",
- "uuid": "0c3c217b-5a00-4e44-9538-328dac95625b",
- "createdBy": {
- "id": 4780622283186922000,
- "type": "VOLCANO_MAIN_ACCOUNT"
}, - "createdAt": "2020-11-23T09:23:55.840932013Z"
}
], - "meta": {
- "offset": 4,
- "total": 5
}
}
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
name required | string Example: "db_name" |
description | string Example: "testing database, please don't delete" |
{- "name": "db_name",
- "description": "testing database, please don't delete"
}
{- "data": {
- "uuid": "f9cac8f6-7bf0-4c37-bba1-5066356410a2"
}
}
db_name required | string |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "data": {
- "uuid": "sample_db_uuid",
- "name": "my_db_name",
- "description": "DB description entered by user with limit length.",
- "noOfTables": 12,
- "sizeInBytes": 212600881152,
- "createdBy": {
- "id": 4780622283186922000,
- "type": "VOLCANO_MAIN_ACCOUNT"
}, - "createdAt": "2020-11-23T09:23:55.840932013Z",
- "lastModifiedBy": {
- "id": 4780622283186922000,
- "type": "VOLCANO_MAIN_ACCOUNT"
}, - "lastModifiedAt": "2020-11-23T09:23:55.840932013Z",
- "databaseType": "DATABASE"
}
}
db_name required | string |
filter | string |
offset | integer Example: offset=200 skip specified number of elements, offset shuold be >= 0 |
limit | integer Example: limit=100 |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "data": [
- {
- "uuid": "sample_table_uuid",
- "name": "performance",
- "description": "sample description",
- "tableType": "TABLE",
- "createdBy": {
- "id": 4780622283186922000,
- "type": "VOLCANO_MAIN_ACCOUNT"
}, - "createdAt": "2020-11-23T09:23:55.840932013Z",
- "lastModifiedAt": "2020-11-23T09:23:55.840932013Z"
}
], - "meta": {
- "offset": 4,
- "total": 5
}
}
db_name required | string |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
name required | string Example: "table_name" Name of the table. |
description | string Example: "Hello Table" Description of the table. |
required | Array of objects (Column) Example: [{"name":"ColumnID","type":"String","nullable":false,"defaultValue":"defaultValue","comment":"hello comment"},{"name":"ColumnDate","type":"Date","nullable":false,"defaultValue":"2019-01-01"},{"name":"ColumnHello","type":"int"},{"name":"ColumnNotNull","type":"String","nullable":false}] List of columns of the table. |
orderByKeys required | Array of strings Example: ["ColumnID","ColumnDate"] Name of the column whose values will be used to order the table's data. A key has to be one of the columns. |
samplingKey | string Example: "ColumnID" SAMPLE BY expression. A key has to be one of the columns. |
Array of objects Example: [{"column":"ColumnDate","granularity":"day","expression":"toStartOfDay(`ColumnDate`)"},{"column":"ColumnNotNull","granularity":null,"expression":"ColumnNotNull"}] Keys to partition the table. A key has to be one of the columns. | |
primaryKeys | Array of strings Example: ["ColumnID","ColumnDate"] Primary keys of the table used as the main identifier of the rows. A key has to be one of the columns. |
object Table rows time-to-live (TTL) configuration. | |
object Key used to guarantee uniqueness in the table. A key has to be one of the columns. | |
object Bucket key. Modifiable after creation. A key has to be one of the columns. |
{- "name": "table_name",
- "description": "Hello Table",
- "columns": [
- {
- "name": "ColumnID",
- "type": "String",
- "nullable": false,
- "defaultValue": "defaultValue",
- "comment": "hello comment"
}, - {
- "name": "ColumnDate",
- "type": "Date",
- "nullable": false,
- "defaultValue": "2019-01-01"
}, - {
- "name": "ColumnHello",
- "type": "int"
}, - {
- "name": "ColumnNotNull",
- "type": "String",
- "nullable": false
}
], - "orderByKeys": [
- "ColumnID",
- "ColumnDate"
], - "samplingKey": "ColumnID",
- "partitionKeys": [
- {
- "column": "ColumnDate",
- "granularity": "day",
- "expression": "toStartOfDay(`ColumnDate`)"
}, - {
- "column": "ColumnNotNull",
- "granularity": null,
- "expression": "ColumnNotNull"
}
], - "primaryKeys": [
- "ColumnID",
- "ColumnDate"
], - "ttl": {
- "column": "order_date",
- "value": 3,
- "unit": "MONTH",
- "granularity": "hour",
- "expression": "`toStartOfHour`(`order_date`) + INTERVAL 3 MONTH"
}, - "uniqueKey": {
- "columns": [
- "ColumnID",
- "ColumnDate"
], - "isUniqueTable": true,
- "expression": "(`ColumnID`, `ColumnDate`)"
}, - "clusterKey": {
- "columns": [
- "ColumnID",
- "ColumnDate"
], - "numOfBuckets": 20,
- "expression": "(`ColumnID`, `ColumnDate`)"
}
}
{- "data": {
- "uuid": "f9cac8f6-7bf0-4c37-bba1-5066356410a2"
}
}
db_name required | string |
filter | string |
offset | integer Example: offset=200 skip specified number of elements, offset shuold be >= 0 |
limit | integer Example: limit=100 |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "data": [
- {
- "uuid": "sample_table_uuid",
- "name": "performance",
- "tableType": "TABLE",
- "description": "sample description",
- "createdBy": {
- "id": 4780622283186922000,
- "type": "VOLCANO_MAIN_ACCOUNT"
}, - "createdAt": "2020-11-23T09:23:55.840932013Z",
- "lastModifiedAt": "2020-11-23T09:23:55.840932013Z"
}
], - "meta": {
- "offset": 4,
- "total": 5
}
}
db_name required | string |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "data": {
- "dbSyncStatus": "Running",
- "tableSyncStatus": [
- {
- "tableName": "materialized_mysql_table_1",
- "status": "Running"
}
], - "lastException": "ConnectionFailed"
}
}
db_name required | string |
table_name required | string |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
Array of objects (Column) Example: [{"name":"ColumnID","type":"String","nullable":false,"defaultValue":"defaultValue","comment":"updated_column_comment"},{"name":"ColumnDate","type":"Date","nullable":false,"defaultValue":"2019-01-01"}] | |
dropColumns | Array of strings Example: ["dropColumn1","dropColumn2"] |
Array of objects (Column) Example: [{"name":"ColumnExisting","type":"String","defaultValue":"defaultValue","comment":"you can update data type (including Nullable), default value and comment when modifying columns"},{"name":"ColumnExisting2","type":"Date","nullable":false,"defaultValue":"2019-01-01"}] | |
Array of objects | |
object Table TTL (time to live) for rows - set a new interval for the table TTL | |
isRemoveTTL | boolean Example: false |
{- "addColumns": [
- {
- "name": "ColumnID",
- "type": "String",
- "nullable": false,
- "defaultValue": "defaultValue",
- "comment": "updated_column_comment"
}, - {
- "name": "ColumnDate",
- "type": "Date",
- "nullable": false,
- "defaultValue": "2019-01-01"
}
], - "dropColumns": [
- "dropColumn1",
- "dropColumn2"
], - "modifyColumns": [
- {
- "name": "ColumnExisting",
- "type": "String",
- "defaultValue": "defaultValue",
- "comment": "you can update data type (including Nullable), default value and comment when modifying columns"
}, - {
- "name": "ColumnExisting2",
- "type": "Date",
- "nullable": false,
- "defaultValue": "2019-01-01"
}
], - "renameColumns": [
- {
- "fromName": "old_column_name",
- "toName": "new_column_name"
}
], - "ttl": {
- "column": "order_date",
- "value": 3,
- "unit": "MONTH",
- "granularity": "hour"
}, - "isRemoveTTL": false
}
{ }
db_name required | string |
table_name required | string |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "data": {
- "uuid": "a637ce52-07ca-4e80-b05a-458c42ab2f72",
- "sizeInBytes": 13011000000000,
- "noOfRows": 34567890,
- "createdBy": {
- "id": 4780622283186922000,
- "type": "VOLCANO_MAIN_ACCOUNT"
}, - "createdAt": "2020-11-23T09:23:55.840932013Z",
- "lastModifiedAt": "2020-11-23T09:23:55.840932013Z",
- "name": "table_name",
- "description": "Hello Table",
- "orderByKeys": [
- "ColumnID",
- "ColumnDate"
], - "samplingKey": "ColumnID",
- "partitionKeys": [
- {
- "column": "ColumnDate",
- "granularity": "day",
- "expression": "toStartOfDay(`ColumnDate`)"
}, - {
- "column": "ColumnNotNull",
- "granularity": null,
- "expression": "ColumnNotNull"
}
], - "primaryKeys": [
- "ColumnID",
- "ColumnDate"
], - "ttl": {
- "column": "order_date",
- "value": 3,
- "unit": "MONTH",
- "granularity": "hour",
- "expression": "`toStartOfHour`(`order_date`) + INTERVAL 3 MONTH"
}, - "uniqueKey": {
- "columns": [
- "ColumnID",
- "ColumnDate"
], - "isUniqueTable": true,
- "expression": "(`ColumnID`, `ColumnDate`)"
}, - "clusterKey": {
- "columns": [
- "ColumnID",
- "ColumnDate"
], - "numOfBuckets": 20,
- "expression": "(`ColumnID`, `ColumnDate`)"
}, - "tableType": "TABLE",
- "columns": [
- {
- "uuid": "f965ac8f6-7bf0-4c37-bba1-5066353410a4",
- "name": "ColumnID",
- "type": "String",
- "nullable": false,
- "defaultValue": "defaultValue",
- "queryFrequency": 1000,
- "queryCount": 243242,
- "comment": "hello comment",
- "lastQueryTime": "2020-11-23T09:23:55.840932013Z",
- "fullColumnExpression": "String"
}, - {
- "uuid": "f965ac8f6-7bf0-4c37-bba1-5066353410a5",
- "name": "ColumnDate",
- "type": "Date",
- "nullable": false,
- "defaultValue": "2019-01-01",
- "queryFrequency": 898,
- "queryCount": 24324,
- "lastQueryTime": null,
- "fullColumnExpression": "Date"
}, - {
- "uuid": "f965ac8f6-7bf0-4c37-bba1-5066353410a6",
- "name": "ColumnHello",
- "type": "Int",
- "nullable": true,
- "queryFrequency": 500,
- "queryCount": 2432,
- "lastQueryTime": "2020-11-23T09:23:55.840932013Z",
- "fullColumnExpression": "Nullable(Int)"
}, - {
- "uuid": "f965ac8f6-7bf0-4c37-bba1-5066353410a7",
- "name": "ColumnNotNull",
- "type": "String",
- "nullable": false,
- "queryFrequency": 100,
- "queryCount": 243,
- "lastQueryTime": "2020-11-23T09:23:55.840932013Z",
- "fullColumnExpression": "String"
}, - {
- "uuid": "f965ac8f6-7bf0-4c37-bba1-5066353410a4",
- "name": "ColumnBitEngine",
- "type": "BitMap64",
- "nullable": false,
- "queryFrequency": 100,
- "queryCount": 243,
- "lastQueryTime": "2020-11-23T09:23:55.840932013Z",
- "fullColumnExpression": "Nullable(BitMap64)",
- "encoding_expression": "BitEngineEncode"
}
]
}
}
db_name required | string |
table_name required | string |
limit | integer Example: limit=100 |
offset | integer Example: offset=200 skip specified number of elements, offset shuold be >= 0 |
filter | string |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "data": [
- {
- "partitionName": "partition 1",
- "sizeInBytes": 300,
- "rowCount": 3000,
- "lastModifiedAt": "2020-11-23T09:23:55.840932013Z"
}
], - "meta": {
- "offset": 4,
- "total": 5
}
}
db_name required | string |
table_name required | string |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
partitionNames | Array of strings Example: ["partition_name1"] |
{- "partitionNames": [
- "partition_name1"
]
}
{- "data": "Success"
}
db_name required | string |
table_name required | string |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "data": {
- "maxPartitionName": "`2022-07-31`",
- "minPartitionName": "`2022-07-01`"
}
}
db_name required | string |
filter | string |
offset | integer Example: offset=200 skip specified number of elements, offset shuold be >= 0 |
limit | integer Example: limit=100 |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "data": [
- {
- "uuid": "sample_mv_uuid",
- "name": "performance",
- "description": "sample description",
- "tableType": "MATERIALIZED-VIEW",
- "baseDatabase": "base",
- "baseTable": "table",
- "targetDatabase": "target",
- "targetTable": "table",
- "ratio": 124.1,
- "hitTimes": 100,
- "createdBy": {
- "id": 4780622283186922000,
- "type": "VOLCANO_MAIN_ACCOUNT"
}, - "createdAt": "2020-11-23T09:23:55.840932013Z",
- "lastModifiedAt": "2020-11-23T09:23:55.840932013Z"
}
], - "meta": {
- "offset": 4,
- "total": 5
}
}
db_name required | string |
mv_name required | string |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "data": {
- "uuid": "a637ce52-07ca-4e80-b05a-458c42ab2f72",
- "baseDatabase": "base",
- "baseTable": "table",
- "targetDatabase": "target",
- "targetTable": "table",
- "ratio": 124.1,
- "hitTimes": 100,
- "createdBy": {
- "id": 4780622283186922000,
- "type": "VOLCANO_MAIN_ACCOUNT"
}, - "createdAt": "2020-11-23T09:23:55.840932013Z",
- "lastModifiedAt": "2020-11-23T09:23:55.840932013Z",
- "name": "table_name",
- "description": "Hello Table",
- "orderByKeys": [
- "ColumnID",
- "ColumnDate"
], - "samplingKey": "ColumnID",
- "partitionKeys": [
- {
- "column": "ColumnDate",
- "granularity": "day",
- "expression": "toStartOfDay(`ColumnDate`)"
}, - {
- "column": "ColumnNotNull",
- "granularity": null,
- "expression": "ColumnNotNull"
}
], - "primaryKeys": [
- "ColumnID",
- "ColumnDate"
], - "ttl": {
- "column": "order_date",
- "value": 3,
- "unit": "MONTH",
- "granularity": "hour",
- "expression": "`toStartOfHour`(`order_date`) + INTERVAL 3 MONTH"
}, - "uniqueKey": {
- "columns": [
- "ColumnID",
- "ColumnDate"
], - "isUniqueTable": true,
- "expression": "(`ColumnID`, `ColumnDate`)"
}, - "clusterKey": {
- "columns": [
- "ColumnID",
- "ColumnDate"
], - "numOfBuckets": 20,
- "expression": "(`ColumnID`, `ColumnDate`)"
}, - "tableType": "TABLE",
- "columns": [
- {
- "uuid": "f965ac8f6-7bf0-4c37-bba1-5066353410a4",
- "name": "ColumnID",
- "type": "String",
- "nullable": false,
- "defaultValue": "defaultValue",
- "queryFrequency": 1000,
- "queryCount": 243242,
- "comment": "hello comment",
- "lastQueryTime": "2020-11-23T09:23:55.840932013Z",
- "fullColumnExpression": "String"
}, - {
- "uuid": "f965ac8f6-7bf0-4c37-bba1-5066353410a5",
- "name": "ColumnDate",
- "type": "Date",
- "nullable": false,
- "defaultValue": "2019-01-01",
- "queryFrequency": 898,
- "queryCount": 24324,
- "lastQueryTime": null,
- "fullColumnExpression": "Date"
}, - {
- "uuid": "f965ac8f6-7bf0-4c37-bba1-5066353410a6",
- "name": "ColumnHello",
- "type": "Int",
- "nullable": true,
- "queryFrequency": 500,
- "queryCount": 2432,
- "lastQueryTime": "2020-11-23T09:23:55.840932013Z",
- "fullColumnExpression": "Nullable(Int)"
}, - {
- "uuid": "f965ac8f6-7bf0-4c37-bba1-5066353410a7",
- "name": "ColumnNotNull",
- "type": "String",
- "nullable": false,
- "queryFrequency": 100,
- "queryCount": 243,
- "lastQueryTime": "2020-11-23T09:23:55.840932013Z",
- "fullColumnExpression": "String"
}, - {
- "uuid": "f965ac8f6-7bf0-4c37-bba1-5066353410a4",
- "name": "ColumnBitEngine",
- "type": "BitMap64",
- "nullable": false,
- "queryFrequency": 100,
- "queryCount": 243,
- "lastQueryTime": "2020-11-23T09:23:55.840932013Z",
- "fullColumnExpression": "Nullable(BitMap64)",
- "encoding_expression": "BitEngineEncode"
}
]
}
}
db_name required | string |
table_name required | string |
{- "data": {
- "status": [
- 1
]
}, - "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
X-QuerySession-ID | string Query/Worksheet session ID |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
query required | string Example: "USE TUTORIAL_DB; SELECT * FROM TUTORIAL_DB.Customer;" |
mode required | string Enum: "ansi_sql" "clickhouse_sql" |
vwID | string Example: "vw-compute-wh-test-8839992783" |
queryID | string Example: "optional-1234567891011121314151617181920s211a22231" |
asyncModeSwitchAfterInSec | integer Example: 0 |
maxRowsReturn | integer Example: 2 maximum number of rows return in the result (0 means return all rows) |
{- "query": "USE TUTORIAL_DB; SELECT * FROM TUTORIAL_DB.Customer;",
- "mode": "ansi_sql",
- "vwID": "vw-compute-wh-test-8839992783",
- "queryID": "optional-1234567891011121314151617181920s211a22231",
- "asyncModeSwitchAfterInSec": 0,
- "maxRowsReturn": 2
}
{- "data": [
- {
- "sessionID": "08c2cf17-b4e4-43b7-a93f-6012e5d63ff8",
- "queryID": "08c2cf17-b4e4-43b7-a93f-6012e5d63ff8",
- "sqlStatement": "SELECT *\nFROM `test_db`.`test_table`\nLIMIT 1000",
- "executionType": "QUERY",
- "status": "SUCCESS",
- "startTime": "2020-11-23T09:23:55.840932013Z",
- "endTime": "2020-11-23T09:23:55.840932013Z",
- "durationInMs": 3050,
- "vwResumeDurationInMs": 3000,
- "errorMessage": "Code 100 DB Exception: Unknown Table `fakeDB.fakeTable`",
- "rowsNum": 100,
- "columns": [
- {
- "name": "ColumnID",
- "type": "String",
- "nullable": false,
- "defaultValue": "defaultValue"
}, - {
- "name": "ColumnDate",
- "type": "Date",
- "nullable": false,
- "defaultValue": "2019-01-01"
}
], - "rows": [
- [
- "123456",
- "Linus Torvald",
- "Principal Developer, Linux Kernel",
- "March 21 1990"
], - [
- "123456",
- "Rob Pike",
- "Google Cloud Leading Director",
- "Jan 23 1996"
]
]
}
]
}
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
query required | string Example: "USE TUTORIAL_DB; SELECT * FROM TUTORIAL_DB.Customer;" |
mode required | string Enum: "ansi_sql" "clickhouse_sql" |
vwID | string Example: "vw-compute-wh-test-8839992783" |
queryID | string Example: "optional-1234567891011121314151617181920s211a22231" |
{- "query": "USE TUTORIAL_DB; SELECT * FROM TUTORIAL_DB.Customer;",
- "mode": "ansi_sql",
- "vwID": "vw-compute-wh-test-8839992783",
- "queryID": "optional-1234567891011121314151617181920s211a22231"
}
{- "data": [
- {
- "status": "running",
- "queryID": "query-id-one-two-three",
- "Exception": "Code 100 DB Exception: Unknown Table `fakeDB.fakeTable`"
}
]
}
id required | string Example: b36fa16e-a0ce-4274-a744-621357180928 |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "data": {
- "state": "running",
- "errorMessage": "internal error",
- "sqlStatement": "SELECT 1",
- "startTime": "2020-11-23T09:23:55.840932013Z",
- "endTime": "2020-11-23T09:23:55.840932013Z"
}
}
id required | string Example: b36fa16e-a0ce-4274-a744-621357180928 |
maxRowsReturn | integer Example: maxRowsReturn=2 maximum rows return in the result(0 means return all rows) |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "data": [
- {
- "sessionID": "08c2cf17-b4e4-43b7-a93f-6012e5d63ff8",
- "queryID": "08c2cf17-b4e4-43b7-a93f-6012e5d63ff8",
- "sqlStatement": "SELECT *\nFROM `test_db`.`test_table`\nLIMIT 1000",
- "executionType": "QUERY",
- "status": "SUCCESS",
- "startTime": "2020-11-23T09:23:55.840932013Z",
- "endTime": "2020-11-23T09:23:55.840932013Z",
- "durationInMs": 3050,
- "vwResumeDurationInMs": 3000,
- "errorMessage": "Code 100 DB Exception: Unknown Table `fakeDB.fakeTable`",
- "rowsNum": 100,
- "columns": [
- {
- "name": "ColumnID",
- "type": "String",
- "nullable": false,
- "defaultValue": "defaultValue"
}, - {
- "name": "ColumnDate",
- "type": "Date",
- "nullable": false,
- "defaultValue": "2019-01-01"
}
], - "rows": [
- [
- "123456",
- "Linus Torvald",
- "Principal Developer, Linux Kernel",
- "March 21 1990"
], - [
- "123456",
- "Rob Pike",
- "Google Cloud Leading Director",
- "Jan 23 1996"
]
]
}
]
}
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
query | string Example: "USE TUTORIAL_DB; SELECT * FROM TUTORIAL_DB.Customer;" |
object (UserInfo) |
{- "query": "USE TUTORIAL_DB; SELECT * FROM TUTORIAL_DB.Customer;",
- "userInfo": {
- "accountID": 112233,
- "userID": 112233,
- "activeRole": "AccountAdmin"
}
}
{- "data": {
- "valid": true,
- "message": "access denied, user has not access to table1 ",
- "tables": [
- "databaseName.table1",
- "databaseName.table2"
]
}
}
Create a new API key for current user. The number of API key is limited to 2 per user.
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
noExpiry | boolean Example: false Defines whether the API key has an expiry time or not. If set to true, |
expiryInDays | integer Example: 90 Defines the expiry time (in days) of the created API key starting from time of creation. |
comment | string API key description / comment |
{- "noExpiry": false,
- "expiryInDays": 90,
- "comment": "string"
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "id": "8914859996411850157",
- "key": "qUNomoCoqSokljuoRs5z",
- "status": "ENABLED",
- "noExpiry": false,
- "expiredAt": "2020-11-23T09:23:55.840932013Z",
- "createdAt": "2020-11-23T09:23:55.840932013Z",
- "updatedAt": "2020-11-23T09:23:55.840932013Z",
- "comment": "string"
}
}
Listing all of the current user's API key(s).
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": [
- {
- "id": "8914859996411850157",
- "maskedKey": "qUNomoCoqS**********",
- "status": "ENABLED",
- "expiredAt": "2020-11-23T09:23:55.840932013Z",
- "createdAt": "2020-11-23T09:23:55.840932013Z",
- "updatedAt": "2020-11-23T09:23:55.840932013Z",
- "noExpiry": false,
- "comment": "string",
- "accountID": 0
}
]
}
api_key_id required | string Example: qUNomoCoqSokljuoRs5z ID of User's API Key |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
api_key_id required | string Example: qUNomoCoqSokljuoRs5z ID of User's API Key |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
status | string (ApiKeyStatus) Enum: "ENABLED" "DISABLED" Example: "ENABLED" |
{- "status": "ENABLED"
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
api_key_id required | string Example: qUNomoCoqSokljuoRs5z ID of User's API Key |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
addExpiryInDays | integer Example: 90 |
{- "addExpiryInDays": 90
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "meta": {
- "nextCursor": "nextCursor",
- "prevCursor": "prevCursor",
- "offset": 4,
- "total": 5
}, - "error": {
- "message": "null if no error, otherwise, it will be error message"
}, - "data": {
- "Roles": [
- {
- "ID": 0,
- "AccountID": 0,
- "Name": "string",
- "Parent": "string",
- "Description": "string",
- "CreatedAt": 0,
- "UpdatedAt": 0
}
]
}
}
UserID | integer |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "Roles": [
- {
- "ID": 0,
- "AccountID": 0,
- "Name": "string",
- "Parent": "string",
- "Description": "string",
- "CreatedAt": 0,
- "UpdatedAt": 0
}
]
}
}
Assigning a role to a user enables the target user to assume the role and gain access to all the resources accessible by the role.
To use this, the assigning role has to have the permission to assign role(s), e.g. SystemAdmin
.
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
UserID | integer Example: 1336688750 Target user ID. |
RoleName | string Example: "SystemAdmin" Name of the role to assign. Role must exist under the account. |
{- "UserID": 1336688750,
- "RoleName": "SystemAdmin"
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "AccountID": 670804081,
- "RoleName": "SystemAdmin",
- "UserID": 1336688750,
- "CreatedAt": 1669692114,
- "UpdatedAt": 1669692114
}
}
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
UserID | integer Example: 1336688750 Target user ID. |
RoleName | string Example: "SystemAdmin" Name of the role to assign. Role must exist under the account. |
{- "UserID": 1336688750,
- "RoleName": "SystemAdmin"
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "RoleName": "string",
- "UserID": 0,
- "DeletedAt": 0
}
}
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
RoleName | string |
ByteHouseResourceID | string |
SecureObjectTypeName | string |
ActionName | string |
GrantOption | boolean |
{- "RoleName": "string",
- "ByteHouseResourceID": "string",
- "SecureObjectTypeName": "string",
- "ActionName": "string",
- "GrantOption": true
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "RolePermission": {
- "ID": 0,
- "AccountID": 0,
- "ByteHouseResourceID": "string",
- "SecureObjectType": "string",
- "SecureObjectAction": "string",
- "RoleName": "string",
- "GrantOption": true,
- "CreatedAt": 0,
- "UpdatedAt": 0
}
}
}
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
RoleName | string |
ByteHouseResourceID | string |
SecureObjectTypeName | string |
ActionName | string |
{- "RoleName": "string",
- "ByteHouseResourceID": "string",
- "SecureObjectTypeName": "string",
- "ActionName": "string"
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
RoleName required | string |
ByteHouseResourceID required | string |
SecureObjectTypeName required | string |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "MutableActions": {
- "ActionName": "string",
- "GrantOption": true,
- "InheritedFrom": "string",
- "CreatedAt": 0,
- "UpdatedAt": 0
}, - "ImmutableActions": {
- "ActionName": "string",
- "GrantOption": true,
- "InheritedFrom": "string",
- "CreatedAt": 0,
- "UpdatedAt": 0
}, - "InheritedMutableActions": {
- "ActionName": "string",
- "GrantOption": true,
- "InheritedFrom": "string",
- "CreatedAt": 0,
- "UpdatedAt": 0
}, - "InheritedImmutableActions": {
- "ActionName": "string",
- "GrantOption": true,
- "InheritedFrom": "string",
- "CreatedAt": 0,
- "UpdatedAt": 0
}
}
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "status": "string",
- "accountMode": "string",
- "isMainAccount": true,
- "resources": [
- {
- "instanceID": "string",
- "status": "string",
- "effectiveAt": "2020-11-23T09:23:55.840932013Z",
- "nextStatus": "string",
- "nextEffectiveAt": "2020-11-23T09:23:55.840932013Z"
}
]
}
}
startTime required | string Example: startTime=2021-11-23T09:23:55.840932013Z stats start time |
endTime required | string Example: endTime=2021-11-24T09:23:55.840932013Z stats end time |
dbName | string Example: dbName=dbName db name |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "granularity": 3600,
- "series": [
- {
- "date": "2020-11-23T09:23:55.840932013Z",
- "totalSizeInBytes": 234,
- "totalRows": 234,
- "details": [
- {
- "dbName": "dbName1",
- "sizeInBytes": 2342,
- "rows": 2342
}
]
}
]
}
}
startTime required | string Example: startTime=2021-11-23T09:23:55.840932013Z stats start time |
endTime required | string Example: endTime=2021-11-24T09:23:55.840932013Z stats end time |
vwName | string Example: vwName=vwName vw name |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "granularity": 3600,
- "series": [
- {
- "date": "2020-11-23T09:23:55.840932013Z",
- "totalCredits": 234.1,
- "details": [
- {
- "vwName": "vwName1",
- "credit": 20.24
}
]
}
]
}
}
id required | string Example: b36fa16e-a0ce-4274-a744-621357180928 |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "elapsed": 1,
- "rows_read": 100,
- "bytes_read": 100,
- "total_cpu_seconds": 0.1,
- "io_wait_seconds": 0.1
}
}
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
name required | string (ConnectionName) Example: "s3_sales_report" A descriptive name for your connection, 128 chars or less |
type required | string (ImportSourceType) Enum: "LOCAL" "S3" "TOS" "HIVE" "KAFKA" "KINESIS" "ALI_OSS" "MINIO" "CFS" "LASFS" "MYSQL" "BYTEHOUSE" Example: "TOS" |
required | object |
{- "name": "s3_sales_report",
- "type": "TOS",
- "data": {
- "accessKey": "AKIA1B2C3D4E5F6G7H8IJKLM",
- "secretKey": "94eUOh9w3yEFqJyGW2XdU8NHJO/yTI9RHen4e0iU"
}
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "id": 1
}
}
cursor | string Example: cursor=eyJ2YWx1ZSI6bnVsbCwic29ydF92YWx1ZSI6bnVsbH0= |
limit | integer Example: limit=100 |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "meta": {
- "nextCursor": "nextCursor",
- "prevCursor": "prevCursor",
- "offset": 4,
- "total": 5
}, - "error": {
- "message": "null if no error, otherwise, it will be error message"
}, - "data": [
- {
- "id": 12345,
- "name": "s3_sales_report",
- "type": "TOS",
- "createdAt": "2022-05-10T12:43:56.722117+08:00"
}
]
}
id required | integer |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
name required | string Example: "s3_connection_updated" Name of the connection |
required | object |
{- "name": "s3_connection_updated",
- "data": {
- "accessKey": "AKIA1B2C3D4E5F6G7H8IJKLM",
- "secretKey": "94eUOh9w3yEFqJyGW2XdU8NHJO/yTI9RHen4e0iU"
}
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
id required | integer |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
id required | integer |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "id": 48613,
- "name": "TOS china source",
- "type": "TOS",
- "data": {
- "accessKey": "**********",
- "secretKey": "*************"
}, - "accountID": 3093442639250928000,
- "userID": 1360734397924064800,
- "createdAt": "2022-04-27T04:36:11Z"
}
}
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
name required | string (ImportJobName) Example: "s3-cell-towers-csv" A descriptive name, 128 chars or less |
description | string [Optional] To describe the job in more details |
connectionID | integer ID of the connection which provides credentials to read data from source, for ByteHouse import job, connectionID should be 0 |
required | object (ImportJobConfiguration) |
required | object (ImportJobSourceSchema) Provides schema of the source data, optional for batch data sources |
schemaFile | string Base64 encoded string of protobuf schema file, required for KAFKA PROTOBUF |
state required | string (ImportJobState) Enum: "PUBLISHED" "DRAFT" DRAFT means the job is partially created. |
{- "name": "s3-cell-towers-csv",
- "description": "string",
- "connectionID": 0,
- "configuration": {
- "source": {
- "type": "TOS",
- "properties": {
- "bucket": "bytehouse-data-express-test",
- "region": "cn-north-1",
- "fileNames": "cell_towers.json",
- "pathPrefix": "shared/clickhouse/cell_towers/"
}, - "parser": {
- "type": "CSV",
- "properties": {
- "fieldSeparator": ",",
- "encoding": "UTF-8",
- "header": true,
- "quote": "\""
}
}
}, - "sink": {
- "tableUUID": "ed4549e4-ce9a-41eb-a67d-2117cbb16716",
- "properties": {
- "loadingMode": "FULL_REFRESH"
}
}, - "schema": {
- "strategy": "NAME_CUSTOM_MAPPING",
- "columns": [
- {
- "sourceColumnName": "unit price",
- "sinkColumnName": "unit_price"
}
]
}
}, - "sourceSchema": {
- "properties": [
- {
- "name": "radio",
- "type": "String",
- "example": "UMTS"
}
]
}, - "schemaFile": "string",
- "state": "PUBLISHED"
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "id": 0
}
}
cursor | string Example: cursor=eyJ2YWx1ZSI6bnVsbCwic29ydF92YWx1ZSI6bnVsbH0= |
limit | integer Example: limit=100 |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "meta": {
- "nextCursor": "nextCursor",
- "prevCursor": "prevCursor",
- "offset": 4,
- "total": 5
}, - "error": {
- "message": "null if no error, otherwise, it will be error message"
}, - "data": [
- {
- "id": 398,
- "name": "sample-s3-sales-70",
- "accountID": 8635733085987518000,
- "sourceType": "TOS",
- "tableUUID": "feb4b7a6-fbc7-4164-abf5-a705499b02f9",
- "databaseName": "brian",
- "tableName": "sales",
- "createdAt": "2022-05-10T13:21:21+08:00",
- "createdBy": "8628611004645993074",
- "ingestedRecords": 0,
- "lastExecutionStatus": "RUNNING",
- "state": "PUBLISHED"
}
]
}
id required | integer |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "name": "s3-cell-towers-csv",
- "description": "string",
- "connectionID": 0,
- "configuration": {
- "source": {
- "type": "TOS",
- "properties": {
- "bucket": "bytehouse-data-express-test",
- "region": "cn-north-1",
- "fileNames": "cell_towers.json",
- "pathPrefix": "shared/clickhouse/cell_towers/"
}, - "parser": {
- "type": "CSV",
- "properties": {
- "fieldSeparator": ",",
- "encoding": "UTF-8",
- "header": true,
- "quote": "\""
}
}
}, - "sink": {
- "tableUUID": "ed4549e4-ce9a-41eb-a67d-2117cbb16716",
- "properties": {
- "loadingMode": "FULL_REFRESH"
}
}, - "schema": {
- "strategy": "NAME_CUSTOM_MAPPING",
- "columns": [
- {
- "sourceColumnName": "unit price",
- "sinkColumnName": "unit_price"
}
]
}
}, - "sourceSchema": {
- "properties": [
- {
- "name": "radio",
- "type": "String",
- "example": "UMTS"
}
]
}, - "schemaFile": "string",
- "state": "PUBLISHED"
}
}
id required | integer |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
name required | string (ImportJobName) Example: "s3-cell-towers-csv" A descriptive name, 128 chars or less |
description | string [Optional] To describe the job in more details |
connectionID | integer ID of the connection which provides credentials to read data from source, for ByteHouse import job, connectionID should be 0 |
required | object (ImportJobConfiguration) |
required | object (ImportJobSourceSchema) Provides schema of the source data, optional for batch data sources |
schemaFile | string Base64 encoded string of protobuf schema file, required for KAFKA PROTOBUF |
state required | string (ImportJobState) Enum: "PUBLISHED" "DRAFT" DRAFT means the job is partially created. |
{- "name": "s3-cell-towers-csv",
- "description": "string",
- "connectionID": 0,
- "configuration": {
- "source": {
- "type": "TOS",
- "properties": {
- "bucket": "bytehouse-data-express-test",
- "region": "cn-north-1",
- "fileNames": "cell_towers.json",
- "pathPrefix": "shared/clickhouse/cell_towers/"
}, - "parser": {
- "type": "CSV",
- "properties": {
- "fieldSeparator": ",",
- "encoding": "UTF-8",
- "header": true,
- "quote": "\""
}
}
}, - "sink": {
- "tableUUID": "ed4549e4-ce9a-41eb-a67d-2117cbb16716",
- "properties": {
- "loadingMode": "FULL_REFRESH"
}
}, - "schema": {
- "strategy": "NAME_CUSTOM_MAPPING",
- "columns": [
- {
- "sourceColumnName": "unit price",
- "sinkColumnName": "unit_price"
}
]
}
}, - "sourceSchema": {
- "properties": [
- {
- "name": "radio",
- "type": "String",
- "example": "UMTS"
}
]
}, - "schemaFile": "string",
- "state": "PUBLISHED"
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
id required | integer |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
id required | integer |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
name | string Example: "Job Updated Name" New name of import job |
{- "name": "Job Updated Name"
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
id required | integer |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
description | string Example: "Job Updated Description" New description of import job |
{- "description": "Job Updated Description"
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
id required | integer |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "source.properties.fileStagingLocation": {
- "description": "Full path of uploaded file for the local ingestion job",
- "type": "string",
- "default": "employees.csv",
- "required": true
}
}
}
id required | integer |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
Starting Argument of the file
source.properties.fileNames | string Example: "Forestry_Planting_Spaces.csv" |
{- "source.properties.fileNames": "Forestry_Planting_Spaces.csv"
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "executionID": "fc276d11-381a-43ec-b7d9-cbb76a90d057"
}
}
id required | integer |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
id required | integer |
cursor | string Example: cursor=eyJ2YWx1ZSI6bnVsbCwic29ydF92YWx1ZSI6bnVsbH0= |
limit | integer Example: limit=100 |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "meta": {
- "nextCursor": "nextCursor",
- "prevCursor": "prevCursor",
- "offset": 4,
- "total": 5
}, - "error": {
- "message": "null if no error, otherwise, it will be error message"
}, - "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "jobID": 28834,
- "jobName": "s3-cell-towers-csv",
- "sourceType": "TOS",
- "startedAt": "2022-05-12T03:28:22Z",
- "durationInMs": 10760,
- "status": "RUNNING",
- "diagnostics": "",
- "startedBy": 1360734397924064800,
- "numIngestedRecords": 0,
- "tableUUID": "5f7ae696-651c-4252-b193-74a830c1f21a",
- "percentageCompletion": 99.9,
- "estimatedTimeLeftInMs": 0
}
]
}
cursor | string Example: cursor=eyJ2YWx1ZSI6bnVsbCwic29ydF92YWx1ZSI6bnVsbH0= |
limit | integer Example: limit=100 |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "meta": {
- "nextCursor": "nextCursor",
- "prevCursor": "prevCursor",
- "offset": 4,
- "total": 5
}, - "error": {
- "message": "null if no error, otherwise, it will be error message"
}, - "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "jobID": 40449,
- "jobName": "s3-cell-towers-csv",
- "sourceType": "TOS",
- "category": "BATCH",
- "tableUUID": "feb4b7a6-fbc7-4164-abf5-a705499b02f9",
- "databaseName": "brian",
- "tableName": "sales",
- "startedAt": "2022-05-10T13:21:21+08:00",
- "startedBy": 8628611004645993000,
- "durationInMs": 12420,
- "status": "RUNNING",
- "diagnostics": "string",
- "numIngestedRecords": 0,
- "numRejectedRecords": 0,
- "percentageCompletion": 99.9,
- "estimatedTimeLeftInMs": 0
}
]
}
id required | string <uuid> |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "jobID": 40395,
- "connectionID": 48613,
- "status": "RUNNING",
- "statusChangedAt": "2022-05-04T07:12:31Z",
- "accountID": 3093442639250928000,
- "userID": 1360734397924064800,
- "createdAt": "2022-04-27T04:36:11Z",
- "startedAt": "2022-04-27T04:36:11Z",
- "finishedAt": "0001-01-01T00:00:00Z",
- "durationInMs": 614179673,
- "sourceType": "TOS",
- "configuration": {
- "source": {
- "type": "TOS",
- "properties": {
- "bucket": "bytehouse-data-express-test",
- "region": "cn-north-1",
- "fileNames": "cell_towers.json",
- "pathPrefix": "shared/clickhouse/cell_towers/"
}, - "parser": {
- "type": "CSV",
- "properties": {
- "fieldSeparator": ",",
- "encoding": "UTF-8",
- "header": true,
- "quote": "\""
}
}
}, - "sink": {
- "tableUUID": "ed4549e4-ce9a-41eb-a67d-2117cbb16716",
- "properties": {
- "loadingMode": "FULL_REFRESH"
}
}, - "schema": {
- "strategy": "NAME_CUSTOM_MAPPING",
- "columns": [
- {
- "sourceColumnName": "unit price",
- "sinkColumnName": "unit_price"
}
]
}
}, - "sourceSchema": {
- "properties": [
- {
- "name": "radio",
- "type": "String",
- "example": "UMTS"
}
]
}, - "schemaFile": "",
- "diagnostics": "",
- "numIngestedRecords": 0,
- "numRejectedRecords": 0,
- "percentageCompletion": 99.9,
- "estimatedTimeLeftInMs": 0
}
}
id required | string <uuid> |
limit | integer Example: limit=100 |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "error": {
- "message": "something went wrong, please refer to document or find help from tech support"
}
}
Get historical consuming status of a Kafka execution including current offset, lag and consumption speed. The response will be an array of consuming status of time windows in the period from now back trace to now - 'period' (from query parameter). The time window length is specified by the 'granularity' query parameter.
id required | string Example: b36fa16e-a0ce-4274-a744-621357180928 |
partition required | integer Kafka topic partition used to query kafka consuming status. |
period required | string Example: period=1h Time period to request for kafka historical consuming status and the value should be a valid duration string according to https://pkg.go.dev/time#ParseDuration. |
granularity required | string Example: granularity=2m Time granularity to request for kafka historical consuming status and the value should be a valid duration string according to https://pkg.go.dev/time#ParseDuration. |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}, - "data": [
- {
- "currentOffset": 12345,
- "lag": 2,
- "consumptionSpeed": 3.2,
- "time": "2022-05-12T11:15:00.000+08:00"
}
]
}
limit | integer Example: limit=100 limitation of the response row count.
|
offset | integer Example: offset=200 skip specified number of elements, offset shuold be >= 0 |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "data": [
- {
- "id": "vw-123456789-vwname",
- "name": "depart1_name2",
- "description": "some description about this VW",
- "configID": 123456,
- "status": "up",
- "autoSuspend": 5,
- "autoResume": true,
- "createdAt": "2020-11-23T09:23:55.840932013Z",
- "lastModifiedAt": "2020-11-23T09:23:55.840932013Z"
}
], - "meta": {
- "offset": 4,
- "total": 5
}
}
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
name required | string (VWName) Example: "depart1_name2" vw name.
|
status | string (VWStatusParam) Default: "up" Example: "up" indicate target status of the vw. "up"-run/resume; "down"-suspend. |
autoSuspend | integer (VWAutoSuspend) Default: 0 Example: 5 VW will auto suspend after x minutes of idleness. If set to 0(default), VW will never auto suspend. The value should be >= 0; |
autoResume | boolean (VWAutoResume) Default: false Example: true If set to true, the VW will try auto resume when query arrives. |
configID required | integer (VWConfigID) Example: 123456 configID should > 0, you can get available resource settings by "list config" api. |
description | string (VWDescription) Default: "" Example: "some description about this VW" |
{- "name": "depart1_name2",
- "status": "up",
- "autoSuspend": 5,
- "autoResume": true,
- "configID": 123456,
- "description": "some description about this VW"
}
{- "name": "string",
- "vwID": "vw-123456789-vwname",
- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
Getting the virtual warehouse details by name
name required | string Example: seg1_vw2 vw name |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "id": "vw-123456789-vwname",
- "name": "depart1_name2",
- "description": "some description about this VW",
- "configID": 123456,
- "status": "up",
- "autoSuspend": 5,
- "autoResume": true,
- "createdAt": "2020-11-23T09:23:55.840932013Z",
- "lastModifiedAt": "2020-11-23T09:23:55.840932013Z",
- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
name required | string Example: seg1_vw2 vw name |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
description | string or null (VWDescriptionNullable) Example: "some description about this VW" |
configID | integer or null (VWConfigIDNullable) Example: 123456 configID should > 0, you can get available resource settings by "list config" api. |
status | string or null (VWStatusParamNullable) Example: "up" indicate target status of the vw. "up"-run/resume; "down"-suspend. |
autoSuspend | integer or null (VWAutoSuspendNullable) Example: 5 VW will auto suspend after x minutes of idleness. If set to 0(default), VW will never auto suspend. The value should be >= 0; |
autoResume | boolean or null (VWAutoResumeNullable) Example: true If set to true, the VW will try auto resume when query arrives. |
{- "description": "some description about this VW",
- "configID": 123456,
- "status": "up",
- "autoSuspend": 5,
- "autoResume": true
}
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
name required | string Example: seg1_vw2 vw name |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "message": "Success",
- "error": {
- "message": "omitempty if no error, otherwise, it will be error message"
}
}
limit | integer Example: limit=100 limitation of the response row count.
|
offset | integer Example: offset=200 skip specified number of elements, offset shuold be >= 0 |
X-User-ActiveRole | string Example: AccountAdmin User Active Role |
{- "data": [
- {
- "id": 10,
- "name": "XS",
- "cpu": "0.6",
- "memory": "2Gi",
- "replica": 2,
- "isDefault": true,
- "createdAt": "2020-11-23T09:23:55.840932013Z"
}
], - "meta": {
- "offset": 4,
- "total": 5
}
}