import_activity
Imports a .fit, .gpx or .tcx file as an activity. A duplicate raises GarminConnectionError. Multipart upload to /upload-service/upload/{ext} (extension from filename, must be fit/gpx/tcx) with the load-bearing NK/origin/custom User-Agent headers that make Garmin treat it as an import rather than a device sync; a 409 is re-raised as GarminConnectionError ("Activity already exists (duplicate):...").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The file's contents: plain text for .gpx/.tcx, base64 for .fit | |
| encoding | No | How content is encoded. Default utf8; use base64 for .fit | |
| filename | Yes | File name ending in .fit, .gpx or .tcx, e.g. morning-run.gpx |