Code Samples #
Copy
curl --request GET \
--url 'https://app.xcloud.host/api/v1/sites/{uuid}/events' \
--header 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://app.xcloud.host/api/v1/sites/{uuid}/events', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
});
const data = await response.json();
console.log(data);
import requests
headers = {
"Authorization": "Bearer YOUR_TOKEN"
}
response = requests.get("https://app.xcloud.host/api/v1/sites/{uuid}/events", headers=headers)
print(response.json())
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://app.xcloud.host/api/v1/sites/{uuid}/events',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_TOKEN'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
using System.Net.Http;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://app.xcloud.host/api/v1/sites/{uuid}/events");
request.Headers.Add("Authorization", "Bearer YOUR_TOKEN");
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://app.xcloud.host/api/v1/sites/{uuid}/events"))
.header("Authorization", "Bearer YOUR_TOKEN")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Response #
Copy
{
"success": true,
"message": "Events retrieved successfully.",
"data": {
"items": [
{
"uuid": "9b1f2a3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"type": "ssl_issued",
"status": "completed",
"output": "SSL certificate issued for example.com",
"user": "xcloud_example",
"created_at": "2025-03-14T10:15:00Z"
},
{
"uuid": "1c2d3e4f-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
"type": "cache_purge",
"status": "completed",
"output": "Full-page cache purged",
"user": null,
"created_at": "2025-03-13T22:00:00Z"
}
],
"pagination": {
"total": 2,
"per_page": 15,
"current_page": 1,
"last_page": 1
}
}
}
{
"success": false,
"message": "Unauthenticated.",
"data": null
}
{
"success": false,
"message": "This action is unauthorized. Your token is missing the required scope.",
"data": null
}
{
"success": false,
"message": "Not found.",
"data": null
}
Returns the recent task and event history for the site (e.g. SSL issuance, cache purge, plugin updates). Requires the read:sites scope.
Path Parameters #
| Name | Type | Required | Description |
|---|---|---|---|
uuid | string (uuid) | Required | UUID of the site |
Query Parameters #
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | Optional | Page number (default 1) |
per_page | integer | Optional | Items per page (default 15, max 100) |
Responses #
200 — Paginated site event log #
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | Optional | |
message | string | Optional | |
data | object | Optional | |
data | object | Optional | |
data.items | array of object | Optional | |
data.pagination | object | Optional |
Example 200 response
Copy
{
"success": true,
"message": "Events retrieved successfully.",
"data": {
"items": [
{
"uuid": "9b1f2a3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"type": "ssl_issued",
"status": "completed",
"output": "SSL certificate issued for example.com",
"user": "xcloud_example",
"created_at": "2025-03-14T10:15:00Z"
},
{
"uuid": "1c2d3e4f-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
"type": "cache_purge",
"status": "completed",
"output": "Full-page cache purged",
"user": null,
"created_at": "2025-03-13T22:00:00Z"
}
],
"pagination": {
"total": 2,
"per_page": 15,
"current_page": 1,
"last_page": 1
}
}
}
401 — Missing or invalid authentication token #
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | Optional | |
message | string | Optional | |
data | object | Optional |
Example 401 response
Copy
{
"success": false,
"message": "Unauthenticated.",
"data": null
}
403 — Token lacks the required scope #
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | Optional | |
message | string | Optional | |
data | object | Optional |
Example 403 response
Copy
{
"success": false,
"message": "This action is unauthorized. Your token is missing the required scope.",
"data": null
}
404 — Resource not found or not accessible to your Team #
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | Optional | |
message | string | Optional | |
data | object | Optional |
Example 404 response
Copy
{
"success": false,
"message": "Not found.",
"data": null
}
