Skip to content

public.logs.search

GET
/logs
curl --request GET \
--url https://rest.watchtower15.com/v1/logs \
--header 'Authorization: Bearer <token>'
source_uuids
Array<string> | null
levels
Array<string> | null
Allowed values: debug info notice warning error critical alert emergency
streams
Array<string> | null
search
string | null
<= 500 characters
tag_uuids
Array<string> | null
period
string | null

A relative window ending now: 1 to 9999 minutes, hours, days or weeks (3h, 2w). Not with from and to. The operation names its longest window and its default.

from
string | null

The start of a pinned window, epoch milliseconds or RFC 3339 with an offset. Needs to. A start before the oldest data kept is served from it.

to
string | null

The end of a pinned window, epoch milliseconds or RFC 3339 with an offset, after from. A window that ends before the oldest data kept, or in the future, is refused.

limit
integer | null
>= 1 <= 500
cursor
string | null
<= 512 characters

LogsSearchResource

Media typeapplication/json
object
data
required
Array<object>
object
logged_at
required

Epoch milliseconds.

integer | null
level
required

One of debug, info, notice, warning, error, critical, alert, emergency; null for a line with no level.

string | null
stream
required
string | null
message
required
string
source
required

Where the line came from.

object
type
required

server or log_source.

string
uuid
required
string | null
name
required

The source’s name; a deleted source reads as the console labels it.

string | null
next_cursor
required
string | null
meta
object
window
required

The window the lines were read in, epoch milliseconds; a later page reads the first page’s.

object
from
required
integer
to
required
integer

Example generated

{
"data": [
{
"logged_at": 1,
"level": "example",
"stream": "example",
"message": "example",
"source": {
"type": "example",
"uuid": "example",
"name": "example"
}
}
],
"next_cursor": "example",
"meta": {
"window": {
"from": 1,
"to": 1
}
}
}

The API key is missing, malformed, expired or revoked.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

The key or its owner does not hold what the operation needs.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

No such record in this organisation (an absent id and another organisation’s answer alike).

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

The request is invalid; errors names the parameters.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

A rate limit or the organisation’s daily limit is reached; Retry-After says when to retry.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

An unexpected error.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

A data store did not answer within the request’s 10 seconds; try again shortly (store_unavailable).

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}