SG SealGrid Athena Docs

Package Library

The package library is Athena's on-server content store for large installer files. Upload an MSI, EXE, ZIP, or script payload — up to 15 GB — once, and Athena keeps it with a verified SHA-256 fingerprint, optional version and tag metadata, and download statistics. Endpoints and agents pull the file back through a time-limited, signed, resumable download link. It is the simple way to host a binary inside your own network — no external repository, no file share to babysit — and works entirely offline.

Library vs. deployment packages

This page covers the package library (api/packages) — a flat store of individual files you upload and hand out by link. If instead you want to build a multi-step install job (payload files, an ordered set of steps, and a rollout targeted at agents, tags, or collections), see Software Deployment, which uses the separate deployment-package builder.

What the library stores#

Each item in the library is a single uploaded file plus a small metadata record. When you upload, Athena streams the file to disk while computing its SHA-256 hash in one pass, so the fingerprint is ready the moment the upload finishes. The record tracks:

FieldMeaning
idThe package's unique identifier (GUID), used in every other call.
fileNameThe original file name of the upload.
displayNameA friendly name (optional; defaults to the file name).
versionA version string you supply, e.g. 1.2.3 (optional).
descriptionFree-text notes about the package (optional).
tagsA list of tags for categorizing and searching (optional).
sizeBytesThe stored file size in bytes.
hash / hashAlgorithmThe SHA-256 fingerprint of the file and the algorithm name (SHA256).
contentTypeThe MIME type inferred from the file extension (installers, archives, scripts, certificates, and more are recognized).
uploadedAt / uploadedByWhen the file was uploaded and, for metadata uploads, which account uploaded it.
downloadCount / lastDownloadedAtHow many times the file has been served and when it was last served.
downloadUrlA freshly signed, time-limited link to fetch the file (see Download links).

Who can do what#

Access follows the standard roles. Uploading and deleting change what is stored, so they are Admin-only; browsing, verifying, and minting a download link are open to Operators as well.

ActionMinimum role
Upload a package (with or without metadata)Admin
Delete a packageAdmin
View storage statisticsAdmin
List / view packagesOperator or Admin
Verify integrityOperator or Admin
Generate a download linkOperator or Admin
Download the file (with a valid link)Signed link — no login required

Uploading a package#

Upload is a multipart/form-data POST with the file in a file field. The maximum size is 15 GB (Packages:MaxUploadSizeGB, default 15). Athena sanitizes the file name, stores the file under a fresh identifier, and returns the new record — including its hash and a ready-to-use download link.

Use api/packages/with-metadata instead of the bare api/packages when you want to attach a display name, version, description, or comma-separated tags at upload time.

# Simple upload
curl -k -X POST -H "Authorization: Bearer <token>" \
  -F "file=@AcmeApp-1.2.3.msi" \
  https://athena.example.com:8443/api/packages

# Upload with metadata and tags
curl -k -X POST -H "Authorization: Bearer <token>" \
  -F "file=@AcmeApp-1.2.3.msi" \
  -F "displayName=Acme App" \
  -F "version=1.2.3" \
  -F "description=Production release" \
  -F "tags=production,windows,msi" \
  https://athena.example.com:8443/api/packages/with-metadata
Uploads are atomic

The file is written to a temporary area and only moved into place once it is fully received, so an interrupted upload never leaves a half-written package for anyone to download. If an upload fails, its partial data is cleaned up automatically.

Download links (time-limited & resumable)#

Files are fetched through a signed link rather than a bearer token, so you can hand the link to any HTTP client — a download manager, a script on an endpoint, or an agent during a deployment — without sharing your credentials. A link looks like:

https://athena.example.com:8443/api/packages/<id>/download?token=<token>&expires=<unix-time>

The token is HMAC-signed and tied to the package ID and expiry, so it cannot be forged or repurposed for another package, and it stops working once expires passes. To mint a link explicitly, call generate-url with an expiry in minutes — the default is 60 and the maximum is 1440 (24 hours); values outside that range are clamped:

# Mint a link valid for 2 hours
curl -k -X POST -H "Authorization: Bearer <token>" \
  "https://athena.example.com:8443/api/packages/<id>/generate-url?expirationMinutes=120"

The download endpoint honours HTTP Range requests, so a client that loses its connection mid-transfer can resume from where it stopped instead of starting over — important for multi-gigabyte installers over a slow link. Each successful download bumps the package's downloadCount and lastDownloadedAt.

Verifying integrity#

