List Racks
GET
/v1/racksTo obtain a list of all Private Racks you have, use a GET request sent to the /v1/racks endpoint.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Query Parameters
label_selector?string
This parameter will filter results by labels. More details in the Labels section.
per_page?integer
The number of results [ 1 .. 100 ] displayed on a page. By default, 20 results are shown.
Range
1 <= value <= 100Default
20page?integer
The number of a page (>= 1) that will be returned. By default, it's 1.
Range
1 <= valueDefault
1sorting?string
This parameter sorts items. By default, it's id. Also, it's possible to sort by name and location_id.
Default
"id"Value in
- "id"
- "name"
- "location_id"
direction?string
This parameter defines if items are sorted in an ascending ASC or descending DESC order. By default, ASC is set up.
Default
"ASC"Value in
- "ASC"
- "DESC"
location_id?integer
A unique identifier of a location. All the IDs can be listed here.
Response Body
application/json
curl -X GET "https://example.com/v1/racks"[ { "id": "xkazD8dJ", "name": "rack-10213", "location_id": 1803, "location_code": "location3709", "labels": { "environment": "production", "service": "my-web-app", "example.com/project": "my-project", "example.com/owner": "my-team" } }, { "id": "w9aAzzbv", "name": "rack-10214", "location_id": 1803, "location_code": "location3709", "labels": { "environment": "production", "service": "my-web-app", "example.com/project": "my-project", "example.com/owner": "my-team" } }]