server.list
This method is flexible in its use. With it you can piece together criteria
and receive a list of servers that match that criteria.
Examples
Listing all servers
The default behavior of this API method is to return an array of active server objects.
You can specify to include cancelled servers by setting cancelled
to true
.
Listing by type
You can add a constraint for server type by setting type
to (for example) colocated
.
Listing by creation date
Like other daterange parameters, created_on
can also expect an array with
the start date followed by end date.
Listing by hostname
The hostname parameter is a wildcard search, allowing you to, for example, list all
servers with a hostname with the .co
TLD:
Parameters
Name | Type | Default |
---|---|---|
type |
enum
|
"all" |
Values: all, colocated, dedicated | ||
created_on |
date|daterange
|
null |
renews_on |
date|daterange
|
null |
cancelled_on |
date|daterange
|
null |
cancelled |
bool
|
null |
sort_by |
enum
|
"id" |
Values: id, created_on, renews_on, cancelled_on | ||
order |
enum
|
"default" |
Values: default, asc, desc |
Errors
Code | Name |
---|