mock_create_from_entry
Create a Map Local mock from a live or historical capture entry, applying optional JSON patches and archiving the previous mock.
Instructions
Turn a captured response into a Map Local mock, optionally editing it.
Take entry_id from query_live_capture_entries (pass capture_id) or a history
summary (pass recording_path). The mock is written for the entry's host and
path; a previous mock at that path is archived, never deleted.
Read warnings: Map Local always answers 200 and ignores method and query.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| patches | No | Edits applied to the captured JSON response, addressed by JSON Pointer: {"op": "set", "path": "/data/balance", "value": 0} or {"op": "remove", "path": "/data/banner"}. Use "/items/-" to append and "/items/[id=42]/status" to pick an array element by a field. | |
| entry_id | Yes | ||
| capture_id | No | ||
| recording_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mock | Yes | ||
| warnings | No | ||
| next_step | Yes | ||
| patches_applied | No | ||
| source_entry_id | No | ||
| archived_previous | No |