Portal Community

Validation Checks

Pre-export validation runs synchronously before any dependency resolution or serialization. If any check fails, the export is aborted with a 400 Bad Request response listing all failures (not just the first).

1. Request Validation

CheckRuleError Code
Package nameRequired, 1–100 characters, no special characters except hyphens and spacesInvalidPackageName
Package typeMust be one of the 5 valid enum valuesInvalidPackageType
VersionMust be valid SemVer: major.minor.patchInvalidVersion
Artifact IDsArray must have at least 1 element, max 50 root artifact IDs per exportArtifactIdsMissing / TooManyRootArtifacts
Tenant IDMust be a valid, active tenant IDInvalidTenantId

2. Authorization Validation

CheckRuleError Code
Permission scopeCaller must have installhub:export permissionInsufficientPermission
Tenant accessCaller must have access to the specified tenantIdTenantAccessDenied
Artifact ownershipAll specified artifact IDs must belong to the caller's tenantTenantMismatch

3. Artifact Existence Validation

CheckRuleError Code
ExistenceAll specified artifact IDs must exist in the tenantArtifactNotFound
StatusArtifacts must be in Published or Active state (not Draft, Archived, or Deleted)ArtifactNotExportable
CompletenessArtifacts must not have dangling references (e.g., a workflow node pointing to a deleted form)IncompleteArtifact

4. Dependency Graph Validation

CheckRuleError Code
Circular dependencyThe artifact reference graph must be a DAG (no cycles)CircularDependency
Cross-tenant referencesNo artifact may reference an artifact from a different tenantCrossTenantReference
Dependency depthMaximum dependency depth is 10 levels (prevents pathological graphs)DependencyDepthExceeded
Total artifact countMaximum 500 artifacts in a single bundle (including auto-resolved)BundleSizeExceeded

5. Version Conflict Validation

CheckRuleError Code
Version uniquenessA package with the same name + version must not already exist for this tenantVersionConflict

Validation Error Response Format

HTTP 400 Bad Request
{
  "error": "ValidationFailed",
  "message": "Export request failed validation. See 'errors' for details.",
  "errors": [
    {
      "code":    "ArtifactNotFound",
      "field":   "artifactIds[0]",
      "message": "Artifact 'proc-9999' does not exist in tenant 'tenant-7f3a'"
    },
    {
      "code":    "InvalidVersion",
      "field":   "version",
      "message": "Version 'v2.1' is not valid SemVer. Expected format: major.minor.patch (e.g., 2.1.0)"
    }
  ]
}

Validation vs. Security Scanning

Pre-export validation checks that the export request is well-formed and the artifacts are complete. It is not a security scan. Security scanning (expression injection, CVE checks) runs separately on the bundle before import. See Guide 8: Security Scanning for details.

All Errors Returned at Once Validation does not stop at the first error — it runs all checks and returns all failures together. This allows you to fix all issues in one iteration rather than discovering them one by one.

Draft Artifacts Cannot Be Exported

Artifacts in Draft state cannot be exported. This prevents distributing incomplete or untested automation. Publish the artifact first, then run the export.

{
  "error": "ArtifactNotExportable",
  "message": "Artifact 'proc-1001' (EmployeeOnboarding) is in Draft state. Publish it before exporting.",
  "artifactId": "proc-1001",
  "currentStatus": "Draft",
  "requiredStatus": "Published"
}