CorefinityCorefinityDocs
Open the Control PanelControl Panel
SSH keys · 2 of 14

List a company's Legacy SSH keys

Answers the Legacy keys on the company's environments, grouped by environment, 25 environments a page. A Legacy key was on the server before the Control Panel managed its keys, and stops working on ends_on unless it is kept. Paged by cursor: send next_cursor back as cursor; null means the last page.

GET/api/companies/{company}/ssh/legacy

Path parameters

companyintegerRequired

The id of a company you belong to or manage. Digits only. At least 1.

Query parameters

environment_idinteger

Answer the Legacy keys of this environment only, in one page (cursor is not used, though a malformed one is still refused, and next_cursor is null). Digits only. It may be any environment you can reach. At least 1.

cursorstring

The next_cursor of the previous answer, sent back as it was given. Anything else (a value that is not a cursor of these lists, or more than 200 characters) is refused 422 invalid_arguments on cursor.

Returns

200 A page of Legacy keys.

Fields of the 200 answer
next_cursorstring or nullRequired

Send as cursor to read the next page. Null on the last page.

companyobjectRequired
Fields
idintegerRequired

At least 1.

namestringRequired
ends_onstring or nullRequired

The day they stop working. Format: date.

environmentsarray of objectsRequired
Fields of each item
environmentobjectRequired

An environment, with the website and company it belongs to.

Fields
companyobjectRequired
Fields
idintegerRequired

At least 1.

namestringRequired
idintegerRequired

The environment id, the {environment} these endpoints take and the owner.id of an environment key.

namestringRequired
productstringRequired

cse is CoreStack Enterprise.

csecorestackcorecluster
site_idinteger or nullRequired

The site row id the /corestack/sites/{site} endpoints take. Null on CoreStack Enterprise.

websiteobjectRequired
Fields
idintegerRequired

At least 1.

namestringRequired
keysarray of objectsRequired
Fields of each item
added_atstring or nullRequired

Format: date-time.

added_byobject or any or nullRequired
bitsinteger or nullRequired

The key size, for RSA keys.

deliveryobjectRequired

Whether the key works on this environment yet.

Fields
planned_forstring or nullRequired

When a waiting environment is planned to switch over. Format: date-time.

statestringRequired

waiting means the environment has not switched to keys managed by the Control Panel yet.

appliedapplyingremovingfailedwaiting
editablebooleanRequired

Whether you may rename the key or change where it applies.

fingerprintstringRequired

The SHA-256 fingerprint, as ssh-keygen -lf prints it.

idinteger or nullRequired

The key id the /ssh/keys/{key} endpoints take. Null for the Corefinity deploy key.

last_used_atstring or nullRequired

Format: date-time.

legacyobject or any or nullRequired

Set for a Legacy key, else null.

namestringRequired
removablebooleanRequired

Whether you may remove the key.

restrictedbooleanRequired

True when the key carries restrictions from before it was imported.

restrictionsarray of stringsRequired

The restrictions as they are written in front of the key. Read-only.

sourceobjectRequired

The level a key on an environment comes from.

Fields
layerstringRequired

agency is a key of your agency. system is the Corefinity deploy key.

agencycompanywebsiteenvironmentuserlegacysystem
ownerobject or any or nullRequired

Null for a key that has no owner you can see.

typestringRequired

The key type, such as ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521 or ssh-rsa. A key imported from a server may carry an older type (ssh-dss) or a security-key type (sk-), which new keys may not.

ssh-ed25519ecdsa-sha2-nistp256ecdsa-sha2-nistp384ecdsa-sha2-nistp521ssh-rsassh-dss[email protected][email protected]
weakbooleanRequired

True for a key that would be refused if it were added today.

not_on_new_systembooleanRequired
extensionobject or any or nullRequired

Set when Corefinity has moved that day for the company.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403scope_requiredUse a token with the scope named in scope.
404feature_offThis feature is not on for your organisation yet.
404not_foundNot found.
422invalid_argumentsThe arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again.
429rate_limitedWait 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/companies/1204/ssh/legacy \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "company": {
    "id": 1204,
    "name": "Harbour & Finch"
  },
  "ends_on": "2026-12-09",
  "environments": [
    {
      "environment": {
        "company": {
          "id": 1204,
          "name": "Harbour & Finch"
        },
        "id": 1311,
        "name": "Production",
        "product": "corecluster",
        "site_id": 1042,
        "website": {
          "id": 1310,
          "name": "Harbour & Finch trade"
        }
      },
      "keys": [
        {
          "added_at": "2026-11-02T00:00:00+00:00",
          "added_by": null,
          "bits": null,
          "delivery": {
            "planned_for": null,
            "state": "applied"
          },
          "editable": false,
          "fingerprint": "SHA256:Ploa6Hz7DwoHuC3xPgwJD+qGdTytelbFQ+lXDSmu+lY",
          "id": 7290,
          "last_used_at": null,
          "legacy": {
            "ci_hint": null,
            "ends_on": "2026-12-09",
            "placed_at": null,
            "state": "legacy"
          },
          "name": "deploy@build-server",
          "removable": true,
          "restricted": false,
          "restrictions": [],
          "source": {
            "layer": "legacy",
            "owner": {
              "id": 1311,
              "name": "Production",
              "type": "environment"
            }
          },
          "type": "ssh-ed25519",
          "weak": false
        }
      ],
      "not_on_new_system": false
    }
  ],
  "extension": null,
  "next_cursor": null
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT