Get a Files item
GET
/api/v1/files/stat
const url = 'https://example.com/api/v1/files/stat?path=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/v1/files/stat?path=example' \ --header 'Authorization: Bearer <token>'Requires a signed-in User with the data scope and access to the requested path. It returns 404 when the Item is missing or not shared with the User. Route: /api/v1/files/stat. Inputs: path, inline. Safe reads can use bounded retries.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”path
required
string
inline
boolean
Responses
Section titled “Responses”Media typeapplication/json
object
canvas_note_id
Indexed Canvas identity, including plain JSON without frontmatter (#991). Set only after this listing’s current Files grant has passed.
string | null
changed_by
Named guest who created this previous Version through a public Edit link, when there is one.
string | null
content_hash
string | null
created
Inode creation time, when the Home filesystem reports statx birth time.
string | null
has_thumbnail
required
boolean
item_id
string | null
kind
required
string
mime
string | null
modified
required
string
name
required
string
original_path
Trash listings only: the Home-relative path the item is restored to.
string | null
share_badges
required
Array<string>
size
required
integer format: int64
Examplegenerated
{ "canvas_note_id": "example", "changed_by": "example", "content_hash": "example", "created": "example", "has_thumbnail": true, "item_id": "example", "kind": "example", "mime": "example", "modified": "example", "name": "example", "original_path": "example", "share_badges": [ "example" ], "size": 1}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}