Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

API Documentation

Simon Siegert edited this page Jun 11, 2018 · 4 revisions

api-server v1.0.0

api-server

Chains

Retrieve aggregated data for a chain

GET /chain/:accessibility(private|public)/:chainName

Parameters

Name Type Description
accessibility String

Private or public

chainName String

Name of the chain to retieve data for

startTime Number optional

Start time of timespan to get data for

endTime Number optional

End time of timespan to get data for

target Strign

Target system the chain is running on

numberOfItems Number optional

Number of data entries to retrieve (max: 100000)

Get Chain Info

GET /chain

Set Chain Parameters

POST /chain

Parameters

Name Type Description
parameters Object

JSON-Object containing parameters to be set and their values. Can also contain a scenario name.

chainName String

Name of the chain to configure

target String

Target system the chain is running on

Store Chain Data

POST /chain/private/:chainName

Parameters

Name Type Description
chainName String

Name of the chain to store data for

hostId String

Host Id of the node

chainName String

Name of the running chain

target String

Target system the node is running on

isMining Boolean

Whether the node is mining or not

hashrate Number

Hashrate of the node

avgBlocktime Number

Average blocktime the node observed

blockSize Number

Blocksize of the last blocks

avgDifficulty Number

Average difficulty of the last blocks

avgTransactions Number

Average transactions

cpuUsage Number

CPU usage in percent

Logs

Access Server Log

GET /log

Parameters

Name Type Description
startTime Number optional

Start time of timespan to get data for as UTC timestamp

endTime Number optional

End time of timespan to get data for as UTC timestamp

numberOfItems Number optional

Number of data entries to retrieve (max: 100000)

logLevel String optional

Lowest Log level to be retrieved. Can be 'trace', 'debug', 'info', 'warn', 'error' or 'fatal'. Defaults to 'trace'.

Recording

Cancel Recording

POST /recordings/cancel

Get List of Recordings

GET /recordings

Check if currently recording

GET /recordings/isRecording

Start Recording

POST /recordings/start

Parameters

Name Type Description
name String

Name of the recording that is to be started

Stop Recording

POST /recordings/stop

Scenario

Manually define a scenario

POST /scenarios

Parameters

Name Type Description
fileName String

Name of the uploaded scenario

description String optional

String desribing the scenario

payloadSize Number

Payload size of each transaction

period Number

The period time of transactions

numberOfNodes Number

The number of nodes for this scenario

Get all defined scenarios

GET /scenarios

Parameters

Name Type Description
id String optional

Id of the scenario to filter for

Upload a Scylla Log

POST /scenarios/upload

Parameters

Name Type Description
fileName String

Name of the uploaded scenario

description String optional

String desribing the scenario

User

Check Log In

GET /user/check

Create New User

POST /user/create

Parameters

Name Type Description
username String

Unique username of user to create

password String

Password for new user

Log In

POST /user/login

https://github.com/BPChain/meta/wiki/API-Documentation

Parameters

Name Type Description
username String

Username to log in with

password String

Password for user

Log Out

POST /user/logout