Runtime Logs
Read the newest lines of an environment's Odoo or PostgreSQL logs, live from its server. This is the same output as the Logs tab in the dashboard.
For the log of a deploy, restart or other task, use GET /environments/{env_id}/logs instead.
Base URL: https://api.oec.sh/api/public/v1
Works with read-only and full-access keys.
Get Runtime Logs
GET /environments/{env_id}/runtime-logsPath Parameters
| Parameter | Type | Description |
|---|---|---|
env_id | UUID | The environment ID. |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
source | string | odoo (default) or container: the Odoo container's output. postgres: the database container's output. |
lines | integer | Newest lines to return. Min 1, max 1000. Default: 200. |
Response: 200 OK
{
"environment_id": "5a296461-9222-40da-91f5-9e912890dc1b",
"source": "odoo",
"lines": 200,
"truncated": true,
"log": "2026-10-05 09:12:01,224 1 INFO prod odoo.modules.loading: loading 112 modules...\n...",
"fetched_at": "2026-10-05T09:12:03.512Z"
}| Field | Type | Description |
|---|---|---|
environment_id | UUID | The environment ID. |
source | string | The source you asked for. |
lines | integer | Number of lines in log. |
truncated | boolean | true when older lines exist that were not returned. Ask for more lines to see them (up to 1000). |
log | string | The lines, oldest first, separated by \n. At most 1 MB: when the lines are longer than that, only the newest whole lines that fit are returned and truncated is true. Empty when the container has printed nothing yet. |
fetched_at | string | When the logs were read from the server (UTC). |
Errors
| Status | error | Reason |
|---|---|---|
404 | not_found | Environment not found, or outside your key's organization or project. |
409 | no_server | The environment has no server assigned yet. |
409 | environment_not_ready | The environment is pending, cloning or deploying, so there is no container to read yet. Follow the task with GET /environments/{env_id}/logs and try again when it has finished. |
409 | container_not_found | Docker on the server reports that the container does not exist. Deploy the environment to create it. |
422 | lines is outside 1 to 1000, or source is not one of the values above. | |
429 | target_rate_limit | More than 6 calls in a minute for this environment, or more than 20 runtime-log and metrics calls in a minute from your organization to environments on the same server. Wait the number of seconds in retry_after (also sent as the Retry-After header). |
502 | server_unreachable | The server could not be reached, or Docker on it did not answer. Try again in a minute. |
504 | docker_timeout | Docker on the server did not answer within 20 seconds. The site may still be running; restarting Docker on the server clears this. |
Every call reads from your server. On top of your key's rate limit, each environment accepts at most 6 runtime-log calls a minute, whichever keys make them, and your organization can make at most 20 runtime-log and metrics calls a minute to the environments on one server.
Example
# Last 500 lines of Odoo output
curl "https://api.oec.sh/api/public/v1/environments/YOUR_ENV_ID/runtime-logs?lines=500" \
-H "Authorization: Bearer YOUR_API_KEY"
# PostgreSQL output, just the log text
curl -s "https://api.oec.sh/api/public/v1/environments/YOUR_ENV_ID/runtime-logs?source=postgres" \
-H "Authorization: Bearer YOUR_API_KEY" | jq -r '.log'