A newer release of this product is available.
ONTAP REST API Storage volumes volume.uuid files path endpoints
This API is used to retrieve a list of files and directories for a given directory of a volume.
Examples
Retrieving the list of files in a directory
# The API:
GET /api/storage/volumes/{volume.uuid}/files/{path}
# The call:
curl -X GET "https://<mgmt-ip>/api/storage/volumes/cb6b1b39-8d21-11e9-b926-05056aca658/files/d1%2Fd2%2Fd3" -H 'accept: application/hal+json'
# Response for file records:
{
"records": [
{
"path": "d1/d2/d3",
"name": ".",
"_links": {
"self": {
"href": "/api/storage/volumes/cb6b1b39-8d21-11e9-b926-005056aca658/files/d1%2Fd2%2Fd3%2F%2E"
}
}
},
{
"path": "d1/d2/d3",
"name": "..",
"_links": {
"self": {
"href": "/api/storage/volumes/cb6b1b39-8d21-11e9-b926-005056aca658/files/d1%2Fd2%2Fd3%2F%2E%2E"
}
}
},
{
"path": "d1/d2/d3",
"name": "f1"
},
{
"path": "d1/d2/d3",
"name": "d5",
"_links": {
"self": {
"href": "/api/storage/volumes/cb6b1b39-8d21-11e9-b926-005056aca658/files/d1%2Fd2%2Fd3%2Fd5"
}
}
}
],
"num_records": 4,
"_links": {
"self": {
"href": "/api/storage/volumes/cb6b1b39-8d21-11e9-b926-005056aca658/files/d1%2Fd2%2Fd3"
}
}
}