Import
reqable converts third-party API definitions and recorded requests into mock rules. It currently supports:
- YApi: deep integration with a self-hosted YApi service.
- OpenAPI / Swagger: OpenAPI 3.x and Swagger 2.0 in
JSONorYAML. - Postman: Collection v2.0 and v2.1.
- HAR: network archives exported from Chrome DevTools and similar tools.
- cURL: a single pasted cURL command.
Platforms such as Apifox and Knife4j can export an OpenAPI document that reqable can import.
Import workflow
- Open the action menu above the Mock list.
- Select Import → Import from API platform.
- Select a source and upload a file, or paste a cURL command.
- Confirm the number of parsed endpoints.
- Select an existing group or create a new one.
- Start the import.
Every source is converted to reqable's common endpoint model, then turned into rules with the current default Mock strategy.
URL fallback
An OpenAPI document may omit servers, and a Postman Collection may use an unresolved variable such as . In these cases, enter an optional URL fallback on the OpenAPI or Postman import page.
The dialog initially uses the origin of the current business page. You can replace it with the actual API origin:
https://api.example.comThis value only completes imported URLs. It is not used to connect to the platform or download definitions. HAR and cURL normally contain complete URLs, so they do not show this option.
OpenAPI / Swagger
Supported data includes:
- OpenAPI 3.x
servers,paths,parameters,requestBody, andresponses. - Swagger 2.0
host,basePath,schemes, body parameters, and form parameters. - Local
#/...references. - Examples generated from schema
example,default,enum, and field types. - Common JSON, form, and text request/response bodies.
Path parameters use their examples when available. Otherwise, reqable creates an editable placeholder value.
Postman Collection
Collection v2.0 and v2.1 support includes:
- Nested folders and collection variables.
- URLs, query parameters, and headers.
- Raw JSON, text, form-data, URL-encoded, and GraphQL bodies.
- Saved response examples.
If a request has no saved response example, reqable creates an empty JSON response that you can edit after import.
HAR
HAR is useful for converting traffic that already occurred in a browser:
- Export a HAR file from the Chrome DevTools Network panel.
- Select HAR in reqable.
- Upload the
.harfile.
reqable reads methods, URLs, headers, request bodies, and response bodies, including Base64-encoded response content.
cURL
Commonly used options are supported:
-X/--request.-H/--header.-d/--data/--data-raw/--data-binary.-F/--form.-G/--get.-u/--user.-b/--cookie.
Example:
curl 'https://api.example.com/users' \
-H 'Content-Type: application/json' \
-d '{"name":"reqable"}'A cURL command does not contain response content, so the imported rule starts with an empty JSON response.
YApi integration
Configuration
- Enter your team's YApi root URL in Settings → API platform integration → YApi service URL.
- Make sure the current YApi account can access the target project.
- Open Import from API platform → YApi.
Generation modes
After selecting endpoints, choose one of two modes:
- AI generation reads the endpoint definition and schema, then asks the configured model to generate a response.
- YApi mock import reuses the existing platform mock and does not require AI configuration.
A failed endpoint does not stop the batch. Failed items are summarized after all remaining endpoints finish.

AI context
AI-generated rules retain the response schema, request schema, and endpoint description. This context is included automatically when you later use Refine with AI.
Restore a reqable Mock file
Mock file import and API platform import are different workflows:
- API platform import reads OpenAPI, Postman, HAR, cURL, or YApi and creates new rules.
- Mock file import restores the complete mock
JSONexported by reqable.
Restored rules receive new IDs to avoid collisions with existing items.
