On this page
Examples and troubleshooting
A complete workflow
Import a collection, connect, find an endpoint, run it as a table, then keep the result:
IMPORT API BRUNO "C:\bruno\my-api.yml" MYAPI;
CONNECT API MYAPI:Development;
SHOW ENDPOINTS MATCH user;
RUN /users TABLE;
DUMP API RESULT TO REPORT.USERS AS XLSX;
DISCONNECT API;
Each step is described on its own page: API sources and configuration, Running API requests and Working with API results.
SQL and API together
A database connection and an API session context can be active at the same time, and BroadSQL keeps running ordinary SQL against the database connection throughout; connecting to an API never closes or replaces it. In these examples the database connection is the WORLD sample; the APIs (DESK, CRM) are examples of APIs you would define yourself, since WORLD comes with no API:
WORLD> CONNECT API DESK:PROD;
API DESK connected using environment PROD.
WORLD [API DESK:PROD]> RUN /api/rest/emails/v1/ping?key=DESK;
API: Desk Definition API
Environment: PROD
Endpoint: GET Check email service
GET https://desk.example.com/api/rest/emails/v1/ping?key=DESK
HTTP 200
Duration: 143 ms
OK
WORLD [API DESK:PROD]> SELECT COUNT(*) FROM COUNTRY;
COUNT(*)
--------
254
WORLD [API DESK:PROD]> DUMP API RESULT TO PING_RESULT AS CSV;
1 row(s) exported to PING_RESULT.csv.
Completed: 2026-10-14 19:25:43 +02:00 (0:00:00).
WORLD [API DESK:PROD]> DISCONNECT API;
WORLD>
The same coexistence holds for a write endpoint: the database connection is no more affected by a POST/PATCH/DELETE than by a GET:
WORLD> CONNECT API CRM:TEST;
API CRM connected using environment TEST.
WORLD [API CRM:TEST]> RUN POST /customers;
API: CRM Service
Environment: TEST
Endpoint: POST Create Customer
POST https://crm-test.example.com/customers
HTTP 201
Duration: 118 ms
id : 501
status : created
WORLD [API CRM:TEST]> DUMP API RESULT TO api_customer.CUSTOMERS AS H2;
1 row(s) exported to api_customer.CUSTOMERS (table dropped and recreated).
Completed: 2026-10-14 19:25:43 +02:00 (0:00:00).
WORLD [API CRM:TEST]> DISCONNECT API;
WORLD>
WORLD, the SQL connection, is exactly as it was before CONNECT API ran; only the API session context changed. The API result went into the table CUSTOMERS of the local H2 database api_customer, a separate connection that CONNECT api_customer; opens.
Troubleshooting
| Message | What it means | See |
|---|---|---|
No API is connected. Use CONNECT API <api>:<environment>; before RUN. | RUN needs an API session. | Running an endpoint (RUN) |
No endpoint matches: ... | No active endpoint of the connected API has this method and path shape, or the endpoint is inactive. | Executing an inactive API, endpoint, or environment |
Unable to resolve variable: ... | A ${name} used by an enabled part of the request has no value. | Variables |
Execution refused. Method OPTIONS is not enabled for execution in this release. | The method, or a form-urlencoded/multipart-form body, cannot be executed yet. | Executing an unsupported method or body |
API 'MYAPI' is inactive. ... | The API or the environment was deactivated in CONFIG API. | Executing an inactive API, endpoint, or environment |
DUMP API RESULT: no API execution result held in memory. Run RUN first. | The last call did not succeed, or none was made. | Exporting API results |
| Running the endpoint is refused, naming its authentication type | The endpoint uses an authentication type this release cannot execute (Digest, NTLM, OAuth1, AWS Signature, OAuth2 Authorization Code or Password). | Authentication |
Related pages
- API Client overview
- API sources and configuration, Running API requests, Parameters, variables and authentication, Working with API results.
Found something wrong or unclear on this page? Tell us, with the page address.