Core Interface (0.1.0)

Download OpenAPI specification:

Core DB Query-Specific API
If the above download is not available, please download openapi.json from the following link.
openapi.json

DB Query Execution

Executes a DB query and returns the result.
If the query results in an error, a response of result-type:error is returned with the status code 200.
If the query itself cannot be executed, a status code other than 200 is returned.

header Parameters
X-hive-api-key
string

The token string to specify when token authentication is enabled.

Request Body schema: application/json
required

DB query

query
required
string

Query string

timeout
int [ 1 .. 180 ]
Default: 30

Query processing timeout (seconds), a timeout occurs after specified time

timestamp_unit
string
Default: "nanosecond"
Enum: "nanosecond" "microsecond" "millisecond" "second"

Unit of return result timestamp

omit_option
string
Default: 0
Enum: 0 1 2

Specify whether to omit data absence or null value data (0= Null and data absence are omitted, 1 or 2= Not omitted)

Responses

Request samples

Content type
application/json
{
  • "query": "SELECT \"comp1:data1\", \"comp2:dataA\" FROM SPDB;",
  • "timeout": 15,
  • "timestamp_unit": "nanosecond"
}

Response samples

Content type
application/json
Example
{
  • "query": "SELECT \"comp1:data1\", \"comp2:dataA\" FROM SPDB;",
  • "timestamp_unit": "nanosecond",
  • "success": true,
  • "result": {
    }
}

DB Query Execution (Stream Format)

Executes a DB query and returns the result in stream format.
This API only supports queries that do not change the state of the server, such as SELECT.
Not supported at this time. (May be added in the future)

Request Body schema: application/json
required

DB query

query
required
string

Query string

timeout
int [ 1 .. 180 ]
Default: 30

Query processing timeout (seconds), a timeout occurs after specified time

timestamp_unit
string
Default: "nanosecond"
Enum: "nanosecond" "microsecond" "millisecond" "second"

Unit of return result timestamp

omit_option
string
Default: 0
Enum: 0 1 2

Specify whether to omit data absence or null value data (0= Null and data absence are omitted, 1 or 2= Not omitted)

Responses

Request samples

Content type
application/json
{
  • "query": "SELECT \"comp1:data1\", \"comp2:dataA\" FROM SPDB;",
  • "timeout": 15,
  • "timestamp_unit": "nanosecond"
}

Response samples

Content type
application/jsonlines
[
  • {
    }
]