Grid REST API (0.1.0)

Download OpenAPI specification:Download

An API providing HTTP/JSON interface to Hyperledger Grid.

Transaction

Submit a BatchList of Transactions

Accepts a protobuf formatted BatchList as an octet-stream binary file and submits it to be committed.

The API will return immediately with a status of 202. There will be no data object, only a link to a /batch_statuses endpoint to be polled to check the status of submitted batches.

Request Body schema: application/octet-stream

A binary encoded protobuf BatchList

Array of objects (Batch)

Responses

Fetch the committed statuses for a set of batches

Fetches an array of objects with a status and id for each batch requested. There are four possible statuses with string values 'COMMITTED', 'INVALID', 'PENDING', and 'UNKNOWN'.

The batch(es) you want to check can be specified using the id filter parameter. If a wait time is specified in the URL, the API will wait to respond until all batches are committed, or the time in seconds has elapsed. If the value of wait is not set (i.e., ?wait&id=...), or it is set to any non-integer value other than false, the wait time will be just under the API's specified timeout (usually 300).

Note that because this route does not return full resources, the response will not be paginated, and there will be no head or paging properties.

query Parameters
id
required
string

A comma-separated list of batch ids

wait
integer

A time in seconds to wait for commit

Responses

Response samples

Content type
application/json
{}

Schema

Get a list of schemas

Fetches a list of schemas from the reporting database

Responses

Response samples

Content type
application/json
{
  • "data":
    [
    ]
}

Find schema by schema name

Returns a single schema

path Parameters
schema_name
required
string

Name of the schema to return

Responses

Response samples

Content type
application/json
{
  • "link":
    {
    }
}

Pike

Get a list of Agents

Fetches a list of agents from the reporting database

Responses

Response samples

Content type
application/json
{
  • "data":
    [
    ]
}

list_organizations

Responses

Response samples

Content type
application/json
{
  • "data":
    [
    ]
}

fetch_organization

path Parameters
id
required
string

Id of the organization to return

Responses

Response samples

Content type
application/json
{
  • "data":
    {
    }
}

Find agent by public key

Returns a single agent from reporting database

path Parameters
public_key
required
string

Public key of the agent to return

Responses

Response samples

Content type
application/json
{
  • "data":
    [
    ]
}

Location

list_locations

Responses

Response samples

Content type
application/json
{
  • "data":
    [
    ]
}

Fetch a specific location

Fetches a single location with the given location ID

path Parameters
location_id
required
string

ID of the location to fetch.

query Parameters
service_id
string

The ID of the service the payload should be sent to; required if running on Splinter.

Responses