98 Commits

Author SHA1 Message Date
tim
91a1151255 Add endpoint to get blocks by transaction 2017-01-25 10:33:37 +01:00
tim
5048846b0f Minor corrections on /statuses 2017-01-25 10:33:37 +01:00
tim
5ac7eb9b5a Add notes about endpoint specialities
For details, see the following comment:
https://github.com/bigchaindb/bigchaindb/pull/830#issuecomment-262468005
2017-01-25 10:33:37 +01:00
tim
9cd4c18fb4 Remove uuid based endpoints 2017-01-25 10:33:37 +01:00
tim
ea16a8731e Remove ?fields query string 2017-01-25 10:33:37 +01:00
tim
26cb00ab9c Document /block/block_id endpoint 2017-01-25 10:33:37 +01:00
tim
af6b799c4f Adjustments according to feedback
- owner_afters --> owners_after
- List choices for operation query string
- List choices for fields query string
- Use proper sphinx-way to define type of query string
2017-01-25 10:33:37 +01:00
tim
2997a5e994 Minor corrections to endpoints 2017-01-25 10:33:37 +01:00
tim
d748a1dc18 Minor corrections of redundant infos 2017-01-25 10:33:37 +01:00
tim
9a1b1364ea Add response headers 2017-01-25 10:33:37 +01:00
tim
152f151f23 :param _: --> :query _: 2017-01-25 10:33:07 +01:00
tim
eda8cdbba1 Add docs about /transactions endpoint 2017-01-25 10:33:07 +01:00
tim
f18f3cb8d2 Add sections to be done 2017-01-25 10:33:07 +01:00
tim
0a06547c1b Add transactions by metadata id endpoint 2017-01-25 10:33:07 +01:00
tim
ee904d78f4 Add transactions by asset id endpoint 2017-01-25 10:32:17 +01:00
tim
748e155378 Get block status using /statuses 2017-01-25 10:32:17 +01:00
tim
58d0b771cb id --> resource_id
Inevitably, some resources will not allow to filter by the exact
    keyword that is included in a resources body.

    Take for example asset and metadata.
    They both have a property called 'id', hence requests of a form:

        /transactions&fields=x,y&property_name=z

    might now be allowed to be resolved as the keyword 'id' in this
    case could reference both 'metadata.id' and 'asset.id'.

    This problem cannot be structurally resolved with URL paths.
    Hence it was decided to emphasize on a few resources that
    implement 'id' as a sort-of primary key.
2017-01-25 10:32:17 +01:00
tim
90aff0e202 Give up /conditions endpoint
A transaction contains:

        - conditions
        - fulfillments
        - assets
        - meta data

    While:

        - assets; and
        - meta data

    could be viewed as their own "tables" or resources, conditions
    and fulfillments cannot. Why?

    Because in comparison they do not contain a primary key, allowing
    them to be queried by it.
2017-01-25 10:32:17 +01:00
tim
156bf4fb21 txid --> id
KISS: A transaction is a resource as every other. Let's not give it
a special id (like 'txid'), but simply a regular id.
2017-01-25 10:32:17 +01:00
tim
9766332b8b Restructure doc: Endpoints as roots 2017-01-25 10:32:17 +01:00
tim
85d9553a1e owner_after --> owners_after
Querystring keywords should be in line with data model.
2017-01-25 10:31:25 +01:00
tim
e243a1be9b Use sphinx note for note in document 2017-01-25 10:31:25 +01:00
tim
0dc9b46ea7 Structural changes to the document
- Remove /unspents/ and replace with endpoint under /transactions
- Remove /transactions/txid/conditions/cid endpoint
2017-01-25 10:30:58 +01:00
tim
b488997353 tx_id --> txid 2017-01-25 10:29:12 +01:00
tim
5789a37664 Allow /statuses to return a 303 See Other response.
According to: https://www.ietf.org/rfc/rfc2616.txt a 303 See Other can
be returned to indicate that the resource the user is looking for can be
found under a new path.
In the case of a transaction including the `status == 'valid'`, we
return 303 See Other, as well as a Location header to the /transactions
endpoint.

"The response to the request can be found under a different URI and SHOULD be
retrieved using a GET method on that resource."
2017-01-25 10:29:12 +01:00
tim
71d3c70fda Status --> Statuses
Usage of singular resource names is discouraged in REST:
http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api

The plural of status is statuses:
http://english.stackexchange.com/questions/877/what-is-the-plural-form-of-status
2017-01-25 10:28:28 +01:00
tim
1086c3a5c4 POST /transactions status code to 202
According to https://www.ietf.org/rfc/rfc2616.txt a 201 Created status
code MUST only be returned when:

"The origin server MUST create the resource before returning the 201 status
code."

hence, a 202 Accepted's definition is more appropriate:

"The request has been accepted for processing, but the processing has not been
completed.

The entity returned with this response SHOULD include an indication of the
request's current status and either a pointer to a status monitor or some
estimate of when the user can expect the request to be fulfilled."
2017-01-25 10:27:52 +01:00
tim
f15a7f7e8b Document conditions endpoint 2017-01-25 10:23:14 +01:00
Scott Sadler
04a78aacec Merge remote-tracking branch 'origin/master' into inputs-outputs 2016-12-22 13:45:02 +01:00
Scott Sadler
27ad7b5092 s/fulfillments/inputs/g && s/conditions/outputs/g (docs changes) 2016-12-19 12:29:29 +01:00
troymc
71e52ccf3e Fixed HTTP API docs re/ API Endpoint 2016-12-16 13:36:13 +01:00
troymc
10a697fa60 Fixed broken link to The Transaction Model 2016-12-11 16:23:39 +01:00
Sylvain Bellemare
3bdaf60acb Fix docs building warnings 2016-12-08 11:45:41 +01:00
troymc
adde84970f Fixed merge conflict in bigchaindb/__init__.py 2016-12-01 16:09:34 +01:00
Scott Sadler
49726c4a31 make html runs generation scripts for documentation, generates http server examples 2016-11-30 16:28:58 +01:00
troymc
9212bcbe24 Minor edit about tx depending on associated keypairs 2016-11-29 14:28:21 +01:00
Brett Sun
536d440837 Fix HTTP API docs for upcoming release 2016-11-29 11:42:13 +01:00
Scott Sadler
7dc9f52fe0 remove transaction timestamp 2016-11-22 13:03:30 +01:00
Troy McConaghy
8f24e10fdc Docs: Noted unspents endpoint not yet implemented 2016-11-20 14:03:42 +01:00
troymc
5bf213d873 Removed api_endpoint from HTTP API docs & wrote how API Root URL is truly determined 2016-11-15 16:20:18 +01:00
tim
5ef532976d Corrections to render sphinx correctly 2016-11-15 13:46:39 +01:00
tim
f82f1add03 TransactionLinks --> URIs 2016-11-15 13:18:25 +01:00
tim
284411d881 PR Feedback 2016-11-15 13:18:25 +01:00
tim
93f3e9a06b Document unspents endpoint 2016-11-15 13:18:25 +01:00
tim
74b1662a78 Format http api docs to 79 chars 2016-11-15 13:18:25 +01:00
tim
1c8fec730c Format http api docs to 79 chars 2016-11-11 15:38:28 +01:00
troymc
a52921e9ec Updated the docs page about the HTTP API 2016-10-27 18:45:11 +02:00
troymc
cd2fd494ac Moved docs directory to docs/server, except README.md 2016-10-27 14:09:24 +02:00