Discover and test REST APIs
Find public API definitions and test raw or saved operations with controlled input.
Find a public API definition, test an operation before import, and call a saved operation with controlled arguments. This workflow helps you verify connectivity and authentication before a REST operation becomes part of an agent workflow.
Before you begin
Sign in to Agent Studio with a Clerk session. Prepare a non-production base URL, synthetic request data, and a credential limited to the operation you intend to test. To test a saved operation, first import the OpenAPI integration.
Discover an API
Request the directory with a name, description, identifier, provider, or category search term. This example searches for documentation APIs and returns up to 12 entries:
curl 'https://studio.example.com/api/openapi/directory?q=documentation&page=1&limit=12' \
-H 'Cookie: <clerk-session-cookie>'You can also filter with category and provider. Matching is case-insensitive, and the response includes total, page, limit, hasMore, the current items, available categories, provider suggestions, and directory metrics.
Inspect hasMore before increasing page. The default page size is 24; limit is constrained to 1–100. Choose a directory entry whose description, provider, and source match the service you intend to connect.
Do not treat directory presence as proof that an API is available or suitable for production. Review the provider’s definition and service terms separately.
From the selected definition, identify the test base URL and one endpoint definition. Prepare the values accepted by the operation in arguments, including only required path, query, header, cookie, or body data.
Use a harmless read such as retrieving one synthetic support ticket. Keep authentication in authType and authConfig; do not add secrets to the endpoint description or argument values unless the API itself defines the credential as a request parameter.
Send POST /api/openapi/test-raw with the endpoint definition, baseUrl, authType, authConfig, and arguments. Agent Studio validates the request and runs it as a preview integration.
{
"endpoint": "<parsed endpoint definition>",
"baseUrl": "https://sandbox-api.example.com",
"authType": "BEARER",
"authConfig": "<configuration for the selected mode>",
"arguments": {
"path": { "ticketId": "ticket_demo_123" }
}
}Replace the endpoint and authentication placeholders with the structured values produced by the parser and required by your target API. A successful Agent Studio request returns success: true; inspect data for the upstream result.
After importing the definition, call the integration-specific test route with the saved operation identifier and its arguments:
curl -X POST 'https://studio.example.com/api/openapi/integrations/<integration-id>/test' \
-H 'Content-Type: application/json' \
-H 'Cookie: <clerk-session-cookie>' \
--data '{
"operationId": "getSupportTicket",
"arguments": {
"path": { "ticketId": "ticket_demo_123" }
}
}'The route resolves the integration for the signed-in user, selects the saved operation by operationId, and returns the result in data.
Confirm that the upstream status and response body match the target API’s definition. Check that path values were substituted correctly and that query, header, cookie, and body arguments reached the intended locations.
If the read test succeeds, repeat with the smallest representative input your workflow will use. Do not proceed to a write operation until its approval and side-effect requirements are understood.
Verify the test
Troubleshoot tests
Next steps
Import and manage the OpenAPI integration after a safe raw test succeeds. Review Review approval requests before allowing workflows to perform consequential operations.