The Daily WTF
I’m starting to wonder if we need a “Representative API” category. There are just so many ways in which a developer can mess up basic tasks, like mapping a RESTful API to their backend.
Today’s anonymous submitter was working with a REST API provided by a “world leading parcel” company. Everything started well. The documentation was thorough, contained links to example projects, and it came with a Swagger API doc. Based on that documentation and based on the Swagger doc, they went ahead and tried to CURL the API for a specific endpoint:
curl -X POST https://[redacted]/rest/returns
It returned a 500 error, with no description of the error which occurred.
They tried playing around with the body content that gets sent. They went back to the documentation, and discovered an inconsistency- in the docs, it suggested that the url should be rest/v1/returns, so they tried that. That didn’t
To read the full article click on the 'post' link at the top.