Caddy.Admin.Api (Caddy v1.0.5)

Control Caddy Server through admin socket

admin-api

Admin API

POST /load Sets or replaces the active configuration
POST /stop Stops the active configuration and exits the process
GET /config/[path] Exports the config at the named path
POST /config/[path] Sets or replaces object; appends to array
PUT /config/[path] Creates new object; inserts into array
PATCH /config/[path] Replaces an existing object or array element
DELETE /config/[path] Deletes the value at the named path
Using @id in JSON Easily traverse into the config structure
Concurrent config changes Avoid collisions when making unsynchronized changes to config
POST /adapt Adapts a configuration to JSON without running it
GET /pki/ca/<id> Returns information about a particular PKI app CA
GET /pki/ca/<id>/certificates Returns the certificate chain of a particular PKI app CA
GET /reverse_proxy/upstreams Returns the current status of the configured proxy upstreams

Link to this section Summary

Functions

Adapts a configuration to JSON without running it

Delete the config at the named path

Get info from caddy server

Exports the config at the named path

Sets or replaces the active configuration

Patch the config at the named path

Post the config at the named path

Put the config at the named path

Stops the active configuration and exits the process

Link to this section Functions

@spec adapt(binary()) :: map()

Adapts a configuration to JSON without running it

Link to this function

delete_config()

Link to this function

delete_config(path)

Delete the config at the named path

Get info from caddy server

Link to this function

get_config(path)

Exports the config at the named path

@spec load(map() | String.t()) :: Caddy.Admin.Request.t()

Sets or replaces the active configuration

Link to this function

patch_config(data)

Link to this function

patch_config(path, data)

Patch the config at the named path

Link to this function

post_config(data)

Link to this function

post_config(path, data)

Post the config at the named path

Link to this function

put_config(data)

Link to this function

put_config(path, data)

Put the config at the named path

Stops the active configuration and exits the process