InstallHub
Export API
The Export API provides three REST endpoints: initiate an export, download the resulting bundle, and preview the dependency graph before committing to an export.
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /api/installhub/packages/export | Create a new package from specified artifacts |
POST | /api/installhub/packages/preview | Preview dependency graph without creating a bundle |
GET | /api/installhub/packages/{packageId}/download | Download the ZIP bundle for a package |
GET | /api/installhub/packages/{packageId} | Get package metadata and manifest |
POST /api/installhub/packages/export
POST/api/installhub/packages/export
Request Body
{
"tenantId": "tenant-7f3a9b12", // required
"packageName": "Employee Onboarding Suite", // required, 1-100 chars
"packageType": "workflow-package", // required, see enum below
"version": "2.1.0", // required, SemVer format
"description": "Complete onboarding workflow", // optional
"author": "HR Automation Team", // optional
"tags": ["hr", "onboarding"], // optional
"artifactIds": [ // required, at least 1
"proc-1001"
]
}
packageType Enum Values
| Value | Use For |
|---|---|
workflow-package | Primary artifact is a ProcessDefinition or ThreadDefinition |
form-package | Primary artifact is one or more AtlasForms |
app-package | Primary artifact is an App Studio AppDefinition |
agent-package | Primary artifact is an Octopus agent definition |
config-package | Rules, entity schemas, or configuration only |
Success Response (200 OK)
{
"packageId": "pkg-a3f9c821-4b2e-49d1-bc44-f7e2a1c09d33",
"packageName": "Employee Onboarding Suite",
"version": "2.1.0",
"checksum": "sha256:3a9f1c4e8d2b7f6a1e5c9d3b0a4f8e2c7d1a6b9e3f5c8d2a0b7e4f1c9d3a6b0",
"artifactCount": 5,
"bundleDownloadUrl": "/api/installhub/packages/pkg-a3f9c821-.../download",
"exportedAt": "2026-05-25T09:00:00Z",
"isSuccess": true,
"manifest": {
"packageId": "pkg-a3f9c821-...",
"name": "Employee Onboarding Suite",
"version": "2.1.0",
"artifacts": [...],
"installOrder": ["ent-44", "rule-305", "form-2005", "thread-2002", "proc-1001"]
}
}
Error Responses
| Status | Error Code | Cause |
|---|---|---|
| 400 | ArtifactNotFound | One or more artifact IDs do not exist in the tenant |
| 400 | CircularDependency | The artifact graph contains a circular reference |
| 400 | InvalidVersion | The version string is not valid SemVer |
| 400 | IncompleteArtifact | An artifact is in draft/incomplete state and cannot be exported |
| 403 | TenantMismatch | Requested artifact belongs to a different tenant |
| 409 | VersionConflict | A package with this name and version already exists |
POST /api/installhub/packages/preview
POST/api/installhub/packages/preview
Returns the resolved dependency graph without creating a bundle. Use this to confirm what will be included before running the export.
// Request
{
"tenantId": "tenant-7f3a9b12",
"artifactIds": ["proc-1001"]
}
// Response
{
"rootArtifacts": [
{ "type": "ProcessDefinition", "id": "proc-1001", "name": "EmployeeOnboarding" }
],
"resolvedDependencies": [
{ "type": "ThreadDefinition", "id": "thread-2002", "name": "ApprovalSubflow", "resolvedFrom": "proc-1001" },
{ "type": "AtlasForm", "id": "form-2005", "name": "EmployeeForm", "resolvedFrom": "proc-1001" },
{ "type": "RuleSet", "id": "rule-305", "name": "ApprovalRules", "resolvedFrom": "proc-1001" },
{ "type": "EntitySchema", "id": "ent-44", "name": "EmployeeSchema", "resolvedFrom": "form-2005" }
],
"totalArtifacts": 5,
"installOrder": ["ent-44", "rule-305", "form-2005", "thread-2002", "proc-1001"],
"hasCircularDependency": false,
"warnings": []
}
GET /api/installhub/packages/{packageId}/download
GET/api/installhub/packages/{packageId}/download
// Headers
Authorization: Bearer {token}
// Response
HTTP 200 OK
Content-Type: application/zip
Content-Disposition: attachment; filename="employee-onboarding-2.1.0.zip"
[ZIP bytes]
Authentication and Authorization
All export endpoints require a valid Bearer token. The caller must have the installhub:export permission scope. Tenant isolation is enforced — the caller can only export artifacts from tenants they have access to.
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
X-Tenant-Id: tenant-7f3a9b12 // Optional — can also be in request body
Rate Limiting
The export endpoint is rate-limited to prevent abuse:
- Per user: 10 exports per minute
- Per tenant: 50 exports per hour
Exceeding these limits returns HTTP 429 Too Many Requests with a Retry-After header.