Because every package carries the SHA-256 hash computed at upload time, you can ask Athena to re-read the stored file and confirm it still matches — a quick way to catch silent disk corruption or tampering before you deploy something. The verify call returns the expected hash and a boolean result:

curl -k -X POST -H "Authorization: Bearer <token>" \
  https://athena.example.com:8443/api/packages/<id>/verify

A client that downloads the file can independently compute its own SHA-256 and compare it to the package's hash to prove end-to-end that the bytes it received are exactly the bytes you uploaded.

Browsing, searching & statistics#

List all packages, or pass a search term to filter by file name, display name, or description. The list is returned newest-first. Fetch a single package by ID to get its full record plus a fresh download link. The storage stats endpoint summarizes the whole library — total number of packages, total bytes used (with a friendly size), total downloads, and the largest and most-downloaded files — handy for a capacity dashboard.

# List, or search
curl -k -H "Authorization: Bearer <token>" \
  "https://athena.example.com:8443/api/packages?search=acme"

# Library-wide storage stats (Admin)
curl -k -H "Authorization: Bearer <token>" \
  https://athena.example.com:8443/api/packages/stats
Deleting is permanent

Deleting a package removes the stored file and its metadata immediately and cannot be undone. Any download links already issued for it will stop working. Keep an eye on the Disk component on the health report so the package volume never fills up.

REST API#

All management calls use the JWT-authenticated REST API on port 8443; send the bearer token as Authorization: Bearer <token>. Only the download endpoint is different — it authenticates with the signed link instead.

EndpointRolePurpose
POST api/packagesAdminUpload a file (multipart file; up to 15 GB). Returns the new record and a download link.
POST api/packages/with-metadataAdminUpload with displayName, version, description, and tags.
GET api/packagesOperator/AdminList packages, optionally filtered by ?search=.
GET api/packages/{id}Operator/AdminGet one package's full record plus a fresh download link.
POST api/packages/{id}/verifyOperator/AdminRe-hash the stored file and report whether it still matches.
POST api/packages/{id}/generate-urlOperator/AdminMint a signed download link (?expirationMinutes=, default 60, max 1440).
GET api/packages/{id}/downloadSigned linkDownload the file (?token=&expires=); supports HTTP Range/resume.
GET api/packages/statsAdminLibrary-wide storage and download statistics.
DELETE api/packages/{id}AdminPermanently delete the package file and its metadata.

PowerShell#

The Athena PowerShell module wraps the library so you can script uploads, downloads, and audits. Sign in with Connect-Athena first. Send-, Save-, and Remove-AthenaPackage support -WhatIf/-Confirm.

CmdletWhat it does
Send-AthenaPackageUpload a file. Add -Name, -Version, -Description, or -Tags to attach metadata (Admin).
Get-AthenaPackageList packages (with -Name/-Search and paging) or fetch one by -Id.
Save-AthenaPackageDownload a package by -Id to a file or directory (-Path, -Force to overwrite).
Test-AthenaPackageVerify a package's integrity by -Id.
Remove-AthenaPackageDelete a package by -Id (Admin).
Get-AthenaPackageStatsReturn library-wide storage statistics.
# Connect, then upload with metadata
Connect-Athena -Server "athena.contoso.com"
Send-AthenaPackage -Path "C:\Installers\AcmeApp-1.2.3.msi" `
  -Name "Acme App" -Version "1.2.3" -Tags "production","windows"

# Find it, verify it, and pull it down
$pkg = Get-AthenaPackage -Search "acme" | Select-Object -First 1
Test-AthenaPackage -Id $pkg.Id
Save-AthenaPackage -Id $pkg.Id -Path "C:\Downloads"

Storage & configuration#

Packages are stored on the server under Packages:StoragePath (default ./packages). Point it at a persistent volume — in a container deployment, mount the package directory on durable storage so the library survives a restart. The relevant configuration keys are:

KeyDefaultPurpose
Packages:StoragePath./packagesDirectory where package files and metadata are stored.
Packages:MaxUploadSizeGB15Maximum size of a single uploaded package.
Packages:TokenSecretSecret used to sign download links. Set a strong, unique value in production.
Packages:BaseUrlhttps://localhost:8443Base URL used when building download links (falls back to Server:PublicUrl).
Change the token secret and set a public URL

Download links are only as trustworthy as Packages:TokenSecret — set a strong, unique value so links cannot be forged. Set Packages:BaseUrl (or Server:PublicUrl) to the address endpoints actually reach the server on, so the generated links point somewhere your clients can download from.