Skip to main content
Files

File スキーマ

Forward API リファレンス。

File object

Upload, get, and list endpoints return this structure.
フィールド説明
idstringfile_ プレフィックス付きの File ID
typestringAlways "file"
filenamestring保存されたファイル名
size_bytesintegerファイルサイズ(バイト)
mime_typestringMIME type supplied during upload or detected from the filename
downloadablebooleanWhether the File can be downloaded through the /content endpoint
scopeobject | nullScope when the File is attached to another resource, such as { "id": "sess_...", "type": "session" }; null when unattached
metadataobjectCustom metadata supplied during upload; defaults to {} when omitted. created_by is reserved by Forward and must not be supplied by callers
identity_idstring | nullOwning Forward identity; typically null when created with a PAT
icon_urlstring | nullIcon URL associated by Forward
binding_infoBinding infoBinding information, such as Template reference counts
created_atstringCreation time in RFC 3339 format
updated_atstringLast update time in RFC 3339 format

Supported upload file types

アップロードエンドポイントはテキストベースのファイルのみを受け付けます。
カテゴリ受け入れ可能な値
MIME タイプすべての text/* MIME タイプに加え、application/jsonapplication/xmlapplication/javascriptapplication/x-yamlapplication/x-toml
拡張子.txt, .md, .csv, .json, .xml, .yaml, .yml, .toml, .ini, .conf, .cfg, .env, .log, .html, .htm, .css, .scss, .less, .js, .jsx, .ts, .tsx, .vue, .svelte, .py, .go, .rs, .java, .kt, .scala, .c, .cpp, .cc, .h, .hpp, .rb, .php, .swift, .r, .lua, .pl, .sh, .bash, .zsh, .fish, .ps1, .sql, .graphql, .gql, .proto, .dockerfile, .makefile, .gitignore, .editorconfig, .eslintrc, .prettierrc, .tex, .rst, .adoc, .org, .svg
拡張子なしファイル名dockerfile, makefile, gemfile, rakefile, procfile, vagrantfile, justfile, brewfile

File download response object

The Download a File endpoint returns this structure, including a short-lived presigned URL.
フィールド説明
urlstring署名付きダウンロード URL
expires_atstringURL expiration time in RFC 3339 format
filenamestringSuggested download filename, used for browser Content-Disposition

Binding info

Reference summary included by Forward in File responses.
フィールド説明
agent_template_countintegerNumber of Templates currently bound to the File

List pagination fields

フィールド説明
dataarray of File objectsRecords on the current page
has_morebooleanWhether another page is available
next_pagestring | nullForward cursor for the next page (recommended). Equals the current page's last_id when has_more=true; otherwise null
first_idstring | nullID of the first record on the current page
last_idstring | nullID of the last record on the current page
The request cursor parameters page, after_id, and before_id are mutually exclusive; providing more than one returns 400. Use page where possible; it has the same semantics as after_id.