Skip to main content

Importing APIs

SureStage supports importing API definitions from multiple formats to quickly create mock simulations.

Supported Formats

FormatFile TypeNotes
OpenAPI / Swagger.json, .yamlv2.0 and v3.x supported
Postman Collection.jsonv2.1 format
HAR.harHTTP Archive from browser dev tools
cURLTextPaste cURL commands directly

Importing an OpenAPI Spec

  1. Open a simulation (or create a new one)
  2. Click Import > OpenAPI/Swagger
  3. Upload the spec file or paste a URL
  4. Review the import preview:
    • Routes that will be created
    • Response schemas detected
    • Parameters and examples
  5. Click Import

Import Options

  • Generate example responses - Use schema definitions to create realistic mock responses
  • Include all status codes - Create responses for 200, 400, 401, 404, 500
  • Preserve examples - Use examples from the spec when available
  • AI enhancement - Use AI to generate richer mock data

Importing from HAR

HAR (HTTP Archive) files capture real browser traffic:

  1. Open browser DevTools > Network tab
  2. Perform the actions you want to capture
  3. Right-click > Save all as HAR
  4. In SureStage, click Import > HAR
  5. Upload the file
  6. Filter which requests to import
  7. Click Import

Importing from cURL

Paste one or more cURL commands:

curl -X GET https://api.example.com/users \
-H "Authorization: Bearer token123"

SureStage parses the command and creates a matching route with the response structure.

Next Steps