oCoreoCore Docs
API Reference

S S H Keys

List SSH keys

Returns all SSH public keys for the authenticated user.

GET
/user/ssh-keys

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

curl -X GET "//api.ocore.dev/api/user/ssh-keys" \
  -H "Authorization: <token>"

OK

{
  "keys": [
    {
      "createdAt": "string",
      "fingerprint": "string",
      "id": "string",
      "keyType": "string",
      "label": "string",
      "lastUsedAt": "string",
      "warning": "string"
    }
  ]
}

Add SSH key

Adds a new SSH public key to the user account.

POST
/user/ssh-keys

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

SSH key request

labelstring
publicKeystring
curl -X POST "//api.ocore.dev/api/user/ssh-keys" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "string",
    "publicKey": "string"
  }'

Created

{
  "createdAt": "string",
  "fingerprint": "string",
  "id": "string",
  "keyType": "string",
  "label": "string",
  "lastUsedAt": "string",
  "warning": "string"
}

Import GitHub SSH keys

Imports SSH public keys from a GitHub user account.

POST
/user/ssh-keys/import-github

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

GitHub import request

githubUsernamestring
curl -X POST "//api.ocore.dev/api/user/ssh-keys/import-github" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "githubUsername": "string"
  }'

OK

{
  "imported": 0,
  "skipped": 0
}

Update SSH key label

Renames an SSH key.

PATCH
/user/ssh-keys/{keyId}

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

Label update

labelstring

Path Parameters

keyIdRequiredstring

SSH key ID

curl -X PATCH "//api.ocore.dev/api/user/ssh-keys/<string>" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "string"
  }'

OK

{
  "createdAt": "string",
  "fingerprint": "string",
  "id": "string",
  "keyType": "string",
  "label": "string",
  "lastUsedAt": "string",
  "warning": "string"
}

Delete SSH key

Deletes an SSH key from the user account.

DELETE
/user/ssh-keys/{keyId}

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

keyIdRequiredstring

SSH key ID

curl -X DELETE "//api.ocore.dev/api/user/ssh-keys/<string>" \
  -H "Authorization: <token>"

No Content

Was this page helpful?