Http api.localhost assets front_top truyencotich_002.png

This page assumes you already know an API Root URL for a BigchainDB node or reverse proxy. It should be something like

GET /api/v1/transactions/4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

5 or

GET /api/v1/transactions/4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

6.

If you set up a BigchainDB node or reverse proxy yourself, and you’re not sure what the API Root URL is, then see the last section of this page for help.

BigchainDB Root URL

If you send an HTTP GET request to the BigchainDB Root URL e.g.

GET /api/v1/transactions/4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

7 or

GET /api/v1/transactions/4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

5 (with no

GET /api/v1/transactions/4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

9 on the end), then you should get an HTTP response with something like the following in the body:

HTTP/1.1 200 OK Content-Type: application/json { "api": {

"v1": {
  "assets": "/api/v1/assets/",
  "blocks": "/api/v1/blocks/",
  "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/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"
}
}, "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/", "software": "BigchainDB", "version": "2.2.1" }

API Root Endpoint

If you send an HTTP GET request to the API Root Endpoint e.g.

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

0 or

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

1, then you should get an HTTP response that allows you to discover the BigchainDB API endpoints:

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

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.

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

3

Get the transaction with the ID

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

4.

If a transaction with ID

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

4 has been included in a committed block, then this endpoint returns that transaction, otherwise the response will be

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

6.

Parameters:

  • transaction_id (hex string) – transaction ID

Example request:

GET /api/v1/transactions/4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

Example response:

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

Response Headers:

  • – HTTP/1.1 200 OK Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 7 Status Codes:
  • – A transaction with that ID was found.
  • – A transaction with that ID was not found.

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

9

Requests to the

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

0 endpoint without any query parameters will get a response status code

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

1.

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

3

Get a list of transactions that use an asset with the ID

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

4.

If

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

5 is

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

6, then the CREATE transaction which created the asset with ID

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

4 will be returned.

If

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

5 is

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

9, then every TRANSFER transaction involving the asset with ID

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

4 will be returned. This allows users to query the entire history or provenance of an asset.

If

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

5 is not included, then every transaction involving the asset with ID

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

4 will be returned.

if

HTTP/1.1 200 OK Content-Type: application/json [{ "asset": {

"id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"
}, "id": "79ef6803210c941903d63d08b40fa17f0a5a04f11ac0ff04451553a187d97a30", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUAYRI8kzKaZcrW-_avQrAIk5q-7o_7U6biBvoHk1ioBLqHSBcE_PAdNEaeWesAAW_HeCqNUWKaJ5Lzo5Nfz7QgN",
  "fulfills": {
    "output_index": 0,
    "transaction_id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"
  },
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 1
}, "operation": "TRANSFER", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;lu6ov4AKkee6KWGnyjOVLBeyuP0bz4-O6_dPi15eYUc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9"
  ]
}
], "version": "2.0" }, { "asset": {
"id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"
}, "id": "1fec726a3b426498147f1a1f19a92c187d551a7f66db4b88d666d7dcc10e86a4", "inputs": [
{
  "fulfillment": "pGSAICw7Ul-c2lG6NFbHp3FbKRC7fivQcNGO7GS4wV3A-1QggUARCMty2JBK_OyPJntWEFxDG4-VbKMy853NtqwnPib5QUJIuwPQa1Y4aN2iIBuoqGE85Pmjcc1ScG9FCPSQHacK",
  "fulfills": {
    "output_index": 0,
    "transaction_id": "79ef6803210c941903d63d08b40fa17f0a5a04f11ac0ff04451553a187d97a30"
  },
  "owners_before": [
    "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9"
  ]
}
], "metadata": {
"sequence": 2
}, "operation": "TRANSFER", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "3Af3fhhjU6d9WecEM9Uw5hfom9kNEwE7YuDWdqAUssqm",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;Ll1r0LzgHUvWB87yIrNFYo731MMUEypqvrbPATTbuD4?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "3Af3fhhjU6d9WecEM9Uw5hfom9kNEwE7YuDWdqAUssqm"
  ]
}
], "version": "2.0" }]

3 is set to

HTTP/1.1 200 OK Content-Type: application/json [{ "asset": {

"id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"
}, "id": "79ef6803210c941903d63d08b40fa17f0a5a04f11ac0ff04451553a187d97a30", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUAYRI8kzKaZcrW-_avQrAIk5q-7o_7U6biBvoHk1ioBLqHSBcE_PAdNEaeWesAAW_HeCqNUWKaJ5Lzo5Nfz7QgN",
  "fulfills": {
    "output_index": 0,
    "transaction_id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"
  },
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 1
}, "operation": "TRANSFER", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;lu6ov4AKkee6KWGnyjOVLBeyuP0bz4-O6_dPi15eYUc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9"
  ]
}
], "version": "2.0" }, { "asset": {
"id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"
}, "id": "1fec726a3b426498147f1a1f19a92c187d551a7f66db4b88d666d7dcc10e86a4", "inputs": [
{
  "fulfillment": "pGSAICw7Ul-c2lG6NFbHp3FbKRC7fivQcNGO7GS4wV3A-1QggUARCMty2JBK_OyPJntWEFxDG4-VbKMy853NtqwnPib5QUJIuwPQa1Y4aN2iIBuoqGE85Pmjcc1ScG9FCPSQHacK",
  "fulfills": {
    "output_index": 0,
    "transaction_id": "79ef6803210c941903d63d08b40fa17f0a5a04f11ac0ff04451553a187d97a30"
  },
  "owners_before": [
    "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9"
  ]
}
], "metadata": {
"sequence": 2
}, "operation": "TRANSFER", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "3Af3fhhjU6d9WecEM9Uw5hfom9kNEwE7YuDWdqAUssqm",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;Ll1r0LzgHUvWB87yIrNFYo731MMUEypqvrbPATTbuD4?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "3Af3fhhjU6d9WecEM9Uw5hfom9kNEwE7YuDWdqAUssqm"
  ]
}
], "version": "2.0" }]

4, only the last transaction is returned instead of all transactions with the given

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

4.

This endpoint returns transactions only if they are in committed blocks.

Query Parameters:

  • operation (string) – (Optional) GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com 6 or GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com 9.
  • asset_id (string) – asset ID.
  • last_tx (string) – (Optional) HTTP/1.1 200 OK Content-Type: application/json [{ "asset": {
    "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"  
    
    }, "id": "79ef6803210c941903d63d08b40fa17f0a5a04f11ac0ff04451553a187d97a30", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUAYRI8kzKaZcrW-_avQrAIk5q-7o_7U6biBvoHk1ioBLqHSBcE_PAdNEaeWesAAW_HeCqNUWKaJ5Lzo5Nfz7QgN",  
      "fulfills": {  
        "output_index": 0,  
        "transaction_id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"  
      },  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 1  
    
    }, "operation": "TRANSFER", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;lu6ov4AKkee6KWGnyjOVLBeyuP0bz4-O6_dPi15eYUc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9"  
      ]  
    }  
    
    ], "version": "2.0" }, { "asset": {
    "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"  
    
    }, "id": "1fec726a3b426498147f1a1f19a92c187d551a7f66db4b88d666d7dcc10e86a4", "inputs": [
    {  
      "fulfillment": "pGSAICw7Ul-c2lG6NFbHp3FbKRC7fivQcNGO7GS4wV3A-1QggUARCMty2JBK_OyPJntWEFxDG4-VbKMy853NtqwnPib5QUJIuwPQa1Y4aN2iIBuoqGE85Pmjcc1ScG9FCPSQHacK",  
      "fulfills": {  
        "output_index": 0,  
        "transaction_id": "79ef6803210c941903d63d08b40fa17f0a5a04f11ac0ff04451553a187d97a30"  
      },  
      "owners_before": [  
        "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 2  
    
    }, "operation": "TRANSFER", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "3Af3fhhjU6d9WecEM9Uw5hfom9kNEwE7YuDWdqAUssqm",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;Ll1r0LzgHUvWB87yIrNFYo731MMUEypqvrbPATTbuD4?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "3Af3fhhjU6d9WecEM9Uw5hfom9kNEwE7YuDWdqAUssqm"  
      ]  
    }  
    
    ], "version": "2.0" }] 4 or HTTP/1.1 200 OK Content-Type: application/json [{ "asset": {
    "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"  
    
    }, "id": "79ef6803210c941903d63d08b40fa17f0a5a04f11ac0ff04451553a187d97a30", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUAYRI8kzKaZcrW-_avQrAIk5q-7o_7U6biBvoHk1ioBLqHSBcE_PAdNEaeWesAAW_HeCqNUWKaJ5Lzo5Nfz7QgN",  
      "fulfills": {  
        "output_index": 0,  
        "transaction_id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"  
      },  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 1  
    
    }, "operation": "TRANSFER", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;lu6ov4AKkee6KWGnyjOVLBeyuP0bz4-O6_dPi15eYUc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9"  
      ]  
    }  
    
    ], "version": "2.0" }, { "asset": {
    "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"  
    
    }, "id": "1fec726a3b426498147f1a1f19a92c187d551a7f66db4b88d666d7dcc10e86a4", "inputs": [
    {  
      "fulfillment": "pGSAICw7Ul-c2lG6NFbHp3FbKRC7fivQcNGO7GS4wV3A-1QggUARCMty2JBK_OyPJntWEFxDG4-VbKMy853NtqwnPib5QUJIuwPQa1Y4aN2iIBuoqGE85Pmjcc1ScG9FCPSQHacK",  
      "fulfills": {  
        "output_index": 0,  
        "transaction_id": "79ef6803210c941903d63d08b40fa17f0a5a04f11ac0ff04451553a187d97a30"  
      },  
      "owners_before": [  
        "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 2  
    
    }, "operation": "TRANSFER", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "3Af3fhhjU6d9WecEM9Uw5hfom9kNEwE7YuDWdqAUssqm",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;Ll1r0LzgHUvWB87yIrNFYo731MMUEypqvrbPATTbuD4?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "3Af3fhhjU6d9WecEM9Uw5hfom9kNEwE7YuDWdqAUssqm"  
      ]  
    }  
    
    ], "version": "2.0" }] 9.

Example request:

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

Example response:

HTTP/1.1 200 OK Content-Type: application/json [{ "asset": {

"id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"
}, "id": "79ef6803210c941903d63d08b40fa17f0a5a04f11ac0ff04451553a187d97a30", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUAYRI8kzKaZcrW-_avQrAIk5q-7o_7U6biBvoHk1ioBLqHSBcE_PAdNEaeWesAAW_HeCqNUWKaJ5Lzo5Nfz7QgN",
  "fulfills": {
    "output_index": 0,
    "transaction_id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"
  },
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 1
}, "operation": "TRANSFER", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;lu6ov4AKkee6KWGnyjOVLBeyuP0bz4-O6_dPi15eYUc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9"
  ]
}
], "version": "2.0" }, { "asset": {
"id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"
}, "id": "1fec726a3b426498147f1a1f19a92c187d551a7f66db4b88d666d7dcc10e86a4", "inputs": [
{
  "fulfillment": "pGSAICw7Ul-c2lG6NFbHp3FbKRC7fivQcNGO7GS4wV3A-1QggUARCMty2JBK_OyPJntWEFxDG4-VbKMy853NtqwnPib5QUJIuwPQa1Y4aN2iIBuoqGE85Pmjcc1ScG9FCPSQHacK",
  "fulfills": {
    "output_index": 0,
    "transaction_id": "79ef6803210c941903d63d08b40fa17f0a5a04f11ac0ff04451553a187d97a30"
  },
  "owners_before": [
    "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9"
  ]
}
], "metadata": {
"sequence": 2
}, "operation": "TRANSFER", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "3Af3fhhjU6d9WecEM9Uw5hfom9kNEwE7YuDWdqAUssqm",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;Ll1r0LzgHUvWB87yIrNFYo731MMUEypqvrbPATTbuD4?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "3Af3fhhjU6d9WecEM9Uw5hfom9kNEwE7YuDWdqAUssqm"
  ]
}
], "version": "2.0" }]

Response Headers:

  • – HTTP/1.1 200 OK Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 7 Status Codes:
  • – A list of transactions containing an asset with ID GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com 4 was found and returned.
  • – The request wasn’t understood by the server, e.g. the GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com 4 querystring was not included in the request.

