Skip to content

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 JSON or YAML.
  • 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

  1. Open the action menu above the Mock list.
  2. Select Import → Import from API platform.
  3. Select a source and upload a file, or paste a cURL command.
  4. Confirm the number of parsed endpoints.
  5. Select an existing group or create a new one.
  6. 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:

text
https://api.example.com

This 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, and responses.
  • 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:

  1. Export a HAR file from the Chrome DevTools Network panel.
  2. Select HAR in reqable.
  3. Upload the .har file.

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:

bash
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

  1. Enter your team's YApi root URL in Settings → API platform integration → YApi service URL.
  2. Make sure the current YApi account can access the target project.
  3. 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.

YApi import demo

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 JSON exported by reqable.

Restored rules receive new IDs to avoid collisions with existing items.

Released under the MIT License. · [Privacy Policy](/en/privacy) · [Terms of Service](/en/terms) · Contact: [arktomson99@gmail.com](mailto:arktomson99@gmail.com)