Skip to main content
GET
Get logs overview

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

projectId
string
required

The unique identifier of the Upsun project

Pattern: [a-z0-9]+
Example:

"abc123def456"

environmentId
string
required

The environment identifier

Pattern: .+
Example:

"main"

Query Parameters

from
integer<int64>
required

Start timestamp for the time range (Unix timestamp in seconds)

Example:

1704067200

to
integer<int64>
required

End timestamp for the time range (Unix timestamp in seconds)

Example:

1704153600

severities[]
enum<string>[]

Filter by severity levels. Can be specified multiple times for multiple values (e.g., ?severities[]=ERROR&severities[]=CRITICAL). Use severities_mode to control inclusion/exclusion behavior.

Available options:
EMERGENCY,
ALERT,
CRITICAL,
ERROR,
WARNING,
NOTICE,
INFO,
DEBUG
severities_mode
enum<string>

Filter mode for severities parameter. "1" (additive) includes only specified severities. "-1" (subtractive, default) excludes specified severities and includes all others.

Available options:
1,
-1
Example:

"1"

services[]
string[]

Filter by service names. Can be specified multiple times for multiple values (e.g., ?services[]=app&services[]=database). Use services_mode to control inclusion/exclusion behavior.

services_mode
enum<string>

Filter mode for services parameter. "1" (additive) includes only specified services. "-1" (subtractive, default) excludes specified services and includes all others.

Available options:
1,
-1
Example:

"1"

instances[]
string[]

Filter by instance identifiers. Can be specified multiple times for multiple values (e.g., ?instances[]=app.0&instances[]=app.1). Use instances_mode to control inclusion/exclusion behavior.

instances_mode
enum<string>

Filter mode for instances parameter. "1" (additive) includes only specified instances. "-1" (subtractive, default) excludes specified instances and includes all others.

Available options:
1,
-1
Example:

"1"

hosts[]
string[]

Filter by host names. Can be specified multiple times for multiple values (e.g., ?hosts[]=web-0&hosts[]=web-1). Use hosts_mode to control inclusion/exclusion behavior.

hosts_mode
enum<string>

Filter mode for hosts parameter. "1" (additive) includes only specified hosts. "-1" (subtractive, default) excludes specified hosts and includes all others.

Available options:
1,
-1
Example:

"1"

commands[]
string[]

Filter by command names. Can be specified multiple times for multiple values (e.g., ?commands[]=start&commands[]=deploy). Use commands_mode to control inclusion/exclusion behavior.

commands_mode
enum<string>

Filter mode for commands parameter. "1" (additive) includes only specified commands. "-1" (subtractive, default) excludes specified commands and includes all others.

Available options:
1,
-1
Example:

"1"

units[]
string[]

Filter by systemd unit names. Can be specified multiple times for multiple values (e.g., ?units[]=php-fpm&units[]=nginx). Use units_mode to control inclusion/exclusion behavior.

units_mode
enum<string>

Filter mode for units parameter. "1" (additive) includes only specified units. "-1" (subtractive, default) excludes specified units and includes all others.

Available options:
1,
-1
Example:

"1"

container_ids[]
string[]

Filter by container IDs. Can be specified multiple times for multiple values (e.g., ?container_ids[]=abc123). Use container_ids_mode to control inclusion/exclusion behavior.

container_ids_mode
enum<string>

Filter mode for container_ids parameter. "1" (additive) includes only specified container IDs. "-1" (subtractive, default) excludes specified container IDs and includes all others.

Available options:
1,
-1
Example:

"1"

container_images[]
string[]

Filter by container images. Can be specified multiple times for multiple values (e.g., ?container_images[]=nginx:1.21). Use container_images_mode to control inclusion/exclusion behavior.

container_images_mode
enum<string>

Filter mode for container_images parameter. "1" (additive) includes only specified container images. "-1" (subtractive, default) excludes specified container images and includes all others.

Available options:
1,
-1
Example:

"1"

log_kinds[]
enum<string>[]

Filter by log kind. "access": HTTP access logs (nginx), "application": user application logs (default), "cron": scheduled cron job logs, "deployment": deploy and post-deploy logs, "platform": platform-managed infrastructure service logs (e.g. sshd, systemd-journald, dbus). Can be specified multiple times (e.g., ?log_kinds[]=application&log_kinds[]=deployment). Use log_kinds_mode to control inclusion/exclusion behavior.

Available options:
access,
application,
cron,
deployment,
platform
log_kinds_mode
enum<string>

Filter mode for log_kinds parameter. "1" (additive) includes only specified log kinds. "-1" (subtractive, default) excludes specified log kinds and includes all others.

Available options:
1,
-1
Example:

"1"

Response

Logs overview retrieved successfully

_grain
integer
required

Data granularity in seconds

Example:

5

_from
integer
required

Query start timestamp

Example:

1704067200

_to
integer
required

Query end timestamp

Example:

1704153600

_project_id
string
required

Project identifier

Example:

"abc123def456"

_environment_id
string
required

Environment identifier

Example:

"main"

_branch_machine_name
string
required

Branch machine name

Example:

"main-bvxea6i"

_total
integer
required

Total number of log entries matching the current filters

Example:

15000

data
object[]
required

Time-series data with log counts per severity per time interval. Each data point contains timestamp and optional data fields. Fields are omitted for timestamps with no data - this indicates no logs were received.

Example:

Navigation links

filters
object
required
_severities
string[]

Active severity filters (only present when filters applied)

Example:
_severities_mode
enum<string>

Mode for severity filters: "1" (include) or "-1" (exclude)

Available options:
1,
-1
Example:

"1"

_services
string[]

Active service filters (only present when filters applied)

Example:
_services_mode
enum<string>

Mode for service filters: "1" (include) or "-1" (exclude)

Available options:
1,
-1
Example:

"1"

_instances
string[]

Active instance filters (only present when filters applied)

Example:
_instances_mode
enum<string>

Mode for instance filters: "1" (include) or "-1" (exclude)

Available options:
1,
-1
Example:

"1"

_hosts
string[]

Active host filters (only present when filters applied)

Example:
_hosts_mode
enum<string>

Mode for host filters: "1" (include) or "-1" (exclude)

Available options:
1,
-1
Example:

"1"

_commands
string[]

Active command filters (only present when filters applied)

Example:
_commands_mode
enum<string>

Mode for command filters: "1" (include) or "-1" (exclude)

Available options:
1,
-1
Example:

"1"

_container_ids
string[]

Active container ID filters (only present when filters applied)

Example:
_container_ids_mode
enum<string>

Mode for container ID filters: "1" (include) or "-1" (exclude)

Available options:
1,
-1
Example:

"1"

_container_images
string[]

Active container image filters (only present when filters applied)

Example:
_container_images_mode
enum<string>

Mode for container image filters: "1" (include) or "-1" (exclude)

Available options:
1,
-1
Example:

"1"

_log_kinds
enum<string>[]

Active log kind filters (only present when filters applied)

Available options:
access,
application,
cron,
deployment,
platform
Example:
_log_kinds_mode
enum<string>

Mode for log kind filters: "1" (include) or "-1" (exclude)

Available options:
1,
-1
Example:

"1"