What are your pet peeves when consuming APIs?

  • 17 March 2021
  • 0 replies
  • 9 views

Userlevel 1
Badge +2

I thought it might be interesting to talk about what irritates you when consuming APIs;  What API design patterns make you mad, or frustrated, or do you just not like?

:raised_back_of_hand_tone2: Please be kind!  Don’t insult the API designers, and try not to mention names if you can help it!

 

I hate positional data with mixed types.

I can’t stand when APIs represent different data by its index in an array.  Sure, if the data is positional that’s fine (say, a list of the top 15 students in a class), but when it’s just descriptive and unlabelled, it’s so annoying.

(I’m talking about APIs which return values like:  {[“something”, 12345, true, “another thing”]} where each response is a property of an object and could have been part of a key:value pair).

 

Non-Idempotent object creation.

I once worked with a Marketing automation system that allowed you to push data in via their awful API.  

Each push required you to use send:

  • Customer ID from your system
  • Datetime
  • That datetime’s data

If the Customer ID already existed, it updated the existing customer record with an associated data record.  If it didn’t exist or it already had an entry for that datetime, it created a new customer record, and associated that with the data.  Mostly….

 

Errors which aren’t.

The same system would sometimes throw an error on update, prompting you to try again.  If you did, it counted as a duplicate, triggering a new customer record to be created.

 

What about you?

What are your API design peeves?


0 replies

Be the first to reply!

Reply