{
  "schema_version": 2,
  "id": "operate/rs/references/rest-api/requests/logs",
  "title": "Logs requests",
  "url": "https://redis.io/docs/latest/operate/rs/references/rest-api/requests/logs/",
  "summary": "Cluster event logs requests",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2025-03-10T13:08:54-04:00",
  "children": [],
  "page_type": "content",
  "content_hash": "0df6db8d41e4128470831720c0bbd6d54fab61a0340851e42b9ab24560179d62",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "| Method | Path | Description |\n|--------|------|-------------|\n| [GET](#get-logs) | `/v1/logs` | Get cluster events log |"
    },
    {
      "id": "get-logs",
      "title": "Get cluster events log",
      "role": "content",
      "text": "GET /v1/logs\n\nGet cluster events log.\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [view_logged_events](https://redis.io/docs/latest/operate/rs/references/rest-api/permissions#view_logged_events) |"
    },
    {
      "id": "get-request",
      "title": "Request",
      "role": "content",
      "text": "#### Example HTTP request\n\n\tGET /v1/logs?order=desc \n\n\n#### Request headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n\n#### Query parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| stime | ISO_8601 | Start time before which we don't want events. (optional) |\n| etime | ISO_8601 | End time after which we don't want events. (optional) |\n| order | string | desc/asc - get events in descending or ascending order. Defaults to asc. |\n| limit | integer | Maximum number of events to return. (optional) |\n| offset | integer | Skip offset events before returning first one (useful for pagination). (optional) |"
    },
    {
      "id": "get-response",
      "title": "Response",
      "role": "returns",
      "text": "Returns a JSON array of events.\n\n#### Example JSON body\n\n[code example]\n\n#### Event object\n\n| Field | Description |\n|-------|-------------|\n| time | Timestamp when event happened. |\n| type | Event type. Additional fields may be available for certain event types. |\n| additional fields | Additional fields may be present based on event type.|"
    },
    {
      "id": "get-status-codes",
      "title": "Status codes",
      "role": "content",
      "text": "| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error |"
    }
  ],
  "examples": [
    {
      "id": "get-response-ex0",
      "language": "json",
      "code": "[\n  {\n    \"time\": \"2014-08-29T11:19:49Z\",\n    \"type\": \"bdb_name_updated\",\n    \"severity\": \"INFO\",\n    \"bdb_uid\": \"1\",\n    \"old_val\": \"test\",\n    \"new_val\": \"test123\"\n  },\n  {\n    \"time\": \"2014-08-29T11:18:48Z\",\n    \"type\": \"cluster_bdb_created\",\n    \"severity\": \"INFO\",\n    \"bdb_uid\": \"1\",\n    \"bdb_name\": \"test\"\n  },\n  {\n    \"time\": \"2014-08-29T11:17:49Z\",\n    \"type\": \"cluster_node_joined\",\n    \"severity\": \"INFO\",\n    \"node_uid\": 2\n  }\n]",
      "section_id": "get-response"
    }
  ]
}
