Get your free beta license ↗
API operation · domains group
GET

/domains/{name}/logs/{type}

First published 3 Oct 20260.1.0Unchanged since publication

Read lines from a domain's access, error or PHP error log

Who may call it
AdministratorResellerCustomer
Token scope, any of
domainsreadall
Answers200 OK

Omit after to read the last lines of the log. The lines parameter defaults to 100 and accepts values from 1 to 1000. The response's offset gives the byte position immediately after the last complete line read. If the log is shorter than the supplied after offset, UrbeStack returns the last lines and sets reset.

Returns 400 for an invalid type or a malformed lines or after value. Valid log types are access, error and php. An unknown domain returns 404. Access to an existing domain is limited to administrators, the domain owner and the owner's reseller. Other callers receive 403.

As a command

Run as root on the server

Parameters

namepath ·DomainNameRequired
typepath ·string, one of access, error, phpRequired
linesquery ·integer, 1 to 1000
afterquery ·integer, 0 or more
Byte position from the offset field of an earlier response, expressed as a non-negative integer of up to 15 digits. The operation reads from that position and returns at most the number of new log lines specified by lines.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X GET "$API/domains/example.com/logs/access?lines=1&after=1" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
{
  "domain": "example.com",
  "download_max": 1,
  "exists": true,
  "file": "urbestack-panel-20260909T101500Z.json.enc",
  "lines": [
    "text"
  ],
  "offset": 1,
  "reset": true,
  "size": 1,
  "truncated": true,
  "type": "rebuild",
  "utc_offset": "text"
}

Errors

10 errors, each a status and a sentence
400--after is a number of bytes, 0 or more
400Domain name required
400Domain name too long
400Invalid domain name
400Log type must be access, error or php
400after must be a number of bytes
400lines must be a number
401Authentication required
403Insufficient privileges
404Domain '<name>' not found
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/get-domains-name-logs-type/