# Use a personal key from /profile, never a platform-wide server key. # Keep it in an environment variable supplied by your secret manager. # Run against a disposable development account first. export FLOWBOARD_URL=${FLOWBOARD_URL:-https://flowboard.studio} # Download a public, portable fixture. curl --fail --silent --show-error "$FLOWBOARD_URL/api/examples/api-database" > example.json # Create one private diagram. Keep its ID and reuse it. curl --fail --silent --show-error "$FLOWBOARD_URL/api/diagrams" \ -H "Authorization: Bearer $FLOWBOARD_PERSONAL_KEY" \ -H 'Content-Type: application/json' --data-binary @example.json > created.json diagram_id=$(jq -r .id created.json) # Patch through MCP. REST supports PUT replacement, not PATCH. jq -n --arg id "$diagram_id" '{jsonrpc:"2.0",id:1,method:"tools/call",params:{name:"patch_diagram",arguments:{id:$id,operations:[{op:"set_title",title:"My request path"}]}}}' | curl --fail --silent --show-error "$FLOWBOARD_URL/mcp" \ -H "Authorization: Bearer $FLOWBOARD_PERSONAL_KEY" \ -H 'Content-Type: application/json' --data-binary @- > patched.json # MCP tool failures can have HTTP 200. Check result.isError, too. jq -e '.error == null and .result.isError != true' patched.json # Read and validate the result; expect the title My request path. curl --fail --silent --show-error "$FLOWBOARD_URL/api/diagrams/$diagram_id" \ -H "Authorization: Bearer $FLOWBOARD_PERSONAL_KEY" > current.json jq -e '.title == "My request path"' current.json curl --fail --silent --show-error "$FLOWBOARD_URL/api/diagrams/$diagram_id/validate" \ -H "Authorization: Bearer $FLOWBOARD_PERSONAL_KEY" # Export Markdown and YAML without exposing the private model publicly. curl --fail --silent --show-error "$FLOWBOARD_URL/api/diagrams/$diagram_id/markdown" \ -H "Authorization: Bearer $FLOWBOARD_PERSONAL_KEY" > model.md curl --fail --silent --show-error "$FLOWBOARD_URL/api/diagrams/$diagram_id/yaml" \ -H "Authorization: Bearer $FLOWBOARD_PERSONAL_KEY" > model.yaml # Optional cleanup: DELETE this exact disposable diagram ID only after review.