API & DEVELOPERS

Guides · v1

Client examples

Use the public repository to start a backend or native integration. Every example uses explicit resources and synthetic placeholders; none contains credentials.

JavaScript

javascript
import {readWorkspaces} from "./examples/api-client.mjs";
const result = await readWorkspaces(process.env.ORCH_ACCESS_TOKEN);
console.log(`Received ${result.workspaces.length} workspaces.`);

Python

shell
python examples/read-workspaces.py

Supply ORCH_ACCESS_TOKEN from your application’s protected environment. Do not save it in a committed dotenv file or paste it into a shared terminal transcript.

curl

shell
printf 'header = "Authorization: Bearer %s"\n' "$ORCH_ACCESS_TOKEN" | \
  curl --config - --fail-with-body --max-time 20 \
  --header "Accept: application/json" \
  https://api.orchesphere.ai/v1/workspaces

This sends the header through curl’s stdin configuration rather than displaying the token or passing it as a command-line argument. Avoid verbose/trace output, which can expose credentials.

MCP read flow

Authorize the separate MCP resource, initialize the JSON-RPC connection, list tools, then call a read tool using a returned workspace ID. See the MCP reference for the exact request schemas.