Maintenance API
Scroll down for example requests and responses.
goloop management
Base URLs:
Node Management
Code samples
GET /system
Return system information.
Name | In | Type | Required | Description |
---|---|---|---|---|
format | query | string | false | Format the output using the given Go template |
Example responses200 Response
{
"buildVersion": "v0.1.7",
"buildTags": "linux/amd64 tags()-2019-08-20-09:39:15",
"setting": {
"address": "hx4208599c8f58fed475db747504a80a311a3af63b",
"p2p": "localhost:8080",
"p2pListen": "localhost:8080",
"rpcAddr": ":9080",
"rpcDump": false
},
"config": {
"eeInstances": 1,
"rpcDefaultChannel": "",
"rpcIncludeDebug": false
}
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Success | ||
500 | Internal Server Error | None |
This operation does not require authentication
Code samples
GET /system/configure
Return system configuration.
Example responses200 Response
{
"eeInstances": 1,
"rpcDefaultChannel": "",
"rpcIncludeDebug": false
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Success | ||
500 | Internal Server Error | None |
This operation does not require authentication
Code samples
POST /system/configure
Body parameter
{
"key": "string",
"value": "string"
}
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | true | key-value to configure |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Success | None | |
500 | Internal Server Error | None |
This operation does not require authentication
Code samples
GET /system/backup
Return list of backups
Example responses200 Response
[
{
"name": "0x178977_0x1_1_20200715-111057.zip",
"cid": "0x178977",
"nid": "0x1",
"channel": "1",
"height": 2021,
"codec": "rlp"
}
]
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Success | ||
500 | Internal Server Error | None |
This operation does not require authentication
Code samples
GET /system/restore
View the status of restoring
Example responses200 Response
{
"name": "0x178977_0x1_1_20200715-111057.zip",
"overwrite": true,
"state": "started 23/128"
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Success | ||
500 | Internal Server Error | None |
This operation does not require authentication
Code samples
POST /system/restore
Start to restore chain from the backup
Body parameter
{
"name": "0x178977_0x1_1_20200715-111057.zip",
"overwrite": true
}
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | true | Name of backup and options |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Success | None | |
500 | Internal Server Error | None |
This operation does not require authentication
Code samples
DELETE /system/restore
Stop restoring operation
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Success | None | |
500 | Internal Server Error | None |
This operation does not require authentication
Chain Management
Code samples
GET /chain
Returns a list of chains
Example responses200 Response
[
{
"cid": "0x782b03",
"nid": "0x000000",
"channel": "000000",
"state": "started",
"height": 100,
"lastError": ""
}
]
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Success | Inline | |
500 | Internal Server Error | None |
Status Code 200
array of chains
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | false | none | array of chains | |
» cid | string("0x" + lowercase HEX string) | false | none | chain-id of chain |
» nid | string("0x" + lowercase HEX string) | false | none | network-id of chain |
» channel | string | false | none | chain-alias of node |
» height | integer(int64) | false | none | block height of chain |
» state | string | false | none | state of chain |
» lastError | string | false | none | last error of chain |
This operation does not require authentication
Code samples
POST /chain
Join Chain
Body parameter
json:
dbType: goleveldb
seedAddress: 'localhost:8080'
role: 3
concurrencyLevel: 1
normalTxPool: 5000
patchTxPool: 1000
maxBlockTxBytes: 1048576
nodeCache: none
channel: '000000'
secureSuites: 'none,tls,ecdhe'
secureAeads: 'chacha,aes128,aes256'
defaultWaitTimeout: 0
txTimeout: 0
maxWaitTimeout: 0
autoStart: false
genesisZip: string
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | Genesis-Storage zip file and json encoded chain-configuration for join chain using multipart |
» json | body | true | json encoded chain-configuration, using multipart 'Content-Disposition: name=json' | |
»» dbType | body | string | false | Name of database system, ReadOnly |
»» seedAddress | body | string | false | List of Seed ip-port, Comma separated string, Runtime-Configurable |
»» role | body | integer | false | Role: |
»» concurrencyLevel | body | integer | false | Maximum number of executors to use for concurrency |
»» normalTxPool | body | integer | false | Size of normal transaction pool |
»» patchTxPool | body | integer | false | Size of patch transaction pool |
»» maxBlockTxBytes | body | integer | false | Max size of transactions in a block |
»» nodeCache | body | string | false | Node cache: |
»» channel | body | string | false | Chain-alias of node |
»» secureSuites | body | string | false | Supported Secure suites with order (none,tls,ecdhe) - Comma separated string |
»» secureAeads | body | string | false | Supported Secure AEAD with order (chacha,aes128,aes256) - Comma separated string |
»» defaultWaitTimeout | body | integer | false | Default wait timeout in milli-second(0:disable) |
»» maxWaitTimeout | body | integer | false | Max wait timeout in milli-second(0:uses same value of defaultWaitTimeout) |
»» txTimeout | body | integer | false | Transaction timeout in milli-second(0:uses system default value) |
»» autoStart | body | boolean | false | Start the chain automatically on node start |
» genesisZip | body | string(binary) | true | Genesis-Storage zip file, using multipart 'Content-Disposition: name=genesisZip' |
Detailed descriptions
»» role: Role:
0
- None1
- Seed2
- Validator3
- Seed and ValidatorRuntime-Configurable
»» nodeCache: Node cache:
none
- No cachesmall
- Memory Lv1 ~ Lv5 for alllarge
- Memory Lv1 ~ Lv5 for all and File Lv6 for store
Enumerated Values
Parameter | Value |
---|---|
»» dbType | badgerdb |
»» dbType | goleveldb |
»» dbType | boltdb |
»» dbType | mapdb |
»» role | 0 |
»» role | 1 |
»» role | 2 |
»» role | 3 |
»» nodeCache | none |
»» nodeCache | small |
»» nodeCache | large |
Example responses200 Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Success | ||
409 | Conflict | None | |
500 | Internal Server Error | None |
This operation does not require authentication
Code samples
GET /chain/{cid}
Return low-level information about a chain.
Name | In | Type | Required | Description |
---|---|---|---|---|
cid | path | string("0x" + lowercase HEX string) | true | chain-id of chain |
format | query | string | false | Format the output using the given Go template |
informal | query | boolean | false | Inspect with informal data |
Example responses200 Response
{
"cid": "0x782b03",
"nid": "0x000000",
"channel": "000000",
"state": "started",
"height": 100,
"lastError": "",
"genesisTx": {},
"config": {
"dbType": "goleveldb",
"seedAddress": "localhost:8080",
"role": 3,
"concurrencyLevel": 1,
"normalTxPool": 5000,
"patchTxPool": 1000,
"maxBlockTxBytes": 1048576,
"nodeCache": "none",
"channel": "000000",
"secureSuites": "none,tls,ecdhe",
"secureAeads": "chacha,aes128,aes256",
"defaultWaitTimeout": 0,
"txTimeout": 0,
"maxWaitTimeout": 0,
"autoStart": false
},
"module": {
"property1": {},
"property2": {}
}
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Success | ||
404 | Not Found | None | |
500 | Internal Server Error | None |
This operation does not require authentication
Code samples
DELETE /chain/{cid}
Leave Chain.
Name | In | Type | Required | Description |
---|---|---|---|---|
cid | path | string("0x" + lowercase HEX string) | true | chain-id of chain |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Success | None | |
404 | Not Found | None | |
500 | Internal Server Error | None |
This operation does not require authentication
Code samples
POST /chain/{cid}/start
Start Chain.
Name | In | Type | Required | Description |
---|---|---|---|---|
cid | path | string("0x" + lowercase HEX string) | true | chain-id of chain |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Success | None | |
404 | Not Found | None | |
500 | Internal Server Error | None |
This operation does not require authentication
Code samples
POST /chain/{cid}/stop
Stop Chain.
Name | In | Type | Required | Description |
---|---|---|---|---|
cid | path | string("0x" + lowercase HEX string) | true | chain-id of chain |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Success | None | |
404 | Not Found | None | |
500 | Internal Server Error | None |
This operation does not require authentication
Code samples
POST /chain/{cid}/reset
Reset Chain.
Name | In | Type | Required | Description |
---|---|---|---|---|
cid |