Victor Vieux 12 years ago
parent
commit
ec559c02b8

+ 4 - 0
docs/sources/api/docker_remote_api.rst

@@ -44,6 +44,10 @@ What's new
 
 
    **New!** List the processes running inside a container.
    **New!** List the processes running inside a container.
 
 
+.. http:get:: /events:
+
+   **New!** Monitor docker's events via streaming or via polling
+
 Builder (/build):
 Builder (/build):
 
 
 - Simplify the upload of the build context
 - Simplify the upload of the build context

+ 30 - 0
docs/sources/api/docker_remote_api_v1.3.rst

@@ -1059,6 +1059,36 @@ Create a new image from a container's changes
         :statuscode 500: server error
         :statuscode 500: server error
 
 
 
 
+Monitor Docker's events
+***********************
+
+.. http:get:: /events
+
+	Get events from docker, either in real time via streaming, or via polling (using `since`)
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+           POST /events?since=1374067924
+
+        **Example response**:
+
+        .. sourcecode:: http
+
+           HTTP/1.1 200 OK
+	   Content-Type: application/json
+
+	   {"status":"create","id":"dfdf82bd3881","time":1374067924}
+	   {"status":"start","id":"dfdf82bd3881","time":1374067924}
+	   {"status":"stop","id":"dfdf82bd3881","time":1374067966}
+	   {"status":"destroy","id":"dfdf82bd3881","time":1374067970}
+
+	:query since: timestamp used for polling
+        :statuscode 200: no error
+        :statuscode 500: server error
+
+
 3. Going further
 3. Going further
 ================
 ================