GET
/instances
Retrieve a paginated list of all cloud instances associated with your account. Supports filtering by status, region, and tags.
Request Parameters
Query parameters are appended to the endpoint URL. All parameters are optional.
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | Optional | Filter by instance status: running, stopped, pending, error |
| region | string | Optional | Filter by deployment region (e.g., us-east-1, eu-west-2) |
| limit | integer | Optional | Max results per page. Default: 50, Max: 200 |
| page | integer | Optional | Page number for pagination. Default: 1 |
| tags | string | Optional | Comma-separated list of tag keys to filter by |
Response Schema
Returns a JSON object containing the instances array and pagination metadata.
Response (200 OK)
"data": [
{
"id": "inst_7x9k2m4p8q",
"name": "prod-api-node-01",
"status": "running",
"region": "us-east-1",
"type": "cn-x86-standard-8",
"ip_address": "192.168.4.22",
"created_at": "2025-01-15T08:32:10Z",
"metrics": {
"cpu_usage": 34.2,
"memory_usage": 68.5,
"disk_io": 12.4
}
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 128,
"has_next": true
}
Code Examples
Shell
curl -X GET "https://api.cloudnexus.io/v2/instances?limit=50&page=1" \
-H "Authorization: Bearer $CN_API_KEY" \
-H "Content-Type: application/json"
Python
import requests
headers = {
"Authorization": "Bearer $CN_API_KEY",
"Content-Type": "application/json"
}
params = {"limit": 50, "page": 1, "status": "running"}
response = requests.get("https://api.cloudnexus.io/v2/instances", headers=headers, params=params)
print(response.json())
Node.js
const axios = require('axios');
const config = {
headers: {
'Authorization': `Bearer ${process.env.CN_API_KEY}`,
'Content-Type': 'application/json'
}
};
axios.get('https://api.cloudnexus.io/v2/instances', {
...config,
params: { limit: 50, page: 1 }
})
.then(res => console.log(res.data))
.catch(err => console.error(err));
API Console
Ready
// Click "Execute Request" to simulate API response
// Response will appear here...