Skip to content

Management API

Max Harley edited this page Sep 4, 2019 · 1 revision

Warning: Feature taken out due to redesign.

The management API can be reached on the path and with the IPs specific in the service configuration. For these examples, I will assume the operator is using /management as the management path. Use JSON format for all POST requests.

GET /management - List all IDs and information about those IDs

POST /management/reset - Reset times_served and not_serving for target path

Key Description
path Path to reset
{ "path": "/index.html" }

POST /management/new - Create new path with data. Warning: Users can arbitrarily write to the filesystem by using directory traversal on path.Path.

Key Description
path Info object to upload. Look at the options in paths.go
file String with file data as base64
{
  "path": {
    "Path": "/info/test.html",
    "Serve": 1,
  },
  "file": "PGI+SGVsbG8hPC9iPgo="
}