2713 Commits

Author SHA1 Message Date
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
Rodolphe Marques
69505a366b Added bigchaindb commands to add and remove nodes from replicaset 2017-01-24 17:55:06 +01:00
Rodolphe Marques
5683ed5163 Added mongodb admin commands to add and remove members from the
replicaset
2017-01-24 15:59:02 +01:00
libscott
4802f0fabe Merge pull request #1080 from bigchaindb/no-dev-in-tx-version
short form 0.9, 0.10 etc tx version with no '.dev' suffix
2017-01-24 14:34:37 +01:00
Scott Sadler
e3317b370b don't rename TransactionLink to TL 2017-01-24 12:11:21 +01:00
Scott Sadler
af23ff5b65 clean up use of double quotes, rename UNSPENTS_ENDPOINT, clarify test 2017-01-24 12:08:55 +01:00
libscott
a7a163fd3c Merge pull request #1083 from bigchaindb/single-quotes
Add flake8-quotes checker and cleanup double quotes
2017-01-24 12:07:29 +01:00
Sylvain Bellemare
7207f57879 Change to single quotes 2017-01-24 10:24:16 +01:00
Sylvain Bellemare
fe5d966dca Put back some strings with wrapped single quotes
just to double check that flake8-quotes does indeed tolerate it
2017-01-24 10:22:32 +01:00
tymlez
78bd1ecd96 consensus plugin 2017-01-24 09:12:16 +00:00
Scott Sadler
bd048a3115 add flake8-quotes checker and cleanup double quotes 2017-01-23 17:30:37 +01:00
Rodolphe Marques
927e57beba Changed backend.connect to handle backend specific kwargs.
Fixed tests
2017-01-23 17:29:42 +01:00
Rodolphe Marques
f12264773c bigchaindb configure now requires a positional backend argument.
Created and fixed tests.
Updated `b` fixture
2017-01-23 16:49:59 +01:00
Scott Sadler
897ffe81bc outputs endpoint with unspent filter parameter 2017-01-23 16:10:21 +01:00
Scott Sadler
4bb64fa0b8 generalise get_owned_ids to get_outputs and get_owned_ids 2017-01-23 16:10:21 +01:00
libscott
ad2abcf723 Merge pull request #1065 from bigchaindb/1021/http_transactions_list
1021/http transactions list
2017-01-23 16:06:07 +01:00
Troy McConaghy
616e6ce263 Merge pull request #1078 from bigchaindb/better-error-handling-in-awsdeploy.sh
Better error handling in awsdeploy.sh
2017-01-23 15:25:18 +01:00
Scott Sadler
ccdbb91c1c short form 0.9, 0.10 etc tx version with no '.dev' suffix 2017-01-23 15:16:15 +01:00
Troy McConaghy
2c78870d3a Merge pull request #1076 from bigchaindb/docs/1048/how-to-install-os-deps-for-fabric
Docs: Added instructions to install fabric's OS-level dependencies
2017-01-23 15:14:37 +01:00
Troy McConaghy
315695a486 Merge pull request #1075 from bigchaindb/docs/1023/update-os-reqs-in-quickstart-docs
Docs: Quickstart page now assumes you're using Ubuntu 16.04 or similar
2017-01-23 15:13:40 +01:00
libscott
23ba642d2c s/txes/txs/g 2017-01-23 14:38:30 +01:00
Scott Sadler
a5acd0c7b9 document patching technique in get_transactions_filtered web view test 2017-01-23 14:07:22 +01:00
Troy McConaghy
36eccb3f83 Better error handling in awsdeploy.sh 2017-01-22 16:20:13 +01:00
Troy McConaghy
98fb15c124 Added instructions to install fabric's OS-level dependencies 2017-01-22 15:07:14 +01:00
Troy McConaghy
15d28e3f91 Quickstart now assumes you're using Ubuntu 16.04 or similar 2017-01-22 14:47:45 +01:00
Troy McConaghy
b10b03e3ca Changed 'len(validated_transactions) == 0' to 'not validated_transactions' as suggested by @amirelemam in #762 2017-01-22 13:48:34 +01:00
Troy McConaghy
e253ca015f Line-length changes, many suggested by @amirelemam in #762 2017-01-22 13:45:17 +01:00
Rodolphe Marques
e7ffcf5705 Added replicaset name to bigchaindb config (#1063)
* Added replicaset name to bigchaindb config

* changed travis replSet to match bigchaindb default

* Updated initialize_replica_set

It now initializes the replica set with the name provided by the
bigchaindb config file.


* initialize_replica_set is now called when creating a mongodb connection.

This way we are sure that a replica set exists when we return a
connection.

* Moved the initialize replica set logic to the connection.

* update the config documentation
2017-01-20 14:05:28 +01:00
Scott Sadler
c5253825b3 remove unused backend query stub get_txids_by_asset_id 2017-01-20 10:31:28 +01:00
Scott Sadler
f2034cddde make asset_id not optional in get_transactions_filtered 2017-01-20 10:08:30 +01:00
Sylvain Bellemare
7606bdb59f Merge pull request #1070 from utarl/fix-wrong-link-in-readme
change the link to consensus.py to right one
2017-01-20 03:44:25 -05:00
utarl
ef4bc69f5b change the link to consensus.py to right one 2017-01-20 16:27:57 +08:00
Scott Sadler
2ec23be05d fix flake8 2017-01-18 17:13:38 +01:00
Troy McConaghy
3344fdfe50 Merge pull request #1053 from bigchaindb/docs/1047/long-description-in-setup-py
In setup.py: longer long_description & updated the docs URL
2017-01-18 16:00:03 +01:00
Scott Sadler
ae14d0e5c4 api method to get transactions by asset_id 2017-01-18 15:43:53 +01:00
Scott Sadler
1c918caf4c txlist / get_transactions_filtered 2017-01-18 15:42:47 +01:00