diff --git a/README.md b/README.md index 0f5e8b9c..3f1e874c 100644 --- a/README.md +++ b/README.md @@ -36,12 +36,11 @@ This command generates static content into the `build` directory and can be serv It has been configured to deploy new changes to docs.timeplus.com via Netlify. ### Localization -Currently English is the only official language for the documentation and we are working on other languages, starting from Simplified Chinese. -[![Crowdin](https://badges.crowdin.net/timeplus-docs/localized.svg)](https://crowdin.com/project/timeplus-docs) It's managed by Crowdin and welcome any contribution. +Currently English is the only official language for the documentation. ### Update Neutron REST API doc 1. Make sure your Neutron is up-to-date 2. Go to your Neutron folder, `make gen_api_doc` to generate `docs/swagger.yaml` 3. Go back to this folder and modify the `root` inside the `.redocly.yaml`, make sure the path is correct -4. `yarn rest-doc` +4. `yarn run rest-doc` diff --git a/static/rest.html b/static/rest.html index f0574a49..e94b2d57 100644 --- a/static/rest.html +++ b/static/rest.html @@ -12,7 +12,7 @@ margin: 0; } - -

Timeplus (v1)

Download OpenAPI specification:Download

Timeplus (v1)

Download OpenAPI specification:

Welcome to the Timeplus HTTP REST API specification.

-

Alerts v1beta2

list alerts

Alerts v1beta2

list alerts

Get all alerts.

-
Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create an alert

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create an alert

Create an alert. Please refer to the documentation of alert for more details.

-
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

create alert request parameters

action
required
string

Detailed properties to create the sink

resolve_sql
string
severity
required
integer
trigger_sql
required
string

Persistent query template - the following properties are used to create the persistent query

-

Responses

Request samples

Content type
application/json
{
  • "action": "string",
  • "description": "string",
  • "name": "string",
  • "properties": {
    },
  • "resolve_sql": "string",
  • "severity": 0,
  • "trigger_sql": "string"
}

Response samples

Content type
application/json
{
  • "action": "string",
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "string",
  • "id": "string",
  • "instance": {
    },
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "message": "string",
  • "name": "string",
  • "properties": {
    },
  • "resolve_query": {
    },
  • "resolve_sql": "string",
  • "severity": 0,
  • "status": "running",
  • "trigger_query": {
    },
  • "trigger_sql": "string"
}

delete an alert

Responses

Request samples

Content type
application/json
{
  • "action": "string",
  • "description": "string",
  • "name": "string",
  • "properties": {
    },
  • "resolve_sql": "string",
  • "severity": 0,
  • "trigger_sql": "string"
}

Response samples

Content type
application/json
{
  • "action": "string",
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "string",
  • "id": "string",
  • "instance": {
    },
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "message": "string",
  • "name": "string",
  • "properties": {
    },
  • "resolve_query": {
    },
  • "resolve_sql": "string",
  • "severity": 0,
  • "status": "running",
  • "trigger_query": {
    },
  • "trigger_sql": "string"
}

delete an alert

Delete the alert with the given ID.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

alert ID

-

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get an alert

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get an alert

Get an alert with the given ID.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

alert ID

-

Responses

Response samples

Content type
application/json
{
  • "action": "string",
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "string",
  • "id": "string",
  • "instance": {
    },
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "message": "string",
  • "name": "string",
  • "properties": {
    },
  • "resolve_query": {
    },
  • "resolve_sql": "string",
  • "severity": 0,
  • "status": "running",
  • "trigger_query": {
    },
  • "trigger_sql": "string"
}

update an alert

Responses

Response samples

Content type
application/json
{
  • "action": "string",
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "string",
  • "id": "string",
  • "instance": {
    },
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "message": "string",
  • "name": "string",
  • "properties": {
    },
  • "resolve_query": {
    },
  • "resolve_sql": "string",
  • "severity": 0,
  • "status": "running",
  • "trigger_query": {
    },
  • "trigger_sql": "string"
}

update an alert

Update the specific alert with the given ID.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

alert ID

-
Request Body schema: application/json
required
Request Body schema: application/json
required

update alert request parameters

action
required
string

Detailed properties to create the sink

resolve_sql
string
severity
required
integer
trigger_sql
required
string

Persistent query template - the following properties are used to create the persistent query

-

Responses

Request samples

Content type
application/json
{
  • "action": "string",
  • "description": "string",
  • "name": "string",
  • "properties": {
    },
  • "resolve_sql": "string",
  • "severity": 0,
  • "trigger_sql": "string"
}

Response samples

Content type
application/json
{
  • "action": "string",
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "string",
  • "id": "string",
  • "instance": {
    },
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "message": "string",
  • "name": "string",
  • "properties": {
    },
  • "resolve_query": {
    },
  • "resolve_sql": "string",
  • "severity": 0,
  • "status": "running",
  • "trigger_query": {
    },
  • "trigger_sql": "string"
}

resolve a triggered alert

Responses

Request samples

Content type
application/json
{
  • "action": "string",
  • "description": "string",
  • "name": "string",
  • "properties": {
    },
  • "resolve_sql": "string",
  • "severity": 0,
  • "trigger_sql": "string"
}

Response samples

Content type
application/json
{
  • "action": "string",
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "string",
  • "id": "string",
  • "instance": {
    },
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "message": "string",
  • "name": "string",
  • "properties": {
    },
  • "resolve_query": {
    },
  • "resolve_sql": "string",
  • "severity": 0,
  • "status": "running",
  • "trigger_query": {
    },
  • "trigger_sql": "string"
}

resolve a triggered alert

Manually resolve a triggered alert so that it can be triggered again by the trigger event in the future.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

alert ID

-

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

start an alert

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

start an alert

Start the alert with the given ID. If the alert is already running, the API does nothing and returns 204.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Alert ID

-

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

stop an alert

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

stop an alert

Stop the alert with the given ID.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

alert ID

-

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

API keys v1beta2

list API keys

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

API keys v1beta2

list API keys

Get all API keys created by current user. The tenant owner will get all the API keys regardless of the creator.

-
Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create an API key

Authorizations:
ApiKeyAuth

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:
ApiKeyAuth
Request Body schema: application/json
Authorizations:
ApiKeyAuth
Request Body schema: application/json

API Key parameters

expire_at
string <RFC3339>
Responses

Request samples

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

Response samples

Content type
application/json
{
  • "api_key": "vthm5o5ENm4TaX5RcixG+DB8q9ALQtrU3VlfQBVFv1lQauWeDXR87MI5kOjXG",
  • "created_at": 1257894000,
  • "created_by": {
    },
  • "expire_at": 1257894000,
  • "id": "string",
  • "name": "myAPIKey (vthm****OjXG)",
  • "permissions": [
    ]
}

delete an API key

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "api_key": "vthm5o5ENm4TaX5RcixG+DB8q9ALQtrU3VlfQBVFv1lQauWeDXR87MI5kOjXG",
  • "created_at": 1257894000,
  • "created_by": {
    },
  • "expire_at": 1257894000,
  • "id": "string",
  • "name": "myAPIKey (vthm****OjXG)",
  • "permissions": [
    ]
}

delete an API key

Delete the API key with the givin ID. The tenant owner is able to delete the API key regardless of the creator.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

API key ID

-

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

Dashboards v1beta2

list dashboards

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

Dashboards v1beta2

list dashboards

Get all dashboards.

-
Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create a dashboard

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create a dashboard

Create a dashboard.

-
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

dashboard request parameters

-
description
string
name
required
string
Array of objects (dashboard.Panel)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "string",
  • "id": "string",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "string",
  • "panels": [
    ]
}

delete a dashboard

description
string
name
required
string
Array of objects (dashboard.Panel)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "string",
  • "id": "string",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "string",
  • "panels": [
    ]
}

delete a dashboard

Delete the dashboard with the given ID.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

dashboard ID

-

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get a dashboard

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get a dashboard

get a dashboard.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

dashboard ID

-

Responses

Response samples

Content type
application/json
{
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "string",
  • "id": "string",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "string",
  • "panels": [
    ]
}

update a dashboard

Responses

Response samples

Content type
application/json
{
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "string",
  • "id": "string",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "string",
  • "panels": [
    ]
}

update a dashboard

Update the specific dashboard with the given ID.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

dashboard ID

-
Request Body schema: application/json
required
Request Body schema: application/json
required

update dashboard request parameters

-
description
string
name
required
string
Array of objects (dashboard.Panel)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "string",
  • "id": "string",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "string",
  • "panels": [
    ]
}

Databases v1beta2

list databases

