Skip to content

Servers

Manage your connected server infrastructure programmatically.

Base URL: https://your-rasnucloud.com/api/v1

All requests require Authorization: Bearer <token>.


List Servers

http
GET /api/v1/servers

Returns all servers in your organization, paginated (12 per page by default).

Response 200 OK:

json
{
  "data": [
    {
      "id": "01j9k1abc...",
      "title": "Production API",
      "host": "203.0.113.1",
      "port": 22,
      "username": "root",
      "status": "verified",
      "created_at": "2025-11-01T12:00:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 12,
    "total": 5,
    "last_page": 1
  }
}

Server status values:

StatusMeaning
unverifiedJust added — connection not yet confirmed
verifiedConnected, agent installed, and online
offlineWas connected but agent is no longer responding

Get a Server

http
GET /api/v1/servers/{id}

Returns a single server including its full server intelligence data.

json
{
  "data": {
    "id": "01j9k1abc...",
    "title": "Production API",
    "host": "203.0.113.1",
    "status": "verified",
    "fingerprint": {
      "os": {
        "name": "Ubuntu",
        "version": "22.04 LTS",
        "kernel": "5.15.0-91-generic"
      },
      "cpu_cores": 4,
      "ram": "8 GB",
      "disk": "100 GB"
    }
  }
}

Add a Server

http
POST /api/v1/servers
Content-Type: application/json

Request body:

json
{
  "title": "Staging DB",
  "host": "10.0.0.5",
  "port": 22,
  "username": "root",
  "auth_method": "private_key",
  "private_key": "-----BEGIN OPENSSH PRIVATE KEY-----\n..."
}
FieldTypeRequiredDescription
titlestringYesDisplay name for the server
hoststringYesIP address or hostname
portintegerNoDefault: 22
usernamestringYesSSH user
auth_methodstringYespassword or private_key
passwordstringConditionalRequired if auth_method is password
private_keystringConditionalRequired if auth_method is private_key

Adding a server triggers SSH connection verification and automatic agent installation — identical to the dashboard flow.

Response 201 Created: Server object


Update a Server

http
PATCH /api/v1/servers/{id}
Content-Type: application/json

Update any mutable field. All fields are optional.

json
{
  "title": "Production DB (Primary)"
}

Response 200 OK: Updated server object


Delete a Server

http
DELETE /api/v1/servers/{id}

Removes the server from RasnuCloud. The agent remains installed on the server — remove it manually if needed.

Response 204 No Content


Trigger a Rescan

http
POST /api/v1/servers/{id}/scan

Forces an immediate re-scan of server intelligence. Results are available within approximately 30 seconds.

Response 202 Accepted:

json
{
  "message": "Server scan queued."
}

Released under the MIT License.