Files
Versioned file storage for project resources
Files
Store, version, and manage files within your project. Files support versioning — each update creates a new version while preserving the previous content.
List Files
GET /v1/filesReturns all non-deleted files for the current project.
curl https://api.fugoku.com/v1/files \
-H "X-Fugoku-API-Key: $FUGOKU_API_TOKEN"Response:
{
"data": [
{
"id": "file-abc123",
"path": "/configs/app.yaml",
"name": "app.yaml",
"size": 2048,
"mimeType": "text/yaml",
"status": "synced",
"currentVersion": 3,
"createdAt": "2026-08-01T00:00:00.000Z",
"updatedAt": "2026-08-15T00:00:00.000Z"
}
]
}Get File
GET /v1/files/:idcurl https://api.fugoku.com/v1/files/file-abc123 \
-H "X-Fugoku-API-Key: $FUGOKU_API_TOKEN"List File Versions
GET /v1/files/:id/versionsReturns all versions of a file, ordered by version number.
curl https://api.fugoku.com/v1/files/file-abc123/versions \
-H "X-Fugoku-API-Key: $FUGOKU_API_TOKEN"Response:
{
"data": [
{
"id": "fv-abc123",
"version": 1,
"content": "original content",
"checksum": "sha256:...",
"createdAt": "2026-08-01T00:00:00.000Z"
},
{
"id": "fv-def456",
"version": 2,
"content": "updated content",
"checksum": "sha256:...",
"createdAt": "2026-08-10T00:00:00.000Z"
}
]
}Create File
POST /v1/filesRequest Body:
| Field | Type | Required | Description |
|---|---|---|---|
path | string | Yes | File path (e.g. /configs/app.yaml) |
name | string | Yes | File name |
mimeType | string | No | MIME type |
content | any | No | Initial file content (string or JSON) |
curl -X POST https://api.fugoku.com/v1/files \
-H "X-Fugoku-API-Key: $FUGOKU_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"path": "/configs/app.yaml",
"name": "app.yaml",
"mimeType": "text/yaml",
"content": "key: value"
}'Update File
PUT /v1/files/:idCreates a new version of the file with updated content. The previous version is preserved.
Request Body:
| Field | Type | Description |
|---|---|---|
content | any | New file content (string or JSON) |
curl -X PUT https://api.fugoku.com/v1/files/file-abc123 \
-H "X-Fugoku-API-Key: $FUGOKU_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "content": "updated: content" }'Delete File
DELETE /v1/files/:idSoft-deletes the file (sets deletedAt). The file is no longer returned in list responses.
curl -X DELETE https://api.fugoku.com/v1/files/file-abc123 \
-H "X-Fugoku-API-Key: $FUGOKU_API_TOKEN"File Attributes
| Attribute | Type | Description |
|---|---|---|
path | string | File path |
name | string | File name |
size | integer | File size in bytes |
mimeType | string | MIME type |
status | string | File status (synced, pending, error) |
currentVersion | integer | Current version number (0 = no content yet) |