description
string
name
required
string
Array of objects (dashboard.Panel)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "string",
  • "id": "string",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "string",
  • "panels": [
    ]
}

Databases v1beta2

list databases

Get all databases.

-
Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

External streams v1beta2

list external streams

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Dictionaries v1beta2

list dictionary

Get all dictionaries.

+
Authorizations:
ApiKeyAuth
query Parameters
db
string

database

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

delete a dictionary

Delete the dictionary with the given name.

+
Authorizations:
ApiKeyAuth
path Parameters
name
required
string

dictionary name

+
query Parameters
db
string

database

+

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get a dictionary

Get the dictionary with the given name.

+
Authorizations:
ApiKeyAuth
path Parameters
name
required
string

dictionary name

+
query Parameters
db
string

database

+

Responses

Response samples

Content type
application/json
{
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "string",
  • "id": "string",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "string",
  • "query": "string"
}

External streams v1beta2

list external streams

Get all external streams.

-
Authorizations:
ApiKeyAuth
query Parameters
db
string
Authorizations:
ApiKeyAuth
query Parameters
db
string

database

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create an external stream

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create an external stream

Create an external stream.

-
Authorizations:
ApiKeyAuth
query Parameters
db
string
Authorizations:
ApiKeyAuth
query Parameters
db
string

database

-
Request Body schema: application/json
required
Request Body schema: application/json
required

create external stream request parameters

Array of objects (ColumnDef)

Required if this is a kafka external stream

-
description
string
name
required
string
required
Array of objects (StreamSetting)

Responses

Request samples

Content type
application/json
{
  • "columns": [
    ],
  • "description": "a sample kafka external stream",
  • "name": "external_kafka",
  • "settings": [
    ]
}

Response samples

Content type
application/json
{
  • "columns": [
    ],
  • "description": "a sample kafka external stream",
  • "name": "external_kafka",
  • "settings": [
    ]
}

delete an external stream

description
string
name
required
string
required
Array of objects (StreamSetting)

Responses

Request samples

Content type
application/json
{
  • "columns": [
    ],
  • "description": "a sample kafka external stream",
  • "name": "external_kafka",
  • "settings": [
    ]
}

Response samples

Content type
application/json
{
  • "columns": [
    ],
  • "description": "a sample kafka external stream",
  • "name": "external_kafka",
  • "settings": [
    ]
}

delete an external stream

Delete the external stream with the given name.

-
Authorizations:
ApiKeyAuth
path Parameters
name
required
string
Authorizations:
ApiKeyAuth
path Parameters
name
required
string

external stream name

query Parameters
db
string

database

-

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get an external stream

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get an external stream

Get the external stream with the given name.

-
Authorizations:
ApiKeyAuth
path Parameters
name
required
string
Authorizations:
ApiKeyAuth
path Parameters
name
required
string

external stream name

query Parameters
db
string

database

-

Responses

Response samples

Content type
application/json
{
  • "columns": [
    ],
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "my test stream",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "test_external_stream",
  • "settings": [
    ]
}

get the stats of an external stream

Responses

Response samples

Content type
application/json
{
  • "columns": [
    ],
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "my test stream",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "test_external_stream",
  • "settings": [
    ],
  • "type": "string"
}

get the stats of an external stream

Get the stats of an external stream with the given name.

-
Authorizations:
ApiKeyAuth
path Parameters
name
required
string
Authorizations:
ApiKeyAuth
path Parameters
name
required
string

external stream name

query Parameters
db
string

database

historyDays
integer

number of days of the history metrics, must be >= 1 and <= 7 if set

-

Responses

Response samples

Content type
application/json
{
  • "history": [
    ],
  • "read_bps": 0,
  • "read_eps": 0,
  • "written_bps": 0,
  • "written_eps": 0
}

preview an external stream

Responses

Response samples

Content type
application/json
{
  • "history": [
    ],
  • "read_bps": 0,
  • "read_eps": 0,
  • "written_bps": 0,
  • "written_eps": 0
}

preview an external stream

Preview an external stream.

-
Authorizations:
ApiKeyAuth
query Parameters
db
string
Authorizations:
ApiKeyAuth
query Parameters
db
string

database

-
Request Body schema: application/json
required
Request Body schema: application/json
required

preview external stream request parameters

count
integer

Number of preview events. Defaulted to 1

@@ -735,87 +795,87 @@ " class="sc-dJkDXt sc-eXfTSZ eOvdyU gdUGMw">

Preview from the earliest or latest offset of the stream. Defaulted to latest

required
Array of objects (StreamSetting)
timeout
integer

Preview timeout in seconds. Defaulted to 60

-

Responses

Request samples

Content type
application/json
{
  • "count": 1,
  • "offset": "latest",
  • "settings": [
    ],
  • "timeout": 60
}

Response samples

Content type
application/json
[
  • {
    }
]

External tables v1beta2

list external tables

Responses

Request samples

Content type
application/json
{
  • "count": 1,
  • "offset": "latest",
  • "settings": [
    ],
  • "timeout": 60
}

Response samples

Content type
application/json
[
  • {
    }
]

External tables v1beta2

list external tables

Get all external tables.

-
Authorizations:
ApiKeyAuth
query Parameters
db
string
Authorizations:
ApiKeyAuth
query Parameters
db
string

database

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create an external table

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create an external table

Create an external table.

-
Authorizations:
ApiKeyAuth
query Parameters
db
string
Authorizations:
ApiKeyAuth
query Parameters
db
string

database

-
Request Body schema: application/json
required
Request Body schema: application/json
required

create external table request parameters

-
description
string
name
required
string
required
Array of objects (StreamSetting)

Responses

Request samples

Content type
application/json
{
  • "description": "a sample kafka external stream",
  • "name": "external_kafka",
  • "settings": [
    ]
}

Response samples

Content type
application/json
{
  • "description": "a sample kafka external stream",
  • "name": "external_kafka",
  • "settings": [
    ]
}

delete an external table

description
string
name
required
string
required
Array of objects (StreamSetting)

Responses

Request samples

Content type
application/json
{
  • "description": "a sample kafka external stream",
  • "name": "external_kafka",
  • "settings": [
    ]
}

Response samples

Content type
application/json
{
  • "description": "a sample kafka external stream",
  • "name": "external_kafka",
  • "settings": [
    ]
}

delete an external table

Delete the external table with the given name.

-
Authorizations:
ApiKeyAuth
path Parameters
name
required
string
Authorizations:
ApiKeyAuth
path Parameters
name
required
string

external table name

query Parameters
db
string

database

-

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get an external table

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get an external table

Get the external table with the given name.

-
Authorizations:
ApiKeyAuth
path Parameters
name
required
string
Authorizations:
ApiKeyAuth
path Parameters
name
required
string

external table name

query Parameters
db
string

database

-

Responses

Response samples

Content type
application/json
{
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "my test table",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "test_external_table",
  • "settings": [
    ]
}

Queries v1beta2

format a query

Responses

Response samples

Content type
application/json
{
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "my test table",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "test_external_table",
  • "settings": [
    ],
  • "type": "string"
}

Queries v1beta2

format a query

Format the given query and make it easy to read.

-
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

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

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
query Parameters
tag
string
Authorizations:
ApiKeyAuth
query Parameters
tag
string

filter by tag

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

execute a query and return the results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

execute a query and return the results

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

query request parameters

-
object (BatchingPolicy)
description
string
name
string
sql
required
string
tags
Array of strings

Responses

Request samples

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

Response samples

Content type
{
  • "analysis": {
    },
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "ad-hoc streaming query",
  • "duration": 10,
  • "end_time": 1689809152,
  • "id": "UUID",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "message": "string",
  • "name": "test_query",
  • "response_time": 1,
  • "result": {
    },
  • "sinks": {
    },
  • "sql": "select * from iot",
  • "start_time": 1689809142,
  • "status": "running",
  • "tags": [
    ],
  • "timeColumns": {
    }
}

delete a query

object (BatchingPolicy)
description
string
name
string
sql
required
string
tags
Array of strings

Responses

Request samples

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

Response samples

Content type
{
  • "analysis": {
    },
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "ad-hoc streaming query",
  • "duration": 10,
  • "end_time": 1689809152,
  • "id": "UUID",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "message": "string",
  • "name": "test_query",
  • "response_time": 1,
  • "result": {
    },
  • "sinks": {
    },
  • "sql": "select * from iot",
  • "start_time": 1689809142,
  • "status": "running",
  • "tags": [
    ],
  • "timeColumns": {
    }
}

delete a query

Delete the query with the given ID.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

query ID

