List SSH keys

Retrieve a list of all SSH keys available on a server.


GET/api/servers/{server}/ssh-keys

List all SSH keys

This endpoint allows you to retrieve a paginated list of all SSH keys on a server.

Request

GET
/api/servers/{server}/ssh-keys
curl -G "https://ploi.io/api/servers/{server}/ssh-keys" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"

Response

{
  "data": [
    {
      "id": 1,
      "status": "active",
      "name": "Macbook Pro",
      "key": "ssh-rsa AAAAB3N....",
      "system_user": "ploi"
    }
  ],
  "links": {
    "first": "https://ploi.io/api/servers/1/ssh-keys?page=1",
    "last": "https://ploi.io/api/servers/1/ssh-keys?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "Previous",
        "active": false
      },
      {
        "url": "https://ploi.io/api/servers/1/ssh-keys?page=1",
        "label": 1,
        "active": true
      },
      {
        "url": null,
        "label": "Next",
        "active": false
      }
    ],
    "path": "https://ploi.io/api/servers/1/ssh-keys",
    "per_page": 15,
    "to": 2,
    "total": 2
  }
}