POST /api/v1/transactions?mode=async HTTP/1.1 Host: example.com Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

3

POST /api/v1/transactions?mode=async HTTP/1.1 Host: example.com Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

4

This endpoint is used to send a transaction to a BigchainDB network. The transaction is put in the body of the request.

Query Parameters:

  • mode (string) – (Optional) One of the three supported modes to send a transaction: POST /api/v1/transactions?mode=async HTTP/1.1 Host: example.com Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 5, POST /api/v1/transactions?mode=async HTTP/1.1 Host: example.com Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 6, POST /api/v1/transactions?mode=async HTTP/1.1 Host: example.com Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 7. The default is POST /api/v1/transactions?mode=async HTTP/1.1 Host: example.com Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 5.

Once the posted transaction arrives at a BigchainDB node, that node will check to see if the transaction is valid. If it’s invalid, the node will return an HTTP 400 (error). Otherwise, the node will send the transaction to Tendermint (in the same node) using the .

The meaning of the

POST /api/v1/transactions?mode=async HTTP/1.1 Host: example.com Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

9 query parameter is inherited from the mode parameter in .

HTTP/1.1 202 Accepted Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

0 means the HTTP response will come back immediately, before Tendermint asks BigchainDB Server to check the validity of the transaction (a second time).

HTTP/1.1 202 Accepted Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

1 means the HTTP response will come back after Tendermint gets a response from BigchainDB Server regarding the validity of the transaction.

HTTP/1.1 202 Accepted Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2 means the HTTP response will come back once the transaction is in a committed block.

Note

In the async and sync modes, after a successful HTTP response is returned, the transaction may still be rejected later on. All the transactions are recorded internally by Tendermint in WAL (Write-Ahead Log) before the HTTP response is returned. Nevertheless, the following should be noted:

  • Transactions in WAL including the failed ones are not exposed in any of the BigchainDB or Tendermint APIs.
  • Transactions are never fetched from WAL. WAL is never replayed.
  • A critical failure (e.g. the system is out of disk space) may occur preventing transactions from being stored in WAL, even when the HTTP response indicates a success.
  • If a transaction fails the validation because it conflicts with the other transactions of the same block, Tendermint includes it into its block, but BigchainDB does not store these transactions and does not offer any information about them in the APIs.

Note

The posted transaction should be valid. The relevant BigchainDB Transactions Spec explains how to build a valid transaction and how to check if a transaction is valid. One would normally use a driver such as the BigchainDB Python Driver to build a valid transaction.

Note

A client can subscribe to the WebSocket Event Stream API to listen for committed transactions.

Example request:

POST /api/v1/transactions?mode=async HTTP/1.1 Host: example.com Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

Example response:

HTTP/1.1 202 Accepted Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

Response Headers:

  • – HTTP/1.1 200 OK Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 7 Status Codes:
  • – The meaning of this response depends on the value of the POST /api/v1/transactions?mode=async HTTP/1.1 Host: example.com Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 9 parameter. See above.
  • – The posted transaction was invalid.

POST /api/v1/transactions?mode=async HTTP/1.1 Host: example.com Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

3

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

9

This endpoint (without any parameters) will push a new transaction. Since no

POST /api/v1/transactions?mode=async HTTP/1.1 Host: example.com Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

9 parameter is included, the default mode is assumed:

POST /api/v1/transactions?mode=async HTTP/1.1 Host: example.com Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

5.

Transaction Outputs

The

HTTP/1.1 202 Accepted Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

9 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.

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2

GET /api/v1/outputs?public_key=1AAAbbb...ccc HTTP/1.1 Host: example.com

1

Get transaction outputs by public key. The

GET /api/v1/outputs?public_key=1AAAbbb...ccc HTTP/1.1 Host: example.com

2 parameter must be a base58 encoded ed25519 public key associated with transaction output ownership.

Returns a list of transaction outputs.