-

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get a query

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get a query

Get the query with the given ID.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

query ID

-

Responses

Response samples

Content type
application/json
{
  • "analysis": {
    },
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "ad-hoc streaming query",
  • "duration": 10,
  • "end_time": 1689809152,
  • "id": "UUID",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "message": "string",
  • "name": "test_query",
  • "response_time": 1,
  • "result": {
    },
  • "sinks": {
    },
  • "sql": "select * from iot",
  • "start_time": 1689809142,
  • "status": "running",
  • "tags": [
    ],
  • "timeColumns": {
    }
}

cancel a query

Responses

Response samples

Content type
application/json
{
  • "analysis": {
    },
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "ad-hoc streaming query",
  • "duration": 10,
  • "end_time": 1689809152,
  • "id": "UUID",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "message": "string",
  • "name": "test_query",
  • "response_time": 1,
  • "result": {
    },
  • "sinks": {
    },
  • "sql": "select * from iot",
  • "start_time": 1689809142,
  • "status": "running",
  • "tags": [
    ],
  • "timeColumns": {
    }
}

cancel a query

Cancel the query with the given ID. If given query is not running, the request will do nothing. Otherwise, the query will be canceled and the status will be set to canceled

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

query ID

-

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get the pipeline for a query

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get the pipeline for a query

get the pipeline for a query

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

query ID

-

Responses

Response samples

Content type
application/json
{
  • "edges": [
    ],
  • "nodes": [
    ]
}

analyze sql

Responses

Response samples

Content type
application/json
{
  • "edges": [
    ],
  • "nodes": [
    ]
}

analyze sql

analyze sql

-
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

sql request parameters

-
sql
string

Responses

Request samples

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

Response samples

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

Metrics v1beta2

query global metrics

sql
string

Responses

Request samples

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

Response samples

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

Metrics v1beta2

query global metrics

query global metrics.

-
Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "storage": 0
}

Invitations v1beta2

list invitations

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "storage": 0
}

Invitations v1beta2

list invitations

Get all invitations.

-
Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create an invitation

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create an invitation

Invite an user to the current tenant.

-
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

create invitation request parameters

-
email
required
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

delete an invitation

email
required
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

delete an invitation

Delete the invitation with the given ID. Deleting the invitation will remove the user from current workspace.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

invitation ID

-

Responses

MaterializedViews v1beta2

list materialize view

Responses

MaterializedViews v1beta2

list materialize view

Get all materialize view.

-
Authorizations:
ApiKeyAuth
query Parameters
db
string
Authorizations:
ApiKeyAuth
query Parameters
expand
boolean

includes optional metrics

+
db
string

database

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create a materialize view

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create a materialize view

Create a materialize view. There are two different types of the materialize view, please refer to the documentation of MaterializedView for more details.

-
Authorizations:
ApiKeyAuth
query Parameters
db
string
Authorizations:
ApiKeyAuth
query Parameters
db
string

database

-
Request Body schema: application/json
required
Request Body schema: application/json
required

create MaterializedView request parameters

description
string
logstore_retention_bytes
integer

The max size a stream can grow. Any non-positive value means unlimited size. Defaulted to 10 GiB.

@@ -983,255 +1045,255 @@ " class="sc-dJkDXt sc-eXfTSZ eOvdyU gdUGMw">

View name should only contain a maximum of 64 letters, numbers, or _, and start with a letter

query
required
string
target_stream
string

Specify this when you want to have multiple materialized views sink to the same target stream.

-
ttl_expression
string

Responses

Request samples

Content type
application/json
{
  • "description": "the description of my_test_view",
  • "logstore_retention_bytes": 10737418240,
  • "logstore_retention_ms": 604800000,
  • "name": "my_test_view",
  • "query": "select * from car_live_data where speed_kmh > 100",
  • "target_stream": "string",
  • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 28 DAY"
}

Response samples

Content type
application/json
{
  • "columns": [
    ],
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "description for my_view",
  • "id": "string",
  • "lagging": 50,
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "logstore_retention_bytes": 10737418240,
  • "logstore_retention_ms": 604800000,
  • "memory": 1048576,
  • "name": "my_view",
  • "query": "select * from car_live_data where speed_kmh > 100",
  • "status": "Materialized view is not running on any node",
  • "status_code": 0,
  • "status_ts": 1737411240123,
  • "target_stream": "high_speed_cars",
  • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
}

delete a materialized view

ttl_expression
string

Responses

Request samples

Content type
application/json
{
  • "description": "the description of my_test_view",
  • "logstore_retention_bytes": 10737418240,
  • "logstore_retention_ms": 604800000,
  • "name": "my_test_view",
  • "query": "select * from car_live_data where speed_kmh > 100",
  • "target_stream": "string",
  • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 28 DAY"
}

Response samples

Content type
application/json
{
  • "columns": [
    ],
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "description for my_view",
  • "id": "string",
  • "lagging": 50,
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "logstore_retention_bytes": 10737418240,
  • "logstore_retention_ms": 604800000,
  • "memory": 1048576,
  • "name": "my_view",
  • "query": "select * from car_live_data where speed_kmh > 100",
  • "status": "Materialized view is not running on any node",
  • "status_code": 0,
  • "status_ts": 1737411240123,
  • "target_stream": "high_speed_cars",
  • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
}

delete a materialized view

Delete the materialized view with the given name.

-
Authorizations:
ApiKeyAuth
path Parameters
name
required
string
Authorizations:
ApiKeyAuth
path Parameters
name
required
string

MaterializedView name

query Parameters
db
string

database

-

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get a materialize view

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get a materialize view

Get a materialize view with the given name.

-
Authorizations:
ApiKeyAuth
path Parameters
name
required
string
Authorizations:
ApiKeyAuth
path Parameters
name
required
string

MaterializedView name

query Parameters
db
string

database

-

Responses

Response samples

Content type
application/json
{
  • "columns": [
    ],
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "description for my_view",
  • "id": "string",
  • "lagging": 50,
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "logstore_retention_bytes": 10737418240,
  • "logstore_retention_ms": 604800000,
  • "memory": 1048576,
  • "name": "my_view",
  • "query": "select * from car_live_data where speed_kmh > 100",
  • "status": "Materialized view is not running on any node",
  • "status_code": 0,
  • "status_ts": 1737411240123,
  • "target_stream": "high_speed_cars",
  • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
}

update a materialize view

Responses

Response samples

Content type
application/json
{
  • "columns": [
    ],
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "description for my_view",
  • "id": "string",
  • "lagging": 50,
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "logstore_retention_bytes": 10737418240,
  • "logstore_retention_ms": 604800000,
  • "memory": 1048576,
  • "name": "my_view",
  • "query": "select * from car_live_data where speed_kmh > 100",
  • "status": "Materialized view is not running on any node",
  • "status_code": 0,
  • "status_ts": 1737411240123,
  • "target_stream": "high_speed_cars",
  • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
}

update a materialize view

Update the specific materialize view with the given name. Updating the query of a materialized view is not allowed

-
Authorizations:
ApiKeyAuth
path Parameters
name
required
string
Authorizations:
ApiKeyAuth
path Parameters
name
required
string

name of the MaterializedView

query Parameters
db
string

database

-
Request Body schema: application/json
required
Request Body schema: application/json
required

update MaterializedView request parameters

description
string
logstore_retention_bytes
integer

The max size a stream can grow. Any non-positive value means unlimited size. Defaulted to 10 GiB.

logstore_retention_ms
integer

The max time the data can be retained in the stream. Any non-positive value means unlimited time. Defaulted to 7 days.

-
query
string
ttl_expression
string

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "logstore_retention_bytes": 10737418240,
  • "logstore_retention_ms": 604800000,
  • "query": "string",
  • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 28 DAY"
}

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get the stats of a materialize view

query
string
ttl_expression
string

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "logstore_retention_bytes": 10737418240,
  • "logstore_retention_ms": 604800000,
  • "query": "string",
  • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 28 DAY"
}

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get the stats of a materialize view

Get the stats of a materialize view with the given name.

-
Authorizations:
ApiKeyAuth
path Parameters
name
required
string
Authorizations:
ApiKeyAuth
path Parameters
name
required
string

MaterializedView name

query Parameters
db
string

database

historyDays
integer

number of days of the history metrics, must be >= 1 and <= 7 if set

-

Responses

Response samples

