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
Name of the data package file
UID of the user creating the data package
Request Body
The data package file to upload (typically a .zip file)
Response
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
Array of data package metadata objects
Unique identifier for the data package
UID of the user who uploaded the package
ISO 8601 timestamp of upload
Privacy level (0 = public, 1 = private)
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 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
Array of data package update objects
Identifier of the package to update
New filename for the package
Privacy level (0 = public, 1 = private)
Response
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
Array of data packages to delete
SHA-256 hash of the package to delete
Response
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]"
}