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.

Try it Out
{
    "cancelled": true
}
[

]

Listing by type

You can add a constraint for server type by setting type to (for example) colocated.

Try it Out
{
    "type": "dedicated"
}
[

]

Listing by creation date

Try it Out
{
    "created_on": "2013-03-11"
}
[

]

Like other daterange parameters, created_on can also expect an array with
the start date followed by end date.

Try it Out
{
    "created_on": [
        "2012-03-11",
        "2012-03-17"
    ]
}
[

]

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:

Try it Out
{
    "hostname": "*.co"
}
[

]

Parameters

Name Type Default
type enum "all"

Type of server

Values: all, colocated, dedicated
created_on date|daterange null

Day the server was created

renews_on date|daterange null

Day of renewal

cancelled_on date|daterange null

Day the server was cancelled

cancelled bool null

Restrict search to only cancelled servers

sort_by enum "id"

Column to sort servers by

Values: id, created_on, renews_on, cancelled_on
order enum "default"

Order in ascending or descending order. Default is different depending on the sort_by attribute.

Values: default, asc, desc

Errors

Code Name