Updates to the COS Content APIs



Hi everyone,

As some of you may have noticed, there have been a few changes to some of the COS Content APIs recently. We’ve completely rebuilt the service behind those APIs, and while we designed those changes to be completely transparent, there were a few things that did end up changing when the endpoints were switched to the new service.

Here are a list of the things that changed:

  • All requests will require the Content-Type header to be set (usually to application/json but the specific type will be listed on the documentation page), and will return an error if the header is missing.
  • Some endpoints (Publishing a blog post, and deleting a blog post) will now return a 204 response instead of a 200 response. These endpoints were previously returning a text response.
  • Restoring a deleted blog post is now a PUT request (it was a POST request)

I apologize for the late notice on these changes. Normally we want to announce these changes ahead of time, but we didn’t intend for this to create any changes. We’ll also be updating our testing to try and prevent this type of thing going forward. In this case, we did have testing in place, but we weren’t specifically checking for a missing content-type header, and our tests weren’t checking for a difference in the response code, just that the request was succeeding when using the same data.