1
0
mirror of https://github.com/bigchaindb/bigchaindb.git synced 2024-06-10 20:05:02 +02:00

Problem: People reading HTTP API docs not told about the option to query MongoDB directly (#2463)

Solution: Tell them
This commit is contained in:
Troy McConaghy 2018-08-21 10:26:39 +02:00 committed by Vanshdeep Singh
parent 01dba7e883
commit 4815e75855

View File

@ -51,6 +51,15 @@ that allows you to discover the BigchainDB API endpoints:
Transactions
------------
.. note::
If you want to do more sophisticated queries
than those provided by the BigchainDB HTTP API,
then one option is to connect to MongoDB directly (if possible)
and do whatever queries MongoDB allows.
For more about that option, see
`the page about querying BigchainDB <https://docs.bigchaindb.com/en/latest/query.html>`_.
.. http:get:: /api/v1/transactions/{transaction_id}
Get the transaction with the ID ``transaction_id``.
@ -184,6 +193,14 @@ The ``/api/v1/outputs`` endpoint returns transactions outputs filtered by a
given public key, and optionally filtered to only include either spent or
unspent outputs.
.. note::
If you want to do more sophisticated queries
than those provided by the BigchainDB HTTP API,
then one option is to connect to MongoDB directly (if possible)
and do whatever queries MongoDB allows.
For more about that option, see
`the page about querying BigchainDB <https://docs.bigchaindb.com/en/latest/query.html>`_.
.. http:get:: /api/v1/outputs
@ -294,6 +311,15 @@ unspent outputs.
Assets
------
.. note::
If you want to do more sophisticated queries
than those provided by the BigchainDB HTTP API,
then one option is to connect to MongoDB directly (if possible)
and do whatever queries MongoDB allows.
For more about that option, see
`the page about querying BigchainDB <https://docs.bigchaindb.com/en/latest/query.html>`_.
.. http:get:: /api/v1/assets
Return all the assets that match a given text search.
@ -302,10 +328,6 @@ Assets
:query int limit: (Optional) Limit the number of returned assets. Defaults
to ``0`` meaning return all matching assets.
.. note::
Currently this endpoint is only supported if using MongoDB.
.. http:get:: /api/v1/assets/?search={search}
Return all assets that match a given text search.
@ -413,6 +435,15 @@ Assets
Transaction Metadata
--------------------
.. note::
If you want to do more sophisticated queries
than those provided by the BigchainDB HTTP API,
then one option is to connect to MongoDB directly (if possible)
and do whatever queries MongoDB allows.
For more about that option, see
`the page about querying BigchainDB <https://docs.bigchaindb.com/en/latest/query.html>`_.
.. http:get:: /api/v1/metadata
Return all the metadata objects that match a given text search.
@ -421,10 +452,6 @@ Transaction Metadata
:query int limit: (Optional) Limit the number of returned metadata objects. Defaults
to ``0`` meaning return all matching objects.
.. note::
Currently this endpoint is only supported if using MongoDB.
.. http:get:: /api/v1/metadata/?search={search}
Return all metadata objects that match a given text search.