Read a service's logs
The newest lines its running containers wrote, read live from each server through its agent and merged by time. Logs stay on the servers, so a server whose agent is away is listed in unreachable instead.
bearerAuthorizationBearer <token>An API key (opk_…) or a CLI token (opc_…).
serviceId*stringThe service's id.
tail?integerHow many lines, 1 to 1000. Default 100.
1 <= value <= 1000Read a service's logs
application/json- response
data*array<>The newest lines of every replica, merged by time, oldest first.
unreachable*array<>Containers whose server's agent could not be asked; their lines are missing.
curl "https://openpanel.sh/api/v1/services/$SERVICE_ID/logs" \ -H "Authorization: Bearer $OPENPANEL_TOKEN"{ "data": [ { "at": "2019-08-24T14:15:22Z", "serverId": "10d2345a-e43d-463d-830e-4f5b19b60d41", "container": "string", "replica": 0, "line": "string" } ], "unreachable": [ { "serverId": "10d2345a-e43d-463d-830e-4f5b19b60d41", "container": "string", "reason": "string" } ]}List connected Git accounts GET
The Git accounts connected in the console (Organization settings, Git accounts). A service built from Git names one as its source's accountId.
Read a service's metrics GET
CPU, memory, network and restarts of each of its replicas over the range, from the samples its servers' agents report every few seconds. Anyone who can see the service may read them.