How to save the mapping as a json file when using admin api ? #506

Closed
opened 2025-12-29 08:29:14 +01:00 by adam · 1 comment
Owner

Originally created by @bhargavjulaganti on GitHub (Apr 10, 2023).

I am usibg this example project for running wiremock

When we use this POST admin endpoint (__admin/mappings) , I don't see the mapping not saved anywhere in the local disk. Is there a way we can enable to save the json file

Originally created by @bhargavjulaganti on GitHub (Apr 10, 2023). I am usibg this example [project](https://github.com/WireMock-Net/WireMock.Net/tree/f3d52adbb2053ad5fb17fb10c31da698ff68f36e/examples/WireMock.Net.WebApplication.NETCore3) for running wiremock When we use this POST admin endpoint (__admin/mappings) , I don't see the mapping not saved anywhere in the local disk. Is there a way we can enable to save the json file
adam added the question label 2025-12-29 08:29:14 +01:00
adam closed this issue 2025-12-29 08:29:14 +01:00
Author
Owner

@StefH commented on GitHub (Apr 10, 2023):

When you post new mappings to __admin/mappings via the admin endpoint, these new / updated mappings are only saved in memory.

If you want to save these to disk, do post to __admin/mappings/save.
Save all persistent stub mappings to the disk. (by default this is \bin{x}_admin\mappings. Where {x} is the platform + build configuration)

@StefH commented on GitHub (Apr 10, 2023): When you post new mappings to `__admin/mappings` via the admin endpoint, these new / updated mappings are only saved in memory. If you want to save these to disk, do post to `__admin/mappings/save`. Save all persistent stub mappings to the disk. (by default this is \bin\{x}\__admin\mappings_. Where {x} is the platform + build configuration)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#506