Cloud › Logs and shell
List logs
GET https://devapi.dispralabs.com/v1/cloud/projects/:prj/logs
Searches the project's logs: build output and what its services write, newest first, in pages of up to 750 lines. Filter by service, deployment, level, time and text. Without from, the last 7 days. Page back with next_cursor.
Needs a key with read access or more.
- Authentication: Secret key (send it as
Authorization: Bearer <key>)
Parameters
prjstring, required: The project's id. Example:prj_01jdk3m9x2v7c4q8w5n6b1t0rasvcstring, optional: Only this service. Example:svc_01jdk3n2f4g6h8j0k2l4z6x8cadepstring, optional: Only this deployment.levelstring, optional: Levels, comma separated. Example:warn,errorqstring, optional: Text to search for. Example:timeoutfromtimestamp, optional: From this time (RFC 3339).totimestamp, optional: Until this time (RFC 3339).cursorstring, optional: The next_cursor of the previous page.limitnumber, optional: Lines per page, 1 to 750 (default 50). Example:200
Returns
- 200 The log page object: A page of lines.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_limit | limit is 1 to 750. |
| 404 | not_found | No such object in the key's project (or environment). |
| 503 | logs_unavailable | Logs can't be read right now. Retry shortly. |
Request samples
Dispra Cloud CLI
dcloud logs api --page --limit 200 --search timeout
cURL
curl "https://devapi.dispralabs.com/v1/cloud/projects/prj_01jdk3m9x2v7c4q8w5n6b1t0ra/logs?svc=svc_01jdk3n2f4g6h8j0k2l4z6x8ca&level=warn%2Cerror&q=timeout&limit=200" \
-H "Authorization: Bearer dsp_live_YOUR_KEY"
Node
const res = await fetch("https://devapi.dispralabs.com/v1/cloud/projects/prj_01jdk3m9x2v7c4q8w5n6b1t0ra/logs?svc=svc_01jdk3n2f4g6h8j0k2l4z6x8ca&level=warn%2Cerror&q=timeout&limit=200", {
method: "GET",
headers: { Authorization: "Bearer dsp_live_YOUR_KEY" },
});
console.log(await res.json());
Python
import requests
res = requests.request("GET", "https://devapi.dispralabs.com/v1/cloud/projects/prj_01jdk3m9x2v7c4q8w5n6b1t0ra/logs", headers={"Authorization": "Bearer dsp_live_YOUR_KEY"}, params={"svc": "svc_01jdk3n2f4g6h8j0k2l4z6x8ca", "level": "warn,error", "q": "timeout", "limit": "200"})
print(res.json())
Go
req, _ := http.NewRequest("GET", "https://devapi.dispralabs.com/v1/cloud/projects/prj_01jdk3m9x2v7c4q8w5n6b1t0ra/logs?svc=svc_01jdk3n2f4g6h8j0k2l4z6x8ca&level=warn%2Cerror&q=timeout&limit=200", nil)
req.Header.Set("Authorization", "Bearer dsp_live_YOUR_KEY")
res, _ := http.DefaultClient.Do(req)
Responses
200
{
"data": {
"items": [{"id":"ln_8f2c1a","ts":"2026-12-05T10:15:02Z","level":"info","message":"GET /healthz 200 3ms"}],
"next_cursor": "c_1764324999_8f2c1a",
"total": 1832,
"total_cap": 10000
}
}
400 invalid_limit
{
"error": {
"code": "invalid_limit",
"message": "limit is 1 to 750.",
"request_id": "req_7f3a9c21d84be056"
}
}
404 not_found
{
"error": {
"code": "not_found",
"message": "No such object in the key's project (or environment).",
"request_id": "req_7f3a9c21d84be056"
}
}
503 logs_unavailable
{
"error": {
"code": "logs_unavailable",
"message": "Logs can't be read right now. Retry shortly.",
"request_id": "req_7f3a9c21d84be056"
}
}