Parameters:

  • public_key – Base58 encoded public key associated with output ownership. This parameter is mandatory and without it the endpoint will return a GET /api/v1/outputs?public_key=1AAAbbb...ccc HTTP/1.1 Host: example.com 3 response code.
  • spent – (Optional) Boolean value ( HTTP/1.1 200 OK Content-Type: application/json [{ "asset": {
    "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"  
    
    }, "id": "79ef6803210c941903d63d08b40fa17f0a5a04f11ac0ff04451553a187d97a30", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUAYRI8kzKaZcrW-_avQrAIk5q-7o_7U6biBvoHk1ioBLqHSBcE_PAdNEaeWesAAW_HeCqNUWKaJ5Lzo5Nfz7QgN",  
      "fulfills": {  
        "output_index": 0,  
        "transaction_id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"  
      },  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 1  
    
    }, "operation": "TRANSFER", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;lu6ov4AKkee6KWGnyjOVLBeyuP0bz4-O6_dPi15eYUc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9"  
      ]  
    }  
    
    ], "version": "2.0" }, { "asset": {
    "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"  
    
    }, "id": "1fec726a3b426498147f1a1f19a92c187d551a7f66db4b88d666d7dcc10e86a4", "inputs": [
    {  
      "fulfillment": "pGSAICw7Ul-c2lG6NFbHp3FbKRC7fivQcNGO7GS4wV3A-1QggUARCMty2JBK_OyPJntWEFxDG4-VbKMy853NtqwnPib5QUJIuwPQa1Y4aN2iIBuoqGE85Pmjcc1ScG9FCPSQHacK",  
      "fulfills": {  
        "output_index": 0,  
        "transaction_id": "79ef6803210c941903d63d08b40fa17f0a5a04f11ac0ff04451553a187d97a30"  
      },  
      "owners_before": [  
        "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 2  
    
    }, "operation": "TRANSFER", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "3Af3fhhjU6d9WecEM9Uw5hfom9kNEwE7YuDWdqAUssqm",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;Ll1r0LzgHUvWB87yIrNFYo731MMUEypqvrbPATTbuD4?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "3Af3fhhjU6d9WecEM9Uw5hfom9kNEwE7YuDWdqAUssqm"  
      ]  
    }  
    
    ], "version": "2.0" }] 4 or HTTP/1.1 200 OK Content-Type: application/json [{ "asset": {
    "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"  
    
    }, "id": "79ef6803210c941903d63d08b40fa17f0a5a04f11ac0ff04451553a187d97a30", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUAYRI8kzKaZcrW-_avQrAIk5q-7o_7U6biBvoHk1ioBLqHSBcE_PAdNEaeWesAAW_HeCqNUWKaJ5Lzo5Nfz7QgN",  
      "fulfills": {  
        "output_index": 0,  
        "transaction_id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"  
      },  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 1  
    
    }, "operation": "TRANSFER", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;lu6ov4AKkee6KWGnyjOVLBeyuP0bz4-O6_dPi15eYUc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9"  
      ]  
    }  
    
    ], "version": "2.0" }, { "asset": {
    "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317"  
    
    }, "id": "1fec726a3b426498147f1a1f19a92c187d551a7f66db4b88d666d7dcc10e86a4", "inputs": [
    {  
      "fulfillment": "pGSAICw7Ul-c2lG6NFbHp3FbKRC7fivQcNGO7GS4wV3A-1QggUARCMty2JBK_OyPJntWEFxDG4-VbKMy853NtqwnPib5QUJIuwPQa1Y4aN2iIBuoqGE85Pmjcc1ScG9FCPSQHacK",  
      "fulfills": {  
        "output_index": 0,  
        "transaction_id": "79ef6803210c941903d63d08b40fa17f0a5a04f11ac0ff04451553a187d97a30"  
      },  
      "owners_before": [  
        "3yfQPHeWAa1MxTX9Zf9176QqcpcnWcanVZZbaHb8B3h9"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 2  
    
    }, "operation": "TRANSFER", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "3Af3fhhjU6d9WecEM9Uw5hfom9kNEwE7YuDWdqAUssqm",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;Ll1r0LzgHUvWB87yIrNFYo731MMUEypqvrbPATTbuD4?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "3Af3fhhjU6d9WecEM9Uw5hfom9kNEwE7YuDWdqAUssqm"  
      ]  
    }  
    
    ], "version": "2.0" }]
  • indicating if the result set should include only spent or only unspent outputs. If not specified, the result includes all the outputs (both spent and unspent) associated with the GET /api/v1/outputs?public_key=1AAAbbb...ccc HTTP/1.1 Host: example.com 2.

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2

