For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get attached public keys

Retrieve public keys attached to a specified virtual machine. Use this endpoint to view SSH keys configured for specific VPS instances.

Get attached public keys

get

Retrieve public keys attached to a specified virtual machine.

Use this endpoint to view SSH keys configured for specific VPS instances.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
virtualMachineIdintegerRequired

Virtual Machine ID

Example: 1268054
Query parameters
pageintegerOptional

Page number

Example: 1
Responses
200

Success response

application/json
get/api/vps/v1/virtual-machines/{virtualMachineId}/public-keys
GET /api/vps/v1/virtual-machines/{virtualMachineId}/public-keys HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "id": 325,
      "name": "My public key",
      "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD..."
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Last updated

Was this helpful?