nChain Event API Reference
V.1.4.3 API
V.1.4.3 API
  • About
  • Version History
  • API reference
    • Records
      • Status
      • Content
      • Match
    • Linkedrecords
      • Update
      • Delete
      • Status
      • Content
      • Match
      • Navigate
  • Specification
Powered by GitBook
On this page
  1. API reference
  2. Records

Content

PreviousStatusNextMatch

Get record content

get

Get the record content. It may not be confirmed on the blockchain yet. Get record status determines when the transaction is confirmed on the blockchain.

Path parameters
txIdstringRequired

The transaction Id of the record to fetch. Using a value other than a id returned by write record produces undefined behavior.

Header parameters
x-api-keystringRequired

{your-API-key}

Responses
200
The transaction has been published. The response contains the record as an application/octet-stream
400
Invalid request. The response is in JSON structure conforming to https://tools.ietf.org/html/rfc7807. It contains an error code and description of the error. - 'errorCode' can be one of: - TX_ID_PARAM_INVALID: Provided transaction id parameter is not a valid blockchain transaction id - TX_NOT_AN_EVENT_TRANSACTION: Transaction is not an nChain Event record transaction - TX_CONTENT_TYPE_NOT_SUPPORTED: Transaction is not supported by this nChain Event version
404
The transaction cannot be read from the blockchain. It could either still be in the process of publishing or the blockchain has rejected it.
500
An internal error occurred. Retry later. The Response is a JSON conforming to https://tools.ietf.org/html/rfc7807
get
GET /api/v1/records/{txId}/content HTTP/1.1
Host: {your-URL}
x-api-key: text
Accept: */*

No content

Get record headers

head

Obtain information about the record (i.e. length and type) in the HTTP headers.

Path parameters
txIdstringRequired

The transaction Id of the record to fetch. Using a value other than a transaction Id returned by write record produces undefined behavior.

Header parameters
x-api-keystringRequired

{your-API-key}

Responses
200
The transaction has been published. The response is empty; HTTP headers are set as follows: - Content-Type: application/octet-stream - Content-Length: actual size of the record as it would be returned by GET record
400
Invalid request.
404
The transaction cannot be read from the blockchain. It could either still be in the process of publishing or the blockchain has rejected it.
500
An internal error occurred. Retry later.
head
HEAD /api/v1/records/{txId}/content HTTP/1.1
Host: {your-URL}
x-api-key: text
Accept: */*

No content

  • GETGet record content
  • HEADGet record headers