List Racks

GET/v1/racks

To 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

FieldDetails
label_selector?
string

This parameter will filter results by labels. More details in the Labels section.

per_page?
integer

Default: 20

Range: 1–100

The number of results [ 1 .. 100 ] displayed on a page. By default, 20 results are shown.

page?
integer

Default: 1

Min: 1

The number of a page (>= 1) that will be returned. By default, it's 1.

sorting?
string

Value in: "id", "name", "location_id"

Default: "id"

This parameter sorts items. By default, it's id. Also, it's possible to sort by name and location_id.

direction?
string

Value in: "ASC", "DESC"

Default: "ASC"

This parameter defines if items are sorted in an ascending ASC or descending DESC order. By default, ASC is set up.

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"    }  }]