https://linen.dev logo
#general
Title
# general
k

Kevin Wang

11/21/2023, 3:38 PM
Hi All, does anyone know if there is Restful API to change the
root-dir
for WireMock recording?
t

Tom

11/21/2023, 4:14 PM
Hi @Kevin Wang, there isn't an API to do this at the moment, only a startup/CLI parameter
k

Kevin Wang

11/21/2023, 4:41 PM
@Tom Thanks for your answer. I noticed we have a RestfulAPI
POST /__admin/settings
for update global settings, I wonder what setting we can update through this API, will it be picked up by WireMock on the fly?
t

Tom

11/21/2023, 4:53 PM
No, there's no setting in there for root directory I'm afraid
k

Kevin Wang

11/21/2023, 5:01 PM
I see. I'm using a standalone WireMock to record some traffic between my client and sever. I want to do multiple recordings in a certain interval, but I want to save the recording files into different directories respectively. certainly I don't want to restart my WireMock server during that. Do you know if there is any way to do that now?
t

Tom

11/21/2023, 7:16 PM
Best solution I can think of is for you to record, export the stubs via
/__admin/mappings
and save to the directory of your choice, then delete them all, record the next set etc.
🙏 1