Skip to main content

Example Repository

Overview

The caip-workflow-examples repository gives you working, copy-pasteable examples for every CAIP Workflows API feature: versioning, staging, configuration, triggers and run management. Fork a folder, swap in your own workload, and run it.

https://bmw.ghe.com/connected-ai/caip-workflow-examples

Each example is a self-contained folder with a README.md, the code/ your workflow runs, and the ordered API calls as requests/*.json. A single runner, run.py, executes any example

What's inside

ExampleWhat it shows
01-hello-worldMinimal flow: create a workflow, validate, pin a version, run it
02-versioningMultiple versions of one workflow and PUT upsert semantics
03-stagingA different version per stage; holding prod on a previous release
04-configurationInline, by-id and stage-bound configuration + resolution priority
05-triggersScheduled and webhook triggers; invoke, list, update, delete
06-run-managementStart, poll, cancel, inspect, log and retry a run
07-full-lifecycleEnd to end: workflow → config → version → stage → trigger → run

Quick start (under 5 minutes)

# 1. Clone
git clone git@bmw.ghe.com:connected-ai/caip-workflow-examples.git
cd caip-workflow-examples

# 2. Point at your space and mint a token
export SPACE_ID=<your-space>
eval "$(scripts/setup.sh)" # or: export CAIP_TOKEN=<token>

# 3. Run any example (add --dry-run to preview the calls first)
python run.py --example 01-hello-world
Prefer a narrated walk-through?

The end-to-end usage guide explains the same calls step by step. The repository is the runnable version of that guide.