Retrieve
Retrieve
get/v2/vals/{val_id}/files
Get metadata for files and directories in a val. If path is an empty string, returns files at the root directory.
Path Parameters
val_idstring
formatuuid
Query Parameters
limitnumber
Maximum items to return in each paginated response
minimum1
maximum100
offsetnumber
Number of items to skip in order to deliver paginated results
minimum0
pathstring
Path to a file or directory (e.g. 'dir/subdir/file.ts'). Pass in an empty string to represent the root directory.
recursiveboolean
Whether to recursively act on all files in the project
branch_idstring
optional
Id to query
formatuuid
versionnumber
optional
Specific branch version to query
minimum0
Returns
dataarray of object
linksselfstringnextstringprevstringPaginationLinks
Links to use for pagination
curl https://api.val.town/v2/vals/$VAL_ID/files \
-d '{}'200 Example
{
"data": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"links": {
"html": "https://example.com",
"module": "https://example.com",
"self": "https://example.com",
"endpoint": "https://example.com"
},
"name": "name",
"path": "path",
"type": "directory",
"updatedAt": "2019-12-27T18:11:19.117Z",
"version": 0
}
],
"links": {
"self": "https://example.com",
"next": "https://example.com",
"prev": "https://example.com"
}
}