Other Features
Mock import and export
Mock rules can be shared or migrated with JSON files.
Export mocks
- Open the action menu above the Mock list.
- Select Export mocks.
- Choose a scope:
- Current group exports only the selected group.
- All exports every rule in every group.
- reqable downloads the generated
JSONfile.
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
- Select Import → Import Mock file from the action menu.
- Choose a
JSONfile exported by reqable. - 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.
