Servers
Manage your connected server infrastructure programmatically.
Base URL: https://your-rasnucloud.com/api/v1
All requests require Authorization: Bearer <token>.
List Servers
GET /api/v1/serversReturns all servers in your organization, paginated (12 per page by default).
Response 200 OK:
{
"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:
| Status | Meaning |
|---|---|
unverified | Just added — connection not yet confirmed |
verified | Connected, agent installed, and online |
offline | Was connected but agent is no longer responding |
Get a Server
GET /api/v1/servers/{id}Returns a single server including its full server intelligence data.
{
"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
POST /api/v1/servers
Content-Type: application/jsonRequest body:
{
"title": "Staging DB",
"host": "10.0.0.5",
"port": 22,
"username": "root",
"auth_method": "private_key",
"private_key": "-----BEGIN OPENSSH PRIVATE KEY-----\n..."
}| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Display name for the server |
host | string | Yes | IP address or hostname |
port | integer | No | Default: 22 |
username | string | Yes | SSH user |
auth_method | string | Yes | password or private_key |
password | string | Conditional | Required if auth_method is password |
private_key | string | Conditional | Required 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
PATCH /api/v1/servers/{id}
Content-Type: application/jsonUpdate any mutable field. All fields are optional.
{
"title": "Production DB (Primary)"
}Response 200 OK: Updated server object
Delete a Server
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
POST /api/v1/servers/{id}/scanForces an immediate re-scan of server intelligence. Results are available within approximately 30 seconds.
Response 202 Accepted:
{
"message": "Server scan queued."
}