Browse code

Update docker_remote_api_v1.21.md to complete the docs

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

tracylihui authored on 2016/02/20 20:17:19
Showing 1 changed files
... ...
@@ -336,7 +336,7 @@ Status Codes:
336 336
 
337 337
 ### Inspect a container
338 338
 
339
-`GET /containers/(id)/json`
339
+`GET /containers/(id or name)/json`
340 340
 
341 341
 Return low-level information on the container `id`
342 342
 
... ...
@@ -526,7 +526,7 @@ Status Codes:
526 526
 
527 527
 ### List processes running inside a container
528 528
 
529
-`GET /containers/(id)/top`
529
+`GET /containers/(id or name)/top`
530 530
 
531 531
 List processes running inside the container `id`. On Unix systems this
532 532
 is done by running the `ps` command. This endpoint is not
... ...
@@ -590,7 +590,7 @@ Status Codes:
590 590
 
591 591
 ### Get container logs
592 592
 
593
-`GET /containers/(id)/logs`
593
+`GET /containers/(id or name)/logs`
594 594
 
595 595
 Get `stdout` and `stderr` logs from the container ``id``
596 596
 
... ...
@@ -630,7 +630,7 @@ Status Codes:
630 630
 
631 631
 ### Inspect changes on a container's filesystem
632 632
 
633
-`GET /containers/(id)/changes`
633
+`GET /containers/(id or name)/changes`
634 634
 
635 635
 Inspect changes on container `id`'s filesystem
636 636
 
... ...
@@ -672,7 +672,7 @@ Status Codes:
672 672
 
673 673
 ### Export a container
674 674
 
675
-`GET /containers/(id)/export`
675
+`GET /containers/(id or name)/export`
676 676
 
677 677
 Export the contents of container `id`
678 678
 
... ...
@@ -695,7 +695,7 @@ Status Codes:
695 695
 
696 696
 ### Get container stats based on resource usage
697 697
 
698
-`GET /containers/(id)/stats`
698
+`GET /containers/(id or name)/stats`
699 699
 
700 700
 This endpoint returns a live stream of a container's resource usage statistics.
701 701
 
... ...
@@ -799,7 +799,7 @@ Status Codes:
799 799
 
800 800
 ### Resize a container TTY
801 801
 
802
-`POST /containers/(id)/resize`
802
+`POST /containers/(id or name)/resize`
803 803
 
804 804
 Resize the TTY for container with  `id`. The unit is number of characters. You must restart the container for the resize to take effect.
805 805
 
... ...
@@ -826,7 +826,7 @@ Status Codes:
826 826
 
827 827
 ### Start a container
828 828
 
829
-`POST /containers/(id)/start`
829
+`POST /containers/(id or name)/start`
830 830
 
831 831
 Start the container `id`
832 832
 
... ...
@@ -836,7 +836,7 @@ Start the container `id`
836 836
 
837 837
 **Example request**:
838 838
 
839
-    POST /containers/(id)/start HTTP/1.1
839
+    POST /containers/(id or name)/start HTTP/1.1
840 840
 
841 841
 **Example response**:
842 842
 
... ...
@@ -851,7 +851,7 @@ Status Codes:
851 851
 
852 852
 ### Stop a container
853 853
 
854
-`POST /containers/(id)/stop`
854
+`POST /containers/(id or name)/stop`
855 855
 
856 856
 Stop the container `id`
857 857
 
... ...
@@ -876,7 +876,7 @@ Status Codes:
876 876
 
877 877
 ### Restart a container
878 878
 
879
-`POST /containers/(id)/restart`
879
+`POST /containers/(id or name)/restart`
880 880
 
881 881
 Restart the container `id`
882 882
 
... ...
@@ -900,7 +900,7 @@ Status Codes:
900 900
 
901 901
 ### Kill a container
902 902
 
903
-`POST /containers/(id)/kill`
903
+`POST /containers/(id or name)/kill`
904 904
 
905 905
 Kill the container `id`
906 906
 
... ...
@@ -925,7 +925,7 @@ Status Codes:
925 925
 
926 926
 ### Rename a container
