File Upload API
Programmatic file management via REST API.
Upload Files
POST /api/v1/deployments/:id/services/:name/files
curl -X POST \
-H "Authorization: Bearer TOKEN" \
-F "files=@index.html" \
-F "files=@style.css" \
https://test.kovanetwork.com/api/v1/deployments/ID/services/web/files
List Files
GET /api/v1/deployments/:id/services/:name/files
curl -H "Authorization: Bearer TOKEN" \
https://test.kovanetwork.com/api/v1/deployments/DEPLOYMENT_ID/services/web/files
Get File Content
GET /api/v1/deployments/:id/services/:name/files/:path
curl -H "Authorization: Bearer TOKEN" \
https://test.kovanetwork.com/api/v1/deployments/ID/services/web/files/index.html
Update File
PUT /api/v1/deployments/:id/services/:name/files/:path
curl -X PUT \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{"content": "<html><body>Updated!</body></html>"}' \
https://test.kovanetwork.com/api/v1/deployments/ID/services/web/files/index.html
Rename File
PATCH /api/v1/deployments/:id/services/:name/files/rename
curl -X PATCH \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{"oldPath": "old.html", "newPath": "new.html"}' \
https://test.kovanetwork.com/api/v1/deployments/ID/services/web/files/rename
Delete File
DELETE /api/v1/deployments/:id/services/:name/files/:path
curl -X DELETE \
-H "Authorization: Bearer TOKEN" \
https://test.kovanetwork.com/api/v1/deployments/ID/services/web/files/old-file.html
Important
After file operations, trigger restart to apply changes:
POST /api/v1/deployments/:id/restart
Or wait for auto-restart if using dashboard (5 seconds after last change).