GET /api/v1/outputs?public_key=1AAAbbb...ccc HTTP/1.1 Host: example.com

8

Return all outputs, both spent and unspent, for the

GET /api/v1/outputs?public_key=1AAAbbb...ccc HTTP/1.1 Host: example.com

2.

Example request:

GET /api/v1/outputs?public_key=1AAAbbb...ccc HTTP/1.1 Host: example.com

Example response:

HTTP/1.1 200 OK Content-Type: application/json [ {

"output_index": 0,
"transaction_id": "2d431073e1477f3073a4693ac7ff9be5634751de1b8abaa1f4e19548ef0b4b0e"
}, {
"output_index": 1,
"transaction_id": "2d431073e1477f3073a4693ac7ff9be5634751de1b8abaa1f4e19548ef0b4b0e"
} ]

Status Codes:

  • – A list of outputs was found and returned in the body of the response.
  • – The request wasn’t understood by the server, e.g. the GET /api/v1/outputs?public_key=1AAAbbb...ccc HTTP/1.1 Host: example.com 2 querystring was not included in the request.

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2

HTTP/1.1 200 OK Content-Type: application/json [ {

"output_index": 0,
"transaction_id": "2d431073e1477f3073a4693ac7ff9be5634751de1b8abaa1f4e19548ef0b4b0e"
}, {
"output_index": 1,
"transaction_id": "2d431073e1477f3073a4693ac7ff9be5634751de1b8abaa1f4e19548ef0b4b0e"
} ]

2

Return all spent outputs for

GET /api/v1/outputs?public_key=1AAAbbb...ccc HTTP/1.1 Host: example.com

2.

Example request:

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

0

Example response:

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

1

Status Codes:

  • – A list of outputs were found and returned in the body of the response.
  • – The request wasn’t understood by the server, e.g. the GET /api/v1/outputs?public_key=1AAAbbb...ccc HTTP/1.1 Host: example.com 2 querystring was not included in the request.

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2

HTTP/1.1 200 OK Content-Type: application/json [ {

"output_index": 0,
"transaction_id": "2d431073e1477f3073a4693ac7ff9be5634751de1b8abaa1f4e19548ef0b4b0e"
}, {
"output_index": 1,
"transaction_id": "2d431073e1477f3073a4693ac7ff9be5634751de1b8abaa1f4e19548ef0b4b0e"
} ]

6

Return all unspent outputs for

GET /api/v1/outputs?public_key=1AAAbbb...ccc HTTP/1.1 Host: example.com

2.

Example request:

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

2

Example response:

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

3

Status Codes:

  • – A list of outputs were found and returned in the body of the response.
  • – The request wasn’t understood by the server, e.g. the GET /api/v1/outputs?public_key=1AAAbbb...ccc HTTP/1.1 Host: example.com 2 querystring was not included in the request.

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.

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

00

Return all the assets that match a given text search.

Query Parameters:

  • search (string) – Text search string to query.
  • limit (int) – (Optional) Limit the number of returned assets. Defaults to HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" } 01 meaning return all matching assets.

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

03

Return all assets that match a given text search.

Note

The

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

04 of the asset is the same

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

04 of the CREATE transaction that created the asset.

Note

You can use

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

06 or

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

07.

If no assets match the text search it returns an empty list.

If the text string is empty or the server does not support text search, a

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

1 is returned.

The results are sorted by text score. For more information about the behavior of text search, see .

Example request:

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

4

Example response:

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

5

Response Headers:

  • – HTTP/1.1 200 OK Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 7 Status Codes:
  • – The query was executed successfully.
  • – The query was not executed successfully. Returned if the text string is empty or the server does not support text search.

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

11

Return at most

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

12 assets that match a given text search.

If no assets match the text search it returns an empty list.

If the text string is empty or the server does not support text search, a

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

1 is returned.

The results are sorted by text score. For more information about the behavior of text search, see .

Example request:

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

6

Example response:

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

7

Response Headers:

  • – HTTP/1.1 200 OK Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 7 Status Codes:
  • – The query was executed successfully.
  • – The query was not executed successfully. Returned if the text string is empty or the server does not support text search.

