Browse code

Documentation for filtering events by label

Signed-off-by: Daniel Nephin <dnephin@docker.com>

Daniel Nephin authored on 2015/10/01 02:12:41
Showing 3 changed files
... ...
@@ -88,6 +88,7 @@ This section lists each version from latest to oldest.  Each listing includes a
88 88
 list of DNS options to be used in the container.
89 89
 * `POST /build` now optionally takes a serialized map of build-time variables.
90 90
 * `GET /events` now includes a `timenano` field, in addition to the existing `time` field.
91
+* `GET /events` now supports filtering by image and container labels.
91 92
 * `GET /info` now lists engine version information.
92 93
 * `GET /containers/json` will return `ImageID` of the image used by container.
93 94
 * `POST /exec/(name)/start` will now return an HTTP 409 when the container is either stopped or paused.
... ...
@@ -181,6 +182,3 @@ to add, and the field `CapDrop`, which specifies a list of capabilities to drop.
181 181
 * `POST /images/create` th `fromImage` and `repo` parameters supportthe
182 182
 `repo:tag` format. Consequently,  the `tag` parameter is now obsolete. Using the
183 183
 new format and the `tag` parameter at the same time will return an error.
184
-
185
-
186
-
... ...
@@ -233,7 +233,7 @@ Json Parameters:
233 233
 -   **CpuShares** - An integer value containing the container's CPU Shares
234 234
       (ie. the relative weight vs other containers).
235 235
 -   **CpuPeriod** - The length of a CPU period in microseconds.
236
--   **Cpuset** - Deprecated please don't use. Use `CpusetCpus` instead. 
236
+-   **Cpuset** - Deprecated please don't use. Use `CpusetCpus` instead.
237 237
 -   **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use.
238 238
 -   **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
239 239
 -   **BlkioWeight** - Block IO weight (relative weight) accepts a weight value between 10 and 1000.
... ...
@@ -1363,7 +1363,7 @@ or being killed.
1363 1363
 
1364 1364
 Query Parameters:
1365 1365
 
1366
--   **dockerfile** - Path within the build context to the Dockerfile. This is 
1366
+-   **dockerfile** - Path within the build context to the Dockerfile. This is
1367 1367
         ignored if `remote` is specified and points to an individual filename.
1368 1368
 -   **t** – A repository name (and optionally a tag) to apply to
1369 1369
         the resulting image in case of success.
... ...
@@ -2038,9 +2038,10 @@ Query Parameters:
2038 2038
 -   **since** – Timestamp used for polling
2039 2039
 -   **until** – Timestamp used for polling
2040 2040
 -   **filters** – A json encoded value of the filters (a map[string][]string) to process on the event list. Available filters:
2041
+  -   `container=<string>`; -- container to filter
2041 2042
   -   `event=<string>`; -- event to filter
2042 2043
   -   `image=<string>`; -- image to filter
2043
-  -   `container=<string>`; -- container to filter
2044
+  -   `label=<string>`; -- image and container label to filter
2044 2045
 
2045 2046
 Status Codes:
2046 2047
 
... ...
@@ -48,9 +48,10 @@ container container 588a23dac085 *AND* the event type is *start*
48 48
 
49 49
 The currently supported filters are:
50 50
 
51
-* container
52
-* event
53
-* image
51
+* container (`container=<name or id>`)
52
+* event (`event=<event type>`)
53
+* image (`image=<tag or id>`)
54
+* label (`label=<key>` or `label=<key>=<value>`)
54 55
 
55 56
 ## Examples
56 57
 
... ...
@@ -133,4 +134,3 @@ relative to the current time on the client machine:
133 133
     2014-05-10T17:42:14.999999999Z07:00 4386fb97867d: (from ubuntu-1:14.04) stop
134 134
     2014-05-10T17:42:14.999999999Z07:00 7805c1d35632: (from redis:2.8) die
135 135
     2014-09-03T15:49:29.999999999Z07:00 7805c1d35632: (from redis:2.8) stop
136
-