GEO Protocol nodes handler API
Time prediction: <5 sec.
Creates and launches new node with random UUID as it’s ID.
Responses
Body
UUID of the created node.
Examples
POST /api/v1/nodes-handlers/ HTTP/1.1
HTTP/1.1 201 Created
Content-Type: application/json
{
"data": {
"uuid": "550e8400-e29b-41d4-a716-446655440000"
}
}
{uuid}
/Time prediction: <5 sec.
- Stops node process;
- Marks it as disabled, by prefixing it’s directory with “(disabled-)”, so this account will be ignored on the next startup;
WARN: Doesn’t removes node’s data itself.
WARN: Doesn’t checks any present debts.
Path variables
UUID of the node, that must be disabled.
Responses
Node was deactivated successfully.
There is no node with exact uuid.
Node is present, but is alredy disabled.
Authentication
Returns list of all neighours of the node.
Responses
Body
Neighbours count
List of UUIDs of all contractors.
Examples
No contractors
GET /api/v1/contractors/ HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"count": 0,
"uuids": []
}
}
Contractors present
GET /api/v1/contractors/ HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"count": 1,
"uuids": ["1b822993-4515-4ee4-adb9-fa2b3347a705"]
}
}
{contractor_uuid}
/trust-lines/{equivalent_id}
Initiates creating of the trust line to the contractor node with total credit amount = amount
.
Path variables
UUID of the node, to which the trust line should be opened.
ID of the accounting unit, that is used for the operation.
Request parameters
Specifies how much current node trusts to the contractor node.
Responses
No requested node is present in the system.
Node process is gone and doesn’t processes incomming commands.
{contractor-uuid}
/trust-lines/Initiates closing of the trust line to the contractor node. Outgoing trust line would be automatically deleted in case if it holds no debt, otherwise - it would be marked as closed, but would be keept until debt wan’t be cleared.
Path variables
Responses
No requested node is present in the system.
Node process is goneand doesn’t processes incomming commands.
{contractor-uuid}
/trust-lines/Updates outgoing trust amount of the trust line to the contractor node.
Path variables
Request parameters
New outgoing trust line amount.
Responses
No requested node is present in the system.
Node process is gone and doesn’t processes incomming commands.
Returns all trust lines of the node.
Responses
Examples
GET /api/v1/contractors/trust-lines/ HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"count": 1,
"trust_lines": [
{
"uuid": "uuid",
"incoming_trust_amount": "1000",
"outgoing_trust_amount": "2000",
"balance": "500"
}
]
}
}
No trust lines
GET /api/v1/contractors/trust-lines/ HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"count": 0,
"trust_lines": []
}
}
{contractor_uuid}
/transactions/{contractor-uuid}
/transactions/max/{contractor_uuid}
/transactions/Generates payment operation from the node to the contractor.
Path variables
UUID of the node, that should receive the transfer.
Request parameters
ID of accounting unit, that is used in the operation.
Responses
Examples
OK
POST /api/v1/contractors/{contractor_uuid}/transactions/ HTTP/1.1
HTTP/1.1 201 Created
Content-Type: application/json
{
"data": {
"transaction_uuid": "1b822993-4515-4ee4-adb9-fa2b3347a705"
}
}
{contractor-uuid}
/transactions/max/Returns max amout flow from contractor node to the current node.
Path variables
UUID of the node, to which the flow must be calculated.
Request parameters
Responses
Examples
GET /api/v1/contractors/{contractor-uuid}/transactions/max/ HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"max_amount": "1000"
}
}
Amount is the base type for all operations, that are requiring pair of amount and equivalent (for example, payment operations, or some operations with trust lines).
Positive BigInt representation in string format.
The comma is ommited, because the number will be represented in 10**8
(power of 8) notation. For example, 1 dollar will be represented as 1 * 10**8
dollars in the system. Max value == 2**32
.