Back to Redis

Index

content/operate/rs/references/rest-api/requests/logs/_index.md

latest2.1 KB
Original Source
MethodPathDescription
GET/v1/logsGet cluster events log

Get cluster events log {#get-logs}

GET /v1/logs

Get cluster events log.

Required permissions

Permission name
[view_logged_events]({{< relref "/operate/rs/references/rest-api/permissions#view_logged_events" >}})

Request {#get-request}

Example HTTP request

GET /v1/logs?order=desc 

Request headers

KeyValueDescription
Hostcnm.cluster.fqdnDomain name
Acceptapplication/jsonAccepted media type

Query parameters

FieldTypeDescription
stimeISO_8601Start time before which we don't want events. (optional)
etimeISO_8601End time after which we don't want events. (optional)
orderstringdesc/asc - get events in descending or ascending order. Defaults to asc.
limitintegerMaximum number of events to return. (optional)
offsetintegerSkip offset events before returning first one (useful for pagination). (optional)

Response {#get-response}

Returns a JSON array of events.

Example JSON body

json
[
  {
    "time": "2014-08-29T11:19:49Z",
    "type": "bdb_name_updated",
    "severity": "INFO",
    "bdb_uid": "1",
    "old_val": "test",
    "new_val": "test123"
  },
  {
    "time": "2014-08-29T11:18:48Z",
    "type": "cluster_bdb_created",
    "severity": "INFO",
    "bdb_uid": "1",
    "bdb_name": "test"
  },
  {
    "time": "2014-08-29T11:17:49Z",
    "type": "cluster_node_joined",
    "severity": "INFO",
    "node_uid": 2
  }
]

Event object

FieldDescription
timeTimestamp when event happened.
typeEvent type. Additional fields may be available for certain event types.
additional fieldsAdditional fields may be present based on event type.

Status codes {#get-status-codes}

CodeDescription
200 OKNo error