Browse code

Update doc docker_remote_api_v1.20.md

Update doc docker_remote_api_v1.20.md
Signed-off-by: longliqiang88 <394564827@qq.com>

longliqiang88 authored on 2016/02/20 20:32:20
Showing 1 changed files
... ...
@@ -318,7 +318,7 @@ Status Codes:
318 318
 
319 319
 ### Inspect a container
320 320
 
321
-`GET /containers/(id)/json`
321
+`GET /containers/(id or name)/json`
322 322
 
323 323
 Return low-level information on the container `id`
324 324
 
... ...
@@ -460,7 +460,7 @@ Status Codes:
460 460
 
461 461
 ### List processes running inside a container
462 462
 
463
-`GET /containers/(id)/top`
463
+`GET /containers/(id or name)/top`
464 464
 
465 465
 List processes running inside the container `id`. On Unix systems this
466 466
 is done by running the `ps` command. This endpoint is not
... ...
@@ -524,7 +524,7 @@ Status Codes:
524 524
 
525 525
 ### Get container logs
526 526
 
527
-`GET /containers/(id)/logs`
527
+`GET /containers/(id or name)/logs`
528 528
 
529 529
 Get `stdout` and `stderr` logs from the container ``id``
530 530
 
... ...
@@ -564,7 +564,7 @@ Status Codes:
564 564
 
565 565
 ### Inspect changes on a container's filesystem
566 566
 
567
-`GET /containers/(id)/changes`
567
+`GET /containers/(id or name)/changes`
568 568
 
569 569
 Inspect changes on container `id`'s filesystem
570 570
 
... ...
@@ -606,7 +606,7 @@ Status Codes:
606 606
 
607 607
 ### Export a container
608 608
 
609
-`GET /containers/(id)/export`
609
+`GET /containers/(id or name)/export`
610 610
 
611 611
 Export the contents of container `id`
612 612
 
... ...
@@ -629,7 +629,7 @@ Status Codes:
629 629
 
630 630
 ### Get container stats based on resource usage
631 631
 
632
-`GET /containers/(id)/stats`
632
+`GET /containers/(id or name)/stats`
633 633
 
634 634
 This endpoint returns a live stream of a container's resource usage statistics.
635 635
 
... ...
@@ -721,7 +721,7 @@ Status Codes:
721 721
 
722 722
 ### Resize a container TTY
723 723
 
724
-`POST /containers/(id)/resize?h=<height>&w=<width>`
724
+`POST /containers/(id or name)/resize?h=<height>&w=<width>`
725 725
 
726 726
 Resize the TTY for container with  `id`. You must restart the container for the resize to take effect.
727 727
 
... ...
@@ -743,7 +743,7 @@ Status Codes:
743 743
 
744 744
 ### Start a container
745 745
 
746
-`POST /containers/(id)/start`
746
+`POST /containers/(id or name)/start`
747 747
 
748 748
 Start the container `id`
749 749
 
... ...
@@ -753,7 +753,7 @@ Start the container `id`
753 753
 
754 754
 **Example request**:
755 755
 
756
-    POST /containers/(id)/start HTTP/1.1
756
+    POST /containers/(id or name)/start HTTP/1.1
757 757
 
758 758
 **Example response**:
759 759
 
... ...
@@ -768,7 +768,7 @@ Status Codes:
768 768
 
769 769
 ### Stop a container
770 770
 
771
-`POST /containers/(id)/stop`
771
+`POST /containers/(id or name)/stop`
772 772
 
773 773
 Stop the container `id`
774 774
 
... ...
@@ -793,7 +793,7 @@ Status Codes:
793 793
 
794 794
 ### Restart a container
795 795
 
796
-`POST /containers/(id)/restart`
796
+`POST /containers/(id or name)/restart`
797 797
 
798 798
 Restart the container `id`
799 799
 
... ...
@@ -817,7 +817,7 @@ Status Codes:
817 817
 
818 818
 ### Kill a container
819 819
 
820
-`POST /containers/(id)/kill`
820
+`POST /containers/(id or name)/kill`
821 821
 
822 822
 Kill the container `id`
823 823
 
