/profile/files
0.1.0Unchanged since publicationRegister a hand-edited file for profile exports
settingsallSet path to the absolute path of an existing regular file of up to 1 MB, such as /etc/php.d/99-custom.ini. For a symbolic link, register its target. Each path can be registered once. The optional note accepts up to 200 printable ASCII characters.
The API returns 400 for a missing or malformed path or an invalid note. Path components may contain word characters and the characters .+@%:-. The components . and .. are forbidden. The API also returns 400 for paths under UrbeStack's own directories or under /proc, /sys, /dev, or /run, for files UrbeStack manages such as its adapter files and the hosts file, and for paths whose names suggest they contain secrets. These restrictions apply to both the supplied path and its resolved path.
The API returns 201 with the new registration and its current disk metadata in file. Profile exports include the file's contents, mode, owner, and group. To restore the file, run urbestack-import --trust-files at the shell. The import result lists the restored file.
As a command
Run as root on the serverpathstring, up to 1024 charactersRequirednotestring, up to 200 charactersExample
See the API overview for how to set $API and $TOKEN.curl -sS -X POST "$API/profile/files" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"note": "added by hand",
"path": "public_html/index.php"
}'201 Created{
"file": {
"changed_at": "text",
"created_at": "2026-09-09T10:15:00Z",
"group": "text",
"id": 1,
"mode": "text",
"note": "added by hand",
"owner": "text",
"package": {
"name": "alice",
"version": "0.0.1"
},
"path": "public_html/index.php",
"present": true,
"size": 1
}
}Errors
9 errors, each a status and a sentence400<path> is a file the panel writes itself; what it holds travels with the profile already400<path> is inside <own>, which the panel manages itself400<path> looks like a secret and may not travel in a profile400A path is required400Invalid note400The path may not contain . or .. components400The path must be absolute and plain401Authentication required409<path> is already registeredurbestack.com/docs/api/post-profile-files/