Browse code

Update docs/reference/api to complete the docs

Signed-off-by: tracylihui <793912329@qq.com>

tracylihui authored on 2016/02/21 11:28:07
Showing 6 changed files
... ...
@@ -180,7 +180,7 @@ Status Codes:
180 180
 
181 181
 ### Inspect a container
182 182
 
183
-`GET /containers/(id)/json`
183
+`GET /containers/(id or name)/json`
184 184
 
185 185
 Return low-level information on the container `id`
186 186
 
... ...
@@ -267,7 +267,7 @@ Status Codes:
267 267
 
268 268
 ### List processes running inside a container
269 269
 
270
-`GET /containers/(id)/top`
270
+`GET /containers/(id or name)/top`
271 271
 
272 272
 List processes running inside the container `id`. On Unix systems this
273 273
 is done by running the `ps` command. This endpoint is not
... ...
@@ -331,7 +331,7 @@ Status Codes:
331 331
 
332 332
 ### Get container logs
333 333
 
334
-`GET /containers/(id)/logs`
334
+`GET /containers/(id or name)/logs`
335 335
 
336 336
 Get stdout and stderr logs from the container ``id``
337 337
 
... ...
@@ -364,7 +364,7 @@ Status Codes:
364 364
 
365 365
 ### Inspect changes on a container's filesystem
366 366
 
367
-`GET /containers/(id)/changes`
367
+`GET /containers/(id or name)/changes`
368 368
 
369 369
 Inspect changes on container `id`'s filesystem
370 370
 
... ...
@@ -400,7 +400,7 @@ Status Codes:
400 400
 
401 401
 ### Export a container
402 402
 
403
-`GET /containers/(id)/export`
403
+`GET /containers/(id or name)/export`
404 404
 
405 405
 Export the contents of container `id`
406 406
 
... ...
@@ -423,13 +423,13 @@ Status Codes:
423 423
 
424 424
 ### Start a container
425 425
 
426
-`POST /containers/(id)/start`
426
+`POST /containers/(id or name)/start`
427 427
 
428 428
 Start the container `id`
429 429
 
430 430
 **Example request**:
431 431
 
432
-        POST /containers/(id)/start HTTP/1.1
432
+        POST /containers/(id or name)/start HTTP/1.1
433 433
         Content-Type: application/json
434 434
 
