# GET /domains/{name}/logs/{type}

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the domains group.

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

- Who may call it: administrator, reseller, customer
- Token scope, any of: domains, read, all
- Answers: 200 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

- [urbestack-domain-log](https://urbestack.com/docs/commands/urbestack-domain-log.md): Reads a domain's access, error or PHP error log.

## Parameters

- `name` (path, DomainName, required)
- `type` (path, string, one of access, error, php, required)
- `lines` (query, integer, 1 to 1000)
- `after` (query, 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

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
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

- 400: --after is a number of bytes, 0 or more
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid domain name
- 400: Log type must be access, error or php
- 400: after must be a number of bytes
- 400: lines must be a number
- 401: Authentication required
- 403: Insufficient privileges
- 404: Domain '<name>' not found
