REST API CI
Dynamic Configuration Interface based on REST API.
Supports only synchronous requests
Can be used from all machines in network
Configuration
Minimal working configuration
All configuration parameters
Authorization token used to restrict access.
IP address on which REST API should listen.
Default: "127.0.0.1"
Port to listen on.
Default: 61438
Handy flag to fast disable dynamic interface not removing "ci_rest"
configuration section
Default: 0
Response codes
500 - internal error. Allocation errors, internal exceptions.
200 - success.
404 - request unrecognized.
400 - bad request. Required request parameters are missing.
413 - request body is too long.
To provide detailed information "status"
field is also available in response body.
Requests examples
Ping
Type: POST
Body: { "token" : "your_secret_token" }
Protect IP address
Type: POST
Body: { "token" : "your_secret_token", "ip_addr" : "192.168.50.149", "vl" : "ca-ontario-toronto" }
Unprotect IP
Type: PUT
Body: { "token" : "your_secret_token", "ip_addr" : "192.168.50.149" }
Protect MAC
Type: POST
Body: { "token" : "your_secret_token", "mac_addr" : "08:00:27:aa:d7:17", "vl" : "ca-ontario-toronto" }
Unprotect MAC
Type: PUT
Body: { "token" : "your_secret_token", "mac_addr" : "08:00:27:aa:d7:17" }
Protect interface
Type: POST
Body: { "token" : "your_secret_token", "iface" : "eth2", "vl" : "ca-ontario-toronto" }
Unprotect interface
Type: PUT
Body: { "token" : "your_secret_token", "iface" : "eth2" }
Dump config file
Type: POST
Body: { "token" : "your_secret_token", "config_path" : "/etc/afwrt/afwrt-ci.conf" }
Get available countries
Type: POST
Body: { "token" : "your_secret_token" }
Last updated