435 435
         {
... ...
@@ -462,7 +462,7 @@ Status Codes:
462 462
 
463 463
 ### Stop a container
464 464
 
465
-`POST /containers/(id)/stop`
465
+`POST /containers/(id or name)/stop`
466 466
 
467 467
 Stop the container `id`
468 468
 
... ...
@@ -487,7 +487,7 @@ Status Codes:
487 487
 
488 488
 ### Restart a container
489 489
 
490
-`POST /containers/(id)/restart`
490
+`POST /containers/(id or name)/restart`
491 491
 
492 492
 Restart the container `id`
493 493
 
... ...
@@ -511,7 +511,7 @@ Status Codes:
511 511
 
512 512
 ### Kill a container
513 513
 
514
-`POST /containers/(id)/kill`
514
+`POST /containers/(id or name)/kill`
515 515
 
516 516
 Kill the container `id`
517 517
 
... ...
@@ -536,7 +536,7 @@ Status Codes:
536 536
 
537 537
 ### Pause a container
538 538
 
539
-`POST /containers/(id)/pause`
539
+`POST /containers/(id or name)/pause`
540 540
 
541 541
 Pause the container `id`
542 542
 
... ...
@@ -556,7 +556,7 @@ Status Codes:
556 556
 
557 557
 ### Unpause a container
558 558
 
559
-`POST /containers/(id)/unpause`
559
+`POST /containers/(id or name)/unpause`
560 560
 
561 561
 Unpause the container `id`
562 562
 
... ...
@@ -576,7 +576,7 @@ Status Codes:
576 576
 
577 577
 ### Attach to a container
578 578
 
579
-`POST /containers/(id)/attach`
579
+`POST /containers/(id or name)/attach`
580 580
 
581 581
 Attach to the container `id`
582 582
 
... ...
@@ -654,7 +654,7 @@ Status Codes:
654 654
 
655 655
 ### Attach to a container (websocket)
656 656
 
657
-`GET /containers/(id)/attach/ws`
657
+`GET /containers/(id or name)/attach/ws`
658 658
 
659 659
 Attach to the container `id` via websocket
660 660
 
... ...
@@ -689,7 +689,7 @@ Status Codes:
689 689
 
690 690
 ### Wait a container
691 691
 
692
-`POST /containers/(id)/wait`
692
+`POST /containers/(id or name)/wait`
693 693
 
694 694
 Block until container `id` stops, then returns the exit code
695 695
 
... ...
@@ -712,7 +712,7 @@ Status Codes:
712 712
 
713 713
 ### Remove a container
714 714
 
715
-`DELETE /containers/(id)`
715
+`DELETE /containers/(id or name)`
716 716
 
717 717
 Remove the container `id` from the filesystem
718 718
 
... ...
@@ -740,7 +740,7 @@ Status Codes:
740 740
 
741 741
 ### Copy files or folders from a container
742 742
 
743
-`POST /containers/(id)/copy`
743
+`POST /containers/(id or name)/copy`
744 744
 
745 745
 Copy files or folders of container `id`
746 746
 
... ...
@@ -268,7 +268,7 @@ Status Codes:
268 268
 
269 269
 ### Inspect a container
270 270
 
271
-`GET /containers/(id)/json`
271
+`GET /containers/(id or name)/json`
272 272
 
273 273
 Return low-level information on the container `id`
274 274
 
... ...
@@ -355,7 +355,7 @@ Status Codes:
355 355
 
356 356
 ### List processes running inside a container
357 357
 
358
-`GET /containers/(id)/top`
358
+`GET /containers/(id or name)/top`
359 359
 
360 360
 List processes running inside the container `id`. On Unix systems this
361 361
 is done by running the `ps` command. This endpoint is not
... ...
@@ -419,7 +419,7 @@ Status Codes:
419 419
 
420 420
 ### Get container logs
421 421
 
422
-`GET /containers/(id)/logs`
422
+`GET /containers/(id or name)/logs`
423 423
 
424 424
 Get stdout and stderr logs from the container ``id``
425 425
 
... ...
@@ -451,7 +451,7 @@ Status Codes:
451 451
 
452 452
 ### Inspect changes on a container's filesystem
453 453
 
454
-`GET /containers/(id)/changes`
454
+`GET /containers/(id or name)/changes`
455 455
 
456 456
 Inspect changes on container `id`'s filesystem
457 457
 
... ...
@@ -487,7 +487,7 @@ Status Codes:
487 487
 
488 488
 ### Export a container
489 489
 
490
-`GET /containers/(id)/export`
490
+`GET /containers/(id or name)/export`
491 491
 
492 492
 Export the contents of container `id`
493 493
 
... ...
@@ -510,7 +510,7 @@ Status Codes:
510 510
 
511 511
 ### Resize a container TTY
512 512
 
513
-`GET /containers/(id)/resize?h=<height>&w=<width>`
513
+`GET /containers/(id or name)/resize?h=<height>&w=<width>`
514 514
 
515 515
 Resize the TTY of container `id`
516 516
 
... ...
@@ -532,13 +532,13 @@ Status Codes:
532 532
 
533 533
 ### Start a container
534 534
 
535
-`POST /containers/(id)/start`
535
+`POST /containers/(id or name)/start`
536 536
 
537 537
 Start the container `id`
538 538
 
539 539
 **Example request**:
540 540
 
541
-        POST /containers/(id)/start HTTP/1.1
541
+        POST /containers/(id or name)/start HTTP/1.1
542 542
         Content-Type: application/json
543 543
 
544 544
         {
... ...
@@ -610,7 +610,7 @@ Status Codes:
610 610
 
611 611
 ### Stop a container
612 612
 
613
-`POST /containers/(id)/stop`
613
+`POST /containers/(id or name)/stop`
614 614
 
615 615
 Stop the container `id`
616 616
 
... ...
@@ -635,7 +635,7 @@ Status Codes:
635 635
 
636 636
 ### Restart a container
637 637
 
638
-`POST /containers/(id)/restart`
638
+`POST /containers/(id or name)/restart`
639 639
 
640 640
 Restart the container `id`
641 641
 
... ...
@@ -659,7 +659,7 @@ Status Codes:
659 659
 
660 660
 ### Kill a container
661 661
 
662
-`POST /containers/(id)/kill`
662
+`POST /containers/(id or name)/kill`
663 663
 
664 664
 Kill the container `id`
665 665
 
... ...
@@ -684,7 +684,7 @@ Status Codes:
684 684
 
685 685
 ### Pause a container
686 686
 
687
-`POST /containers/(id)/pause`
687
+`POST /containers/(id or name)/pause`
688 688
 
689 689
 Pause the container `id`
690 690
 
... ...
@@ -704,7 +704,7 @@ Status Codes:
704 704
 
705 705
 ### Unpause a container
706 706
 
707
-`POST /containers/(id)/unpause`
707
+`POST /containers/(id or name)/unpause`
708 708
 
709 709
 Unpause the container `id`
710 710
 
... ...
@@ -724,7 +724,7 @@ Status Codes:
724 724
 
725 725
 ### Attach to a container
726 726
 
727
-`POST /containers/(id)/attach`
727
+`POST /containers/(id or name)/attach`
728 728
 
729 729
 Attach to the container `id`
730 730
 
... ...
@@ -803,7 +803,7 @@ Status Codes:
803 803
 
804 804
 ### Attach to a container (websocket)
805 805
 
806
-`GET /containers/(id)/attach/ws`
806
+`GET /containers/(id or name)/attach/ws`
807 807
 
808 808
 Attach to the container `id` via websocket
809 809
 
... ...
@@ -838,7 +838,7 @@ Status Codes:
838 838
 
839 839
 ### Wait a container
840 840
 
841
-`POST /containers/(id)/wait`
841
+`POST /containers/(id or name)/wait`
842 842
 
843 843
 Block until container `id` stops, then returns the exit code
844 844
 
... ...
@@ -861,7 +861,7 @@ Status Codes:
861 861
 
862 862
 ### Remove a container
863 863
 
864
-`DELETE /containers/(id)`
864
+`DELETE /containers/(id or name)`
865 865
 
866 866
 Remove the container `id` from the filesystem
867 867
 
... ...
@@ -889,7 +889,7 @@ Status Codes:
889 889
 
890 890
 ### Copy files or folders from a container
891 891
 
892
-`POST /containers/(id)/copy`
892
+`POST /containers/(id or name)/copy`
893 893
 
894 894
 Copy files or folders of container `id`
895 895
 
... ...
@@ -1623,7 +1623,7 @@ the root that contains a list of repository and tag names mapped to layer IDs.
1623 1623
 
1624 1624
 ### Exec Create
1625 1625
 
1626
-`POST /containers/(id)/exec`
1626
+`POST /containers/(id or name)/exec`
1627 1627
 
1628 1628
 Sets up an exec instance in a running container `id`
1629 1629
 
... ...
@@ -268,7 +268,7 @@ Status Codes:
268 268
 
269 269
 ### Inspect a container
270 270
 
271
-`GET /containers/(id)/json`
271
+`GET /containers/(id or name)/json`
272 272
 
273 273
 Return low-level information on the container `id`
274 274
 
... ...
@@ -355,7 +355,7 @@ Status Codes:
355 355
 
356 356
 ### List processes running inside a container
357 357
 
358
-`GET /containers/(id)/top`
358
+`GET /containers/(id or name)/top`
359 359
 
360 360
 List processes running inside the container `id`. On Unix systems this
361 361
 is done by running the `ps` command. This endpoint is not
... ...
@@ -419,7 +419,7 @@ Status Codes:
419 419
 
420 420
 ### Get container logs
421 421
 
422
-`GET /containers/(id)/logs`
422
+`GET /containers/(id or name)/logs`
423 423
 
424 424
 Get stdout and stderr logs from the container ``id``
425 425
 
... ...
@@ -451,7 +451,7 @@ Status Codes:
451 451
 
452 452
 ### Inspect changes on a container's filesystem
453 453
 
454
-`GET /containers/(id)/changes`
454
+`GET /containers/(id or name)/changes`
455 455
 
456 456
 Inspect changes on container `id`'s filesystem
457 457
 
... ...
@@ -487,7 +487,7 @@ Status Codes:
487 487
 
488 488
 ### Export a container
489 489
 
490
-`GET /containers/(id)/export`
490
+`GET /containers/(id or name)/export`
491 491
 
492 492
 Export the contents of container `id`
493 493
 
... ...
@@ -510,7 +510,7 @@ Status Codes:
510 510
 
511 511
 ### Resize a container TTY
512 512
 
513
-`POST /containers/(id)/resize?h=<height>&w=<width>`
513
+`POST /containers/(id or name)/resize?h=<height>&w=<width>`
514 514
 
515 515
 Resize the TTY for container with  `id`. The container must be restarted for the resize to take effect.
516 516
 
... ...
@@ -532,7 +532,7 @@ Status Codes:
532 532
 
533 533
 ### Start a container
534 534
 
535
-`POST /containers/(id)/start`
535
+`POST /containers/(id or name)/start`
536 536
 
537 537
 Start the container `id`
538 538
 
... ...
@@ -542,7 +542,7 @@ Start the container `id`
542 542
 
543 543
 **Example request**:
544 544
 
545
-        POST /containers/(id)/start HTTP/1.1
545
+        POST /containers/(id or name)/start HTTP/1.1
546 546
 
547 547
 **Example response**:
548 548
 
... ...
@@ -557,7 +557,7 @@ Status Codes:
557 557
 
558 558
 ### Stop a container
559 559
 
560
-`POST /containers/(id)/stop`
560
+`POST /containers/(id or name)/stop`
561 561
 
562 562
 Stop the container `id`
563 563
 
... ...
@@ -582,7 +582,7 @@ Status Codes:
582 582
 
583 583
 ### Restart a container
584 584
 
585
-`POST /containers/(id)/restart`
585
+`POST /containers/(id or name)/restart`
586 586
 
587 587
 Restart the container `id`
588 588
 
... ...
@@ -606,7 +606,7 @@ Status Codes:
606 606
 
607 607
 ### Kill a container
608 608
 
609
-`POST /containers/(id)/kill`
609
+`POST /containers/(id or name)/kill`
610 610
 
611 611
 Kill the container `id`
612 612
 
... ...
@@ -631,7 +631,7 @@ Status Codes:
631 631
 
632 632
 ### Pause a container
633 633
 
634
-`POST /containers/(id)/pause`
634
+`POST /containers/(id or name)/pause`
635 635
 
636 636
 Pause the container `id`
637 637
 
... ...
@@ -651,7 +651,7 @@ Status Codes:
651 651
 
652 652
 ### Unpause a container
653 653
 
654
-`POST /containers/(id)/unpause`
654
+`POST /containers/(id or name)/unpause`
655 655
 
656 656
 Unpause the container `id`
657 657
 
... ...
@@ -671,7 +671,7 @@ Status Codes:
671 671
 
672 672
 ### Attach to a container
673 673
 
674
-`POST /containers/(id)/attach`
674
+`POST /containers/(id or name)/attach`
675 675
 
676 676
 Attach to the container `id`
677 677
 
... ...
@@ -751,7 +751,7 @@ Status Codes:
751 751
 
752 752
 ### Attach to a container (websocket)
753 753
 
754
-`GET /containers/(id)/attach/ws`
754
+`GET /containers/(id or name)/attach/ws`
755 755
 
756 756
 Attach to the container `id` via websocket
757 757
 
... ...
@@ -786,7 +786,7 @@ Status Codes:
786 786
 
787 787
 ### Wait a container
788 788
 
789
-`POST /containers/(id)/wait`
789
+`POST /containers/(id or name)/wait`
790 790
 
791 791
 Block until container `id` stops, then returns the exit code
792 792
 
... ...
@@ -809,7 +809,7 @@ Status Codes:
809 809
 
810 810
 ### Remove a container
811 811
 
812
-`DELETE /containers/(id)`
812
+`DELETE /containers/(id or name)`
813 813
 
814 814
 Remove the container `id` from the filesystem
815 815
 
... ...
@@ -837,7 +837,7 @@ Status Codes:
837 837
 
838 838
 ### Copy files or folders from a container
839 839
 
840
-`POST /containers/(id)/copy`
840
+`POST /containers/(id or name)/copy`
841 841
 
842 842
 Copy files or folders of container `id`
843 843
 
... ...
@@ -1585,7 +1585,7 @@ the root that contains a list of repository and tag names mapped to layer IDs.
1585 1585
 
1586 1586
 ### Exec Create
1587 1587
 
1588
-`POST /containers/(id)/exec`
1588
+`POST /containers/(id or name)/exec`
1589 1589
 
1590 1590
 Sets up an exec instance in a running container `id`
1591 1591
 
... ...
@@ -272,7 +272,7 @@ Status Codes:
272 272
 
273 273
 ### Inspect a container
274 274
 
275
-`GET /containers/(id)/json`
275
+`GET /containers/(id or name)/json`
276 276
 
277 277
 Return low-level information on the container `id`
278 278
 
... ...
@@ -394,7 +394,7 @@ Status Codes:
394 394
 
395 395
 ### List processes running inside a container
396 396
 
397
-`GET /containers/(id)/top`
397
+`GET /containers/(id or name)/top`
398 398
 
399 399
 List processes running inside the container `id`. On Unix systems this
400 400
 is done by running the `ps` command. This endpoint is not
... ...
@@ -458,7 +458,7 @@ Status Codes:
458 458
 
459 459
 ### Get container logs
460 460
 
461
-`GET /containers/(id)/logs`
461
+`GET /containers/(id or name)/logs`
462 462
 
463 463
 Get stdout and stderr logs from the container ``id``
464 464
 
... ...
@@ -493,7 +493,7 @@ Status Codes:
493 493
 
494 494
 ### Inspect changes on a container's filesystem
495 495
 
496
-`GET /containers/(id)/changes`
496
+`GET /containers/(id or name)/changes`
497 497
 
498 498
 Inspect changes on container `id`'s filesystem
499 499
 
... ...
@@ -529,7 +529,7 @@ Status Codes:
529 529
 
530 530
 ### Export a container
531 531
 
532
-`GET /containers/(id)/export`
532
+`GET /containers/(id or name)/export`
533 533
 
534 534
 Export the contents of container `id`
535 535
 
... ...
@@ -552,7 +552,7 @@ Status Codes:
552 552
 
553 553
 ### Get container stats based on resource usage
554 554
 
555
-`GET /containers/(id)/stats`
555
+`GET /containers/(id or name)/stats`
556 556
 
557 557
 This endpoint returns a live stream of a container's resource usage statistics.
558 558
 
... ...
@@ -640,7 +640,7 @@ Status Codes:
640 640
 
641 641
 ### Resize a container TTY
642 642
 
643
-`POST /containers/(id)/resize?h=<height>&w=<width>`
643
+`POST /containers/(id or name)/resize?h=<height>&w=<width>`
644 644
 
645 645
 Resize the TTY for container with  `id`. The container must be restarted for the resize to take effect.
646 646
 
... ...
@@ -662,7 +662,7 @@ Status Codes:
662 662
 
663 663
 ### Start a container
664 664
 
665
-`POST /containers/(id)/start`
665
+`POST /containers/(id or name)/start`
666 666
 
667 667
 Start the container `id`
668 668
 
... ...
@@ -672,7 +672,7 @@ Start the container `id`
672 672
 
673 673
 **Example request**:
674 674
 
675
-        POST /containers/(id)/start HTTP/1.1
675
+        POST /containers/(id or name)/start HTTP/1.1
676 676
 
677 677
 **Example response**:
678 678
 
... ...
@@ -687,7 +687,7 @@ Status Codes:
687 687
 
688 688
 ### Stop a container
689 689
 
690
-`POST /containers/(id)/stop`
690
+`POST /containers/(id or name)/stop`
691 691
 
692 692
 Stop the container `id`
693 693
 
... ...
@@ -712,7 +712,7 @@ Status Codes:
712 712
 
713 713
 ### Restart a container
714 714
 
715
-`POST /containers/(id)/restart`
715
+`POST /containers/(id or name)/restart`
716 716
 
717 717
 Restart the container `id`
718 718
 
... ...
@@ -736,7 +736,7 @@ Status Codes:
736 736
 
737 737
 ### Kill a container
738 738
 
739
-`POST /containers/(id)/kill`
739
+`POST /containers/(id or name)/kill`
740 740
 
741 741
 Kill the container `id`
742 742
 
... ...
@@ -761,7 +761,7 @@ Status Codes:
761 761
 
762 762
 ### Rename a container
763 763
 
764
-`POST /containers/(id)/rename`
764
+`POST /containers/(id or name)/rename`
765 765
 
766 766
 Rename the container `id` to a `new_name`
767 767
 
... ...
@@ -786,7 +786,7 @@ Status Codes:
786 786
 
787 787
 ### Pause a container
788 788
 
789
-`POST /containers/(id)/pause`
789
+`POST /containers/(id or name)/pause`
790 790
 
791 791
 Pause the container `id`
792 792
 
... ...
@@ -806,7 +806,7 @@ Status Codes:
806 806
 
807 807
 ### Unpause a container
808 808
 
809
-`POST /containers/(id)/unpause`
809
+`POST /containers/(id or name)/unpause`
810 810
 
811 811
 Unpause the container `id`
812 812
 
... ...
@@ -826,7 +826,7 @@ Status Codes:
826 826
 
827 827
 ### Attach to a container
828 828
 
829
-`POST /containers/(id)/attach`
829
+`POST /containers/(id or name)/attach`
830 830
 
831 831
 Attach to the container `id`
832 832
 
... ...
@@ -909,7 +909,7 @@ Status Codes:
909 909
 
910 910
 ### Attach to a container (websocket)
911 911
 
912
-`GET /containers/(id)/attach/ws`
912
+`GET /containers/(id or name)/attach/ws`
913 913
 
914 914
 Attach to the container `id` via websocket
915 915
 
... ...
@@ -944,7 +944,7 @@ Status Codes:
944 944
 
945 945
 ### Wait a container
946 946
 
947
-`POST /containers/(id)/wait`
947
+`POST /containers/(id or name)/wait`
948 948
 
949 949
 Block until container `id` stops, then returns the exit code
950 950
 
... ...
@@ -967,7 +967,7 @@ Status Codes:
967 967
 
968 968
 ### Remove a container
969 969
 
970
-`DELETE /containers/(id)`
970
+`DELETE /containers/(id or name)`
971 971
 
972 972
 Remove the container `id` from the filesystem
973 973
 
... ...
@@ -995,7 +995,7 @@ Status Codes:
995 995
 
996 996
 ### Copy files or folders from a container
997 997
 
998
-`POST /containers/(id)/copy`
998
+`POST /containers/(id or name)/copy`
999 999
 
1000 1000
 Copy files or folders of container `id`
1001 1001
 
... ...
@@ -1748,7 +1748,7 @@ the root that contains a list of repository and tag names mapped to layer IDs.
1748 1748
 
1749 1749
 ### Exec Create
1750 1750
 
1751
-`POST /containers/(id)/exec`
1751
+`POST /containers/(id or name)/exec`
1752 1752
 
1753 1753
 Sets up an exec instance in a running container `id`
1754 1754
 
... ...
@@ -2005,4 +2005,4 @@ This might change in the future.
2005 2005
 To set cross origin requests to the remote api, please add flag "--api-enable-cors"
2006 2006
 when running docker in daemon mode.
2007 2007
 
2008
-    $ docker -d -H="192.168.1.9:2375" --api-enable-cors 
2008
+    $ docker -d -H="192.168.1.9:2375" --api-enable-cors
... ...
@@ -299,7 +299,7 @@ Status Codes:
299 299
 
300 300
 ### Inspect a container
301 301
 
302
-`GET /containers/(id)/json`
302
+`GET /containers/(id or name)/json`
303 303
 
304 304
 Return low-level information on the container `id`
305 305
 
... ...
@@ -432,7 +432,7 @@ Status Codes:
432 432
 
433 433
 ### List processes running inside a container
434 434
 
435
-`GET /containers/(id)/top`
435
+`GET /containers/(id or name)/top`
436 436
 
437 437
 List processes running inside the container `id`. On Unix systems this
438 438
 is done by running the `ps` command. This endpoint is not
... ...
@@ -496,7 +496,7 @@ Status Codes:
496 496
 
497 497
 ### Get container logs
498 498
 
499
-`GET /containers/(id)/logs`
499
+`GET /containers/(id or name)/logs`
500 500
 
501 501
 Get stdout and stderr logs from the container ``id``
502 502
 
... ...
@@ -534,7 +534,7 @@ Status Codes:
534 534
 
535 535
 ### Inspect changes on a container's filesystem
536 536
 
537
-`GET /containers/(id)/changes`
537
+`GET /containers/(id or name)/changes`
538 538
 
539 539
 Inspect changes on container `id`'s filesystem
540 540
 
... ...
@@ -576,7 +576,7 @@ Status Codes:
576 576
 
577 577
 ### Export a container
578 578
 
579
-`GET /containers/(id)/export`
579
+`GET /containers/(id or name)/export`
580 580
 
581 581
 Export the contents of container `id`
582 582
 
... ...
@@ -599,7 +599,7 @@ Status Codes:
599 599
 
600 600
 ### Get container stats based on resource usage
601 601
 
602
-`GET /containers/(id)/stats`
602
+`GET /containers/(id or name)/stats`
603 603
 
604 604
 This endpoint returns a live stream of a container's resource usage statistics.
605 605
 
... ...
@@ -687,7 +687,7 @@ Status Codes:
687 687
 
688 688
 ### Resize a container TTY
689 689
 
690
-`POST /containers/(id)/resize?h=<height>&w=<width>`
690
+`POST /containers/(id or name)/resize?h=<height>&w=<width>`
691 691
 
692 692
 Resize the TTY for container with  `id`. The container must be restarted for the resize to take effect.
693 693
 
... ...
@@ -709,7 +709,7 @@ Status Codes:
709 709
 
710 710
 ### Start a container
711 711
 
712
-`POST /containers/(id)/start`
712
+`POST /containers/(id or name)/start`
713 713
 
714 714
 Start the container `id`
715 715
 
... ...
@@ -719,7 +719,7 @@ Start the container `id`
719 719
 
720 720
 **Example request**:
721 721
 
722
-        POST /containers/(id)/start HTTP/1.1
722
+        POST /containers/(id or name)/start HTTP/1.1
723 723
 
724 724
 **Example response**:
725 725
 
... ...
@@ -734,7 +734,7 @@ Status Codes:
734 734
 
735 735
 ### Stop a container
736 736
 
737
-`POST /containers/(id)/stop`
737
+`POST /containers/(id or name)/stop`
738 738
 
739 739
 Stop the container `id`
740 740
 
... ...
@@ -759,7 +759,7 @@ Status Codes:
759 759
 
760 760
 ### Restart a container
761 761
 
762
-`POST /containers/(id)/restart`
762
+`POST /containers/(id or name)/restart`
763 763
 
764 764
 Restart the container `id`
765 765
 
... ...
@@ -783,7 +783,7 @@ Status Codes:
783 783
 
784 784
 ### Kill a container
785 785
 
786
-`POST /containers/(id)/kill`
786
+`POST /containers/(id or name)/kill`
787 787
 
788 788
 Kill the container `id`
789 789
 
... ...
@@ -808,7 +808,7 @@ Status Codes:
808 808
 
809 809
 ### Rename a container
810 810
 
811
-`POST /containers/(id)/rename`
811
+`POST /containers/(id or name)/rename`
812 812
 
813 813
 Rename the container `id` to a `new_name`
814 814
 
... ...
@@ -833,7 +833,7 @@ Status Codes:
833 833
 
834 834
 ### Pause a container
835 835
 
836
-`POST /containers/(id)/pause`
836
+`POST /containers/(id or name)/pause`
837 837
 
838 838
 Pause the container `id`
839 839
 
... ...
@@ -853,7 +853,7 @@ Status Codes:
853 853
 
854 854
 ### Unpause a container
855 855
 
856
-`POST /containers/(id)/unpause`
856
+`POST /containers/(id or name)/unpause`
857 857
 
858 858
 Unpause the container `id`
859 859
 
... ...
@@ -873,7 +873,7 @@ Status Codes:
873 873
 
874 874
 ### Attach to a container
875 875
 
876
-`POST /containers/(id)/attach`
876
+`POST /containers/(id or name)/attach`
877 877
 
878 878
 Attach to the container `id`
879 879
 
... ...
@@ -956,7 +956,7 @@ Status Codes:
956 956
 
957 957
 ### Attach to a container (websocket)
958 958
 
959
-`GET /containers/(id)/attach/ws`
959
+`GET /containers/(id or name)/attach/ws`
960 960
 
961 961
 Attach to the container `id` via websocket
962 962
 
... ...
@@ -991,7 +991,7 @@ Status Codes:
991 991
 
992 992
 ### Wait a container
993 993
 
994
-`POST /containers/(id)/wait`
994
+`POST /containers/(id or name)/wait`
995 995
 
996 996
 Block until container `id` stops, then returns the exit code
997 997
 
... ...
@@ -1014,7 +1014,7 @@ Status Codes:
1014 1014
 
1015 1015
 ### Remove a container
1016 1016
 
1017
-`DELETE /containers/(id)`
1017
+`DELETE /containers/(id or name)`
1018 1018
 
1019 1019
 Remove the container `id` from the filesystem
1020 1020
 
... ...
@@ -1042,7 +1042,7 @@ Status Codes:
1042 1042
 
1043 1043
 ### Copy files or folders from a container
1044 1044
 
1045
-`POST /containers/(id)/copy`
1045
+`POST /containers/(id or name)/copy`
1046 1046
 
1047 1047
 Copy files or folders of container `id`
1048 1048
 
... ...
@@ -1194,12 +1194,12 @@ or being killed.
1194 1194
 
1195 1195
 Query Parameters:
1196 1196
 
1197
--   **dockerfile** - path within the build context to the Dockerfile. This is 
1197
+-   **dockerfile** - path within the build context to the Dockerfile. This is
1198 1198
         ignored if `remote` is specified and points to an individual filename.
1199 1199
 -   **t** – repository name (and optionally a tag) to be applied to
1200 1200
         the resulting image in case of success
1201
--   **remote** – A Git repository URI or HTTP/HTTPS URI build source. If the 
1202
-        URI specifies a filename, the file's contents are placed into a file 
1201
+-   **remote** – A Git repository URI or HTTP/HTTPS URI build source. If the
1202
+        URI specifies a filename, the file's contents are placed into a file
1203 1203
 		called `Dockerfile`.
1204 1204
 -   **q** – suppress verbose build output
1205 1205
 -   **nocache** – do not use the cache when building the image
... ...
@@ -1599,7 +1599,7 @@ Display system-wide information
1599 1599
             "SwapLimit": 0,
1600 1600
             "SystemTime": "2015-03-10T11:11:23.730591467-07:00"
1601 1601
         }
1602
-        
1602
+
1603 1603
 Status Codes:
1604 1604
 
1605 1605
 -   **200** – no error
... ...
@@ -1866,7 +1866,7 @@ the root that contains a list of repository and tag names mapped to layer IDs.
1866 1866
 
1867 1867
 ### Exec Create
1868 1868
 
1869
-`POST /containers/(id)/exec`
1869
+`POST /containers/(id or name)/exec`
1870 1870
 
1871 1871
 Sets up an exec instance in a running container `id`
1872 1872
 
... ...
@@ -2118,7 +2118,7 @@ This might change in the future.
2118 2118
 
2119 2119
 ## 3.3 CORS Requests
2120 2120
 
2121
-To set cross origin requests to the remote api please give values to 
2121
+To set cross origin requests to the remote api please give values to
2122 2122
 "--api-cors-header" when running docker in daemon mode. Set * will allow all,
2123 2123
 default or blank means CORS disabled
2124 2124
 
... ...
@@ -220,7 +220,7 @@ Json Parameters:
220 220
       (ie. the relative weight vs other containers).
221 221
 -   **CpuPeriod** - The length of a CPU period in microseconds.
222 222
 -   **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period.
223
--   **Cpuset** - Deprecated please don't use. Use `CpusetCpus` instead. 
223
+-   **Cpuset** - Deprecated please don't use. Use `CpusetCpus` instead.
224 224
 -   **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use.
225 225
 -   **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
226 226
 -   **BlkioWeight** - Block IO weight (relative weight) accepts a weight value between 10 and 1000.
... ...
@@ -310,7 +310,7 @@ Status Codes:
310 310
 
311 311
 ### Inspect a container
312 312
 
313
-`GET /containers/(id)/json`
313
+`GET /containers/(id or name)/json`
314 314
 
315 315
 Return low-level information on the container `id`
316 316
 
... ...
@@ -447,7 +447,7 @@ Status Codes:
447 447
 
448 448
 ### List processes running inside a container
449 449
 
450
-`GET /containers/(id)/top`
450
+`GET /containers/(id or name)/top`
451 451
 
452 452
 List processes running inside the container `id`. On Unix systems this
453 453
 is done by running the `ps` command. This endpoint is not
... ...
@@ -511,7 +511,7 @@ Status Codes:
511 511
 
512 512
 ### Get container logs
513 513
 
514
-`GET /containers/(id)/logs`
514
+`GET /containers/(id or name)/logs`
515 515
 
516 516
 Get `stdout` and `stderr` logs from the container ``id``
517 517
 
... ...
@@ -551,7 +551,7 @@ Status Codes:
551 551
 
552 552
 ### Inspect changes on a container's filesystem
553 553
 
554
-`GET /containers/(id)/changes`
554
+`GET /containers/(id or name)/changes`
555 555
 
556 556
 Inspect changes on container `id`'s filesystem
557 557
 
... ...
@@ -593,7 +593,7 @@ Status Codes:
593 593
 
594 594
 ### Export a container
595 595
 
596
-`GET /containers/(id)/export`
596
+`GET /containers/(id or name)/export`
597 597
 
598 598
 Export the contents of container `id`
599 599
 
... ...
@@ -616,7 +616,7 @@ Status Codes:
616 616
 
617 617
 ### Get container stats based on resource usage
618 618
 
619
-`GET /containers/(id)/stats`
619
+`GET /containers/(id or name)/stats`
620 620
 
621 621
 This endpoint returns a live stream of a container's resource usage statistics.
622 622
 
... ...
@@ -708,7 +708,7 @@ Status Codes:
708 708
 
709 709
 ### Resize a container TTY
710 710
 
711
-`POST /containers/(id)/resize?h=<height>&w=<width>`
711
+`POST /containers/(id or name)/resize?h=<height>&w=<width>`
712 712
 
713 713
 Resize the TTY for container with  `id`. You must restart the container for the resize to take effect.
714 714
 
... ...
@@ -730,7 +730,7 @@ Status Codes:
730 730
 
731 731
 ### Start a container
732 732
 
733
-`POST /containers/(id)/start`
733
+`POST /containers/(id or name)/start`
734 734
 
735 735
 Start the container `id`
736 736
 
... ...
@@ -740,7 +740,7 @@ Start the container `id`
740 740
 
741 741
 **Example request**:
742 742
 
743
-     POST /containers/(id)/start HTTP/1.1
743
+     POST /containers/(id or name)/start HTTP/1.1
744 744
 
745 745
 **Example response**:
746 746
 
... ...
@@ -755,7 +755,7 @@ Status Codes:
755 755
 
756 756
 ### Stop a container
757 757
 
758
-`POST /containers/(id)/stop`
758
+`POST /containers/(id or name)/stop`
759 759
 
760 760
 Stop the container `id`
761 761
 
... ...
@@ -780,7 +780,7 @@ Status Codes:
780 780
 
781 781
 ### Restart a container
782 782
 
783
-`POST /containers/(id)/restart`
783
+`POST /containers/(id or name)/restart`
784 784
 
785 785
 Restart the container `id`
786 786
 
... ...
@@ -804,7 +804,7 @@ Status Codes:
804 804
 
805 805
 ### Kill a container
806 806
 
807
-`POST /containers/(id)/kill`
807
+`POST /containers/(id or name)/kill`
808 808
 
809 809
 Kill the container `id`
810 810
 
... ...
@@ -829,7 +829,7 @@ Status Codes:
829 829
 
830 830
 ### Rename a container
831 831
 
832
-`POST /containers/(id)/rename`
832
+`POST /containers/(id or name)/rename`
833 833
 
834 834
 Rename the container `id` to a `new_name`
835 835
 
... ...
@@ -854,7 +854,7 @@ Status Codes:
854 854
 
855 855
 ### Pause a container
856 856
 
857
-`POST /containers/(id)/pause`
857
+`POST /containers/(id or name)/pause`
858 858
 
859 859
 Pause the container `id`
860 860
 
... ...
@@ -874,7 +874,7 @@ Status Codes:
874 874
 
875 875
 ### Unpause a container
876 876
 
877
-`POST /containers/(id)/unpause`
877
+`POST /containers/(id or name)/unpause`
878 878
 
879 879
 Unpause the container `id`
880 880
 
... ...
@@ -894,7 +894,7 @@ Status Codes:
894 894
 
895 895
 ### Attach to a container
896 896
 
897
-`POST /containers/(id)/attach`
897
+`POST /containers/(id or name)/attach`
898 898
 
899 899
 Attach to the container `id`
900 900
 
... ...
@@ -977,7 +977,7 @@ Status Codes:
977 977
 
978 978
 ### Attach to a container (websocket)
979 979
 
980
-`GET /containers/(id)/attach/ws`
980
+`GET /containers/(id or name)/attach/ws`
981 981
 
982 982
 Attach to the container `id` via websocket
983 983
 
... ...
@@ -1012,7 +1012,7 @@ Status Codes:
1012 1012
 
1013 1013
 ### Wait a container
1014 1014
 
1015
-`POST /containers/(id)/wait`
1015
+`POST /containers/(id or name)/wait`
1016 1016
 
1017 1017
 Block until container `id` stops, then returns the exit code
1018 1018
 
... ...
@@ -1035,7 +1035,7 @@ Status Codes:
1035 1035
 
1036 1036
 ### Remove a container
1037 1037
 
1038
-`DELETE /containers/(id)`
1038
+`DELETE /containers/(id or name)`
1039 1039
 
1040 1040
 Remove the container `id` from the filesystem
1041 1041
 
... ...
@@ -1063,7 +1063,7 @@ Status Codes:
1063 1063
 
1064 1064
 ### Copy files or folders from a container
1065 1065
 
1066
-`POST /containers/(id)/copy`
1066
+`POST /containers/(id or name)/copy`
1067 1067
 
1068 1068
 Copy files or folders of container `id`
1069 1069
 
... ...
@@ -1365,37 +1365,37 @@ Return the history of the image `name`
1365 1365
     HTTP/1.1 200 OK
1366 1366
     Content-Type: application/json
1367 1367
 
1368
-    [    
1369
-        {    
1368
+    [
1369
+        {
1370 1370
             "Id": "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710",
1371 1371
             "Created": 1398108230,
1372 1372
             "CreatedBy": "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /",
1373 1373
             "Tags": [
1374 1374
                 "ubuntu:lucid",
1375 1375
                 "ubuntu:10.04"
1376
-            ],   
1376
+            ],
1377 1377
             "Size": 182964289,
1378 1378
             "Comment": ""
1379
-        },   
1380
-        {    
1379
+        },
1380
+        {
1381 1381
             "Id": "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8",
1382 1382
             "Created": 1398108222,
1383 1383
             "CreatedBy": "/bin/sh -c #(nop) MAINTAINER Tianon Gravi <admwiggin@gmail.com> - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http://archive.ubuntu.com/ubuntu/",
1384 1384
             "Tags": null,
1385 1385
             "Size": 0,
1386 1386
             "Comment": ""
1387
-        },   
1388
-        {    
1387
+        },
1388
+        {
1389 1389
             "Id": "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158",
1390 1390
             "Created": 1371157430,
1391 1391
             "CreatedBy": "",
1392 1392
             "Tags": [
1393 1393
                 "scratch12:latest",
1394 1394
                 "scratch:latest"
1395
-            ],   
1395
+            ],
1396 1396
             "Size": 0,
1397 1397
             "Comment": "Imported from -"
1398
-        }    
1398
+        }
1399 1399
     ]
1400 1400
 
1401 1401
 Status Codes:
... ...
@@ -1932,7 +1932,7 @@ the root that contains a list of repository and tag names mapped to layer IDs.
1932 1932
 
1933 1933
 ### Exec Create
1934 1934
 
1935
-`POST /containers/(id)/exec`
1935
+`POST /containers/(id or name)/exec`
1936 1936
 
1937 1937
 Sets up an exec instance in a running container `id`
1938 1938
 
... ...
@@ -2182,7 +2182,7 @@ from **200 OK** to **101 UPGRADED** and resends the same headers.
2182 2182
 
2183 2183
 ## 3.3 CORS Requests
2184 2184
 
2185
-To set cross origin requests to the remote api please give values to 
2185
+To set cross origin requests to the remote api please give values to
2186 2186
 `--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all,
2187 2187
 default or blank means CORS disabled
2188 2188