Skip to main content
The Data Package API provides endpoints for managing mission packages, including file uploads, downloads, metadata management, and sharing.

Upload Data Package

Upload a new data package to the server.
curl -X POST "http://localhost:19023/DataPackageTable?filename=package.zip&creatorUid=user-123" \
  -u "username:password" \
  -H "Content-Type: application/zip" \
  -F "assetfile=@/path/to/package.zip"

Authentication

This endpoint requires HTTP Basic Authentication.

Query Parameters

filename
string
required
Name of the data package file
creatorUid
string
required
UID of the user creating the data package

Request Body

assetfile
file
required
The data package file to upload (typically a .zip file)

Response

message
string
Success message
id
string
The ID of the uploaded data package

Response Example

{
  "message": "success",
  "id": "42"
}

Get Data Package Table

Retrieve metadata for all data packages.
curl -X GET "http://localhost:19023/DataPackageTable" \
  -u "username:password"

Authentication

This endpoint requires HTTP Basic Authentication.

Response

json_list
array
Array of data package metadata objects

Response Example

{
  "json_list": [
    {
      "PrimaryKey": "mission-package-123",
      "Name": "tactical-map.zip",
      "Hash": "a1b2c3d4e5f6...",
      "SubmissionUser": "user-uid-123",
      "SubmissionDateTime": "2024-03-04T12:00:00Z",
      "Size": 1024000,
      "Privacy": 0
    }
  ]
}

Update Data Package Metadata

Update metadata for one or more data packages.
curl -X PUT "http://localhost:19023/DataPackageTable" \
  -u "username:password" \
  -H "Content-Type: application/json" \
  -d '{
    "DataPackages": [
      {
        "PrimaryKey": "package.zip",
        "Name": "updated-name.zip",
        "Keywords": "mission, tactical, map",
        "Privacy": 1
      }
    ]
  }'

Authentication

This endpoint requires HTTP Basic Authentication.

Request Body

DataPackages
array
required
Array of data package update objects

Response

{
  "message": "success"
}

Delete Data Package

Delete one or more data packages from the server.
curl -X DELETE "http://localhost:19023/DataPackageTable" \
  -u "username:password" \
  -H "Content-Type: application/json" \
  -d '{
    "DataPackages": [
      {
        "hash": "a1b2c3d4e5f6..."
      }
    ]
  }'

Authentication

This endpoint requires HTTP Basic Authentication.

Request Body

DataPackages
array
required
Array of data packages to delete

Response

{
  "message": "success"
}

Data Package Storage

Data packages are stored in the Enterprise Sync system with:
  • Automatic keyword tagging with missionpackage
  • SHA-256 hash calculation for integrity
  • MIME type detection
  • Metadata persistence in the database

Error Responses

500 Internal Server Error
{
  "message": "An error occurred accessing datapackage details: [error details]"
}

Build docs developers (and LLMs) love