JSON API
基礎API
/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
獲取 address 的 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