/oracle-ai-data-platform-fusion-autopilot:aidp-restfrom oracle-ai-data-platform-fusion-autopilot
AIDP control-plane REST client primitives: OCI signing, workspace/cluster discovery, notebook upload via contents API, Job + JobRun lifecycle, taskRun output fetch + marker parsing. Use when a skill or tool needs to talk to a live AIDP cluster — uploading code, dispatching jobs, polling state, retrieving executed notebook output. NOT for AIDP CLI flows (use the `.aidp/cli.js` wrapper) or for in-cluster code (the AIDP runtime injects spark/aidputils as globals).
Ships in oracle-ai-data-platform-fusion-autopilot. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Canonical location: the Python client lives in the plugin source at
scripts/oracle_ai_data_platform_fusion_autopilot/dispatch/rest_client.py. The skill'sclient.pyis a path-resolving re-export shim — it adds the checkout'sscripts/directory tosys.pathand re-exports the canonical names. Edits to the client land in the plugin first; this skill documents the contract and the empirically-confirmed gotchas.
Reusable Python client for the AIDP /aiDataPlatforms/<id>/workspaces/<key>/... REST surface. Encapsulates OCI request signing (both API-key and session-token profiles), the empirically-confirmed request shapes, and the gotchas that aren't in Oracle's swagger.
Do NOT use for:
spark, aidputils, oidlUtils are runtime globals; talk to the AIDP control plane via those, not via REST..aidp/cli.js CLI flows defined in the workspace CLAUDE.md — those handle agent flows, not workspace data jobs.~/.oci/config with at least a DEFAULT profile pointing at a user with AIDP read/write on the target tenancy.region (e.g. us-ashburn-1)aiDataPlatformId (OCID; the regional AIDP instance)workspaceKey (UUID — discoverable via list_workspaces() + find_workspace_by_name(...))clusterKey (UUID — discoverable via list_clusters(workspaceKey) + find_cluster_by_name(...))from client import AidpRestClient
client = AidpRestClient(
region="us-ashburn-1",
aidp_id="<ocid1.datalake.oc1.{region}.{tenancy-specific}>",
workspace_key="<workspace-uuid>",
)
# 1. Verify cluster is healthy
client.verify_cluster_active(cluster_key)
# 2. Upload a notebook (built locally as an nbformat-4 dict)
client.upload_notebook("/Workspace/Shared/my-skill/run.ipynb", notebook_dict)
# 3. Create a job + submit a run
job_key = client.create_notebook_job(
name="my-skill-run", description="...",
notebook_path="/Workspace/Shared/my-skill/run.ipynb",
cluster_key=cluster_key, cluster_name="fusion_autopilot_dev",
task_key="main",
)
run_key = client.submit_run(job_key)
# 4. Poll to terminal state — returns a RunResult dataclass with .status + .raw
result = client.poll_run(run_key, timeout_s=2700, interval_s=20)
if result.status != "SUCCESS":
handle_failure(result.raw)
# 5. Fetch the executed notebook
task_run_key = client.resolve_task_run_key(result.raw, "main")
executed_nb_json = client.fetch_output(task_run_key)
# 6. Parse a stdout marker the notebook printed
marker = client.parse_marker(json.loads(executed_nb_json),
begin="AIDP_LIVE_TEST_RESULT_BEGIN",
end="AIDP_LIVE_TEST_RESULT_END")
https://datalake.<region>.oci.oraclecloud.com/<apiVersion>/aiDataPlatforms/<aiDataPlatformId>/workspaces/<workspaceKey>/...
apiVersion = 20260430. Live-validated 2026-05-17 / 2026-05-21 against the amitV2 AIDP instance + playground workspace.
| Operation | HTTP + path | Notes |
|---|---|---|
| List workspaces | GET /workspaces | Response shape: {items:[{key, displayName, type, ...}]} — name only in displayName, not name |
| Get workspace | GET /workspaces/{key} | Single-resource shape (no items wrapper) |
| List clusters | GET /workspaces/{wk}/clusters | clusters[].state is one of ACTIVE/STOPPED/FAILED/CREATING (NOT lifecycleState) |
| Get cluster | GET /workspaces/{wk}/clusters/{ck} | Used by verify_cluster_active and wait_cluster_active poll loops |
| Start cluster | POST /workspaces/{wk}/clusters/{ck}/actions/start | Body {} required (empty body → 400). Returns 202 + cluster object. Poll state for STOPPED → CREATING → ACTIVE (~3-5 min). |
| Upload content | PUT /workspaces/{wk}/notebook/api/contents/{urlencoded_path} | Body: {name, path, type:'notebook', format:'json', content:<nbformat dict>}. PUT is create-or-update (no separate POST step). Server strips leading / in returned path. |
| Read content | GET /workspaces/{wk}/notebook/api/contents/{urlencoded_path}?type=notebook&content=1 | The ?type=notebook&content=1 query is required — other forms return 500. |
| Create job | POST /workspaces/{wk}/jobs | See "Job-create body" below — path: "jobs" + maxConcurrentRuns: 1 are required client-side even though swagger lists only name as required. Omitting trips 500 + CircuitBreaker (~15min cooldown). |
| List jobs | GET /workspaces/{wk}/jobs | |
| Submit run | POST /workspaces/{wk}/jobRuns | Body: {jobKey, parameters:[], queue:{isEnabled:false}} |
| Poll run | GET /workspaces/{wk}/jobRuns/{key} | state.status enum: PENDING/RUNNING/SUCCESS/FAILED/CANCELED/TIMED_OUT |
| Fetch task output | POST /workspaces/{wk}/taskRuns/{trk}/actions/fetchOutput | Body: {outputKey: ""} (empty string — "main" returns misleading 404). Notebook lands in data[0].value (NOT data[0].content). |
{
"name": "<unique>",
"description": "...",
"path": "jobs",
"maxConcurrentRuns": 1,
"jobClusters": [{"clusterKey": "<UUID>", "clusterName": "<name>", "newCluster": null}],
"parameters": [],
"tasks": [
{
"type": "NOTEBOOK_TASK",
"taskKey": "<task-local id>",
"runIf": "ALL_SUCCESS",
"notebookPath": "/Workspace/Shared/<dir>/<file>.ipynb",
"cluster": {"clusterKey": "<UUID>", "clusterName": "<name>", "newCluster": null},
"parameters": [],
"dependsOn": [],
"maxRetries": 0
}
]
}
jobClusters[] and tasks[].cluster are redundant mirrors — both carry the same {clusterKey, clusterName, newCluster:null} with the cluster's real UUID. Both are required by the working reference job shape.source field on tasks null/omitted — don't set "WORKSPACE".InternalError.urllib.parse.quote(path, safe="") so slashes become %2F. Path-style, not query-style.?type=notebook&content=1 — bare GET returns 500.taskRunKey lives in taskToTaskRunMap[<taskKey>] — research doc was silent. For single-task jobs, next(iter(run["taskRunSummaryMap"])) also works.fetchOutput outputKey: "" — empty string, NOT "main". The 404 it returns for wrong values misleadingly cites the taskRunKey, not the bad outputKey.data[0].value — NOT data[0].content. The executed notebook is a JSON string at .value.oidlUtils.notebook.exit(...) is unreliable on fusion_autopilot_dev — module not installed there. Use the stdout-marker pattern instead: notebook prints <MARKER_BEGIN> <json> <MARKER_END>, REST caller walks cells[*].outputs[*] for it.ReadTimeout — the polling endpoint occasionally times out on a single request. Retry after a short sleep; don't fail the whole dispatch.requests returns raw API body — no {status, data} envelope (unlike oci raw-request from the CLI which wraps it). Top-level keys are the resource fields directly.The full empirical research log lives at dev/RESEARCH_aidp_rest_api_probe_results.md (Phases 1-4 confirmed against amitV2 / playground / fusion_autopilot_dev, 2026-05-17). When this skill's behavior diverges from that doc, the doc updates. When the doc diverges from Oracle's swagger, the doc wins because it was verified against live infrastructure.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ahmedawan-oracle/claude-code-plugins --plugin oracle-ai-data-platform-fusion-autopilot16 skills in this plugin
/aidpf-error-triageRead-only triage router for Oracle AIDP Fusion Autopilot failures. Use when the user pastes CLI output, a traceback, an `.aidp/diagnostics` path, a run id, or says bootstrap, validate, seed, incremental, dashboard, OAC, or workbook failed. Extract `AIDPF-*` codes, affected run id, dataset, layer, variation point, or diagnostic artifact; explain the failure briefly; route to the correct skill or command such as `/aidp-fusion-config`, `/aidp-fusion-bootstrap`, `/medallion-author`, `/fusion-drift-doctor`, `/aidp-fusion-seed`, `/aidp-fusion-incremental`, `/oac-dataset-setup`, or `/workbook-authoring`. Also triage non-AIDPF OAC MCP disconnect symptoms. Never run destructive seed, never edit profiles or overlays, and never bypass drift gates./aidp-fusion-autopilotEnd-to-end conductor for the Fusion to AIDP to OAC dashboard journey. Takes one high-level goal ('I want a supplier-spend vs GL-balance dashboard from Fusion') and drives the whole chain: configure, connect OAC MCP, bootstrap, seed, advise dataset, author mart if needed, create OAC dataset, author workbook, and optionally enable end-user MCP chat by detecting current state and delegating each step to the right sibling skill/command. Auto-advances on clean steps; pauses for real decisions (destructive seed, variation freeze, OAC dataset creation, ambiguous intent, gaps). Use when the user states a dashboard/analytics goal and wants it driven start-to-finish, OR on first run after installing the plugin: 'I just installed this, what now', 'get me started', 'set me up', 'set up Fusion analytics from scratch / end to end', 'autopilot this', 'take me from nothing to a dashboard'. This is the front door for a fresh install (setup scaffolds the bundle). NOT for a single known step (call that skill directly)./aidp-fusion-bootstrapGuide and run the Oracle AIDP Fusion Autopilot bootstrap phase. Validates bundle/config readiness, checks AIDP/Fusion/IAM prerequisites, runs `aidp-fusion-autopilot bootstrap --check-iam` or `bootstrap --refresh`, surfaces tenant variation choices pinned into the active profile YAML and evidence snapshots, and routes unresolved variation failures (`AIDPF-2010` / `AIDPF-2011`) to `/medallion-author`. Use when the user says 'bootstrap', 'pin tenant variation', 'create the profile', 'run pre-seed checks', 'missing profile', 'bootstrap --refresh', or needs the setup phase before seed/incremental. NOT for seed runs, incremental refresh, OAC dataset/workbook work, or net-new mart authoring./aidp-fusion-configGenerate aidp.config.yaml from human-friendly AIDP names instead of hand-copied OCIDs. Use when the user is setting up the fusion-autopilot and doesn't want to dig workspaceKey / clusterKey / aiDataPlatformId out of console URLs — they give a workspace name + cluster name (+ region) and this resolves the keys via the AIDP REST API and writes the env block. Triggers — "set up aidp.config.yaml", "configure the fusion autopilot connection", "I don't have the OCIDs", "fill in workspace/cluster keys", "what do I put for workspaceKey/clusterKey", "configure AIDP coords by name"./aidp-fusion-incrementalTurn a natural-language refresh request into a guarded `aidp-fusion-autopilot run --mode incremental` (the daily delta-merge). Parses intent into scope flags (reusing the seed parser with --mode incremental), auto-satisfies preconditions, and runs the incremental-specific prechecks: a Fusion-PVO/bronze DRIFT precheck (route to /fusion-drift-doctor), a watermark-cursor check (a node with no prior cursor must be seeded first), and plan-hash awareness (if the YAML/SQL/profile changed since the last seed, AIDPF-4040 → re-seed). Use when the user says 'run incremental', 'refresh the marts', 'daily delta', 'incremental supplier_spend', 'pull the latest'. NOT for first build (use /aidp-fusion-seed) or a single CLI call you already know./aidp-fusion-pipelineProductized Fusion → Oracle AI Data Platform pipeline with curated BICC extracts (GL/AR/AP/PO/Suppliers/Items), bronze/silver/gold medallion in Delta, conformed dimensions (account/calendar/org/supplier/item), gold marts (AR-Aging/AP-Aging/GL-Balance/PO-Backlog/Supplier-Spend), and MCP-native OAC workbook authoring. Use when the user wants to load Fusion ERP/HCM/SCM data into AIDP, build a CFO dashboard from Fusion, set up a Fusion-backed lakehouse, create OAC datasets/workbooks over AIDP gold, set up OAC MCP for operator authoring or natural-language Fusion analytics in Claude/Cline/Copilot, run BICC extracts incrementally, productize the Oracle blog "Bring Fusion Data into AIDP Workbench Using BICC", or extract Fusion via the saas-batch REST API. Triggers — "load Fusion into AIDP", "set up Fusion bronze layer", "build CFO dashboard from Fusion", "create OAC workbook from Fusion", "run BICC extract", "Fusion AIDP medallion", "saas-batch Fusion extract".Other plugins' skills for the same job