Files
nomad/website/source/docs/http/client-fs-ls.html.md

1.3 KiB

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
http HTTP API: /v1/client/fs/ls docs-http-client-fs-ls The '/1/client/fs/ls` endpoint is used to list files in an allocation directory.

/v1/client/fs/ls

The /fs/ls endpoint is used to list files in an allocation directory. This API endpoint is hosted by the Nomad client and requests have to be made to the Nomad client where the particular allocation was placed.

GET

Description
List files in an allocation directory.
Method
GET
URL
`/v1/client/fs/ls/`
Parameters
  • path required The path relative to the root of the allocation directory. It defaults to `/`, the root of the allocation directory.
Returns
```javascript
[
  {
    "Name": "alloc",
    "IsDir": true,
    "Size": 4096,
    "FileMode": "drwxrwxr-x",
    "ModTime": "2016-03-15T15:40:00.414236712-07:00"
  },
  {
    "Name": "redis",
    "IsDir": true,
    "Size": 4096,
    "FileMode": "drwxrwxr-x",
    "ModTime": "2016-03-15T15:40:56.810238153-07:00"
  }
]
```