Timeplus (v1)

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

API keys v1beta1

List API keys

list all API keys created by current user

Authorizations:

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

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

Authorizations:
path Parameters
id
required
string

API key ID

Responses

Response samples

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

Queries v1beta1

format a query.

Format the given query and make it easy to read.

Authorizations:
ApiKeyAuth (
  • create:query
)
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:
ApiKeyAuth (
  • read:query
)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

execute a query.

execute a query.

Authorizations:
ApiKeyAuth (
  • create: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
{
  • "analysis": {
    },
  • "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,
  • "status": "string",
  • "tags": [
    ],
  • "timeColumns": {
    }
}

delete a query.

Delete the query with the given ID.

Authorizations:
ApiKeyAuth (
  • write:query
)
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.

Authorizations:
ApiKeyAuth (
  • read:query
)
path Parameters
id
required
string

query ID

Responses

Response samples

Content type
application/json
{
  • "analysis": {
    },
  • "created_at": "string",
  • "created_by": {
    },
  • "description": "string",
  • "duration": 0,
  • "end_time": 0,
  • "id": "string",
  • "last_updated_at": "string",
  • "last_updated_by": {
    },
  • "message": "string",
  • "metrics": {