Skip to content

The format, the graph, the import session and its failures on one page, from M6-S2 and M6-S3. Replace the names in angle brackets.

EntryRule
manifest.jsonRequired. schemaVersion: 1.1 plain, 1.2 with mapped-field hints, 1.3/1.4 published versions. A 1.10 importer accepts 1.0–1.4; an older one only 1.0–1.1
index.jsonRequired. orderedResources (in dependency order) and nameMap (id → file name): the only reliable way to a file
dependencies.jsonRequired in practice. The edges
resources/<Type>/<name>.jsonOne snapshot per resource; no database ids or audit stamps; the source id kept; view execution plans dropped
Anything else at the top levelRefused (UNKNOWN_ENTRY). An unsafe name under resources/ is skipped silently

Never a resource: records, dashboards (records of a system entity), users, groups, organization units, working hours (they travel as references to match or create).

{from, to, kind, hard, path, resolvedVia}. MEMBERSHIP belongs to; REFERENCE points at. Hard: must exist; only hard edges extend an export; a skipped or failed target cascade skips its hard dependents. Soft: nulled at path when the target is missing. Path: where the id sits; the importer rewrites only an exact match. Order is re-derived from the edges on every import.

1 Export, transform, re-import (keep edges true) · 2 Overrides on an import session (content only) · 3 Hand-authoring (unsupported). Prefer 1, parameterise with 2.

Every route: a system-level Admin grant, the target space from the host (x-space-id past the gateway), the current updateIdentifier on every write. $BASE is the target’s address and $REL the Larkspur Release token (M6-S3); the workbench token is refused here by design.

Terminal window
FILE=$(curl -s -X POST "$BASE/api/storage/v2/files?temp=true" -H "x-app-token: $REL" -F "file=@<pkg>.zip" | jq -r '.result[0].id')
curl -s -X POST "$BASE/api/packaging/v1/import/validate" -H "x-app-token: $REL" -H 'Content-Type: application/json' \
-d "{\"fileId\":\"$FILE\",\"fileName\":\"<pkg>.zip\",\"importStrategy\":\"MANUAL\"}"
# → sessionId, validationReport, updateIdentifier
PATCH …/import/<sid>/strategy {strategy, updateIdentifier} MERGE_NEW_ONLY | OVERWRITE_ALL | MANUAL
PATCH …/import/<sid>/config {mappings, valueReferences, unmappedDependencies, mappedFieldDecisions, updateIdentifier}
GET|PATCH|DELETE …/import/<sid>/resource/<type>/<sourceId>/payload override: content, never structure
POST …/import/<sid>/execute → {jobId}; then poll GET …/import/<sid>/status
POST …/import/<sid>/retry | /cancel

States: validating → validated → importing → completed | failed. Completed is not success: read created, overwritten, skipped, cascadeSkipped, errors, importWarnings. Cancel is final and keeps what was written. Stuck in importing for 15 minutes → failed. Idle sessions expire after 7 days.

AnswerMeaningDo
400 on validateNo fileIdUpload to storage first
400 missing spaceThe call did not come through a host that resolves to a spaceCall the space’s address
403Caller below system Admin, or a session of another spaceUse the release credential; check the host
409 STALE_UPDATE_IDENTIFIERSomeone wrote since your tokenReload, reconcile, write again
409 (other)Wrong state for this callRe-read the status, follow the state machine
409 IMPORT_SESSION_CANCELLEDExecute or retry after a cancelOpen a new session
400 on an overrideA structural field changedMap the resource instead
413 on an overridePayload over 2 MBOverride less
400 on executeA needed dependency has no target, or a record reference has no actionMap it
409 MAPPED_FIELD_SOURCE_UNDECIDEDA mapped field needs a decisionDecide it in the config

A dedicated application user with system Admin: an owner and an expiry, used only by the release pipeline from its own runner, the token in the pipeline’s secret store, regenerated each release train, its use reviewed in the audit trail. Never used for day-to-day reads.

What a package cannot carry (capability checklist)

Section titled “What a package cannot carry (capability checklist)”
  • Runtimes (a Function needs the target’s function builder)
  • Records (starting data loaded by script or entered)
  • Application users and tokens
  • Programs outside the platform (feeds, clients)
  • Per-environment values and secrets (set by override)
  • Access that names people or groups (check after install)