Everstack
API ReferenceSandboxGet File Info

Get File Info

GET/v1/sandbox/{sandbox_id}/files/info
GET/v1/sandbox/{'{sandbox_id}'}/files/info

Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.

Description

Returns metadata for one or more files or directories within a sandbox. Multiple path query parameters can be provided to retrieve information for several files in a single request.

Path Parameters

ParameterTypeRequiredDescription
sandbox_idstringYesSandbox ID or name

Query Parameters

ParameterTypeRequiredDescription
pathstringYesPath of the file or directory to inspect. Can be repeated for multiple paths

Responses

200 Success

PropertyTypeDescription
filesobject[]Array of file metadata objects
files[].pathstringAbsolute path of the file
files[].sizeintegerFile size in bytes
files[].is_dirbooleanWhether the path is a directory
files[].modified_atstringLast modification timestamp (ISO 8601)
files[].created_atstringCreation timestamp (ISO 8601)
files[].ownerstringOwning user name
files[].groupstringOwning group name
files[].modeintegerUnix file permission bits (e.g., 644)

default An unexpected error response.

PropertyTypeDescription
codeinteger
messagestring
detailsobject[]

Request

curl -X GET "https://your-instance.example.com/v1/sandbox/sb_abc123/files/info?path=/repo/main.go&path=/repo/README.md" \
  -H "Authorization: Bearer <token>"
const params = new URLSearchParams();
params.append("path", "/repo/main.go");
params.append("path", "/repo/README.md");

const response = await fetch(
  `https://your-instance.example.com/v1/sandbox/sb_abc123/files/info?${params}`,
  {
    method: "GET",
    headers: {
      Authorization: "Bearer <token>",
    },
  }
);

const data = await response.json();
console.log(data.files);
import requests

response = requests.get(
    "https://your-instance.example.com/v1/sandbox/sb_abc123/files/info",
    params=[("path", "/repo/main.go"), ("path", "/repo/README.md")],
    headers={"Authorization": "Bearer <token>"},
)

print(response.json())

Response

{
  "files": [
    {
      "path": "/repo/main.go",
      "size": 1234,
      "is_dir": false,
      "modified_at": "2025-01-01T00:00:00Z",
      "created_at": "2025-01-01T00:00:00Z",
      "owner": "root",
      "group": "root",
      "mode": 644
    }
  ]
}
{"code": 0, "message": "string", "details": [{"@type": "string"}]}