Skip to content

Other Features ​

Mock import and export ​

Mock rules can be shared or migrated with JSON files.

Export mocks ​

  1. Open the action menu above the Mock list.
  2. Select Export mocks.
  3. Choose a scope:
    • Current group exports only the selected group.
    • All exports every rule in every group.
  4. reqable downloads the generated JSON file.

Example format:

json
{
  "version": 1,
  "exportedAt": "2025-01-01T00:00:00.000Z",
  "scope": "current",
  "group": "default",
  "count": 10,
  "mocks": [
    {
      "mockId": "abc123",
      "url": "/api/example",
      "methodMatchMode": "GET",
      "normalResponse": "{\"code\":0,\"data\":[]}",
      "responseMode": "normal"
    }
  ]
}

Only key fields are shown above. The actual file contains complete MockItemData objects.

Import mocks ​

  1. Select Import → Import Mock file from the action menu.
  2. Choose a JSON file exported by reqable.
  3. Select the destination:
    • Existing group imports into the selected group.
    • New group creates a group with the entered name.

Every imported rule receives a new ID to prevent collisions.

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