HelipodDocs

Secret files

Mount files such as certificates, key files and config files into a service.

A secret file is a file you upload once and Helipod mounts into the service at a path you choose, for example a service account JSON at /app/credentials.json. Use it for things that don't fit in a variable. Changes take effect on the next deploy.

Contents are write-only

The API lists a file's name and mount path, never its contents. You can replace a file, but you can't download it back.

The file object

{ "id": "4e5f6a7b-8c9d-4e0f-a1b2-c3d4e5f6a7b8", "name": "Firebase credentials", "mountPath": "/app/credentials.json", "fileName": "credentials.json" }

Prop

Type

List

GET/containers/services/{serviceId}/files

Upload

POST/containers/services/{serviceId}/files
Uploads a file and mounts it at mountPath. Returns 201.

Prop

Type

curl -X POST https://api.helipod.io/api/containers/services/$SERVICE/files \
  -H "Authorization: Bearer hel_your_key" -H "Content-Type: application/json" \
  -d "{
    \"name\": \"Firebase credentials\",
    \"fileName\": \"credentials.json\",
    \"mountPath\": \"/app/credentials.json\",
    \"contentBase64\": \"$(base64 < credentials.json | tr -d '\n')\"
  }"

The response is { "file": { ... }, "needsRedeploy": true }.

Files are checked before they are stored:

  • Up to 10 MB, and not empty (400 INVALID_FILE when the base64 is invalid, the file is empty or too large).
  • No programs or scripts: executables and files such as .sh, .py, .js or .exe are refused (400 REQUEST_ERROR, error says why).
  • At most 10 uploads a minute.

Replace or move

PUT/containers/services/{serviceId}/files/{fileId}
Replace the contents, change the mount path or the label.

Takes the same fields as upload, all optional: contentBase64 (with an optional new fileName), mountPath and name. Send at least one (400 NOTHING_TO_UPDATE otherwise). The response is { "file": { ... }, "needsRedeploy": true }.

Delete

DELETE/containers/services/{serviceId}/files/{fileId}
Removes the file from the next deploy on.

Returns { "id": "...", "deleted": true, "needsRedeploy": true }, or 404 FILE_NOT_FOUND.

On this page