List deployment targets in a zone
This guide shows how to discover deployment targets, the physical hosts in a zone, and narrow the list to the capacity you care about. The list endpoint supports filtering, ordering, and keyset pagination.
Before you begin
Section titled “Before you begin”- Authentication. Export an API token as
$QIBDO_API_TOKEN; the base URL ishttps://api.qibdo.example.com. See Authenticate a user and manage the session. - Permissions. Your identity needs permission to read topology resources. See the authorization model.
- Prerequisites. A qibdo-cloud account, and (optionally) a zone id to scope the list to.
List every target
Section titled “List every target”A bare list returns deployment targets sorted by name ascending, up to the default page size of 20 (the maximum is 100):
GET /topology/v1/targets HTTP/1.1Host: api.qibdo.example.comAuthorization: Bearer $QIBDO_API_TOKENThe response carries an array of deployment targets and a next_page_token.
Soft-deleted targets (those with a deleted status) are excluded by default.
Filter by zone and architecture
Section titled “Filter by zone and architecture”Each deployment target carries the zone it sits in and its full CPU description, so you can filter on both. The example below finds x86-64 hosts in one zone and orders them by hostname, requesting a larger page:
curl -G "https://api.qibdo.example.com/topology/v1/targets" \ -H "Authorization: Bearer $QIBDO_API_TOKEN" \ --data-urlencode 'filter=zone_id = "8c2d1a90-3f47-4e6b-9a51-0d72f4b8e3c1" AND cpu_topology.architecture = "CPU_ARCHITECTURE_X86_64"' \ --data-urlencode 'order_by=hostname' \ --data-urlencode 'page_size=50'A filter expression is a field name, an operator (=, !=, >, <, <=,
>=, or :), and a value (string, number, or boolean). Combine expressions with
AND / OR and group them with parentheses. You can filter on name,
hostname, the zone, and nested fields such as cpu_topology.architecture.
Page through large result sets
Section titled “Page through large result sets”When next_page_token is non-empty, there are more results. Pass it back as
page_token to fetch the next page, keeping every other parameter identical to
the original call:
curl -G "https://api.qibdo.example.com/topology/v1/targets" \ -H "Authorization: Bearer $QIBDO_API_TOKEN" \ --data-urlencode 'filter=zone_id = "8c2d1a90-3f47-4e6b-9a51-0d72f4b8e3c1"' \ --data-urlencode 'page_size=50' \ --data-urlencode 'page_token=CggKBnRhcmdldA'Repeat until the response comes back with an empty next_page_token. List
responses intentionally omit a total count: keyset pagination cannot compute one
efficiently.
Next steps
Section titled “Next steps”- To see how locations, zones, resource pools, and targets relate, see the topology hierarchy.