Skip to main content

Overview

The Enterprise Sync API provides TAK-compatible endpoints for uploading, downloading, and managing data packages (files) across TAK clients. This API handles mission packages, attachments, and other synchronized content.

Upload Endpoints

Upload File (Standard)

POST /Marti/sync/upload
filename
string
required
Name of the file being uploaded (can also use “name” parameter)
creatorUid
string
required
UID of the creator/uploader
hash
string
Optional hash for the content
tool
string
default:"public"
Privacy setting: “public” or “private”
Content-Type
string
required
MIME type of the uploaded file
assetfile
file
File data (multipart form data) or raw request body
Uploads a file to Enterprise Sync storage. Accepts either multipart form data or raw binary in request body.
{
  "UID": "unique-id",
  "SubmissionDateTime": "2026-03-04T12:34:56.789Z",
  "MIMEType": "application/zip",
  "SubmissionUser": "user-uid",
  "PrimaryKey": 123,
  "Hash": "sha256-hash"
}

Upload File (Content)

PUT /Marti/sync/content
POST /Marti/sync/content
hash
string
required
Hash identifier for the content
filename
string
required
Name of the file
creatorUid
string
required
UID of the creator
tool
string
default:"public"
Privacy setting
assetfile
file
required
File data as multipart form data
Alternative upload endpoint that stores content with specified hash.

Upload Mission Package

PUT /Marti/sync/missionupload
POST /Marti/sync/missionupload
hash
string
required
Hash for the mission package
filename
string
required
Filename for the package
creatorUid
string
required
Creator UID
tool
string
default:"public"
Privacy setting
assetfile
file
required
Mission package file
Uploads a mission package and returns the metadata URL.
http://server-ip:8080/Marti/api/sync/metadata/{hash}/tool
HTTPS variant returns https:// URL instead of http://

Download Endpoints

Download Content

GET /Marti/sync/content
hash
string
Hash of the content to download
uid
string
UID of the content to download
Downloads file content by hash or UID. At least one parameter is required.
objectdata
binary
Binary file data with appropriate Content-Type header

Check Content Exists

HEAD /Marti/sync/content
hash
string
required
Hash of the content to check
Checks if content exists without downloading it. Returns HTTP 200 if exists, 404 if not found.

Query Mission Package

GET /Marti/sync/missionquery
hash
string
required
Hash of the mission package
Downloads a mission package with proper MIME type and filename as attachment.

Search Endpoints

Search Data Packages

GET /Marti/sync/search
keyword
string
default:"missionpackage"
Keyword to search for
tool
string
default:"public"
Filter by privacy setting
Searches for data packages matching the keyword. Only returns public packages (private=0).
{
  "resultCount": 2,
  "results": [
    {
      "UID": "123",
      "Name": "package.zip",
      "Hash": "abc123",
      "PrimaryKey": "456",
      "SubmissionDateTime": "2026-03-04T12:34:56.789000Z",
      "SubmissionUser": "user-uid",
      "CreatorUid": "creator-uid",
      "Keywords": ["missionpackage", "package.zip", "user-uid"],
      "MIMEType": "application/zip",
      "Size": 12345
    }
  ]
}

Metadata Management

Update Package Privacy

PUT /Marti/api/sync/metadata/{hash}/tool
hash
string
required
Hash of the package
privacy
string
required
Either “private” (sets private=1) or anything else (sets private=0)
Updates the privacy setting of a data package.
Okay

Download Package by Hash

GET /Marti/api/sync/metadata/{hash}/tool
hash
string
required
Hash of the package to download
Downloads a data package by its hash with proper MIME type and download filename.
file
binary
File data sent as attachment with original filename
This endpoint supports CORS with wildcard (@cross_origin(send_wildcard=True))

Data Storage

Enterprise Sync stores the following metadata for each uploaded file:
  • UID: Unique identifier
  • Hash: SHA-256 hash of the content
  • PrimaryKey: Database primary key
  • SubmissionDateTime: Upload timestamp
  • SubmissionUser: Submitter UID
  • CreatorUid: Creator UID
  • Keywords: Searchable keywords (includes filename, creator UID, and type)
  • MIMEType: Content type
  • Size: File size in bytes
  • Tool: Privacy setting (“public” or “private”)
  • Private: Boolean flag (0=public, 1=private)

HTTP vs HTTPS Differences

Both HTTP and HTTPS services implement identical Enterprise Sync endpoints with these differences:
  • Controller: HTTP uses HTTPTakApiCommunicationController, HTTPS uses HTTPSTakApiCommunicationController
  • Upload Response: Mission upload returns http:// URLs for HTTP, https:// for HTTPS
  • Download Methods: HTTP returns tuple (data, status), HTTPS may return data directly

Integration with Missions

Enterprise Sync integrates with the Mission API:
  1. Files uploaded via Enterprise Sync receive a hash
  2. The hash can be added to mission contents via /Marti/api/missions/{mission_id}/contents
  3. Mission package uploads automatically add content to missions
  4. Mission subscribers can download content using the sync endpoints

Example Workflow

Upload and Add to Mission

# 1. Upload file
curl -X POST "http://server:8080/Marti/sync/upload?filename=map.zip&creatorUid=user-123" \
  -H "Content-Type: application/zip" \
  --data-binary @map.zip

# Response: {"Hash": "abc123", ...}

# 2. Add to mission
curl -X PUT "http://server:8080/Marti/api/missions/op-alpha/contents" \
  -H "Content-Type: application/json" \
  -d '{"hashes": ["abc123"], "uids": []}'

Search and Download

# 1. Search for packages
curl "http://server:8080/Marti/sync/search?keyword=map"

# 2. Download by hash
curl "http://server:8080/Marti/sync/content?hash=abc123" -o downloaded.zip

Error Responses

  • 404 Not Found: Content does not exist
  • 500 Internal Server Error: Processing error during upload/download

Source Code References

  • HTTP Blueprint: FreeTAKServer/services/http_tak_api_service/blueprints/enterprise_sync_blueprint.py:1-144
  • HTTPS Blueprint: FreeTAKServer/services/https_tak_api_service/blueprints/enterprise_sync_blueprint.py:1-148
  • Core Facade: FreeTAKServer/core/enterprise_sync/enterprise_sync_facade.py:1-103

Build docs developers (and LLMs) love