... ...
@@ -842,7 +842,7 @@ Status Codes:
842 842
 
843 843
 ### Rename a container
844 844
 
845
-`POST /containers/(id)/rename`
845
+`POST /containers/(id or name)/rename`
846 846
 
847 847
 Rename the container `id` to a `new_name`
848 848
 
... ...
@@ -867,7 +867,7 @@ Status Codes:
867 867
 
868 868
 ### Pause a container
869 869
 
870
-`POST /containers/(id)/pause`
870
+`POST /containers/(id or name)/pause`
871 871
 
872 872
 Pause the container `id`
873 873
 
... ...
@@ -887,7 +887,7 @@ Status Codes:
887 887
 
888 888
 ### Unpause a container
889 889
 
890
-`POST /containers/(id)/unpause`
890
+`POST /containers/(id or name)/unpause`
891 891
 
892 892
 Unpause the container `id`
893 893
 
... ...
@@ -907,7 +907,7 @@ Status Codes:
907 907
 
908 908
 ### Attach to a container
909 909
 
910
-`POST /containers/(id)/attach`
910
+`POST /containers/(id or name)/attach`
911 911
 
912 912
 Attach to the container `id`
913 913
 
... ...
@@ -990,7 +990,7 @@ Status Codes:
990 990
 
991 991
 ### Attach to a container (websocket)
992 992
 
993
-`GET /containers/(id)/attach/ws`
993
+`GET /containers/(id or name)/attach/ws`
994 994
 
995 995
 Attach to the container `id` via websocket
996 996
 
... ...
@@ -1025,7 +1025,7 @@ Status Codes:
1025 1025
 
1026 1026
 ### Wait a container
1027 1027
 
1028
-`POST /containers/(id)/wait`
1028
+`POST /containers/(id or name)/wait`
1029 1029
 
1030 1030
 Block until container `id` stops, then returns the exit code
1031 1031
 
... ...
@@ -1048,7 +1048,7 @@ Status Codes:
1048 1048
 
1049 1049
 ### Remove a container
1050 1050
 
1051
-`DELETE /containers/(id)`
1051
+`DELETE /containers/(id or name)`
1052 1052
 
1053 1053
 Remove the container `id` from the filesystem
1054 1054
 
... ...
@@ -1076,7 +1076,7 @@ Status Codes:
1076 1076
 
1077 1077
 ### Copy files or folders from a container
1078 1078
 
1079
-`POST /containers/(id)/copy`
1079
+`POST /containers/(id or name)/copy`
1080 1080
 
1081 1081
 Copy files or folders of container `id`
1082 1082
 
... ...
@@ -1106,14 +1106,14 @@ Status Codes:
1106 1106
 
1107 1107
 ### Retrieving information about files and folders in a container
1108 1108
 
1109
-`HEAD /containers/(id)/archive`
1109
+`HEAD /containers/(id or name)/archive`
1110 1110
 
1111 1111
 See the description of the `X-Docker-Container-Path-Stat` header in the
1112 1112
 following section.
1113 1113
 
1114 1114
 ### Get an archive of a filesystem resource in a container
1115 1115
 
1116
-`GET /containers/(id)/archive`
1116
+`GET /containers/(id or name)/archive`
1117 1117
 
1118 1118
 Get an tar archive of a resource in the filesystem of container `id`.
1119 1119
 
... ...
@@ -1174,7 +1174,7 @@ Status Codes:
1174 1174
 
1175 1175
 ### Extract an archive of files or folders to a directory in a container
1176 1176
 
1177
-`PUT /containers/(id)/archive`
1177
+`PUT /containers/(id or name)/archive`
1178 1178
 
1179 1179
 Upload a tar archive to be extracted to a path in the filesystem of container
1180 1180
 `id`.
... ...
@@ -2078,7 +2078,7 @@ the root that contains a list of repository and tag names mapped to layer IDs.
2078 2078
 
2079 2079
 ### Exec Create
2080 2080
 
2081
-`POST /containers/(id)/exec`
2081
+`POST /containers/(id or name)/exec`
2082 2082
 
2083 2083
 Sets up an exec instance in a running container `id`
2084 2084