Browse code

update API example response for docker events

the events API was rewritten in 723be0a3325799fd6b2a6b689af54f5a07edf992,
but the example response in the documentation doesn't reflect the actual output

this fixes the example response

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3932d46a7878e3e75d8119f332b927fd2107cb32)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2016/04/30 00:37:04
Showing 2 changed files
... ...
@@ -2359,49 +2359,157 @@ Docker networks report the following events:
2359 2359
 
2360 2360
     HTTP/1.1 200 OK
2361 2361
     Content-Type: application/json
2362
+    Server: Docker/1.10.0 (linux)
2363
+    Date: Fri, 29 Apr 2016 15:18:06 GMT
2364
+    Transfer-Encoding: chunked
2362 2365
 
2363
-    [
2364
-	    {
2365
-		"action": "pull",
2366
-		"type": "image",
2367
-		"actor": {
2368
-			"id": "busybox:latest",
2369
-			"attributes": {}
2370
-		}
2371
-		"time": 1442421700,
2372
-		"timeNano": 1442421700598988358
2373
-	    },
2374
-            {
2375
-		"action": "create",
2376
-		"type": "container",
2377
-		"actor": {
2378
-			"id": "5745704abe9caa5",
2379
-			"attributes": {"image": "busybox"}
2380
-		}
2381
-		"time": 1442421716,
2382
-		"timeNano": 1442421716853979870
2383
-	    },
2384
-            {
2385
-		"action": "attach",
2386
-		"type": "container",
2387
-		"actor": {
2388
-			"id": "5745704abe9caa5",
2389
-			"attributes": {"image": "busybox"}
2390
-		}
2391
-		"time": 1442421716,
2392
-		"timeNano": 1442421716894759198
2393
-	    },
2394
-            {
2395
-		"action": "start",
2396
-		"type": "container",
2397
-		"actor": {
2398
-			"id": "5745704abe9caa5",
2399
-			"attributes": {"image": "busybox"}
2400
-		}
2401
-		"time": 1442421716,
2402
-		"timeNano": 1442421716983607193
2403
-	    }
2404
-    ]
2366
+    {
2367
+      "status": "pull",
2368
+      "id": "alpine:latest",
2369
+      "Type": "image",
2370
+      "Action": "pull",
2371
+      "Actor": {
2372
+        "ID": "alpine:latest",
2373
+        "Attributes": {
2374
+          "name": "alpine"
2375
+        }
2376
+      },
2377
+      "time": 1461943101,
2378
+      "timeNano": 1461943101301854122
2379
+    }
2380
+    {
2381
+      "status": "create",
2382
+      "id": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2383
+      "from": "alpine",
2384
+      "Type": "container",
2385
+      "Action": "create",
2386
+      "Actor": {
2387
+        "ID": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2388
+        "Attributes": {
2389
+          "com.example.some-label": "some-label-value",
2390
+          "image": "alpine",
2391
+          "name": "my-container"
2392
+        }
2393
+      },
2394
+      "time": 1461943101,
2395
+      "timeNano": 1461943101381709551
2396
+    }
2397
+    {
2398
+      "status": "attach",
2399
+      "id": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2400
+      "from": "alpine",
2401
+      "Type": "container",
2402
+      "Action": "attach",
2403
+      "Actor": {
2404
+        "ID": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2405
+        "Attributes": {
2406
+          "com.example.some-label": "some-label-value",
2407
+          "image": "alpine",
2408
+          "name": "my-container"
2409
+        }
2410
+      },
2411
+      "time": 1461943101,
2412
+      "timeNano": 1461943101383858412
2413
+    }
2414
+    {
2415
+      "Type": "network",
2416
+      "Action": "connect",
2417
+      "Actor": {
2418
+        "ID": "7dc8ac97d5d29ef6c31b6052f3938c1e8f2749abbd17d1bd1febf2608db1b474",
2419
+        "Attributes": {
2420
+          "container": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2421
+          "name": "bridge",
2422
+          "type": "bridge"
2423
+        }
2424
+      },
2425
+      "time": 1461943101,
2426
+      "timeNano": 1461943101394865557
2427
+    }
2428
+    {
2429
+      "status": "start",
2430
+      "id": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2431
+      "from": "alpine",
2432
+      "Type": "container",
2433
+      "Action": "start",
2434
+      "Actor": {
2435
+        "ID": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2436
+        "Attributes": {
2437
+          "com.example.some-label": "some-label-value",
2438
+          "image": "alpine",
2439
+          "name": "my-container"
2440
+        }
2441
+      },
2442
+      "time": 1461943101,
2443
+      "timeNano": 1461943101607533796
2444
+    }
2445
+    {
2446
+      "status": "resize",
2447
+      "id": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2448
+      "from": "alpine",
2449
+      "Type": "container",
2450
+      "Action": "resize",
2451
+      "Actor": {
2452
+        "ID": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2453
+        "Attributes": {
2454
+          "com.example.some-label": "some-label-value",
2455
+          "height": "46",
2456
+          "image": "alpine",
2457
+          "name": "my-container",
2458
+          "width": "204"
2459
+        }
2460
+      },
2461
+      "time": 1461943101,
2462
+      "timeNano": 1461943101610269268
2463
+    }
2464
+    {
2465
+      "status": "die",
2466
+      "id": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2467
+      "from": "alpine",
2468
+      "Type": "container",
2469
+      "Action": "die",
2470
+      "Actor": {
2471
+        "ID": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2472
+        "Attributes": {
2473
+          "com.example.some-label": "some-label-value",
2474
+          "exitCode": "0",
2475
+          "image": "alpine",
2476
+          "name": "my-container"
2477
+        }
2478
+      },
2479
+      "time": 1461943105,
2480
+      "timeNano": 1461943105079144137
2481
+    }
2482
+    {
2483
+      "Type": "network",
2484
+      "Action": "disconnect",
2485
+      "Actor": {
2486
+        "ID": "7dc8ac97d5d29ef6c31b6052f3938c1e8f2749abbd17d1bd1febf2608db1b474",
2487
+        "Attributes": {
2488
+          "container": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2489
+          "name": "bridge",
2490
+          "type": "bridge"
2491
+        }
2492
+      },
2493
+      "time": 1461943105,
2494
+      "timeNano": 1461943105230860245
2495
+    }
2496
+    {
2497
+      "status": "destroy",
2498
+      "id": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2499
+      "from": "alpine",
2500
+      "Type": "container",
2501
+      "Action": "destroy",
2502
+      "Actor": {
2503
+        "ID": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2504
+        "Attributes": {
2505
+          "com.example.some-label": "some-label-value",
2506
+          "image": "alpine",
2507
+          "name": "my-container"
2508
+        }
2509
+      },
2510
+      "time": 1461943105,
2511
+      "timeNano": 1461943105338056026
2512
+    }
2405 2513
 
