Skip to content

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.

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.

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, scope read 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.

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’s files (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’s path DATA 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_url is 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

KeyType optionsMeaning
api_urlSTATICPlatform API base URL, e.g. https://platform.example — the first parameter

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 chained GitPull’s result data) for every *.yaml file, 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. Any failed object fails the event — the rest of the bundle still lands.
  • path is DATA and therefore hostile: it must be an absolute, existing directory; api_url is required.

Needs from the node — nothing declared; the call is plain HTTPS.

Parameters

KeyType optionsMeaning
pathDATACheckout directory holding the repo’s YAML bundle — the first parameter
api_urlSTATICPlatform API base URL
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.