File Lookup

Endpoints:

GET /files/{file_id}

Token: user

Scope: files

Retrieve a file object. If link_expires_at is passed, this will update the link and any embedded references to it.

URL Parameters

Name Description
file_id ID of the requested file
Example
curl "https://api.pnut.io/v0/files/69" \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -H "X-Pretty-Json: 1"

Returns the requested file details

"call for example 1"

GET /files

Token: user

Scope: files

Retrieve a list of specified file objects. Only returns the first 200 found.

If the file need a file_token_read to access, you may include them with query parameters in the pattern ?file_token_read_{file_id}=xxx&file_token_read_{file_id}=xxx.

Query String Parameters

Name Description
ids Comma-separated list of file IDs
Example
curl "https://api.pnut.io/v0/files?ids=69,71" \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -H "X-Pretty-Json: 1"

Returns a list of files

"call for example 2"

GET /users/me/files

Token: user

Scope: files

Retrieve a list of files created by the authenticated user.

Example
curl "https://api.pnut.io/v0/users/me/files" \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -H "X-Pretty-Json: 1"

Returns a list of files

"call for example 3"