DO Status API

July 24, 2013 2.3k views
Hello. I was wondering if there is an API in place for the Digital Ocean Status domain? Not the droplets/domains etc API. I want to be able to use the API to automatically display the kind of same message the DO status has on my sites so that visitors are aware that there may be performance issues.
2 Answers

@kamaln7 I tried to access https://status.digitalocean.com/api/v1/status.json to get the current status.
The problem is that I get the following error:

XMLHttpRequest cannot load https://status.digitalocean.com/api/v1/status.json. The 'Access-Control-Allow-Origin' header contains multiple values '*, http://localhost:4200', but only one is allowed. Origin 'http://localhost:4200' is therefore not allowed access.

It seems that the server is using the Origin from the AJAX Request and adds it to the Access-Control-Allow-Origin header. That isn't necessary as you already have * that allows all origins.

Have another answer? Share your knowledge.