This page lists all API endpoints of the Portmaster.
This page is very much in progress and may not be fully accurate and up to date. If you plan to develop something that interacts with the Portmaster, we'd love to hear from you and talk about it!
Some endpoints require authentication, which is handled with API Keys . You can use an API key in a Basic
or Bearer
HTTP Authorization
Header.
For development, you may also enable the Development Mode , which disables authentication and gives you full access. Cross-origin requests are not allowed.
Badge | Meaning
User | Endpoint requires User privileges.
Admin | Endpoint requires Admin privileges.
Internal | Endpoint can only be used by the Portmaster itself.
Admin
[WEBSOCKET] /api/database/v1
The websocket interface is not yet documented in a processable format. Please refer to the Portmaster Console App for more information and testing:
http://127.0.0.1:817/ui/modules/console/ (Requires Development Mode )
Request an authentication token with a given set of permissions. The user will be prompted to either authorize or deny the request. Used for external or third-party tool integrations.
GET /api/v1/app/auth
returns application/json
data
app-name
read
write
ttl
User
GET /api/v1/app/profile
returns application/json
data
GET /api/v1/auth/basic
returns text/plain
data
Returns an HTTP Basic Auth request, if not authenticated.
GET /api/v1/auth/bearer
returns text/plain
data
Returns an HTTP Bearer Auth request, if not authenticated.
GET /api/v1/auth/permissions
returns application/json
data
Returns the current permissions assigned to the request.
GET /api/v1/auth/reset
returns text/plain
data
Resets authentication status internally and in the browser.
Admin
GET /api/v1/broadcasts/matching-data
returns application/json
data
Returns the data used by the broadcast notifications to match the instance.
Admin
POST /api/v1/broadcasts/reset-state
returns text/plain
data
Delete the cache of Broadcast Notifications, making them appear again.
Admin
POST /api/v1/broadcasts/simulate
returns text/plain
data
Test broadcast notifications by sending a valid source file in the body.
state
true
User
GET /api/v1/compat/self-check
returns text/plain
data
Runs a couple integration self-checks in order to see if the system integration works.
GET /api/v1/config/options
returns application/json
data
Returns a list of all registered configuration options and their metadata. This does not include the current active or default settings.
Admin
POST /api/v1/core/restart
returns text/plain
data
Restart the Portmaster Core Service.
Internal
POST /api/v1/core/shutdown
returns text/plain
data
Shut down the Portmaster Core Service and all UI components.
GET /api/v1/debug/allocs
returns text/plain
data
Gather and return the memory allocation profile.
You can easily view this data in your browser with this command (with Go installed):
`go tool pprof -http :8888 http://127.0.0.1:817/api/v1/debug/allocs`
GET /api/v1/debug/core
returns text/plain
data
Returns network debugging information, similar to debug/info, but with system status data.
style
github
GET /api/v1/debug/cpu
returns text/plain
data
Gather and return the CPU profile. This data needs to gathered over a period of time, which is specified using the duration parameter.
You can easily view this data in your browser with this command (with Go installed): go tool pprof -http :8888 http://127.0.0.1:817/api/v1/debug/cpu
duration
10s
GET /api/v1/debug/heap
returns text/plain
data
Gather and return the heap memory profile.
You can easily view this data in your browser with this command (with Go installed):
`go tool pprof -http :8888 http://127.0.0.1:817/api/v1/debug/heap`
GET /api/v1/debug/info
returns text/plain
data
Returns debugging information, including the version and platform info, errors, logs and the current goroutine stack.
style
github
GET /api/v1/debug/network
returns text/plain
data
Returns network debugging information, similar to debug/core, but with connection data.
style
github
profile
<Source>/<ID>
where
<query>
User
GET /api/v1/debug/network/state
returns application/json
data
Returns the current network state tables from the OS.
GET /api/v1/debug/stack
returns text/plain
data
Returns the current goroutine stack.
GET /api/v1/debug/stack/print
returns text/plain
data
Prints the current goroutine stack to stdout.
User
GET /api/v1/dns/cache/{query:[a-z0-9\.-]{0,512}\.[A-Z]{1,32}}
returns application/json
data
Returns cached dns records from the internal cache.
query (in path)
fqdn and query type
User
POST /api/v1/dns/clear
returns text/plain
data
Deletes all saved DNS records from the database.
GET /api/v1/dns/resolvers
returns application/json
data
List currently configured DNS resolvers and their status.
GET /api/v1/endpoints
returns application/json
data
Returns a list of all registered endpoints and their metadata.
User
GET /api/v1/modules/status
returns application/json
data
Returns status information of all modules.
Internal
POST /api/v1/modules/{moduleName:.+}/trigger/{eventName:.+}
returns text/plain
data
Triggers an event of an internal module.
User
GET /api/v1/netquery/charts/connection-active
POST /api/v1/netquery/charts/connection-active
returns application/json
data
Query the in-memory sqlite connection database and return a chart of active connections.
User
GET /api/v1/netquery/query
POST /api/v1/netquery/query
returns application/json
data
Query the in-memory sqlite connection database.
GET /api/v1/network/gateways
returns application/json
data
Returns the current active default gateways of the network.
User
GET /api/v1/network/location
returns application/json
data
Returns an approximation of where the device is on the Internet.
User
GET /api/v1/network/location/traceroute
returns application/json
data
Returns an approximation of where the device is on the Internet using a the traceroute technique.
User
GET /api/v1/network/nameservers
returns application/json
data
Returns the currently configured nameservers on the OS.
GET /api/v1/ping
returns text/plain
data
Pong.
Admin
POST /api/v1/spn/account/login
returns text/plain
data
Log into your SPN account.
Admin
DELETE /api/v1/spn/account/logout
returns text/plain
data
Logout from your SPN account.
purge
User
GET /api/v1/spn/account/user/profile
returns application/json
data
Get the user profile of the logged in SPN account.
refresh
User
GET /api/v1/spn/map/{map:[A-Za-z0-9]{1,255}}/graph{format:\.[a-z]{2,4}}
returns text/plain
data
Returns a graph of the given SPN map.
map (in path)
name of map
format (in path)
file type
Internal
POST /api/v1/spn/map/{map:[A-Za-z0-9]{1,255}}/intel/update
returns text/plain
data
Updates the intel data of the map.
User
GET /api/v1/spn/map/{map:[A-Za-z0-9]{1,255}}/measurements
returns application/json
data
Returns the measurements of the map.
User
GET /api/v1/spn/map/{map:[A-Za-z0-9]{1,255}}/measurements/table
returns text/plain
data
Returns the measurements of the map as a table.
User
GET /api/v1/spn/map/{map:[A-Za-z0-9]{1,255}}/optimization
returns application/json
data
Returns the calculated optimization for the map.
User
GET /api/v1/spn/map/{map:[A-Za-z0-9]{1,255}}/optimization/table
returns text/plain
data
Returns the calculated optimization for the map as a table.
User
GET /api/v1/spn/map/{map:[A-Za-z0-9]{1,255}}/pins
returns application/json
data
Returns a list of pins on the map.
User
GET /api/v1/spn/map/{map:[A-Za-z0-9]{1,255}}/route/to/{destination:[a-z0-9_\.:-]{1,255}}
returns text/plain
data
Returns a textual representation of the routing process.
Admin
POST /api/v1/spn/reinit
returns text/plain
data
Stops the SPN, resets all caches and starts it again. The SPN account and settings are not changed.
User
POST /api/v1/ui/reload
returns text/plain
data
Removes all assets from the cache and reloads the current (possibly updated) version from disk when requested.
User
POST /api/v1/updates/check
returns text/plain
data
Triggers checking for updates.