First of all, check that you can browse to https://api.wordpress.org yourself - you should see a page with documentation, if not then the problem may be the WordPress API.
Next, check the normal
root user can retrieve pages from there with
wget -q -O - https://api.wordpress.org - you should get a page of text, if not there may be a problem with the network for the hosting.
Finally, if the server configuration was upgraded from Symbiosis, check that the firewall is not configured to block web requests from the
www-data user - this was enabled by default in Symbiosis Jessie, so check for and remove it with
find /etc/sympl/firewall/outgoing.d -name '50-reject-www-data' -print -delete ; sympl-firewall.