List servers

Retrieve a list of all servers in your account.


GET/api/servers

List all servers

This endpoint allows you to retrieve a paginated list of all your servers.

Required scopes

Read servers

Request

GET
/api/servers
curl -G "https://ploi.io/api/servers" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"

Response

{
  "data": [
    {
      "id": 1,
      "type": "server",
      "name": "awesome-server",
      "ip_address": "127.0.0.1",
      "php_version": 7.2,
      "mysql_version": 5.7,
      "sites_count": 0,
      "status": "Server active",
      "status_id": 0,
      "created_at": "2019-07-08 10:14:50"
    }
  ],
  "links": {
    "first": "http://ploi.io/api/servers?page=1",
    "last": "http://ploi.io/api/servers?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "http://ploi.io/api/servers",
    "per_page": 15,
    "to": 3,
    "total": 3
  }
}