Hi! I'm playing around with WMC via the Admin API,...
# wiremock-cloud
b
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?
r
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?
b
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.
r
awesome! we'll have a fix for this issue deployed before next week
b
Sounds great. Thank you!
r
thank you for bringing it to our attention
r
Just to warn you - at the moment in WMC, files PUT to
/__admin/files
are transient, not persistent. No promises about how long they will last for.
b
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?
r
No, I don't think it is. I'll add it to the list of things to address.