Download OpenAPI specification:Download
Welcome to the Timeplus HTTP REST API specification.
[- {
- "created_at": 1257894000,
- "expire_at": 1257894000,
- "id": "string",
- "name": "string",
- "permissions": [
- "read:query",
- "write:query"
]
}
]
create a new API key with optional expiration, the created API key represents the owner thus has the same permissions as the owner
API Key parameters
expire_at | string <RFC3339> define the expiration time of the API key by specifying the exact date time, cannot use with expire_in |
expire_in | string define the expiration time of the API key by specifying the amount of time to count from now, cannot use with expire_at |
name required | string [ 3 .. 64 ] characters the name of the API key |
{- "expire_at": "2022-06-07T12:00:00Z08:00",
- "expire_in": "24h",
- "name": "string"
}
{- "api_key": "vthm5o5ENm4TaX5RcixG+DB8q9ALQtrU3VlfQBVFv1lQauWeDXR87MI5kOjXG",
- "created_at": 1257894000,
- "expire_at": 1257894000,
- "id": "string",
- "name": "string",
- "permissions": [
- "read:query",
- "write:query"
]
}
Format the given query and make it easy to read.
the query SQL to be formatted
sql | string |
{- "sql": "string"
}
{- "sql": "string"
}
[- {
- "analysis": {
- "group_by_columns": [
- "string"
], - "has_aggr": true,
- "has_subquery": true,
- "has_table_join": true,
- "has_union": true,
- "is_streaming": true,
- "original_query": "string",
- "query_type": "string",
- "required_columns": [
- {
- "column": "string",
- "column_type": "string",
- "database": "string",
- "is_view": true,
- "table": "string"
}
], - "result_columns": [
- {
- "column": "string",
- "column_type": "string",
- "database": "string",
- "is_view": true,
- "table": "string"
}
], - "rewritten_query": "string"
}, - "created_at": "string",
- "created_by": {
- "id": "string",
- "name": "string"
}, - "description": "string",
- "duration": 0,
- "end_time": 0,
- "id": "string",
- "last_updated_at": "string",
- "last_updated_by": {
- "id": "string",
- "name": "string"
}, - "message": "string",
- "name": "string",
- "response_time": 0,
- "result": {
- "data": [
- [
- null
]
], - "header": [
- {
- "name": "string",
- "type": "string"
}
]
}, - "sinks": {
- "property1": {
- "failure_count": 0,
- "success_count": 0
}, - "property2": {
- "failure_count": 0,
- "success_count": 0
}
}, - "sql": "string",
- "start_time": 0,
- "status": "string",
- "tags": [
- "string"
], - "timeColumns": {
- "eventTime": 0,
- "indexTime": 0,
- "windowEnd": 0,
- "windowStart": 0
}
}
]
execute a query.
query request parameters
description | string |
name | string |
sql | string |
tags | Array of strings |
{- "description": "string",
- "name": "string",
- "sql": "string",
- "tags": [
- "string"
]
}
{- "analysis": {
- "group_by_columns": [
- "string"
], - "has_aggr": true,
- "has_subquery": true,
- "has_table_join": true,
- "has_union": true,
- "is_streaming": true,
- "original_query": "string",
- "query_type": "string",
- "required_columns": [
- {
- "column": "string",
- "column_type": "string",
- "database": "string",
- "is_view": true,
- "table": "string"
}
], - "result_columns": [
- {
- "column": "string",
- "column_type": "string",
- "database": "string",
- "is_view": true,
- "table": "string"
}
], - "rewritten_query": "string"
}, - "created_at": "string",
- "created_by": {
- "id": "string",
- "name": "string"
}, - "description": "string",
- "duration": 0,
- "end_time": 0,
- "id": "string",
- "last_updated_at": "string",
- "last_updated_by": {
- "id": "string",
- "name": "string"
}, - "message": "string",
- "name": "string",
- "response_time": 0,
- "result": {
- "data": [
- [
- null
]
], - "header": [
- {
- "name": "string",
- "type": "string"
}
]
}, - "sinks": {
- "property1": {
- "failure_count": 0,
- "success_count": 0
}, - "property2": {
- "failure_count": 0,
- "success_count": 0
}
}, - "sql": "string",
- "start_time": 0,
- "status": "string",
- "tags": [
- "string"
], - "timeColumns": {
- "eventTime": 0,
- "indexTime": 0,
- "windowEnd": 0,
- "windowStart": 0
}
}
Get the query with the given ID.
id required | string query ID |
{- "analysis": {
- "group_by_columns": [
- "string"
], - "has_aggr": true,
- "has_subquery": true,
- "has_table_join": true,
- "has_union": true,
- "is_streaming": true,
- "original_query": "string",
- "query_type": "string",
- "required_columns": [
- {
- "column": "string",
- "column_type": "string",
- "database": "string",
- "is_view": true,
- "table": "string"
}
], - "result_columns": [
- {
- "column": "string",
- "column_type": "string",
- "database": "string",
- "is_view": true,
- "table": "string"
}
], - "rewritten_query": "string"
}, - "created_at": "string",
- "created_by": {
- "id": "string",
- "name": "string"
}, - "description": "string",
- "duration": 0,
- "end_time": 0,
- "id": "string",
- "last_updated_at": "string",
- "last_updated_by": {
- "id": "string",
- "name": "string"
}, - "message": "string",
- "name": "string",
- "response_time": 0,
- "result": {
- "data": [
- [
- null
]
], - "header": [
- {
- "name": "string",
- "type": "string"
}
]
}, - "sinks": {
- "property1": {
- "failure_count": 0,
- "success_count": 0
}, - "property2": {
- "failure_count": 0,
- "success_count": 0
}
}, - "sql": "string",
- "start_time": 0,
- "status": "string",
- "tags": [
- "string"
], - "timeColumns": {
- "eventTime": 0,