List sites
List sites
List all the sites for a specific server
GET api/sites
Example request:
curl -X GET "https://panel.example.hosting.com/api/sites" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": [
{
"id": 1,
"status": "active",
"server_id": 146,
"domain": "domain1.com",
"user_id": "120",
"created_at": "2022-07-23T13:35:51.000000Z"
},
{
"id": 2,
"status": "active",
"server_id": 146,
"domain": "domain2.com",
"user_id": "120",
"created_at": "2022-07-23T13:35:51.000000Z"
},
{
"id": 3,
"status": "active",
"server_id": 146,
"domain": "domain3.com"
"user_id": "121",
"created_at": "2022-07-23T13:35:51.000000Z"
},
{
"id": 4,
"status": "active",
"server_id": 1,
"domain": "domain4.com",
"user_id": "121",
"created_at": "2022-07-23T13:35:51.000000Z"
}
],
"links": {
"first": "https://panel.example.hosting.com/api/sites?page=1",
"last": "https://panel.example.hosting.com/api/sites?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://panel.example.hosting.com/api/sites",
"per_page": 15,
"to": 4,
"total": 4
}
}