-
Notifications
You must be signed in to change notification settings - Fork 210
REST API
Yaroslav Pogrebnyak edited this page Jun 25, 2016
·
12 revisions
You can enable/disable and configure REST API port in gobetween config file in [api]
section:
[api]
enabled = true # true | false
bind = ":8888" # bind host:port
API responds with typical HTTP codes representing success of failure of the operation:
- 200 OK
- 400 Bad Request
- 409 Conflict
- 500 Internal Server Error
Returns system information about gobetween process.
{
"configPath": String,
"pid": Integer,
"startTime": String,
"time": String,
"uptime": Duration,
"version": String
}
# TOML formatted text of current config
{
// server definition of the same structure and format as `[servers.<name>]`
// entry in config TOML file but JSON encoded.
}
{
// Represents the same structure and format as `[servers]` entries in config TOML file.
"<name>": {
// server definition of the same structure and format as `[servers.<name>]`
// entry in config TOML file but JSON encoded.
},
// other servers
}
{
// server definition of the same structure and format as `[servers.<name>]`
// entry in config TOML file but JSON encoded.
}