Get an environment's host keys
Answers the host keys the environment presents, as fingerprints and as known_hosts lines, the latest rotation and whether you can rotate them. Only public keys are ever answered.
Path parameters
The id of a CoreStack Enterprise environment. Not the same number as a site row id. At least 1.
Returns
200 The environment's host keys.
Fields of the 200 answer
An environment, with the website and company it belongs to.
Fields
Fields
At least 1.
The environment id, the {environment} these endpoints take and the owner.id of an environment key.
cse is CoreStack Enterprise.
csecorestackcoreclusterThe site row id the /corestack/sites/{site} endpoints take. Null on CoreStack Enterprise.
Fields
At least 1.
The host keys an SSH client checks when it connects.
Fields
Format: date-time.
Fields of each item
ed25519ecdsarsaComplete known_hosts lines for this environment. Public keys only.
panel host keys can be rotated here. corefinity host keys (CoreStack Enterprise) are read-only.
panelcorefinityThe host keys a staged rotation will switch to. Null when no rotation is staged.
Fields of each item
ed25519ecdsarsaWhy rotatable is false.
unmanagedplatform_updateswitched_offin_progressnullThe latest rotation. Null when there has been none.
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | scope_required | Use a token with the scope named in scope. |
404 | feature_off | This feature is not on for your organisation yet. |
404 | not_found | Not found. |
429 | rate_limited | Wait for the seconds in Retry-After. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl https://manage.corefinity.com/api/environments/1311/ssh/host-keys \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json"use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->get('https://manage.corefinity.com/api/environments/1311/ssh/host-keys');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/environments/1311/ssh/host-keys', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
},
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.get(
"https://manage.corefinity.com/api/environments/1311/ssh/host-keys",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"environment": {
"company": {
"id": 1204,
"name": "Harbour & Finch"
},
"id": 1311,
"name": "Production",
"product": "corecluster",
"site_id": 1042,
"website": {
"id": 1310,
"name": "Harbour & Finch trade"
}
},
"host_keys": {
"changed_at": "2026-11-02T01:12:40+00:00",
"current": [
{
"fingerprint": "SHA256:ExampleHostKeyEd25519FingerprintNotARealOne",
"type": "ed25519"
},
{
"fingerprint": "SHA256:ExampleHostKeyEcdsaFingerprintNotARealOne00",
"type": "ecdsa"
},
{
"fingerprint": "SHA256:ExampleHostKeyRsaFingerprintNotARealOne0000",
"type": "rsa"
}
],
"known_hosts": [
"[ssh-northwind.example.net]:21044 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAAAExampleHostKeyOnlyThisIsNotARealHostKey1",
"[ssh-northwind.example.net]:21044 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBExampleHostKeyOnlyThisIsNotARealHostKey2ExampleHostKeyOnlyThisIsNotARealHostKey2Exampl=",
"[ssh-northwind.example.net]:21044 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQExampleHostKeyOnlyThisIsNotARealHostKey3ExampleHostKeyOnlyThisIsNotARealHostKey3ExampleHostKeyOnlyThisIsNotARealHostKey3"
],
"managed_by": "panel",
"next": null
},
"reason": null,
"rotatable": true,
"rotation": null
}{
"message": "Unauthenticated."
}{
"code": "scope_required",
"message": "This access token does not have the destructive scope this needs. Use a token with the destructive scope.",
"reason": "scope_required",
"scope": "destructive"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}