The correct one is https://sitename/_api/web
. If you type this URL in a browser like Chrome, it should display the current site information in XML.
Also check your protocol, it might be https instead of http.
If you still get the error than you need to download the SP 2013 Client Components SDK
& brought up PowerShell V3
Use below mentioned code in PowerShell V3
# Invoke-RestSPO -Url "https://XXXXXXXX.sharepoint.com/_api/web"
Above code came from below mentioned code
<#
.Synopsis
Sends an HTTP or HTTPS request to a SharePoint Online REST-compliant web service.
.DESCRIPTION
This function sends an HTTP or HTTPS request to a Representational State
Transfer (REST)-compliant ("RESTful") SharePoint Online web service.
.EXAMPLE
Invoke-SPORestMethod -Url "https://contoso.sharepoint.com/_api/web"
.EXAMPLE
Invoke-SPORestMethod -Url "https://contoso.sharepoint.com/_api/contextinfo" -Method "Post"
#>