Monitor events Run in API Explorer

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: 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

Query parameters

  • since string

    Show events created since this timestamp then stream new events.

  • until string

    Show events created until this timestamp then stop streaming.

  • filters string

    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

Responses

  • 200 application/json

    no error

    Hide response attributes Show response attributes object
    • Type string

      The type of object emitting the event

      Values are builder, config, container, daemon, image, network, node, plugin, secret, service, or volume.

    • Action string

      The type of event

    • Actor object

      Actor describes something that generates events, like a container, network, or a volume.

      Hide Actor attributes Show Actor attributes object
      • ID string

        The ID of the object emitting the event

      • Attributes object

        Various key/value attributes of the object, depending on its type.

        Hide Attributes attribute Show Attributes attribute object
        • * string Additional properties
    • scope string

      Scope of the event. Engine events are local scope. Cluster (Swarm) events are swarm scope.

      Values are local or swarm.

    • time integer(int64)

      Timestamp of event

    • timeNano integer(int64)

      Timestamp of event, with nanosecond accuracy

  • 400 application/json

    bad parameter

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

  • 500 application/json

    server error

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

GET /events
curl \
 --request GET 'http://api.example.com/v1.44/events'
Response examples (200)
{
  "Type": "container",
  "Action": "create",
  "Actor": {
    "ID": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
    "Attributes": {
      "name": "my-container",
      "image": "alpine:latest",
      "com.example.some-label": "some-label-value"
    }
  },
  "scope": "local",
  "time": 1629574695,
  "timeNano": 1629574695515050031
}
Response examples (400)
{
  "message": "Something went wrong."
}
Response examples (400)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}