API 向导 (1.0.0)

Download OpenAPI specification:Download

Records API

记录的增删改查接口

获取记录列表

Authorizations:
BearerAuth
path Parameters
objectName
required
string
Example: contracts

对象API名称

query Parameters
filters
string
Example: filters=[["amount", ">", 100000]]

过滤条件

fields
string
Example: fields=["name", "amount", "created"]

字段名

sort
string
Example: sort=created desc

排序,多个用逗号隔开

top
integer
Example: top=10

获取条数,最多5000

skip
integer
Example: skip=1

跳过条数

header Parameters
Authorization
required
string
Example: Bearer apikey,${apikey}

身份验证

Responses

Response samples

Content type
application/json
{
  • "status": 0,
  • "msg": "",
  • "data": {
    }
}

新增一条记录

Authorizations:
BearerAuth
path Parameters
objectName
required
string
Example: contracts

对象API名称

header Parameters
Authorization
required
string
Example: Bearer apikey,${apikey}

身份验证

Request Body schema: application/json
doc
required
object

记录内容

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "status": 0,
  • "msg": "",
  • "data": {
    }
}

查询记录列表

Authorizations:
BearerAuth
path Parameters
objectName
required
string
Example: contracts

对象API名称

header Parameters
Authorization
required
string
Example: Bearer apikey,${apikey}

身份验证

Request Body schema: application/json
filters
Array of strings (过滤条件) [ items ]

如:[["amount", ">", 100000]]

fields
Array of strings (字段名)

如:["name", "amount", "created"]

sort
string (排序)

如:created desc,多个用逗号隔开

top
integer (获取条数)

最多5000

skip
integer (跳过条数)

Responses

Request samples

Content type
application/json
{
  • "filters": [
    ],
  • "fields": [
    ],
  • "sort": "created desc",
  • "top": 10,
  • "skip": 1
}

Response samples

Content type
application/json
{
  • "status": 0,
  • "msg": "",
  • "data": {
    }
}

获取单条记录

Authorizations:
BearerAuth
path Parameters
objectName
required
string
Example: contracts

对象API名称

id
required
string
Example: 626240ac87e5c50032d9bdc1

记录id

query Parameters
fields
string
Example: fields=["name", "amount", "created"]

字段名

header Parameters
Authorization
required
string
Example: Bearer apikey,${apikey}

身份验证

Responses

Response samples

Content type
application/json
{
  • "status": 0,
  • "msg": "",
  • "data": {
    }
}

更新一条记录

Authorizations:
BearerAuth
path Parameters
objectName
required
string
Example: contracts

对象API名称

id
required
string
Example: 63884b0e7afcfb99c989be03_6262243287e5c50032d9bda5

记录id

header Parameters
Authorization
required
string
Example: Bearer apikey,${apikey}

身份验证

Request Body schema: application/json
doc
required
object

更新的内容

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "status": 0,
  • "msg": "",
  • "data": {
    }
}

删除一条记录

Authorizations:
BearerAuth
path Parameters
objectName
required
string
Example: contracts

对象API名称

id
required
string
Example: 5e7d1b9b9c9d4400001d1b9b

记录id

header Parameters
Authorization
required
string
Example: Bearer apikey,${apikey}

身份验证

Responses

Response samples

Content type
application/json
{
  • "status": 0,
  • "msg": "",
  • "data": {
    }
}

下载附件

Authorizations:
BearerAuth
path Parameters
fileId
required
string
Example: 650cede7157c5a3dfb79ab21

附件id

header Parameters
Authorization
required
string
Example: Bearer apikey,${apikey}

身份验证

Responses

Response samples

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

上传附件

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
file
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "_id": "650d09cd9da18d458c2f61f4",
  • "original": {
    },
  • "metadata": {
    },
  • "uploadedAt": "2023-09-22T03:28:13.147Z",
  • "copies": {
    }
}