API Refactor finishing up

I just pushed the last bits of code to re-implement the API endpoints.  This includes the team application, message, and activity endpoints.  So this means that all of the general API has now been re-implemented with new code (finally).  It’s pretty laughable in hindsight that I thought 2-4 weeks was a reasonable amount of time for this, given that it actually took around 9.  But I think we are finally in a position to start the transition in the somewhat near future.

The timeline is probably going to be testing and reviewing the documentation this week.  Then we will start transitioning next week.  “Start transitioning” means that we simply will say that the old API is deprecated and give API clients a few weeks to migrate to using the new URLs.  Hopefully for all clients, this simply will mean switching the URLs, since the APIs are almost exactly the same.  However, clients should definitely test to make sure that we didn’t accidentally change functionality for them.

Speaking of keeping the same functionality, when re-implemented the API I tried to change as little as possible, but some things did end up changing.  The main reason for this was either the documentation was unclear about what the intended functionality was, or I thought that a certain piece of functionality was simply a very bad idea.  These are the main areas of change that I know about:

  • Tasks: it was pretty unclear to me how the interface for PUT/POST was intended to work.  I tried to keep it working more-or-less the same, but some of the code in the old API seemed to be bugs to me so I didn’t translate them over.
  • Team delete: I removed the ability to do a DELETE request on teams.  This seems like something that should never really happen in practice.  If you are depending on this functionality, please send me an email and we can make things work for your use-case.
  • Blank/null values: There were several places in the code where blank strings, null values, the string “null”, and missing values were used interchangeably.  I tried to follow the conventions that the old API used as much as possible, but I can’t say that I got it 100% correct.  Please email me if it’s not working for one of your use cases.

One thought on “API Refactor finishing up

  1. Pingback: The new API is here | Amara – Blog

Comments are closed.