Hi! I'm playing around with WMC via the Admin API,...
# wiremock-cloud
Hi! I'm playing around with WMC via the Admin API, and I noticed that if I have a mock API that hasn't had a file stored, then the Get all file names endpoint returns with Error 500:
Copy code
GET https://<mockapi>.wiremockapi.cloud/__admin/files
Authorization: Token <token>
If I add a file, delete it, then call the
GET .../__admin/files
endpoint, it returns an empty array
[ ]
correctly. The Error 500 seems suspicious, and I guess the endpoint should return an empty array even before any file is stored in the API. What do you think?
thanks @Balog Tamás we're taking a look now
out of curiosity, what is your use case for the files endpoints in wiremock cloud?
I have a GUI-based feature in the WireMocha IntelliJ plugin that can interact with the Admin API of local and remote WireMock servers (documentation), and I'm adding support for this endpoint.
awesome! we'll have a fix for this issue deployed before next week
Sounds great. Thank you!
thank you for bringing it to our attention
Just to warn you - at the moment in WMC, files PUT to
are transient, not persistent. No promises about how long they will last for.
Thank you, that is good to know. Although I don't think I'll need that for my use cases. Is that mentioned somewhere in the WMC documentation as well?
No, I don't think it is. I'll add it to the list of things to address.