2406 2514
 Query Parameters:
2407 2515
 
... ...
@@ -2404,49 +2404,158 @@ Docker networks report the following events:
2404 2404
 
2405 2405
     HTTP/1.1 200 OK
2406 2406
     Content-Type: application/json
2407
+    Server: Docker/1.11.0 (linux)
2408
+    Date: Fri, 29 Apr 2016 15:18:06 GMT
2409
+    Transfer-Encoding: chunked
2410
+
2411
+    {
2412
+      "status": "pull",
2413
+      "id": "alpine:latest",
2414
+      "Type": "image",
2415
+      "Action": "pull",
2416
+      "Actor": {
2417
+        "ID": "alpine:latest",
2418
+        "Attributes": {
2419
+          "name": "alpine"
2420
+        }
2421
+      },
2422
+      "time": 1461943101,
2423
+      "timeNano": 1461943101301854122
2424
+    }
2425
+    {
2426
+      "status": "create",
2427
+      "id": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2428
+      "from": "alpine",
2429
+      "Type": "container",
2430
+      "Action": "create",
2431
+      "Actor": {
2432
+        "ID": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2433
+        "Attributes": {
2434
+          "com.example.some-label": "some-label-value",
2435
+          "image": "alpine",
2436
+          "name": "my-container"
2437
+        }
2438
+      },
2439
+      "time": 1461943101,
2440
+      "timeNano": 1461943101381709551
2441
+    }
2442
+    {
2443
+      "status": "attach",
2444
+      "id": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2445
+      "from": "alpine",
2446
+      "Type": "container",
2447
+      "Action": "attach",
2448
+      "Actor": {
2449
+        "ID": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2450
+        "Attributes": {
2451
+          "com.example.some-label": "some-label-value",
2452
+          "image": "alpine",
2453
+          "name": "my-container"
2454
+        }
2455
+      },
2456
+      "time": 1461943101,
2457
+      "timeNano": 1461943101383858412
2458
+    }
2459
+    {
2460
+      "Type": "network",
2461
+      "Action": "connect",
2462
+      "Actor": {
2463
+        "ID": "7dc8ac97d5d29ef6c31b6052f3938c1e8f2749abbd17d1bd1febf2608db1b474",
2464
+        "Attributes": {
2465
+          "container": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2466
+          "name": "bridge",
2467
+          "type": "bridge"
2468
+        }
2469
+      },
2470
+      "time": 1461943101,
2471
+      "timeNano": 1461943101394865557
2472
+    }
2473
+    {
2474
+      "status": "start",
2475
+      "id": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2476
+      "from": "alpine",
2477
+      "Type": "container",
2478
+      "Action": "start",
2479
+      "Actor": {
2480
+        "ID": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2481
+        "Attributes": {
2482
+          "com.example.some-label": "some-label-value",
2483
+          "image": "alpine",
2484
+          "name": "my-container"
2485
+        }
2486
+      },
2487
+      "time": 1461943101,
2488
+      "timeNano": 1461943101607533796
2489
+    }
2490
+    {
2491
+      "status": "resize",
2492
+      "id": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2493
+      "from": "alpine",
2494
+      "Type": "container",
2495
+      "Action": "resize",
2496
+      "Actor": {
2497
+        "ID": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2498
+        "Attributes": {
2499
+          "com.example.some-label": "some-label-value",
2500
+          "height": "46",
2501
+          "image": "alpine",
2502
+          "name": "my-container",
2503
+          "width": "204"
2504
+        }
2505
+      },
2506
+      "time": 1461943101,
2507
+      "timeNano": 1461943101610269268
2508
+    }
2509
+    {
2510
+      "status": "die",
2511
+      "id": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2512
+      "from": "alpine",
2513
+      "Type": "container",
2514
+      "Action": "die",
2515
+      "Actor": {
2516
+        "ID": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2517
+        "Attributes": {
2518
+          "com.example.some-label": "some-label-value",
2519
+          "exitCode": "0",
2520
+          "image": "alpine",
2521
+          "name": "my-container"
2522
+        }
2523
+      },
2524
+      "time": 1461943105,
2525
+      "timeNano": 1461943105079144137
2526
+    }
2527
+    {
2528
+      "Type": "network",
2529
+      "Action": "disconnect",
2530
+      "Actor": {
2531
+        "ID": "7dc8ac97d5d29ef6c31b6052f3938c1e8f2749abbd17d1bd1febf2608db1b474",
2532
+        "Attributes": {
2533
+          "container": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2534
+          "name": "bridge",
2535
+          "type": "bridge"
2536
+        }
2537
+      },
2538
+      "time": 1461943105,
2539
+      "timeNano": 1461943105230860245
2540
+    }
2541
+    {
2542
+      "status": "destroy",
2543
+      "id": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2544
+      "from": "alpine",
2545
+      "Type": "container",
2546
+      "Action": "destroy",
2547
+      "Actor": {
2548
+        "ID": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
2549
+        "Attributes": {
2550
+          "com.example.some-label": "some-label-value",
2551
+          "image": "alpine",
2552
+          "name": "my-container"
2553
+        }
2554
+      },
2555
+      "time": 1461943105,
2556
+      "timeNano": 1461943105338056026
2557
+    }
2407 2558
 