Validators

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

16

Return the local validators set of a given node.

Example request:

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

8

Example response:

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

9

Response Headers:

  • – HTTP/1.1 200 OK Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 7 Status Codes:
  • – The query was executed successfully and validators set was returned.

Blocks

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

19

Get the block with the height

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

20.

Parameters:

  • block_height (integer) – block height

Example request:

GET /api/v1/transactions/4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

0

Example response:

GET /api/v1/transactions/4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

1

Response Headers:

  • – HTTP/1.1 200 OK Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 7 Status Codes:
  • – A block with that block height was found.
  • – The request wasn’t understood by the server, e.g. just requesting HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" } 22 without the HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" } 20.
  • – A block with that block height was not found.

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

25

The unfiltered

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

22 endpoint without any query parameters returns a

GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

1 status code.

Example request:

GET /api/v1/transactions/4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

2

Example response:

Status Codes:

  • – The request wasn’t understood by the server, e.g. just requesting HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" } 22 without the HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" } 20.

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

2

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

31

Retrieve a list of block IDs (block heights), such that the blocks with those IDs contain a transaction with the ID

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

4. A correct response may consist of an empty list or a list with one block ID.

Note

In case no block was found, an empty list and an HTTP status code

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

33 is returned, as the request was still successful.

Query Parameters:

  • transaction_id (string) – (Required) transaction ID

Example request:

GET /api/v1/transactions/4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

3

Example response:

GET /api/v1/transactions/4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1 Host: example.com

4

Response Headers:

  • – HTTP/1.1 200 OK Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 7 Status Codes:
  • – The request was properly formed and zero or more blocks were found containing the specified HTTP/1.1 200 OK Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 4.
  • – The request wasn’t understood by the server, e.g. just requesting HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" } 22, without defining HTTP/1.1 200 OK Content-Type: application/json { "asset": {
    "data": {  
      "msg": "Hello BigchainDB!"  
    }  
    
    }, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
    {  
      "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",  
      "fulfills": null,  
      "owners_before": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "metadata": {
    "sequence": 0  
    
    }, "operation": "CREATE", "outputs": [
    {  
      "amount": "1",  
      "condition": {  
        "details": {  
          "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",  
          "type": "ed25519-sha-256"  
        },  
        "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"  
      },  
      "public_keys": [  
        "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"  
      ]  
    }  
    
    ], "version": "2.0" } 4.

Determining the API Root URL

When you start BigchainDB Server using

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

38, an HTTP API is exposed at some address. The default is:

HTTP/1.1 200 OK Content-Type: application/json { "asset": {

"data": {
  "msg": "Hello BigchainDB!"
}
}, "id": "4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317", "inputs": [
{
  "fulfillment": "pGSAIDE5i63cn4X8T8N1sZ2mGkJD5lNRnBM4PZgI_zvzbr-cgUCy4BR6gKaYT-tdyAGPPpknIqI4JYQQ-p2nCg3_9BfOI-15vzldhyz-j_LZVpqAlRmbTzKS-Q5gs7ZIFaZCA_UD",
  "fulfills": null,
  "owners_before": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "metadata": {
"sequence": 0
}, "operation": "CREATE", "outputs": [
{
  "amount": "1",
  "condition": {
    "details": {
      "public_key": "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD",
      "type": "ed25519-sha-256"
    },
    "uri": "ni:///sha-256;PNYwdxaRaNw60N6LDFzOWO97b8tJeragczakL8PrAPc?fpt=ed25519-sha-256&cost=131072"
  },
  "public_keys": [
    "4K9sWUMFwTgaDGPfdynrbxWqWS6sWmKbZoTjxLtVUibD"
  ]
}
], "version": "2.0" }

0

It’s bound to

HTTP/1.1 200 OK Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", "docs": "https://docs.bigchaindb.com/projects/server/en/v2.2.1/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streams": "ws://localhost:9985/api/v1/streams/valid_transactions", "transactions": "/transactions/", "validators": "/validators" }

40, so you can access it from the same machine, but it won’t be directly accessible from the outside world. (The outside world could connect via a SOCKS proxy or whatnot.)