get table's fields
get the table's fields, the table's fields is the table's columns
Authorizations:
path Parameters
tableId required | string table id |
ownerName required | string owner name |
repoName required | string repository name |
query Parameters
name_type | string Enum: "name" "id" name_type |
Responses
Response samples
- 200
- 400
- 401
- 500
{- "code": 0,
- "data": {
- "fields": {
- "property1": {
- "id": "fld1677711637971927040",
- "name": "field1",
- "type": "STR"
}, - "property2": {
- "id": "fld1677711637971927040",
- "name": "field1",
- "type": "STR"
}
}
}, - "error": ""
}
delete records of table
delete the table's records, with filter
Authorizations:
path Parameters
tableId required | string table id |
ownerName required | string owner name |
repoName required | string repository name |
Request Body schema: application/json
body
object filter, filter condition | |
name_type | string Default: "id" Enum: "id" "name" name type, name or id, default is id |
Responses
Request samples
- Payload
{- "filter": {
- "field": "field1",
- "filter_type": "single",
- "filters": [
- { }
], - "op": "gt",
- "val": null
}, - "name_type": "id"
}
Response samples
- 200
- 400
- 401
- 500
{- "code": 0,
- "data": {
- "affect_count": 0
}, - "error": ""
}
create records of table
create the table's records, if on_conflict is not empty, action is update, otherwise is insert. create single or multiple records.
Authorizations:
path Parameters
tableId required | string table id |
ownerName required | string owner name |
repoName required | string repository name |
Request Body schema: application/json
body
action | string Default: "insert" Enum: "insert" "update" action, insert or update, default is insert, if on_conflict is not empty, action is update |
name_type | string Default: "id" Enum: "name" "id" name type, name or id, default is id |
on_conflict | Array of strings if exists, not create, update |
object example: {"name":"test", "age": 18} | |
Array of objects |
Responses
Request samples
- Payload
{- "action": "insert",
- "name_type": "id",
- "on_conflict": [
- "name",
- "age"
], - "record": {
- "property1": "string",
- "property2": "string"
}, - "records": [
- {
- "property1": "string",
- "property2": "string"
}
]
}
Response samples
- 200
- 400
- 401
- 500
{- "code": 0,
- "data": {
- "record": { },
- "records": [
- { }
]
}, - "error": ""
}
update records of table
update the table's records, with filter, order, limit, offset, fields, name_type, etc.
Authorizations:
path Parameters
tableId required | string table id |
ownerName required | string owner name |
repoName required | string repository name |
Request Body schema: application/json
body
object fields, if empty, return all fields | |
object filter, filter condition | |
name_type | string Default: "id" Enum: "name" "id" name type, name or id, default is id |
Responses
Request samples
- Payload
{- "fields": {
- "6896890709": "max"
}, - "filter": {
- "field": "field1",
- "filter_type": "single",
- "filters": [
- { }
], - "op": "gt",
- "val": null
}, - "name_type": "id"
}
Response samples
- 200
- 400
- 401
- 500
{- "code": 0,
- "data": {
- "affect_count": 0
}, - "error": ""
}
delete record
delete record
Authorizations:
path Parameters
tableId required | string table id |
ownerName required | string owner name |
repoName required | string repository name |
recordId required | string record id |
Responses
Response samples
- 200
- 400
- 401
- 500
{- "code": 0,
- "data": { },
- "error": ""
}
get record
get record
Authorizations:
path Parameters
tableId required | string table id |
ownerName required | string owner name |
repoName required | string repository name |
recordId required | string record id |
Request Body schema: application/json
body
fields | Array of strings fields, if empty, return all fields |
name_type | string Default: "id" Enum: "name" "id" name type, name or id, default is id |
Responses
Request samples
- Payload
{- "fields": [
- "6896890709",
- "1212312686"
], - "name_type": "id"
}
Response samples
- 200
- 400
- 401
- 500
{- "code": 0,
- "data": {
- "record": { }
}, - "error": ""
}
update record
update record
Authorizations:
path Parameters
tableId required | string table id |
ownerName required | string owner name |
repoName required | string repository name |
recordId required | string record id |
Request Body schema: application/json
body
object fields, if empty, return all fields | |
name_type | string Default: "id" Enum: "name" "id" name type, name or id, default is id |
Responses
Request samples
- Payload
{- "fields": {
- "6896890709": "max"
}, - "name_type": "id"
}
Response samples
- 200
- 400
- 401
- 500
{- "code": 0,
- "data": {
- "record": {
- "create_time": 1700373436,
- "fields": {
- "field1": "val1",
- "field2": "val2"
}, - "record_id": "b46c807f-382c-48bb-bfae-a078982181ed",
- "update_time": 1700373436
}
}, - "error": ""
}
get records' metrics
get the table's records' metrics, like count, max, min, avg, sum
Authorizations:
path Parameters
tableId required | string table id |
ownerName required | string owner name |
repoName required | string repository name |
Request Body schema: application/json
body
filter | object filter, condition filter |
object metrics, like count, max, min, avg, sum | |
Array of objects (openapi.FieldMetric) metrics, like count, max, min, avg, sum | |
name_type | string Default: "id" Enum: "name" "id" name type, name or id, default is id |
Responses
Request samples
- Payload
{- "filter": { },
- "metric": {
- "aggr": "count",
- "condition": "distinct",
- "field": "field1"
}, - "metrics": [
- {
- "aggr": "count",
- "condition": "distinct",
- "field": "field1"
}
], - "name_type": "id"
}
Response samples
- 200
- 400
- 401
- 500
{- "code": 0,
- "data": {
- "metric": {
- "aggr": "count",
- "condition": "distinct",
- "field": "field1",
- "value": { }
}, - "metrics": [
- {
- "aggr": "count",
- "condition": "distinct",
- "field": "field1",
- "value": { }
}
]
}, - "error": ""
}
get records of table
get the table's records, with filter, order, limit, offset, fields, name_type, etc.
Authorizations:
path Parameters
tableId required | string table id |
ownerName required | string owner name |
repoName required | string repository name |
Request Body schema: application/json
body
fields | Array of strings fields, if empty, return all fields |
filter | object filter, condition filter |
limit | integer [ 1 .. 100 ] Default: 50 limit of records |
name_type | string Default: "id" Enum: "name" "id" name type, name or id, default is id |
offset | integer [ 0 .. 1000000 ] Default: 0 offset of records |
object order by, if empty, order by id desc | |
Array of objects order by, if empty, order by id desc | |
skip | integer [ 0 .. 1000000 ] Default: 0 skip of records, same as offset, use offset first |
take | integer [ 1 .. 100 ] Default: 50 take of records, same as limit, use limit first |
Responses
Request samples
- Payload
{- "fields": [
- "6896890709",
- "1212312686"
], - "filter": { },
- "limit": 50,
- "name_type": "id",
- "offset": 0,
- "order": {
- "age": "desc"
}, - "orders": [
- {
- "property1": "string",
- "property2": "string"
}
], - "skip": 0,
- "take": 50
}
Response samples
- 200
- 400
- 401
- 500
{- "code": 0,
- "data": {
- "records": [
- {
- "create_time": 1700373436,
- "fields": {
- "field1": "val1",
- "field2": "val2"
}, - "record_id": "b46c807f-382c-48bb-bfae-a078982181ed",
- "update_time": 1700373436
}
]
}, - "error": ""
}
search records of table
search the table's records, internal is a inverted index search, with fields, query, limit, offset, etc.
Authorizations:
path Parameters
tableId required | string table id |
ownerName required | string owner name |
repoName required | string repository name |
Request Body schema: application/json
body
boost_fields | object boost fields, key is field name, value is boost value, from 1 to 10, boost value would give the field more weight in search |
fields | Array of strings fields, it can not be empty |
filter | object filter, condition filter |
limit | integer limit of records |
name_type | string Default: "id" Enum: "name" "id" name type, name or id, default is id |
offset | integer offset of records |
object order by, if empty, order by id desc | |
Array of objects order by, if empty, order by id desc | |
query | string query, required, it can not be empty |
search_fields | Array of strings search fields, if empty, use fields |
skip | integer skip of records, same as offset, use offset first |
take | integer take of records, same as limit, use limit first |
Responses
Request samples
- Payload
{- "boost_fields": { },
- "fields": [
- "name"
], - "filter": { },
- "limit": 50,
- "name_type": "id",
- "offset": 0,
- "order": {
- "age": "desc"
}, - "orders": [
- {
- "property1": "string",
- "property2": "string"
}
], - "query": "name:john",
- "search_fields": [
- "string"
], - "skip": 0,
- "take": 50
}
Response samples
- 200
- 400
- 401
- 500
{- "code": 0,
- "data": {
- "records": [
- {
- "create_time": 1700373436,
- "fields": {
- "field1": "val1",
- "field2": "val2"
}, - "record_id": "b46c807f-382c-48bb-bfae-a078982181ed",
- "update_time": 1700373436
}
]
}, - "error": ""
}
upload file
upload file, file only support jpg, png, file should be less than 3mb
Authorizations:
path Parameters
tableId required | string table id |
ownerName required | string owner name |
repoName required | string repository name |
Request Body schema: multipart/form-data
file required | string <binary> file |
Responses
Response samples
- 200
- 400
- 401
- 500
{- "code": 0,
- "data": {
- "file": {
- "id": "string",
- "image_meta": {
- "height": 0,
- "width": 0
}, - "link": "string"
}
}, - "error": ""
}
upload multiple file
upload multiple file, file only support jpg, png, file should be less than 3mb
Authorizations:
path Parameters
tableId required | string table id |
ownerName required | string owner name |
repoName required | string repository name |
Request Body schema: multipart/form-data
files required | string <binary> files |
Responses
Response samples
- 200
- 400
- 401
- 500
{- "code": 0,
- "data": {
- "files": [
- {
- "id": "string",
- "image_meta": {
- "height": 0,
- "width": 0
}, - "link": "string"
}
]
}, - "error": ""
}