REST API methods for the data service¶
Transactions¶
GET /transactions¶
Returns a list of transactions matching the search query criteria and filters applied.
Important
It is returned a maximum of 500 transactions for the API GET /transactions method request.
Method Response:
[
{
"id": "string",
"type": 0,
"height": 0,
"fee": 0,
"sender": "string",
"senderPublicKey": "string",
"signature": "string",
"timestamp": 0,
"version": 0
}
]
GET /transactions/count¶
Returns the number of transactions matching the search query criteria and filters applied.
Method Response:
{
"count": "string"
}
GET /transactions/id/{id}¶
Returns transaction by ID {id}.
Method Response:
{
"id": "string",
"type": 0,
"height": 0,
"fee": 0,
"sender": "string",
"senderPublicKey": "string",
"signature": "string",
"timestamp": 0,
"version": 0
}
Token assets¶
GET /assets¶
Returns a list of token assets available in the blockchain (as token issue transactions).
Method Response:
[
{
"id": "string",
"type": 0,
"height": 0,
"fee": 0,
"sender": "string",
"senderPublicKey": "string",
"signature": "string",
"timestamp": 0,
"version": 0,
"assetId": "string",
"name": "string",
"description": "string",
"quantity": 0,
"decimals": 0,
"reissuable": true
}
]
Users¶
GET /users¶
Returns a list of users matching the search query criteria and filters applied.
Method Response:
[
{
"address": "string",
"aliases": [
"string"
],
"registration_date": "string",
"permissions": [
"string"
],
"balances": [
{
"assetId": "string",
"amount": 0
}
]
}
]
GET /users/{userAddress}¶
Returns information about the user as per user’s address.
Method Response:
{
"address": "string",
"aliases": [
"string"
],
"registration_date": "string",
"permissions": [
"string"
],
"balances": [
{
"assetId": "string",
"amount": 0
}
]
}
Blocks¶
GET /blocks/{height}¶
Returns the block at the specified height.
Method Response:
{
"version": 0,
"timestamp": 0,
"reference": "string",
"nxt-consensus": {
"base-target": 0,
"generation-signature": "string"
},
"features": [
0
],
"generator": "string",
"signature": "string",
"blocksize": 0,
"transactionCount": 0,
"fee": 0,
"height": 0,
"transactions": [
{
"id": "string",
"type": 0,
"height": 0,
"fee": 0,
"sender": "string",
"senderPublicKey": "string",
"signature": "string",
"timestamp": 0,
"version": 0
}
]
}
Data transactions¶
GET /api/v1/txIds/{key}¶
Returns a list of data transaction ID’s containing the specified key.
Method Response:
[
{
"id": "string"
}
]
GET /api/v1/txIds/{key}/{value}¶
Returns a list of data transaction ID’s containing the specified key and value.
Method Response:
[
{
"id": "string"
}
]
GET /api/v1/txData/{key}¶
Returns data transaction bodies containing the specified key.
Method Response:
[
{
"id": "string",
"type": "string",
"height": 0,
"fee": 0,
"sender": "string",
"senderPublicKey": "string",
"signature": "string",
"timestamp": 0,
"version": 0,
"key": "string",
"value": "string",
"position_in_tx": 0
}
]
GET /api/v1/txData/{key}/{value}¶
Returns data transaction bodies containing the specified key and value.
Method Response:
[
{
"id": "string",
"type": "string",
"height": 0,
"fee": 0,
"sender": "string",
"senderPublicKey": "string",
"signature": "string",
"timestamp": 0,
"version": 0,
"key": "string",
"value": "string",
"position_in_tx": 0
}
]