Timeplus (v1beta1)

Download OpenAPI specification:Download

Welcome to the Timeplus HTTP REST API specification.

Authentication

ApiKeyAuth

use API keys created via the CreateAPIKey API to authorize API access.

Security Scheme Type API Key
Header parameter name: X-Api-Key

tenants

list tenants

Get all tenants

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create a tenant.

Create a tenant.

Request Body schema: application/json

create tenant request parameters

host
string
name
string

Responses

Request samples

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

Response samples

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

delete a tenant.

Delete a tenant with the given ID.

path Parameters
id
required
string

tenant ID

Responses

Response samples

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

get a tenant.

Get a tenant with the given ID.

path Parameters
id
required
string

tenant ID

Responses

Response samples

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

return metatdata config of the specific tenant.

return metatdata config of the specific tenant

Responses

Response samples

Content type
application/json
{
  • "build_time": "string",
  • "commit": "string",
  • "objects": {
    },
  • "vervion": "string"
}

load metadata for specific tenant.

load metadata for specific tenant

Request Body schema: application/json

tenant metadata parameters

build_time
string
commit
string
object
vervion
string

Responses

Request samples

Content type
application/json
{
  • "build_time": "string",
  • "commit": "string",
  • "objects": {
    },
  • "vervion": "string"
}

Response samples

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

API keys

List API keys

list all API keys created by current user

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an API key

create a new API key with optional expiration, the created API key represents the owner thus has the same permissions as the owner

Request Body schema: application/json

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

Responses

Request samples

Content type
application/json
{
  • "expire_at": "2022-06-07T12:00:00Z08:00",
  • "expire_in": "24h",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "api_key": "vthm5o5ENm4TaX5RcixG+DB8q9ALQtrU3VlfQBVFv1lQauWeDXR87MI5kOjXG",
  • "created_at": 1257894000,
  • "expire_at": 1257894000,
  • "id": "string",
  • "name": "string",
  • "permissions": [
    ]
}

Delete an API key

delete the API key with the specified ID

query Parameters
ID
required
string

API key ID

Responses

Response samples

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

queries

format a query.

Format the given query and make it easy to read.

Authorizations:
None
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.

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

execute a query.

execute a query.

Authorizations:
None
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.

Authorizations:
None
path Parameters
id
required
string

query ID

Responses

Response samples

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

get a query.

Get the query wi