github.com/dkerwin/nomad@v0.3.3-0.20160525181927-74554135514b/website/source/docs/http/client-fs-ls.html.md (about) 1 --- 2 layout: "http" 3 page_title: "HTTP API: /v1/client/fs/ls" 4 sidebar_current: "docs-http-client-fs-ls" 5 description: |- 6 The '/1/client/fs/ls` endpoint is used to list files in an allocation 7 directory. 8 --- 9 10 # /v1/client/fs/ls 11 12 The `/fs/ls` endpoint is used to list files in an allocation directory. This API 13 endpoint is hosted by the Nomad client and requests have to be made to the Nomad 14 client where the particular allocation was placed. 15 16 ## GET 17 18 <dl> 19 <dt>Description</dt> 20 <dd> 21 List files in an allocation directory. 22 </dd> 23 24 <dt>Method</dt> 25 <dd>GET</dd> 26 27 <dt>URL</dt> 28 <dd>`/v1/client/fs/ls/<ALLOCATION-ID>`</dd> 29 30 <dt>Parameters</dt> 31 <dd> 32 <ul> 33 <li> 34 <span class="param">path</span> 35 <span class="param-flags">required</span> 36 The path relative to the root of the allocation directory. It 37 defaults to `/`, the root of the allocation directory. 38 </li> 39 </ul> 40 </dd> 41 42 <dt>Returns</dt> 43 <dd> 44 45 ```javascript 46 [ 47 { 48 "Name": "alloc", 49 "IsDir": true, 50 "Size": 4096, 51 "FileMode": "drwxrwxr-x", 52 "ModTime": "2016-03-15T15:40:00.414236712-07:00" 53 }, 54 { 55 "Name": "redis", 56 "IsDir": true, 57 "Size": 4096, 58 "FileMode": "drwxrwxr-x", 59 "ModTime": "2016-03-15T15:40:56.810238153-07:00" 60 } 61 ] 62 ``` 63 64 </dd> 65 66 </dl>