---
title: 301 response for REST API calls
source: https://docs.newrelic.com/docs/apis/rest-api-v2/troubleshooting/301-response-rest-api-calls
---

## Problem

Your REST API call returns a `301` error message that may include some or all of this information:

```sh
curl -X GET 'http://api.newrelic.com/v2/applications/1234567890.json' \
     -H 'X-Api-Key:YOUR_API_KEY' -i
[output] HTTP/1.1 301 Moved Permanently
[output] Status: 301 Moved Permanently
[output] Location: http://api.newrelic.com/v2/applications/1234567890.json
[output] ...
[output] You are being redirected https://api.newrelic.com/v2/applications/1234567890.json
```

OR

```sh
curl -X GET 'http://api.newrelic.com/v2/applications/1234567890.json' \
     -H 'X-Api-Key:YOUR_API_KEY'
[output] You are being redirected https://api.newrelic.com/v2/applications/1234567890.json
```

## Solution

New Relic requires HTTPS for all traffic to APM and the REST API. This includes both inbound and outbound traffic. If your REST API call uses HTTP, change your script or program to HTTPS.
