Servers
Endpoints for managing the servers in the team inventory.
List servers
List the servers the authenticated team can see: its own servers and servers other teams shared with it through a tag (access viewer). Optionally filtered with the server search language in q and by exact metadata values.
query Parameters
qSearch query in the server search language. Space-separated terms must all match and a leading - negates a term. Free text matches the name, hostname, FQDN, IP or a tag name. Filters: php:8.2 (any product: mysql, mariadb, nginx, apache, openssl, kernel, nodejs, redis, postgresql), php:7.4.33, php:<8.1, php:>=8.2, php:7.4, php:eol, php:any compare upstream versions, while php:<8.2.35-1+deb12u2 with a revision compares the full package version like dpkg or rpm. pkg:openssl, pkg:linux-image*, pkg:openssl<1.0.2g-1ubuntu4.20, pkg:tzdata>=2024a and pkg:openssl3.0 always compare like dpkg or rpm per server; a version without a revision covers all of its revisions and a missing epoch is 0. tag:name matches the team's own tags and tags shared with it. os:ubuntu, os:ubuntu@16.04, os:eol, arch:arm64, updates:any, updates:security, updates:none, reboot:required, storage:unhealthy (also degraded, failed or healthy), status:online, status:offline, status:pending, meta:key=value. provider:hetzner, country:DE or country:germany, city:frankfurt or city:none, continent:eu, region:eu (a continent) or region:fsn1 (a provider region). vhost:example.com or domain:example.com match a site by name or alias, cert:expired, cert:expiring, cert:expiring<7d and cert:any match site certificates, vhost-php:7.4 the PHP version sites run; with vhost:, it is the PHP version of that site.
per_pagepageFilter by metadata key/value pairs, every pair must match exactly, for example metadata[customer]=acme.
List servers › Responses
Paginated set of Server
Create a server
Add a pending server to the authenticated team's inventory. The response includes a one-time enrollment token and the install command to run on the server; the token is not returned again, issue a new one when it is lost or expired.
Create a server › Request Body
nameHuman-readable server name.
hostnameHostname of the server, or null to clear it.
Metadata to merge into the server's metadata. Keys are strings of up to 40 characters without [, ], ", \ or ->, values strings of up to 500 characters, and a server has at most 50 keys. Keys starting with serverchief: are read-only system metadata: they are returned in responses, ignored in write requests and do not count towards the limit.
To remove a key, set its value to an empty string. To remove all metadata, send an empty object: {}.
tagsReplace the server's tags with these tags of the team, by formatted ID or by name.
Override detected location fields, merged into the current overrides. A null field clears its override and falls back to the detected value, null clears every override.
Whether the agent refreshes the package lists (apt-get update, yum/dnf makecache) on its own, it never installs packages. Null resets the setting to the default.
Whether the agent is updated automatically when a new release has soaked. Null follows the team setting.
Create a server › Responses
The server was created.
Show a server
Show one server the authenticated team can see, including servers shared with it (access viewer).
path Parameters
serverShow a server › Responses
Server
Update a server
Update a server belonging to the authenticated team. Omitted fields retain their current values, and null clears the hostname. Metadata is merged into the existing metadata and tags replace the server's tags. Changing package_metadata_refresh is sent to the agent with its configuration. Servers shared with the team cannot be changed.
path Parameters
serverUpdate a server › Request Body
nameHuman-readable server name.
hostnameHostname of the server, or null to clear it.
Metadata to merge into the server's metadata. Keys are strings of up to 40 characters without [, ], ", \ or ->, values strings of up to 500 characters, and a server has at most 50 keys. Keys starting with serverchief: are read-only system metadata: they are returned in responses, ignored in write requests and do not count towards the limit.
To remove a key, set its value to an empty string. To remove all metadata, send an empty object: {}.
tagsReplace the server's tags with these tags of the team, by formatted ID or by name.
Override detected location fields, merged into the current overrides. A null field clears its override and falls back to the detected value, null clears every override.
Whether the agent refreshes the package lists (apt-get update, yum/dnf makecache) on its own, it never installs packages. Null resets the setting to the default.
Whether the agent is updated automatically when a new release has soaked. Null follows the team setting.
Update a server › Responses
Server
Issue an enrollment token
Issue a new one-time enrollment token and install command, which invalidates any earlier unused token of the server. For a pending server the token enrolls its first agent. For an enrolled server it reinstalls the agent: the current agent keeps reporting until the new one enrolls, then its credential is revoked.
path Parameters
serverIssue an enrollment token › Responses
The token was issued.
Refresh a server's inventory
Queue a refresh_inventory command: the agent collects the datasets now and reports whatever changed. It is woken up right away when realtime is available and otherwise picks the command up on its next heartbeat. An identical command that the agent has not fetched yet is returned instead of queueing another one.
path Parameters
serverRefresh a server's inventory › Request Body
datasetsDatasets to collect, or null for every enabled dataset.
Refresh a server's inventory › Responses
The command was queued.
Update a server's agent
Queue an update_agent command that installs the newest agent release from the Server Chief package repository, rolling back when the new version does not start. It skips the soak time and batching of the automatic rollout, but the server must be online, report that it can update itself, run a stable agent version older than the newest release and have no agent update in progress. An update to the same version that is already in progress is returned instead.
path Parameters
serverUpdate a server's agent › Responses
The command was queued.
Reboot a server
Queue a reboot command. The agent waits up to 15 minutes for a running package manager, warns logged-in users and reboots the server one minute later, then reports the result once it started again. The server's boot_time moves once it rebooted. The server must be online and its agent must report agent.reboot.available, which needs agent 0.4.0 or later and is false when the server's operator turned reboots off on the server. Only the team that owns the server can reboot it. A reboot that is already queued or running is returned instead.
path Parameters
serverReboot a server › Responses
The command was queued.
Install a server's package updates
Queue an upgrade_packages command. The agent waits up to an hour for a running package manager, updates itself first when a newer agent release exists (regardless of the automatic agent update settings), then installs the pending security updates or every pending update, keeping local configuration files. With restart_services the services that use updated libraries are restarted, with reboot_if_required Server Chief reboots the server afterwards when the agent reports that a reboot is required. The result, with the full output of the package manager, arrives when the agent is done. The server must be online and its agent must report agent.upgrade_packages.available, which needs agent 0.4.0 or later and is false when the server's operator turned it off on the server. Only the team that owns the server can install updates. An update run that is already queued or running is returned instead.
path Parameters
serverInstall a server's package updates › Request Body
scopeWhich pending updates to install: the security updates or every update.
restart_servicesRestart the services that use updated libraries afterwards, so the updates take effect without a reboot.
reboot_if_requiredReboot the server afterwards when the agent reports that a reboot is required, such as after a kernel update. Needs agent.reboot.available.
Install a server's package updates › Responses
The command was queued.
List a server's packages
List the packages installed on a server, sorted by name, with the version a pending update would install.
path Parameters
serverquery Parameters
nameFilter by package name, a substring match unless it contains * as a wildcard.
updatesOnly return packages with a pending update.
origin^[a-z0-9][a-z0-9._:\…Only return packages from an origin: a repository vendor or alias such as sury, esm or ppa:ondrej/php, third-party for packages only third-party repositories offer, or none for packages no configured repository offers.
per_pagepageList a server's packages › Responses
Paginated set of ServerPackage
List a server's software
List the software products detected from a server's packages, one entry per product and major.minor, with end-of-life data from endoflife.date.
path Parameters
serverList a server's software › Responses
Array of ServerSoftware
List a server's sites
List the virtual hosts the agent found in the server's web server and panel configuration, sorted by name, with their PHP version and TLS certificate.
path Parameters
serverquery Parameters
domainOnly return sites serving this domain, by name or alias. A host also matches wildcard aliases covering it, and *.example.com matches every subdomain.
per_pagepageList a server's sites › Responses
Paginated set of ServerVhost
List a server's certificates
List the certificates of the server's sites, mail services and panel, each once however many use it, the most severe issues first, with the tool renewing them and the checks they fail.
path Parameters
serverquery Parameters
queryOnly return certificates whose names, subject, issuer, CA, manager, lineage or plugin contain this text.
issueOnly return certificates failing this check.
has_issuesOnly return certificates failing at least one check.
severityOnly return certificates whose most severe issue has this severity or worse.
expiring_daysOnly return certificates that expire within this many days, including certificates that already expired. 0 returns expired certificates only.
managerOnly return certificates issued and renewed by this tool.
unmanagedOnly return certificates without renewal automation: none was found, or the agent could not tell.
caOnly return certificates of this CA: letsencrypt, letsencrypt-staging, zerossl, buypass, google or sectigo. New values may be added.
pluginOnly return certificates issued with this certbot or acme.sh plugin.
sorturgency lists the most severe issues first and then the soonest expiry, expiry the soonest expiry first, name sorts by the primary name.
per_pagepageList a server's certificates › Responses
Paginated set of ServerCertificate
List a server's applications
List the WordPress, Laravel, Symfony and other Composer or npm applications the server's sites serve, those with a malicious package first, then the most severe open vulnerabilities.
path Parameters
serverquery Parameters
queryOnly return applications whose path or site names contain this text.
kindOnly return applications of this kind.
vulnerableOnly return applications with an open vulnerability in a package they need in production.
maliciousOnly return applications with an open malicious package.
end_of_lifeOnly return applications whose WordPress, Laravel or Symfony release is past its end of life.
outdatedOnly return WordPress applications older than WordPress's latest release.
packageOnly return applications with this Composer or npm package, or WordPress plugin or theme slug, by its exact name, development dependencies included.
per_pagepageList a server's applications › Responses
Paginated set of Application
List a server's package repositories
List the apt, yum and dnf repositories configured on a server, enabled ones with issues first, with the vendor classified from their URIs, how they are signed and how many installed packages they offer.
path Parameters
serverList a server's package repositories › Responses
Array of ServerRepository
List a server's vulnerabilities
List the vulnerabilities security advisories report for the server's installed packages, the most severe first (known exploited, then with a public exploit, then higher EPSS scores first within a severity): one entry per CVE (or advisory without a CVE) and source package, with the installed and fixed version and whether the package manager offers the fix. Resolved vulnerabilities are kept for history. A server whose release has no advisory data returns no vulnerabilities, see vulnerabilities of the server.
path Parameters
serverquery Parameters
cve^[A-Za-z][A-Za-z0-9]…Only return vulnerabilities covered by this CVE or advisory: a CVE ID, or an advisory ID or alias such as DSA-5532-1, USN-6500-1, ALSA-2024:1234 or DEBIAN-CVE-2023-5363.
severityOnly return vulnerabilities of this severity or worse. Unknown only matches unrated vulnerabilities.
fix_statusOnly return vulnerabilities with this fix status.
known_exploitedOnly return vulnerabilities CISA lists as known exploited (true), or those it does not list (false).
public_exploitOnly return vulnerabilities Metasploit, Nuclei or Exploit-DB has a public exploit of (true), or those without one (false).
min_epssOnly return vulnerabilities with at least this EPSS score, the probability of exploitation activity in the next 30 days.
packageOnly return vulnerabilities of this source package, or of the source of this binary package.
statusopen for current vulnerabilities, resolved for vulnerabilities that were fixed or no longer apply, all for both.
per_pagepageList a server's vulnerabilities › Responses
Array of ServerVulnerability
List a server's changes
List the server's change history as far back as the change history of the team's plan, newest first: what changed between inventory reports (packages installed, upgraded or removed, addresses, sites, certificates, repositories, the operating system and hardware), vulnerabilities found and resolved, and agent updates.
path Parameters
serverquery Parameters
datasetOnly return changes of a dataset.
kindOnly return changes of a kind.
sinceOnly return changes detected at or after this ISO 8601 date or timestamp.
per_pagepageList a server's changes › Responses
Paginated set of ServerChange
Show a server's inventory dataset
Show one inventory dataset as the server's agent last reported it: system, hardware, storage, network, resolvers, cloud or updates. The payload is null until the agent reports the dataset, and when the team or server turned off collecting it (collected is false).
path Parameters
serverdatasetShow a server's inventory dataset › Responses
ServerInventory
Replace a server's tags
Set the complete list of tags of one of the team's servers. Only the team's own tags can be attached, and servers shared with the team cannot be changed.
path Parameters
serverReplace a server's tags › Request Body
tagsThe complete set of tags, by formatted ID or by name. Tags of the server missing from the list are detached, an empty list removes every tag.
Replace a server's tags › Responses
Server
Attach or detach server tags
Attach and detach tags of one of the team's servers, other tags are kept. Detaching runs after attaching. Only the team's own tags can be attached, and servers shared with the team cannot be changed.
path Parameters
serverAttach or detach server tags › Request Body
attachTags to attach, by formatted ID or by name. Tags the server already carries are kept.
detachTags to detach, by formatted ID or by name.
Attach or detach server tags › Responses
Server
List install commands
List the team's install commands that can still add servers, the newest first. Their tokens are never shown again.
query Parameters
querySearch results by name.
per_pageNumber of results per page.
pagePage number to return.
List install commands › Responses
Array of InstallCommand
Create an install command
Create a command that installs the agent and adds the server to the team when the agent enrolls, named after its hostname. A single-use command adds one server, otherwise it adds any number of servers until it expires. The token and command are only returned in this response.
Create an install command › Request Body
single_useWhether the command adds one server, or any number of servers until it expires.
valid_for_hoursHours the command can add servers, at most 24.
descriptionWhat the command is for, shown with the active install commands.
tagsTags of the team every added server gets, by formatted ID or by name.
Create an install command › Responses
The install command was created.
Revoke an install command
Stop an install command from adding servers. Servers it already added keep working.
path Parameters
installCommandRevoke an install command › Responses
InstallCommand