https://linen.dev logo
#help
Title
# help
s

Sai Kiran

02/07/2024, 2:50 PM
Hello Everyone, Here is my requirement. I want to mock a rest api which returns the stub i created on the fly after starting the wiremock. for example, Say i created a xyz.txt (with some content) file as bodyFileName in the response template and say i started wiremock container. In my testing, I want to update contents of the stub dynamically through an endpoint. is this possible in wiremock ?
t

Tom

02/07/2024, 3:05 PM
You can update an existing stub by ID using WireMock’s admin API
if you’re calling it directly it’d be a
PUT
to
/__admin/mappings/{stubId}
l

Lee Turner

02/07/2024, 6:08 PM
The full admin API spec can be found here - https://wiremock.org/docs/standalone/admin-api-reference/
s

Sai Kiran

02/07/2024, 6:24 PM
Thank you @Tom and @Lee Turner . Will study docs and post questions if any
👍 1