927 927
 
928
-`POST /containers/(id)/rename`
928
+`POST /containers/(id or name)/rename`
929 929
 
930 930
 Rename the container `id` to a `new_name`
931 931
 
... ...
@@ -950,7 +950,7 @@ Status Codes:
950 950
 
951 951
 ### Pause a container
952 952
 
953
-`POST /containers/(id)/pause`
953
+`POST /containers/(id or name)/pause`
954 954
 
955 955
 Pause the container `id`
956 956
 
... ...
@@ -970,7 +970,7 @@ Status Codes:
970 970
 
971 971
 ### Unpause a container
972 972
 
973
-`POST /containers/(id)/unpause`
973
+`POST /containers/(id or name)/unpause`
974 974
 
975 975
 Unpause the container `id`
976 976
 
... ...
@@ -990,7 +990,7 @@ Status Codes:
990 990
 
991 991
 ### Attach to a container
992 992
 
993
-`POST /containers/(id)/attach`
993
+`POST /containers/(id or name)/attach`
994 994
 
995 995
 Attach to the container `id`
996 996
 
... ...
@@ -1073,7 +1073,7 @@ Status Codes:
1073 1073
 
1074 1074
 ### Attach to a container (websocket)
1075 1075
 
1076
-`GET /containers/(id)/attach/ws`
1076
+`GET /containers/(id or name)/attach/ws`
1077 1077
 
1078 1078
 Attach to the container `id` via websocket
1079 1079
 
... ...
@@ -1108,7 +1108,7 @@ Status Codes:
1108 1108
 
1109 1109
 ### Wait a container
1110 1110
 
1111
-`POST /containers/(id)/wait`
1111
+`POST /containers/(id or name)/wait`
1112 1112
 
1113 1113
 Block until container `id` stops, then returns the exit code
1114 1114
 
... ...
@@ -1131,7 +1131,7 @@ Status Codes:
1131 1131
 
1132 1132
 ### Remove a container
1133 1133
 
1134
-`DELETE /containers/(id)`
1134
+`DELETE /containers/(id or name)`
1135 1135
 
1136 1136
 Remove the container `id` from the filesystem
1137 1137
 
... ...
@@ -1159,7 +1159,7 @@ Status Codes:
1159 1159
 
1160 1160
 ### Copy files or folders from a container
1161 1161
 
1162
-`POST /containers/(id)/copy`
1162
+`POST /containers/(id or name)/copy`
1163 1163
 
1164 1164
 Copy files or folders of container `id`
1165 1165
 
... ...
@@ -1189,14 +1189,14 @@ Status Codes:
1189 1189
 
1190 1190
 ### Retrieving information about files and folders in a container
1191 1191
 
1192
-`HEAD /containers/(id)/archive`
1192
+`HEAD /containers/(id or name)/archive`
1193 1193
 
1194 1194
 See the description of the `X-Docker-Container-Path-Stat` header in the
1195 1195
 following section.
1196 1196
 
1197 1197
 ### Get an archive of a filesystem resource in a container
1198 1198
 
1199
-`GET /containers/(id)/archive`
1199
+`GET /containers/(id or name)/archive`
1200 1200
 
1201 1201
 Get an tar archive of a resource in the filesystem of container `id`.
1202 1202
 
... ...
@@ -1257,7 +1257,7 @@ Status Codes:
1257 1257
 
1258 1258
 ### Extract an archive of files or folders to a directory in a container
1259 1259
 
1260
-`PUT /containers/(id)/archive`
1260
+`PUT /containers/(id or name)/archive`
1261 1261
 
1262 1262
 Upload a tar archive to be extracted to a path in the filesystem of container
1263 1263
 `id`.
... ...
@@ -2232,7 +2232,7 @@ the root that contains a list of repository and tag names mapped to layer IDs.
2232 2232
 
2233 2233
 ### Exec Create
2234 2234
 
2235
-`POST /containers/(id)/exec`
2235
+`POST /containers/(id or name)/exec`
2236 2236
 
2237 2237
 Sets up an exec instance in a running container `id`
2238 2238