Nexo Platform
The platform API integration family: reading and writing the tenant’s definitions bundle through the platform API. The pair moves the GitOps bundle — GitOpsExport writes the tenant’s exported YAML to a fresh directory, GitOpsImport submits a checkout’s YAML for import. See the overview for how every module executes and the shared parameter types, and the GitOps YAML reference for the bundle format itself.
Version lines
Section titled “Version lines”The current line is 1.1.0 — API calls authenticate as the executing node through the platform’s client-credentials exchange, and neither module carries a credential parameter. The frozen 1.0.0 line, which had an api_token SECRET parameter on both modules, stays available for flows built on it; new flows should use 1.1.0.
How authentication works
Section titled “How authentication works”Both modules call the platform API as the executing node:
- The sink runtime provides the node’s credentials in the environment (
CLIENT_ID/CLIENT_SECRET— the same channel the sink’s own client reads). See Node Credentials. - On every run the module exchanges them at
{api_url}/api/clients/token(the standard client-credentials grant, scoperead write) for a fresh token — nothing is stored or cached. - The export/import call goes out with that bearer token; the platform resolves the tenant from the executing node’s pin, so the sink node running the flow must be tenant-pinned.
- Credentials missing from the environment fail the event loudly — the ERROR names the missing variables.
GitOpsExport
Section titled “GitOpsExport”What it does — fetches the tenant’s export bundle and writes it to a fresh directory.
How it works
- Calls
GET {api_url}/api/v1/gitops/export; the payload’sfiles(path → YAML) are written into a new temporary directory, one file per resource. - The directory path is emitted as result data (
result.data.path) — chain the next action’spathDATA param to it (in the shipped machinery,GitCommitPush). - Paths coming back from the platform are validated before writing — relative only, never escaping the bundle directory.
api_urlis required; export or token failures end the run with an ERROR naming the cause.
Needs from the node — nothing declared; the call is plain HTTPS.
Parameters
| Key | Type options | Meaning |
|---|---|---|
api_url | STATIC | Platform API base URL, e.g. https://platform.example — the first parameter |
GitOpsImport
Section titled “GitOpsImport”What it does — submits a checkout’s YAML bundle for import and surfaces the per-object report.
How it works
- Walks the checkout at
path(DATA — the chainedGitPull’s result data) for every*.yamlfile, recursively; a directory without YAML files fails the run. - Posts the whole bundle in one call to
POST {api_url}/api/v1/gitops/import—{"files": …, "prune": false}, so an import never deletes anything. - The report is surfaced in the event output: one line per object (
kind name -> outcome (reason)), then a summary of outcome counts. Anyfailedobject fails the event — the rest of the bundle still lands. pathis DATA and therefore hostile: it must be an absolute, existing directory;api_urlis required.
Needs from the node — nothing declared; the call is plain HTTPS.
Parameters
| Key | Type options | Meaning |
|---|---|---|
path | DATA | Checkout directory holding the repo’s YAML bundle — the first parameter |
api_url | STATIC | Platform API base URL |
The round trips
Section titled “The round trips”repo ──GitPull──► checkout ──GitOpsImport──► platform (import, auto on push)platform ──GitOpsExport──► bundle ──GitCommitPush──► repo (export, on demand)The transport pair is the Nexo GitOps library; onboarding, the webhook, and pruning are the GitOps Definitions guide’s business.