In our current project we need some user data to populate a screen with the user’s settings. I ask the team responsible for this data if they have an API we can call. It shouldn’t have been a surprise to them because we are replacing existing software and the requirements are the same – we just need to implement it using different technologies.
So I email them with the requirements. I want to pass them a UserId, and I want them to send me back the User’s Configuration in return. Easy.
A few days later they send me a meeting invite.
On the meeting they said they didn’t understand the requirement. I then show them the UI designs, and tell them that I need the data in order to populate a form for a particular user.
Two weeks later I get another invite. They still don’t understand what we want. So another team member explains to them.
The next day I get an email with their new design. I can call their API with an ID related to my application, then I have to do a separate API call but I can’t specify a user. The format it comes back in is JSON, but it’s not really conforming to the standard.
So you may expect some JSON about a film to look like this:
{
"title": "Gravity",
"info": {
"directors": ["Alfonso Cuaron"],
"actors": [
"Sandra Bullock",
"George Clooney",
"Ed Harris"
]
}
},
but instead they said they want to send this:
{
"title": "Gravity",
"info": "{directors: [Alfonso Cuaron], actors:[Sandra Bullock, George Clooney, Ed Harris]}"
},
So you can’t have nested objects which JSON is designed for. Instead, you just have 2 fields with everything smashed into one text string. Why?
Ignoring that though, after 3 months, they finally email to say it is ready. So I look at their Swagger documentation which shows all the API calls in a website, and even has a button that can trigger an API call so you can see an example response. “Brilliant” I thought, I can understand what they have done without writing any code or using a tool like Postman to send calls. It is simple as clicking a button. I click the button…but the message fails to send.
I then send an email, informing them that this doesn’t work. The developer says something along the lines of “we are in the process of changing the API”. What do you mean? I waited 3 months and you are saying it’s not ready – an hour after telling me it was ready!? He did get the Swagger documentation updated before the day was over, but I just don’t understand how it wasn’t updated as they were actually making the changes.
So after 3 months, we get an API that isn’t even suited to our needs. This is just madness because we will be the only consumer of at least one of the calls they implemented. Therefore, the API should be driven by our requirements. We shouldn’t be making two different calls, then doing some jiggery-pokery with the data, when it is easy for them just to send it back in the format we want.