JSON API
基础API
地址
method
parameter
描述
/api/pin/{numberOrId}
GET
PIN number 或 PIN id
根据PIN number或PIN id获取PIN详情
/api/address/pin/list/{addressType/{address}
GET
address addressType :creator(创建者),owner(拥有者)
根据address获取该地址创建或拥有的PIN列表
/api/address/pin/root/{address}
GET
address
根据address获取PIN root
/api/node/child/{pinId}
GET
pinId
根据PIN id 获取child node
/api/node/parent/{pinId}
GET
pinId
根据PIN id 获取parent node
/api/info/address/{address}
GET
address
获取adress的MetaID info
/api/info/rootId/{rootId}
GET
rootId
根据rootId获取MetaID info
/api/pin/content/{numberOrId}
GET
PIN number 或 PIN id
根据PIN number或PIN id获取PIN的content
/api/getAllPinByParentPath
GET
page,limit,parentPath
根据parentPath获取所有pin
generalQuery
protocols 数据通用查询,支持get,count,sum方式获取数据。
地址: /api/generalQuery
method: POST
{
"collection": "pins", // 查询的集合名称,必填
"action": "sum", // 查询操作,支持 get, count, sum
"filterRelation": "or", // 查询条件关系,支持 or, and,目前不支持混用
"field": [
"number" // 查询的返回的字段,sum 时必填
],
// 查询条件
"filter": [
{
"operator": "=", // 条件操作符号,支持 =, >, >=, <, <=
"key": "number", // 条件字段
"value": 1 // 查询值
},
{
"operator": "=",
"key": "number",
"value": 2
}
],
"cursor": 0, // 返回数据起始
"limit": 1, // 返回数据条数
"sort": [
"number", // 排序字段
"desc" // 顺序,支持 asc, desc
]
}成功返回示例
失败返回实例
Last updated