Content type
application/json
{
  • "earliest_event": "2023-02-01T01:02:03.456Z",
  • "historical_data_bytes": 234567,
  • "history": [
    ],
  • "lagging": 50,
  • "latest_event": "2023-02-13T07:08:09.012Z",
  • "memory": 1048576,
  • "nodes": [
    ],
  • "read_bps": 0,
  • "read_eps": 0,
  • "row_count": 20,
  • "status": "Materialized view is not running on any node",
  • "status_code": 0,
  • "status_ts": 1737411240123,
  • "streaming_data_bytes": 12345,
  • "written_bps": 0,
  • "written_eps": 0
}

Users v1beta2

list roles

Responses

Response samples

Content type
application/json
{
  • "earliest_event": "2023-02-01T01:02:03.456Z",
  • "historical_data_bytes": 234567,
  • "history": [
    ],
  • "lagging": 50,
  • "latest_event": "2023-02-13T07:08:09.012Z",
  • "memory": 1048576,
  • "nodes": [
    ],
  • "read_bps": 0,
  • "read_eps": 0,
  • "row_count": 20,
  • "status": "Materialized view is not running on any node",
  • "status_code": 0,
  • "status_ts": 1737411240123,
  • "streaming_data_bytes": 12345,
  • "written_bps": 0,
  • "written_eps": 0
}

Users v1beta2

list roles

Get all roles.

-
Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • "admin"
]

list users

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • "admin"
]

list users

list users.

-
Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create user

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create user

create a user.

-
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

create user request parameters

-
password
required
string
role
string
username
required
string

Responses

Request samples

Content type
application/json
{
  • "password": "qwekjds45",
  • "role": "admin",
  • "username": "myname"
}

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

delete a user

password
required
string
role
string
username
required
string

Responses

Request samples

Content type
application/json
{
  • "password": "qwekjds45",
  • "role": "admin",
  • "username": "myname"
}

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

delete a user

delete a user.

-
Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get user

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get user

get a user.

-
Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "role": "admin",
  • "username": "myname"
}

update user

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "role": "admin",
  • "username": "myname"
}

update user

update a user.

-
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

update user request parameters

-
password
string
role
string

Responses

Request samples

Content type
application/json
{
  • "password": "qwekjds45",
  • "role": "admin"
}

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

Saved queries v1beta2

list Saved queries

password
string
role
string

Responses

Request samples

Content type
application/json
{
  • "password": "qwekjds45",
  • "role": "admin"
}

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

Saved queries v1beta2

list Saved queries

Get all saved queries

-
Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create an saved query

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create an saved query

Create a new saved query.

-
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

saved query parameters

-
description
string
name
required
string
sql
required
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": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "get the latest data from iot stream",
  • "id": "string",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "streaming_iot",
  • "sql": "select * from iot",
  • "tags": [
    ]
}

delete a saved query

description
string
name
required
string
sql
required
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": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "get the latest data from iot stream",
  • "id": "string",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "streaming_iot",
  • "sql": "select * from iot",
  • "tags": [
    ]
}

delete a saved query

Delete the saved query with the givin ID

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

saved query ID

-

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get a saved query

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get a saved query

Get a saved query.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

saved query ID

-

Responses

Response samples

Content type
application/json
{
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "get the latest data from iot stream",
  • "id": "string",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "streaming_iot",
  • "sql": "select * from iot",
  • "tags": [
    ]
}

update a saved query

Responses

Response samples

Content type
application/json
{
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "get the latest data from iot stream",
  • "id": "string",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "streaming_iot",
  • "sql": "select * from iot",
  • "tags": [
    ]
}

update a saved query

Update the specific saved query with the given ID.

-
Authorizations:
ApiKeyAuth
path Parameters
id
required
string
Authorizations:
ApiKeyAuth
path Parameters
id
required
string

saved query ID

-
Request Body schema: application/json
required
Request Body schema: application/json
required

update saved query request parameters

-
description
string
name
required
string
sql
required
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": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "get the latest data from iot stream",
  • "id": "string",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "streaming_iot",
  • "sql": "select * from iot",
  • "tags": [
    ]
}

Schemas v1beta2

list schemas

description
string
name
required
string
sql
required
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": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "description": "get the latest data from iot stream",
  • "id": "string",
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "streaming_iot",
  • "sql": "select * from iot",
  • "tags": [
    ]
}

Schemas v1beta2

list schemas

Get all schemas.

-
Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create a schema

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create a schema

Create a schema

-
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

create Schema request parameters

-
content
required
string
name
required
string
type
required
string
Value: "Protobuf"

Responses

Request samples

Content type
application/json
{
  • "content": "",
  • "name": "my_schema",
  • "type": "Protobuf"
}

Response samples

Content type
application/json
{
  • "content": "",
  • "name": "my_schema",
  • "type": "Protobuf"
}

delete a schema

content
required
string
name
required
string
type
required
string
Value: "Protobuf"

Responses

Request samples

Content type
application/json
{
  • "content": "",
  • "name": "my_schema",
  • "type": "Protobuf"
}

Response samples

Content type
application/json
{
  • "content": "",
  • "name": "my_schema",
  • "type": "Protobuf"
}

delete a schema

Delete the schema with the given name.

-
Authorizations:
ApiKeyAuth
path Parameters
name
required
string
Authorizations:
ApiKeyAuth
path Parameters
name
required
string

schema

-

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get a schema

Responses

Response samples

Content type
application/json
{
  • "code": 57,
  • "message": "stream 'iot' exists",
  • "system": "proton"
}

get a schema

get schema with the given name.

-
Authorizations:
ApiKeyAuth
path Parameters
name
required
string
Authorizations:
ApiKeyAuth
path Parameters
name
required
string

schema name

-

Responses

Response samples

Content type
application/json
{
  • "content": "",
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "my_schema",
  • "type": "Protobuf"
}

update a schema

Responses

Response samples

Content type
application/json
{
  • "content": "",
  • "created_at": "2023-02-01 23:22:59",
  • "created_by": {
    },
  • "last_updated_at": "2023-02-05 11:12:13",
  • "last_updated_by": {
    },
  • "name": "my_schema",
  • "type": "Protobuf"
}

update a schema

Update the specific schema with the given content.

-
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

update Schema request parameters

-
content
required
string
name
required
string
type
required
string
Value: "Protobuf"

Responses

Request samples

Content type
application/json
{
  • "content": "",
  • "name": "my_schema",
  • "type": "Protobuf"
}

Response samples

Content type
application/json
{
  • "content": "",
  • "name": "my_schema",
  • "type": "Protobuf"
}

Sinks v1beta2

list sinks

content
required
string
name
required
string
type
required
string
Value: "Protobuf"

Responses

Request samples

Content type
application/json
{
  • "content": "",
  • "name": "my_schema",
  • "type": "Protobuf"
}

Response samples

Content type
application/json
{
  • "content": "",
  • "name": "my_schema",
  • "type": "Protobuf"
}

Sinks v1beta2

list sinks

Get all sinks

-
Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create a sink

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

create a sink

