Search or ask Docker

Monitor events

GET /events — Docker Engine API 1.57.

View Markdown
GET/events

Stream real-time events from the server.

Various objects within Docker report events when something happens to them.

Containers report these events: attach, commit, copy, create, destroy, detach, die, exec_create, exec_detach, exec_start, exec_die, export, health_status, kill, oom, pause, rename, resize, restart, start, stop, top, unpause, update, and prune

Images report these events: create, delete, import, load, pull, push, save, tag, untag, and prune

Volumes report these events: create, mount, unmount, destroy, and prune

Networks report these events: create, connect, disconnect, destroy, update, remove, and prune

The Docker daemon reports these events: reload

Services report these events: create, update, and remove

Nodes report these events: create, update, and remove

Secrets report these events: create, update, and remove

Configs report these events: create, update, and remove

The Builder reports prune events

Connection and access

API connection and authentication guidance

/v1.57

No HTTP authentication requirement is declared for this operation. Transport access controls can still apply.

Parameters

since query

Show events created since this timestamp then stream new events.

Type: string

All schema constraints and annotations
{
  "type": "string"
}

until query

Show events created until this timestamp then stop streaming.

Type: string

All schema constraints and annotations
{
  "type": "string"
}

filters query

A JSON encoded value of filters (a map[string][]string) to process on the event list. Available filters:

  • config=<string> config name or ID
  • container=<string> container name or ID
  • daemon=<string> daemon name or ID
  • event=<string> event type
  • image=<string> image name or ID
  • label=<string> image or container label
  • network=<string> network name or ID
  • node=<string> node ID
  • plugin= plugin name or ID
  • scope= local or swarm
  • secret=<string> secret name or ID
  • service=<string> service name or ID
  • type=<string> object to filter by, one of container, image, volume, network, daemon, plugin, node, service, secret or config
  • volume=<string> volume name

Type: string

All schema constraints and annotations
{
  "type": "string"
}

Request and responses

Response 200

no error

application/json-seq

Schema: EventMessage

Response 200

no error

application/jsonl

Schema: EventMessage

Response 200

no error

application/x-ndjson

Schema: EventMessage

Response 400

bad parameter

application/json

Schema: ErrorResponse

Schema example

{
  "message": "Something went wrong."
}

Response 500

server error

application/json

Schema: ErrorResponse

Schema example

{
  "message": "Something went wrong."
}

Referenced schemas

#/components/schemas/ErrorResponse

#/components/schemas/EventMessage

Complete operation contract
{
  "description": "Stream real-time events from the server.\n\nVarious objects within Docker report events when something happens to them.\n\nContainers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, `update`, and `prune`\n\nImages report these events: `create`, `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune`\n\nVolumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune`\n\nNetworks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune`\n\nThe Docker daemon reports these events: `reload`\n\nServices report these events: `create`, `update`, and `remove`\n\nNodes report these events: `create`, `update`, and `remove`\n\nSecrets report these events: `create`, `update`, and `remove`\n\nConfigs report these events: `create`, `update`, and `remove`\n\nThe Builder reports `prune` events\n",
  "operationId": "SystemEvents",
  "parameters": [
    {
      "description": "Show events created since this timestamp then stream new events.",
      "in": "query",
      "name": "since",
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Show events created until this timestamp then stop streaming.",
      "in": "query",
      "name": "until",
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters:\n\n- `config=\u003cstring\u003e` config name or ID\n- `container=\u003cstring\u003e` container name or ID\n- `daemon=\u003cstring\u003e` daemon name or ID\n- `event=\u003cstring\u003e` event type\n- `image=\u003cstring\u003e` image name or ID\n- `label=\u003cstring\u003e` image or container label\n- `network=\u003cstring\u003e` network name or ID\n- `node=\u003cstring\u003e` node ID\n- `plugin`=\u003cstring\u003e plugin name or ID\n- `scope`=\u003cstring\u003e local or swarm\n- `secret=\u003cstring\u003e` secret name or ID\n- `service=\u003cstring\u003e` service name or ID\n- `type=\u003cstring\u003e` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config`\n- `volume=\u003cstring\u003e` volume name\n",
      "in": "query",
      "name": "filters",
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json-seq": {
          "schema": {
            "$ref": "#/components/schemas/EventMessage"
          }
        },
        "application/jsonl": {
          "schema": {
            "$ref": "#/components/schemas/EventMessage"
          }
        },
        "application/x-ndjson": {
          "schema": {
            "$ref": "#/components/schemas/EventMessage"
          }
        }
      },
      "description": "no error"
    },
    "400": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "bad parameter"
    },
    "500": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "server error"
    }
  },
  "summary": "Monitor events",
  "tags": [
    "System"
  ]
}