Timeplus (v1beta1)

Download OpenAPI specification:Download

Welcome to the Timeplus HTTP REST API specification.

query

query data from streams with SQL

execute a SQL that is not a query like DDL operation.

Execute a SQL that is not a query like DDL operation.

Request Body schema: application/json

the query to be executed

sql
string

Responses

Request samples

Content type
application/json
{
  • "sql": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

format a query.

Format the given query and make it easy to read.

Request Body schema: application/json

the query SQL to be formatted

sql
string

Responses

Request samples

Content type
application/json
{
  • "sql": "string"
}

Response samples

Content type
application/json
{
  • "sql": "string"
}

list queries.

Get all queries.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

execute a query.

execute a query.

Request Body schema: application/json

query request parameters

description
string
name
string
sql
string
tags
Array of strings

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "string",
  • "sql": "string",
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "created_at": "string",
  • "created_by": {
    },
  • "description": "string",
  • "duration": 0,
  • "end_time": 0,
  • "id": "string",
  • "last_updated_at": "string",
  • "last_updated_by": {
    },
  • "message": "string",
  • "name": "string",
  • "response_time": 0,
  • "result": {
    },
  • "sinks": {
    },
  • "sql": "string",
  • "start_time": 0,
  • "stat": {
    },
  • "status": "string",
  • "tags": [
    ],
  • "timeColumns": {
    }
}

delete a query.

Delete the query with the given ID.

path Parameters
id
required
string

query ID

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

get a query.

Get the query with the given ID.

path Parameters
id
required
string

query ID

Responses

Response samples

Content type
application/json
{
  • "created_at": "string",
  • "created_by": {
    },
  • "description": "string",
  • "duration": 0,
  • "end_time": 0,
  • "id": "string",
  • "last_updated_at": "string",
  • "last_updated_by": {
    },
  • "message": "string",
  • "name": "string",
  • "response_time": 0,
  • "result": {
    },
  • "sinks": {
    },
  • "sql": "string",
  • "start_time": 0,
  • "stat": {
    },
  • "status": "string",
  • "tags": [
    ],
  • "timeColumns": {
    }
}

cancel a query.

Cancel the query with the given ID.

path Parameters
id
required
string

query ID

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

list sinks.

list all sinks that are attached to the query with the query ID.

path Parameters
id
required
string

query ID

Responses

Response samples

Content type
application/json
[
  • "string"
]

add a sink to a query.

Add a sink to an existing query.

path Parameters
id
required
string

query ID

Request Body schema: application/json

sink to be added

sink_id
string

Responses

Request samples

Content type
application/json
{
  • "sink_id": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

remove a sink from a query.

Remove a sink with the given sink ID from an existing query.

path Parameters
id
required
string

query ID

sink_id
required
string

sink ID

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

run a SQL.

Run a SQL.

Request Body schema: application/json

the SQL to run

sql
string
timeout
integer

Responses

Request samples

Content type
application/json
{
  • "sql": "string",
  • "timeout": 0
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "header": [
    ]
}

analyze sql

analyze sql

Request Body schema: application/json

sql request parameters

sql
string

Responses

Request samples

Content type
application/json
{
  • "sql": "string"
}

Response samples

Content type
application/json
{
  • "has_aggr": "string",
  • "has_subquery": "string",
  • "has_table_join": "string",
  • "has_union": "string",
  • "original_query": "string",
  • "query_type": "string",
  • "required_columns": [
    ],
  • "result_columns": [
    ],
  • "rewritten_query": "string"
}

stream query result via websocket

stream query result via websocket

path Parameters
id
required
string

query id

Responses

sink

route query results to various destinations

list sinks

Get all sinks

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create a sink.

Create a sink.

Request Body schema: application/json

create sink request parameters

name
string
object
type
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "properties": { },
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "properties": { },
  • "type": "string"
}