Supported Sink Types:
  • template: optional, the template used to send query result to slack, use {{ .field_name }} to replace the field of query result you want to reference. in case it is empty, will encode the event into JSON format
  • header: optional, the http header, default to {}
  • -
    Authorizations:
    ApiKeyAuth
    Request Body schema: application/json
    required
    Authorizations:
    ApiKeyAuth
    Request Body schema: application/json
    required

    create sink request parameters

    description
    string
    name
    required
    string

    Sink name should only contain a maximum of 64 letters, numbers, or _, and start with a letter

    @@ -1293,59 +1355,59 @@

    Supported Sink Types:

    Additional configurations such as broker url and etc. should be passed through <code>properties</code></p> " class="sc-dJkDXt sc-eXfTSZ eOvdyU gdUGMw">

    Available types: [slack, http, redpanda_connect]. Additional configurations such as broker url and etc. should be passed through properties

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "write data to http endpoint",
    • "name": "write_to_http",
    • "properties": {
      },
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "type": "http"
    }

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "write data to http endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "write_to_http",
    • "plan": {
      },
    • "properties": {
      },
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "status": "running",
    • "type": "http"
    }

    delete a sink

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "write data to http endpoint",
    • "name": "write_to_http",
    • "properties": {
      },
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "type": "http"
    }

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "write data to http endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "write_to_http",
    • "plan": {
      },
    • "properties": {
      },
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "status": "running",
    • "type": "http"
    }

    delete a sink

    Delete a sink with the given ID.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    sink ID

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get a sink

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get a sink

    Get a sink with the given ID.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    sink ID

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "write data to http endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "write_to_http",
    • "plan": {
      },
    • "properties": {
      },
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "status": "running",
    • "type": "http"
    }

    patch a sink

    patch the specific sink with the given ID.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string
    Responses

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "write data to http endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "write_to_http",
    • "plan": {
      },
    • "properties": {
      },
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "status": "running",
    • "type": "http"
    }

    patch a sink

    patch the specific sink with the given ID. The pipeline will be restarted and the checkpoint will be kept.

    +
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    sink ID

    -
    Request Body schema: application/json
    required
    Request Body schema: application/json
    required

    patch sink request parameters

    -
    description
    string
    name
    string
    object

    Responses

    Request samples

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

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "write data to http endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "write_to_http",
    • "plan": {
      },
    • "properties": {
      },
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "status": "running",
    • "type": "http"
    }

    update a sink

    description
    string
    name
    string
    object

    Responses

    Request samples

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

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "write data to http endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "write_to_http",
    • "plan": {
      },
    • "properties": {
      },
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "status": "running",
    • "type": "http"
    }

    [DEPRECATED] update a sink

    Update the specific sink with the given ID.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    sink ID

    -
    Request Body schema: application/json
    required
    Request Body schema: application/json
    required

    update sink request parameters

    description
    string
    name
    required
    string

    Sink name should only contain a maximum of 64 letters, numbers, or _, and start with a letter

    @@ -1355,61 +1417,75 @@

    Supported Sink Types:

    Additional configurations such as broker url and etc. should be passed through <code>properties</code></p> " class="sc-dJkDXt sc-eXfTSZ eOvdyU gdUGMw">

    Available types: [slack, http, redpanda_connect]. Additional configurations such as broker url and etc. should be passed through properties

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "write data to http endpoint",
    • "name": "write_to_http",
    • "properties": {
      },
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "type": "http"
    }

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "write data to http endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "write_to_http",
    • "plan": {
      },
    • "properties": {
      },
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "status": "running",
    • "type": "http"
    }

    start a sink

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "write data to http endpoint",
    • "name": "write_to_http",
    • "properties": {
      },
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "type": "http"
    }

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "write data to http endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "write_to_http",
    • "plan": {
      },
    • "properties": {
      },
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "status": "running",
    • "type": "http"
    }

    get the logs of a sink

    Get the logs of a sink with the given id.

    +
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    sink ID

    +
    query Parameters
    lines
    required
    integer

    number of lines

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • "string"
    ]

    start a sink

    Start the sink with the given ID.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    sink ID

    query Parameters
    sync
    boolean

    Whether to run the operation synchronously (default: true)

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get the stats of a sink

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get the stats of a sink

    Get the stats of a sink with the given id.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    sink ID

    -
    query Parameters
    error_log_time_range
    required
    string
    Example: error_log_time_range=1d
    metrics_time_range
    required
    string
    Example: metrics_time_range=10m

    Responses

    Response samples

    Content type
    application/json
    {
    • "earliest_event": "2023-02-01T01:02:03.456Z",
    • "errors": [
      ],
    • "failure_count": 1,
    • "historical_data_bytes": 234567,
    • "history": [
      ],
    • "lagging": 50,
    • "latest_event": "2023-02-13T07:08:09.012Z",
    • "memory": 1048576,
    • "nodes": [
      ],
    • "read_bps": 0,
    • "read_eps": 0,
    • "row_count": 20,
    • "status": "Materialized view is not running on any node",
    • "status_code": 0,
    • "status_ts": 1737411240123,
    • "streaming_data_bytes": 12345,
    • "success_count": 99,
    • "throughput": [
      ],
    • "written_bps": 0,
    • "written_eps": 0
    }

    stop a sink

    query Parameters
    error_log_time_range
    required
    string
    Example: error_log_time_range=1d
    metrics_time_range
    required
    string
    Example: metrics_time_range=10m

    Responses

    Response samples

    Content type
    application/json
    {
    • "earliest_event": "2023-02-01T01:02:03.456Z",
    • "errors": [
      ],
    • "failure_count": 1,
    • "historical_data_bytes": 234567,
    • "history": [
      ],
    • "lagging": 50,
    • "latest_event": "2023-02-13T07:08:09.012Z",
    • "memory": 1048576,
    • "nodes": [
      ],
    • "read_bps": 0,
    • "read_eps": 0,
    • "row_count": 20,
    • "status": "Materialized view is not running on any node",
    • "status_code": 0,
    • "status_ts": 1737411240123,
    • "streaming_data_bytes": 12345,
    • "success_count": 99,
    • "throughput": [
      ],
    • "uptime": 60000,
    • "written_bps": 0,
    • "written_eps": 0
    }

    stop a sink

    Stop the sink with the given ID from sending out data.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    sink ID

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    Sources v1beta2

    preview a source

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    Sources v1beta2

    preview a source

    Get sample events from the source with the given ID. Please refer to create source for more details regarding type and properties.

    -
    Authorizations:
    ApiKeyAuth
    Request Body schema: application/json
    required
    Authorizations:
    ApiKeyAuth
    Request Body schema: application/json
    required

    source properties for preview

    object

    See CreateSourceRequest

    @@ -1421,25 +1497,25 @@

    Supported Sink Types:

    A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".

    type
    required
    string

    See CreateSourceRequest

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "properties": {
      },
    • "size": 1,
    • "timeout": "1m",
    • "type": "websocket"
    }

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    list sources

    Responses

    Request samples

    Content type
    application/json
    {
    • "properties": {
      },
    • "size": 1,
    • "timeout": "1m",
    • "type": "websocket"
    }

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    list sources

    Get all sources.

    -
    Authorizations:
    ApiKeyAuth

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    create a source

    Authorizations:
    ApiKeyAuth

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    create a source

    Supported Source Types:
  • tls.disable: optional, If set to true, disables TLS encryption, default to false
  • tls.skip_verify_server: optional, If set to true, skips server certificate verification when using TLS, default to false
  • -
    Authorizations:
    ApiKeyAuth
    Request Body schema: application/json
    required
    Authorizations:
    ApiKeyAuth
    Request Body schema: application/json
    required

    create source request parameters

    description
    string
    name
    required
    string

    Source name should only contain a maximum of 64 letters, numbers, or _, and start with a letter

    @@ -1531,59 +1607,59 @@

    Supported Source Types:

    Additional configurations such as broker url and etc. should be passed through <code>properties</code></p> " class="sc-dJkDXt sc-eXfTSZ eOvdyU gdUGMw">

    Available types: [stream_generator, websocket, nats, nats_jetstream, redpanda_connect]. Additional configurations such as broker url and etc. should be passed through properties

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "read from my first source",
    • "name": "my_first_source",
    • "properties": {
      },
    • "stream": "dest_stream",
    • "type": "websocket"
    }

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "read data from a websocket endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "my_websocket_source",
    • "properties": {
      },
    • "start_time": 1680301788,
    • "status": "running",
    • "stream": "websocket_stream",
    • "type": "websocket"
    }

    delete a source

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "read from my first source",
    • "name": "my_first_source",
    • "properties": {
      },
    • "stream": "dest_stream",
    • "type": "websocket"
    }

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "read data from a websocket endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "my_websocket_source",
    • "properties": {
      },
    • "start_time": 1680301788,
    • "status": "running",
    • "stream": "websocket_stream",
    • "type": "websocket"
    }

    delete a source

    Delete the source with the given ID.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    source ID

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get a source

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get a source

    Get a source with the given ID.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    source ID

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "read data from a websocket endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "my_websocket_source",
    • "properties": {
      },
    • "start_time": 1680301788,
    • "status": "running",
    • "stream": "websocket_stream",
    • "type": "websocket"
    }

    patch a source

    Responses

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "read data from a websocket endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "my_websocket_source",
    • "properties": {
      },
    • "start_time": 1680301788,
    • "status": "running",
    • "stream": "websocket_stream",
    • "type": "websocket"
    }

    patch a source

    patch the specific source with the given ID. Only stopped sources can be updated.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    source ID

    -
    Request Body schema: application/json
    required
    Request Body schema: application/json
    required

    patch source request parameters

    -
    description
    string
    name
    string
    object
    stream
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "new description for the source",
    • "name": "new_source_name",
    • "properties": {
      },
    • "stream": "new_stream"
    }

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "read data from a websocket endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "my_websocket_source",
    • "properties": {
      },
    • "start_time": 1680301788,
    • "status": "running",
    • "stream": "websocket_stream",
    • "type": "websocket"
    }

    update a source

    description
    string
    name
    string
    object
    stream
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "new description for the source",
    • "name": "new_source_name",
    • "properties": {
      },
    • "stream": "new_stream"
    }

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "read data from a websocket endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "my_websocket_source",
    • "properties": {
      },
    • "start_time": 1680301788,
    • "status": "running",
    • "stream": "websocket_stream",
    • "type": "websocket"
    }

    update a source

    Update the specific source with the given ID. Only stopped sources can be updated.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    source ID

    -
    Request Body schema: application/json
    required
    Request Body schema: application/json
    required

    update source request parameters

    description
    string
    name
    string

    Source name should only contain a maximum of 64 letters, numbers, or _, and start with a letter

    @@ -1591,69 +1667,85 @@

    Supported Source Types:

    " class="sc-dJkDXt sc-eXfTSZ eOvdyU gdUGMw">

    Additional properties that required to read the data from source (e.g. broker url). Please refer to the documentation for this source type

    stream
    string

    The name of the target stream that this source writes to. The stream needs to be created first.

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "new description for the source",
    • "name": "new_source_name",
    • "properties": {
      },
    • "stream": "new_stream"
    }

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "read data from a websocket endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "my_websocket_source",
    • "properties": {
      },
    • "start_time": 1680301788,
    • "status": "running",
    • "stream": "websocket_stream",
    • "type": "websocket"
    }

    start a source

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "new description for the source",
    • "name": "new_source_name",
    • "properties": {
      },
    • "stream": "new_stream"
    }

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "read data from a websocket endpoint",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "message": "string",
    • "name": "my_websocket_source",
    • "properties": {
      },
    • "start_time": 1680301788,
    • "status": "running",
    • "stream": "websocket_stream",
    • "type": "websocket"
    }

    get the logs of a source

    Get the logs of a source with the given id.

    +
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    source ID

    +
    query Parameters
    lines
    required
    integer

    number of lines

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • "string"
    ]

    start a source

    Start the source with the given ID.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    source ID

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get the stats of a source

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get the stats of a source

    Get the stats of a source with the given id.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    source ID

    -
    query Parameters
    error_log_time_range
    required
    string
    Example: error_log_time_range=1d
    metrics_time_range
    required
    string
    Example: metrics_time_range=10m

    Responses

    Response samples

    Content type
    application/json
    {
    • "errors": [
      ],
    • "failure_count": 1,
    • "success_count": 99,
    • "throughput": [
      ]
    }

    stop a source

    query Parameters
    error_log_time_range
    required
    string
    Example: error_log_time_range=1d
    metrics_time_range
    required
    string
    Example: metrics_time_range=10m

    Responses

    Response samples

    Content type
    application/json
    {
    • "errors": [
      ],
    • "failure_count": 1,
    • "success_count": 99,
    • "throughput": [
      ],
    • "uptime": 60000
    }

    stop a source

    Stop the source with the given ID.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    id
    required
    string

    source ID

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    Streams v1beta2

    list streams

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    Streams v1beta2

    list streams

    Get all streams.

    -
    Authorizations:
    ApiKeyAuth
    query Parameters
    db
    string
    Authorizations:
    ApiKeyAuth
    query Parameters
    expand
    boolean

    includes optional metrics

    +
    db
    string

    database

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    create a stream

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    create a stream

    Create a stream. Please refer to the documentation of stream for more details.

    -
    Authorizations:
    ApiKeyAuth
    query Parameters
    db
    string
    Authorizations:
    ApiKeyAuth
    query Parameters
    db
    string

    database

    -
    Request Body schema: application/json
    required
    Request Body schema: application/json
    required

    create stream request parameters

    Array of objects (ColumnFamily)

    Columns in column families shall have no overlap with primary keys

    @@ -1671,67 +1763,67 @@

    Supported Source Types:

    " class="sc-dJkDXt sc-eXfTSZ eOvdyU gdUGMw">

    Stream name should only contain a maximum of 64 letters, numbers, or _, and start with a letter

    order_by_expression
    string
    order_by_granularity
    string
    partition_by_granularity
    string
    primary_key
    string

    Expression of primary key, required in changelog_kv and versioned_kv mode

    -
    replication_factor
    integer
    Array of objects (SecondaryIndex)
    shards
    integer
    ttl_expression
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "column_families": [
      ],
    • "columns": [
      ],
    • "description": "my first stream",
    • "engine": "MutableStream",
    • "event_time_column": "time",
    • "event_time_timezone": "UTC",
    • "logstore_retention_bytes": 10737418240,
    • "logstore_retention_ms": 604800000,
    • "mode": "append",
    • "name": "test_stream",
    • "order_by_expression": "string",
    • "order_by_granularity": "string",
    • "partition_by_granularity": "string",
    • "primary_key": "string",
    • "replication_factor": 0,
    • "secondary_indexes": [
      ],
    • "shards": 0,
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
    }

    Response samples

    Content type
    application/json
    {
    • "column_families": [
      ],
    • "columns": [
      ],
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "my test stream",
    • "engine": "Stream",
    • "is_external": false,
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "logstore_retention_bytes": 1073741824,
    • "logstore_retention_ms": 86400000,
    • "mode": "append",
    • "name": "test_stream",
    • "primary_key": "string",
    • "secondary_indexes": [
      ],
    • "target_stream": "target",
    • "ttl": "to_datetime(_tp_time) + INTERVAL 7 DAY",
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
    }

    delete a stream

    replication_factor
    integer
    Array of objects (SecondaryIndex)
    shards
    integer
    ttl_expression
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "column_families": [
      ],
    • "columns": [
      ],
    • "description": "my first stream",
    • "engine": "MutableStream",
    • "event_time_column": "time",
    • "event_time_timezone": "UTC",
    • "logstore_retention_bytes": 10737418240,
    • "logstore_retention_ms": 604800000,
    • "mode": "append",
    • "name": "test_stream",
    • "order_by_expression": "string",
    • "order_by_granularity": "string",
    • "partition_by_granularity": "string",
    • "primary_key": "string",
    • "replication_factor": 0,
    • "secondary_indexes": [
      ],
    • "shards": 0,
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
    }

    Response samples

    Content type
    application/json
    {
    • "column_families": [
      ],
    • "columns": [
      ],
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "my test stream",
    • "engine": "Stream",
    • "historical_data_bytes": 234567,
    • "is_external": false,
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "logstore_retention_bytes": 1073741824,
    • "logstore_retention_ms": 86400000,
    • "mode": "append",
    • "name": "test_stream",
    • "primary_key": "string",
    • "row_count": 1000,
    • "secondary_indexes": [
      ],
    • "streaming_data_bytes": 12345,
    • "target_stream": "target",
    • "ttl": "to_datetime(_tp_time) + INTERVAL 7 DAY",
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
    }

    delete a stream

    Delete the stream with the given name.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string

    stream name

    query Parameters
    db
    string

    database

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get a stream

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get a stream

    Get a stream with the given name.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string

    stream name

    query Parameters
    db
    string

    database

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "column_families": [
      ],
    • "columns": [
      ],
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "my test stream",
    • "engine": "Stream",
    • "is_external": false,
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "logstore_retention_bytes": 1073741824,
    • "logstore_retention_ms": 86400000,
    • "mode": "append",
    • "name": "test_stream",
    • "primary_key": "string",
    • "secondary_indexes": [
      ],
    • "target_stream": "target",
    • "ttl": "to_datetime(_tp_time) + INTERVAL 7 DAY",
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
    }

    update a stream

    Responses

    Response samples

    Content type
    application/json
    {
    • "column_families": [
      ],
    • "columns": [
      ],
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "my test stream",
    • "engine": "Stream",
    • "historical_data_bytes": 234567,
    • "is_external": false,
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "logstore_retention_bytes": 1073741824,
    • "logstore_retention_ms": 86400000,
    • "mode": "append",
    • "name": "test_stream",
    • "primary_key": "string",
    • "row_count": 1000,
    • "secondary_indexes": [
      ],
    • "streaming_data_bytes": 12345,
    • "target_stream": "target",
    • "ttl": "to_datetime(_tp_time) + INTERVAL 7 DAY",
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
    }

    update a stream

    Update the specific stream with the given name. Right now it only supports updating data retention-related settings. Altering stream or updating external stream is not supported yet.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string

    name of the stream

    query Parameters
    db
    string

    database

    -
    Request Body schema: application/json
    required
    Request Body schema: application/json
    required

    update stream request parameters

    description
    string
    logstore_retention_bytes
    integer

    The max size a stream can grow. Any non-positive value means unlimited size. Defaulted to 10 GiB.

    logstore_retention_ms
    integer

    The max time the data can be retained in the stream. Any non-positive value means unlimited time. Defaulted to 7 days.

    -
    ttl_expression
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "new description",
    • "logstore_retention_bytes": 10737418240,
    • "logstore_retention_ms": 604800000,
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 28 DAY"
    }

    Response samples

    Content type
    application/json
    {
    • "column_families": [
      ],
    • "columns": [
      ],
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "my test stream",
    • "engine": "Stream",
    • "is_external": false,
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "logstore_retention_bytes": 1073741824,
    • "logstore_retention_ms": 86400000,
    • "mode": "append",
    • "name": "test_stream",
    • "primary_key": "string",
    • "secondary_indexes": [
      ],
    • "target_stream": "target",
    • "ttl": "to_datetime(_tp_time) + INTERVAL 7 DAY",
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
    }

    ingest data

    ttl_expression
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "new description",
    • "logstore_retention_bytes": 10737418240,
    • "logstore_retention_ms": 604800000,
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 28 DAY"
    }

    Response samples

    Content type
    application/json
    {
    • "column_families": [
      ],
    • "columns": [
      ],
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "my test stream",
    • "engine": "Stream",
    • "historical_data_bytes": 234567,
    • "is_external": false,
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "logstore_retention_bytes": 1073741824,
    • "logstore_retention_ms": 86400000,
    • "mode": "append",
    • "name": "test_stream",
    • "primary_key": "string",
    • "row_count": 1000,
    • "secondary_indexes": [
      ],
    • "streaming_data_bytes": 12345,
    • "target_stream": "target",
    • "ttl": "to_datetime(_tp_time) + INTERVAL 7 DAY",
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
    }

    ingest data

    Supported Source Types:
  • string lines: when Content-Type is set to text/plain;format=lines, or set format query parameter with value lines.
  • refer to https://docs.timeplus.com/docs/ingest-api for more information *
  • -
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string

    stream name

    query Parameters
    db
    string

    database

    format
    string
    Enum: "compact" "streaming" "raw" "lines"

    enfoce payload format, if it is set, it overwrite the Content-Type header

    -
    Request Body schema:
    required
    Request Body schema:
    required

    ingest data

    -
    columns
    required
    Array of strings
    data
    required
    Array of any[ items ]

    Responses

    Request samples

    Content type
    {
    • "columns": [
      ],
    • "data": [
      ]
    }

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get the stats of a stream

    columns
    required
    Array of strings
    data
    required
    Array of any[ items ]

    Responses

    Request samples

    Content type
    {
    • "columns": [
      ],
    • "data": [
      ]
    }

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get the stats of a stream

    Get the stats of a stream with the given name.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string

    stream name

    query Parameters
    db
    string

    database

    historyDays
    integer

    number of days of the history metrics, must be >= 1 and <= 7 if set

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "earliest_event": "2023-02-01T01:02:03.456Z",
    • "historical_data_bytes": 234567,
    • "history": [
      ],
    • "latest_event": "2023-02-13T07:08:09.012Z",
    • "nodes": [
      ],
    • "read_bps": 0,
    • "read_eps": 0,
    • "row_count": 20,
    • "streaming_data_bytes": 12345,
    • "written_bps": 0,
    • "written_eps": 0
    }

    Subscription v1beta2

    get current subscription

    Responses

    Response samples

    Content type
    application/json
    {
    • "earliest_event": "2023-02-01T01:02:03.456Z",
    • "historical_data_bytes": 234567,
    • "history": [
      ],
    • "latest_event": "2023-02-13T07:08:09.012Z",
    • "nodes": [
      ],
    • "read_bps": 0,
    • "read_eps": 0,
    • "row_count": 20,
    • "streaming_data_bytes": 12345,
    • "written_bps": 0,
    • "written_eps": 0
    }

    Subscription v1beta2

    get current subscription

    Get the status of current subscription.

    -
    Authorizations:
    ApiKeyAuth

    Responses

    Response samples

    Content type
    application/json
    {
    • "customer": {
      },
    • "payment": {
      },
    • "spec": {
      },
    • "subscription_plan": "Free Trial"
    }

    Topology v1beta2

    get topology graph

    Authorizations:
    ApiKeyAuth

    Responses

    Response samples

    Content type
    application/json
    {
    • "customer": {
      },
    • "payment": {
      },
    • "spec": {
      },
    • "subscription_plan": "Free Trial"
    }

    Topology v1beta2

    get topology graph

    Get topology graph of all existings resources in a specific database.

    -
    Authorizations:
    ApiKeyAuth
    query Parameters
    db
    string
    Authorizations:
    ApiKeyAuth
    query Parameters
    db
    string

    database

    extraResources
    Array of strings

    supported resource type: dashboard, schema, udf

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "dependencies": [
      ],
    • "edges": [
      ],
    • "nodes": [
      ]
    }

    UDFs v1beta2

    list user-defined functions

    Responses

    Response samples

    Content type
    application/json
    {
    • "dependencies": [
      ],
    • "edges": [
      ],
    • "nodes": [
      ]
    }

    UDFs v1beta2

    list user-defined functions

    Get all user-defined functions.

    -
    Authorizations:
    ApiKeyAuth

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    create an user-defined function

    Authorizations:
    ApiKeyAuth

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    create an user-defined function

    Create an user-defined function.

    -
    Authorizations:
    ApiKeyAuth
    Request Body schema: application/json
    required
    Authorizations:
    ApiKeyAuth
    Request Body schema: application/json
    required

    create UDF request parameters

    Array of objects (UDFArgument)
    Supported Source Types: " class="sc-dJkDXt sc-eXfTSZ eOvdyU gdUGMw">

    Either javascript or remote

    url
    string

    Only valid when type is remote.

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "arguments": [
      ],
    • "auth_context": {
      },
    • "auth_method": "string",
    • "description": "my first UDF",
    • "is_aggregation": true,
    • "name": "sum_2",
    • "return_type": "float64",
    • "source": "string",
    • "type": "remote",
    }

    Response samples

    Content type
    application/json
    {
    • "arguments": [
      ],
    • "auth_context": {
      },
    • "auth_method": "string",
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "my first UDF",
    • "id": "string",
    • "is_aggregation": true,
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "name": "sum_2",
    • "return_type": "float64",
    • "source": "string",
    • "type": "remote",
    }

    delete an user-defined function

    Responses

    Request samples

    Content type
    application/json
    {
    • "arguments": [
      ],
    • "auth_context": {
      },
    • "auth_method": "string",
    • "description": "my first UDF",
    • "is_aggregation": true,
    • "name": "sum_2",
    • "return_type": "float64",
    • "source": "string",
    • "type": "remote",
    }

    Response samples

    Content type
    application/json
    {
    • "arguments": [
      ],
    • "auth_context": {
      },
    • "auth_method": "string",
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "my first UDF",
    • "id": "string",
    • "is_aggregation": true,
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "name": "sum_2",
    • "return_type": "float64",
    • "source": "string",
    • "type": "remote",
    }

    delete an user-defined function

    Delete the user-defined function with the given name.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string

    user-defined function name

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get an user-defined function

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get an user-defined function

    get the user-defined function with the given name.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string

    user-defined function name

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "arguments": [
      ],
    • "auth_context": {
      },
    • "auth_method": "string",
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "my first UDF",
    • "id": "string",
    • "is_aggregation": true,
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "name": "sum_2",
    • "return_type": "float64",
    • "source": "string",
    • "type": "remote",
    }

    update an user-defined function

    Responses

    Response samples

    Content type
    application/json
    {
    • "arguments": [
      ],
    • "auth_context": {
      },
    • "auth_method": "string",
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "my first UDF",
    • "id": "string",
    • "is_aggregation": true,
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "name": "sum_2",
    • "return_type": "float64",
    • "source": "string",
    • "type": "remote",
    }

    update an user-defined function

    Update the specific user-defined function with the given name.

    -
    Authorizations:
    ApiKeyAuth
    Request Body schema: application/json
    required
    Authorizations:
    ApiKeyAuth
    Request Body schema: application/json
    required

    update UDF request parameters

    Array of objects (UDFArgument)
    Supported Source Types: " class="sc-dJkDXt sc-eXfTSZ eOvdyU gdUGMw">

    Either javascript or remote

    url
    string

    Only valid when type is remote.

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "arguments": [
      ],
    • "auth_context": {
      },
    • "auth_method": "string",
    • "description": "my first UDF",
    • "is_aggregation": true,
    • "name": "sum_2",
    • "return_type": "float64",
    • "source": "string",
    • "type": "remote",
    }

    Response samples

    Content type
    application/json
    {
    • "arguments": [
      ],
    • "auth_context": {
      },
    • "auth_method": "string",
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "my first UDF",
    • "id": "string",
    • "is_aggregation": true,
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "name": "sum_2",
    • "return_type": "float64",
    • "source": "string",
    • "type": "remote",
    }

    Views v1beta2

    list views

    Responses

    Request samples

    Content type
    application/json
    {
    • "arguments": [
      ],
    • "auth_context": {
      },
    • "auth_method": "string",
    • "description": "my first UDF",
    • "is_aggregation": true,
    • "name": "sum_2",
    • "return_type": "float64",
    • "source": "string",
    • "type": "remote",
    }

    Response samples

    Content type
    application/json
    {
    • "arguments": [
      ],
    • "auth_context": {
      },
    • "auth_method": "string",
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "my first UDF",
    • "id": "string",
    • "is_aggregation": true,
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "name": "sum_2",
    • "return_type": "float64",
    • "source": "string",
    • "type": "remote",
    }

    Views v1beta2

    list views

    Get all views.

    -
    Authorizations:
    ApiKeyAuth
    query Parameters
    db
    string
    Authorizations:
    ApiKeyAuth
    query Parameters
    db
    string

    database

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    create a view

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    create a view

    Create a view. There are two different types of the view, please refer to the documentation of view for more details.

    -
    Authorizations:
    ApiKeyAuth
    query Parameters
    db
    string
    Authorizations:
    ApiKeyAuth
    query Parameters
    db
    string

    database

    -
    Request Body schema: application/json
    required
    Request Body schema: application/json
    required

    create view request parameters

    description
    string
    logstore_retention_bytes
    integer

    The max size a stream can grow. Any non-positive value means unlimited size. Defaulted to 10 GiB.

    @@ -1995,101 +2087,101 @@

    Supported Source Types:

    " class="sc-dJkDXt sc-eXfTSZ eOvdyU gdUGMw">

    View name should only contain a maximum of 64 letters, numbers, or _, and start with a letter

    query
    required
    string
    target_stream
    string

    Specify this when you want to have multiple materialized views sink to the same target stream.

    -
    ttl_expression
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "the description of my_test_view",
    • "logstore_retention_bytes": 10737418240,
    • "logstore_retention_ms": 604800000,
    • "materialized": false,
    • "name": "my_test_view",
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "target_stream": "string",
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 28 DAY"
    }

    Response samples

    Content type
    application/json
    {
    • "columns": [
      ],
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "description for my_view",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "logstore_retention_bytes": 10737418240,
    • "logstore_retention_ms": 604800000,
    • "materialized": false,
    • "name": "my_view",
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "target_stream": "high_speed_cars",
    • "ttl": "to_datetime(_tp_time) + INTERVAL 7 DAY",
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
    }

    delete a view

    ttl_expression
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "the description of my_test_view",
    • "logstore_retention_bytes": 10737418240,
    • "logstore_retention_ms": 604800000,
    • "materialized": false,
    • "name": "my_test_view",
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "target_stream": "string",
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 28 DAY"
    }

    Response samples

    Content type
    application/json
    {
    • "columns": [
      ],
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "description for my_view",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "logstore_retention_bytes": 10737418240,
    • "logstore_retention_ms": 604800000,
    • "materialized": false,
    • "name": "my_view",
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "target_stream": "high_speed_cars",
    • "ttl": "to_datetime(_tp_time) + INTERVAL 7 DAY",
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
    }

    delete a view

    Delete the view with the given name.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string

    view name

    query Parameters
    db
    string

    database

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get a view

    Responses

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get a view

    Get a view with the given name.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string

    view name

    query Parameters
    db
    string

    database

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "columns": [
      ],
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "description for my_view",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "logstore_retention_bytes": 10737418240,
    • "logstore_retention_ms": 604800000,
    • "materialized": false,
    • "name": "my_view",
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "target_stream": "high_speed_cars",
    • "ttl": "to_datetime(_tp_time) + INTERVAL 7 DAY",
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
    }

    update a view

    Responses

    Response samples

    Content type
    application/json
    {
    • "columns": [
      ],
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "description": "description for my_view",
    • "id": "string",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "logstore_retention_bytes": 10737418240,
    • "logstore_retention_ms": 604800000,
    • "materialized": false,
    • "name": "my_view",
    • "query": "select * from car_live_data where speed_kmh > 100",
    • "target_stream": "high_speed_cars",
    • "ttl": "to_datetime(_tp_time) + INTERVAL 7 DAY",
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 7 DAY"
    }

    update a view

    Update the specific view with the given name. Updating the query of a materialized view is not allowed

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string

    name of the view

    query Parameters
    db
    string

    database

    -
    Request Body schema: application/json
    required
    Request Body schema: application/json
    required

    update view request parameters

    description
    string
    logstore_retention_bytes
    integer

    The max size a stream can grow. Any non-positive value means unlimited size. Defaulted to 10 GiB.

    logstore_retention_ms
    integer

    The max time the data can be retained in the stream. Any non-positive value means unlimited time. Defaulted to 7 days.

    -
    query
    string
    ttl_expression
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "string",
    • "logstore_retention_bytes": 10737418240,
    • "logstore_retention_ms": 604800000,
    • "query": "string",
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 28 DAY"
    }

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get the stats of a view

    query
    string
    ttl_expression
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "description": "string",
    • "logstore_retention_bytes": 10737418240,
    • "logstore_retention_ms": 604800000,
    • "query": "string",
    • "ttl_expression": "to_datetime(_tp_time) + INTERVAL 28 DAY"
    }

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }

    get the stats of a view

    Get the stats of a view with the given name.

    -
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string
    Authorizations:
    ApiKeyAuth
    path Parameters
    name
    required
    string

    view name

    query Parameters
    historyDays
    integer

    number of days of the history metrics, must be >= 1 and <= 7 if set

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "earliest_event": "2023-02-01T01:02:03.456Z",
    • "historical_data_bytes": 234567,
    • "history": [
      ],
    • "lagging": 50,
    • "latest_event": "2023-02-13T07:08:09.012Z",
    • "memory": 1048576,
    • "nodes": [
      ],
    • "read_bps": 0,
    • "read_eps": 0,
    • "row_count": 20,
    • "status": "Materialized view is not running on any node",
    • "status_code": 0,
    • "status_ts": 1737411240123,
    • "streaming_data_bytes": 12345,
    • "written_bps": 0,
    • "written_eps": 0
    }

    Workspace v1beta2

    get current workspace

    Responses

    Response samples

    Content type
    application/json
    {
    • "earliest_event": "2023-02-01T01:02:03.456Z",
    • "historical_data_bytes": 234567,
    • "history": [
      ],
    • "lagging": 50,
    • "latest_event": "2023-02-13T07:08:09.012Z",
    • "memory": 1048576,
    • "nodes": [
      ],
    • "read_bps": 0,
    • "read_eps": 0,
    • "row_count": 20,
    • "status": "Materialized view is not running on any node",
    • "status_code": 0,
    • "status_ts": 1737411240123,
    • "streaming_data_bytes": 12345,
    • "written_bps": 0,
    • "written_eps": 0
    }

    Workspace v1beta2

    get current workspace

    Get the basic information about the current workspace.

    -
    Authorizations:
    ApiKeyAuth

    Responses

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "free_trial_end_date": "2023-02-13T07:08:09.012Z",
    • "id": "t5abcd1e",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "name": "my_workspace",
    • "settings": {
      }
    }

    update current workspace

    Authorizations:
    ApiKeyAuth

    Responses

    Response samples

    Content type
    application/json
    {
    • "created_at": "2023-02-01 23:22:59",
    • "created_by": {
      },
    • "free_trial_end_date": "2023-02-13T07:08:09.012Z",
    • "id": "t5abcd1e",
    • "last_updated_at": "2023-02-05 11:12:13",
    • "last_updated_by": {
      },
    • "name": "my_workspace",
    • "settings": {
      }
    }

    update current workspace

    Update the settings of current workspace. For Timeplus cloud, only tenant owner can update the workspace. For Timeplus enterprise, there is no such check.

    -
    Authorizations:
    ApiKeyAuth
    Request Body schema: application/json
    required
    Authorizations:
    ApiKeyAuth
    Request Body schema: application/json
    required

    update workspace request parameters

    -
    object (WorkspaceSettings)

    Responses

    Request samples

    Content type
    application/json
    {
    • "settings": {
      }
    }

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }
    +
    object (WorkspaceSettings)

    Responses

    Request samples

    Content type
    application/json
    {
    • "settings": {
      }
    }

    Response samples

    Content type
    application/json
    {
    • "code": 57,
    • "message": "stream 'iot' exists",
    • "system": "proton"
    }