問題
REST API 呼び出しは、次の情報の一部またはすべてを含む可能性がある301
エラー メッセージを返します:
bash
$curl -X GET 'http://rpm.newrelic.com/v2/applications/1234567890.json' \> -H 'X-Api-Key:YOUR_API_KEY' -iHTTP/1.1 301 Moved PermanentlyStatus: 301 Moved PermanentlyLocation: http://rpm.newrelic.com/v2/applications/1234567890.json...You are being redirected https://rpm.newrelic.com/v2/applications/1234567890.json
また
bash
$curl -X GET 'http://rpm.newrelic.com/v2/applications/1234567890.json' \> -H 'X-Api-Key:YOUR_API_KEY'You are being redirected https://rpm.newrelic.com/v2/applications/1234567890.json
解決
New Relic では、 および REST API へのすべてのトラフィックに HTTPS が必要です。 これには、受信トラフィックと送信トラフィックの両方が含まれます。 REST APIコールがHTTPを使用している場合は、スクリプトまたはプログラムをHTTPSに変更します。