Action Testing
Inspect action schemas, test actions in isolation, and decide when a connector or wallet is required.
Action testing is the fastest way to validate a payload before placing it into a workflow graph. Use it to debug schema errors, connector requirements, and provider failures without running the full workflow.
Action test loop
Inspect Available Actions
bashcurl "https://api.b3os.org/v1/actions" \ -H "Authorization: Bearer YOUR_API_KEY"
To inspect one action:
bashcurl "https://api.b3os.org/v1/actions/send-email" \ -H "Authorization: Bearer YOUR_API_KEY"
Test an Action
bashcurl -X POST "https://api.b3os.org/v1/actions/send-email/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "to": "alerts@example.com", "subject": "B3OS test", "text": "This is a test action payload." } }'
Connector-Aware Test
Actions that need account or wallet access should receive a connector reference. The connector holds the credentials; the action input stays focused on the business payload.
bashcurl -X POST "https://api.b3os.org/v1/actions/send-telegram-message/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "connector": { "type": "telegram-bot", "id": "conn_telegram_bot" }, "inputs": { "chatId": "123456789", "text": "B3OS action test" } }'
For actions that can move funds, start with simulation, dust-size amounts, or a controlled test wallet. Confirm chain ID, token decimals, recipient, and approval behavior before publishing a live workflow.
When to Use Each Endpoint
| Endpoint | Use it for |
|---|---|
| GET /v1/actions | Discover catalog actions and high-level details. |
| GET /v1/actions/{type} | Fetch one action schema. |
| GET /v1/logic-actions | Discover workflow-native control-flow actions. |
| POST /v1/actions/{type}/test | Validate inputs and connector requirements before adding a node. |
| POST /v1/actions/{type}/run | Execute a single action intentionally outside a workflow run. |
