默认情况下,BigchainDB为我们提供了一些API
"api": {
"v1": {
"assets": "/api/v1/assets/",
"blocks": "/api/v1/blocks/",
"docs": "https://docs.bigchaindb.com/projects/server/en/v2.0.0/http-client-server-api.html",
"metadata": "/api/v1/metadata/",
"outputs": "/api/v1/outputs/",
"streams": "ws://localhost:9985/api/v1/streams/valid_transactions",
"transactions": "/api/v1/transactions/",
"validators": "/api/v1/validators"
}
}
在white paper for BigchainDB第4页我们可以阅读,我们可以为它创建自己的API
By default, BigchainDB 2.0 creates some MongoDB indexes and the
BigchainDB HTTP API includes some endpoints for doing basic queries.
However, as outlined in the previous paragraph, each node operator can
add additional indexes and query APIs.
我在files’ source中找到了routes.py(其中设置了API url)和query.py(其中定义了从mongo获取数据的方法),但是没有合并的机会来扩展查询API而不分叉存储库
是否有任何变体可以添加自己的API而不更改原始代码
Tags:
apidocsforserversomeoutputsstreamsmetadatav1transactionsvalidatorsassetsbigchaindbblocks0条回答
目前没有回答