It's 4th, but I think I can already announce the shittiest API design of the month.

An endpoint that lists entities filtered by something (email). If there's multiple entities found, it returns an array. If there's only one, it returns an object.

This goes to Salesforce, no less.

Of course I don't need to mention that this is not not documented?

Follow

@katafrakt I had something similar at an old job, truly a pleasure to deal with. Bonus points if it goes 404 when no results are found.

@katafrakt what does yours do, out of curiosity? 200 and an empty array, despite not returning an array on a single result?

@Amikke Unfortunately I can only see the logs and can't trigger requests myself, so I don't know. But it's an interesting question.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.