2408
-    [
2409
-	    {
2410
-		"action": "pull",
2411
-		"type": "image",
2412
-		"actor": {
2413
-			"id": "busybox:latest",
2414
-			"attributes": {}
2415
-		}
2416
-		"time": 1442421700,
2417
-		"timeNano": 1442421700598988358
2418
-	    },
2419
-            {
2420
-		"action": "create",
2421
-		"type": "container",
2422
-		"actor": {
2423
-			"id": "5745704abe9caa5",
2424
-			"attributes": {"image": "busybox"}
2425
-		}
2426
-		"time": 1442421716,
2427
-		"timeNano": 1442421716853979870
2428
-	    },
2429
-            {
2430
-		"action": "attach",
2431
-		"type": "container",
2432
-		"actor": {
2433
-			"id": "5745704abe9caa5",
2434
-			"attributes": {"image": "busybox"}
2435
-		}
2436
-		"time": 1442421716,
2437
-		"timeNano": 1442421716894759198
2438
-	    },
2439
-            {
2440
-		"action": "start",
2441
-		"type": "container",
2442
-		"actor": {
2443
-			"id": "5745704abe9caa5",
2444
-			"attributes": {"image": "busybox"}
2445
-		}
2446
-		"time": 1442421716,
2447
-		"timeNano": 1442421716983607193
2448
-	    }
2449
-    ]
2450 2559
 
2451 2560
 Query Parameters:
2452 2561