listInstances
List Instances
Details
- Method:
GET - Path:
/instances - Operation ID:
list-instances
Parameters
{
"per_page": {
"description": "Number of items requested per page. Default is 100 and Max is 500.",
"required": false,
"location": "query",
"type": "integer"
},
"cursor": {
"description": "Cursor for paging. See [Meta and Pagination](#section/Introduction/Meta-and-Pagination).",
"required": false,
"location": "query",
"type": "string"
},
"tag": {
"description": "Filter by specific tag.",
"required": false,
"location": "query",
"type": "string"
},
"label": {
"description": "Filter by label.",
"required": false,
"location": "query",
"type": "string"
},
"main_ip": {
"description": "Filter by main ip address.",
"required": false,
"location": "query",
"type": "string"
},
"region": {
"description": "Filter by [Region id](#operation/list-regions).",
"required": false,
"location": "query",
"type": "string"
}
}Response Schema
{
"type": "object",
"properties": {
"instances": {
"type": "array",
"items": {
"title": "instance",
"type": "object",
"x-tags": [
"instances"
],
"description": "Instance information.",
"x-examples": {},
"properties": {
"id": {
"type": "string",
"description": "A unique ID for the VPS Instance."
},
"os": {
"type": "string",
"description": "The [Operating System name](#operation/list-os)."
},
"ram": {
"type": "integer",
"description": "The amount of RAM in MB."
},
"disk": {
"type": "integer",
"description": "The size of the disk in GB."
},
"main_ip": {
"type": "string",
"description": "The main IPv4 address."
},
"vcpu_count": {
"type": "integer",
"description": "Number of vCPUs."
},
"region": {
"type": "string",
"description": "The [Region id](#operation/list-regions) where the Instance is located."
},
"default_password": {
"type": "string",
"description": "The default password assigned at deployment."
},
"date_created": {
"type": "string",
"description": "The date this instance was created."
},
"status": {
"type": "string",
"description": "The current status.\n\n* active\n* pending\n* suspended\n* resizing"
},
"power_status": {
"type": "string",
"description": "The power-on status.\n\n* running\n* stopped"
},
"server_status": {
"type": "string",
"description": "The server health status.\n\n* none\n* locked\n* installingbooting\n* ok"
},
"allowed_bandwidth": {
"type": "integer",
"description": "Monthly bandwidth quota in GB."
},
"netmask_v4": {
"type": "string",
"description": "The IPv4 netmask in dot-decimal notation."
},
"gateway_v4": {
"type": "string",
"description": "The gateway IP address."
},
"v6_networks": {
"type": "array",
"description": "An array of IPv6 objects.",
"items": {
"type": "object",
"description": "An IPv6 object.",
"properties": {
"network": {
"type": "string",
"description": "The IPv6 subnet."
},
"main_ip": {
"type": "string",
"description": "The main IPv6 network address."
},
"network_size": {
"description": "The IPv6 network size in bits.",
"type": "integer"
}
}
}
},
"hostname": {
"type": "string",
"description": "The hostname for this instance."
},
"label": {
"type": "string",
"description": "The user-supplied label for this instance."
},
"tag": {
"type": "string",
"description": "Use `tags` instead. The user-supplied tag for this instance.",
"deprecated": true
},
"internal_ip": {
"type": "string",
"description": "The internal IP used by this instance, if set."
},
"kvm": {
"type": "string",
"description": "HTTPS link to the Vultr noVNC Web Console."
},
"os_id": {
"type": "integer",
"description": "The [Operating System id](#operation/list-os) used by this instance."
},
"app_id": {
"type": "integer",
"description": "The [Application id](#operation/list-applications) used by this instance."
},
"image_id": {
"type": "string",
"description": "The [Application image_id](#operation/list-applications) used by this instance."
},
"firewall_group_id": {
"type": "string",
"description": "The [Firewall Group id](#operation/list-firewall-groups) linked to this Instance."
},
"features": {
"type": "array",
"description": "\"auto_backups\", \"ipv6\", \"ddos_protection\"",
"items": {
"type": "string"
}
},
"plan": {
"type": "string",
"description": "A unique ID for the Plan."
},
"tags": {
"type": "array",
"description": "Tags to apply to the instance",
"items": {
"type": "string"
}
}
}
}
},
"meta": {
"title": "meta",
"type": "object",
"x-examples": {
"meta response": {
"meta": {
"total": 31,
"links": {
"next": "WxYzExampleNext",
"prev": ""
}
}
}
},
"description": "The meta information object. See [Meta and Pagination](#section/Introduction/Meta-and-Pagination) for more information.",
"properties": {
"total": {
"type": "integer",
"description": "Total objects available in the list. This value may be greater than the number of objects returned if `per_page` is set."
},
"links": {
"type": "object",
"description": "Cursor values for pagination.",
"properties": {
"next": {
"type": "string",
"description": "Cursor value for the next page."
},
"prev": {
"type": "string",
"description": "Cursor value for the previous page."
}
}
}
}
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('vultr')
# Call this tool
result = await agent.call_tool('listInstances', {
# Add required parameters here
})