export_profile
Export a trading profile as a base64-encoded zip archive for backup or transfer. Returns the profile ID, original filename, and encoded content.
Instructions
Export a profile as a zip archive, base64-encoded.
Maps to GET /profiles_management/export?profile_id=<profile_id>
(spec [V]; profile_id confirmed as the exact query-param name against
source controllers/configuration.py, action "export" -- not id).
This route returns the zip's raw bytes directly (flask.send_file),
not JSON, so this tool bypasses octobot_mcp.client.request_json
(same reason as _fetch_profiles_selector_html) and base64-encodes the
raw response body instead.
filename is read from the response's Content-Disposition header
(confirmed live: attachment; filename=<profile name>_<YYYYMMDD-HHMMSS>.zip,
quoted only when the profile name isn't already a single HTTP token --
e.g. it contains a space -- per RFC 6266/2183; both forms confirmed
live, see octobot_mcp.tools._shared._parse_content_disposition_filename,
moved there in milestone 13 so octobot_mcp.tools.tentacles.export_logs
shares this same implementation) rather than reconstructed locally, so
it always matches exactly what OctoBot named the file. Raises
OctoBotMalformedResponseError if that header is missing or
unparseable -- never returns a fabricated filename.
Output: {"profile_id": str, "filename": str, "content_base64": str}.
Read-only, not confirm-gated (ADR-0003). An unknown profile_id raises
an uncaught NoProfileError inside OctoBot (HTTP 500, confirmed live
with the Content-Type: application/json request header this call
always sends for a readable error message).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile_id | Yes |