It’s the first step in letting the AI “learn” your APIs before generating intelligent test scenarios, chaining logic, and validations. Add Collection Gi

What Does the API Discovery Agent Do?

Once you import your API collection (via Swagger, Postman, or OpenAPI):

It auto-parses your entire API structure:

  • Endpoints
  • Request/response schemas
  • Query and path params
  • Headers
  • Status codes
  • Tags and grouping

Then it builds a dependency graph:

  • Figures out which APIs are connected (e.g., login → create-user → get-user)
  • Understands shared parameters (e.g., user_id, org_id, auth_token)
  • Clusters APIs into logical modules (e.g., Auth, Payments, Users)

Adds semantic understanding:

  • Creates natural-language descriptions for each API
  • Tags APIs with business-relevant keywords (e.g., payment-initiation, auth-refresh)
  • Prepares the foundation for chaining, scenario writing, and test suggestion

3 Ways to Import

1. Upload Swagger or Postman

  • Visit the AI Agent
  • Click the top-left “Add Collection” dropdown
  • Upload:
    • .postman_collection.json
    • swagger.yaml or swagger.json
→ Qodex will automatically parse and activate the collection. To learn more, check out: Uploading a Swagger or Postman Collection

2. Auto-Discover with Qodex SDK

Don’t have a spec? No problem. Run our one-line script to extract live API data from your backend and convert it into a Swagger collection:
curl -sSL https://raw.githubusercontent.com/qodex-ai/swagger-bot/refs/heads/main/run.sh -o script.sh && chmod +x script.sh && ./script.sh --project-api-key YOUR_PROJECT_KEY
→ Your API spec will be uploaded and added to Qodex automatically. To learn more, check out: Auto-discovering APIs with Qodex SDK

3. Select an Existing Collection

If you’ve already uploaded collections:
  • Open the collection selector (top-left dropdown on AI Agent page)
  • Choose from any of your previously imported collections
To learn more, check out: Selecting an Existing Collection As soon as a collection is selected, Qodex activates the endpoints and gets ready to generate tests. Continue to Test Scenario Creation Agent to start writing your first tests.

Frequently Asked Questions (FAQs)

  1. Do I need to configure anything before discovery? No. As soon as you upload your API collection, discovery is triggered automatically. You can view the results in the API overview and dependency graph tabs.
  2. What types of API specs are supported? Qodex currently supports:
    • Swagger (2.0 and 3.0)
    • OpenAPI (3.x)
    • Postman v2 Collections
    If you don’t have one, Qodex can help auto-generate a Swagger file from your SDK.
  3. What does the dependency graph do? The dependency graph visualizes how your APIs relate to each other. For example, it detects if a create-user API requires an auth-token from a login API and automatically maps the flow. This is used to chain API calls in test scenarios.
  4. Can I edit the discovery results? Yes. You can edit module groupings, API tags, or dependency mappings. This helps the AI refine its understanding for better test generation and chaining.
  5. What happens if my collection has 300+ APIs? Discovery can handle large collections, but we recommend starting with 10–15 APIs for trial and testing to conserve AI tokens and verify the output. Large collections consume more tokens for parsing and mapping.
  6. Is any of my API data stored or shared? No. Your API data is processed in an isolated environment within your Qodex workspace. It’s fully encrypted, never shared externally, and compliant with enterprise security policies.