Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

"TextHTTPError: Not Found" when calling API method getSiteEnvVars

オープン
#7,709 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
api, cli

調査の方向性

まず、Netlify CLI と curl を使って、ドキュメントに記載された getSiteEnvVars コマンドを再現し、次に要求されたパスをリンク先のドキュメント URL にある OpenAPI のオペレーションと比較します。CLI が getSiteEnvVars リクエストをどのように組み立てるかを追跡し、エンドポイントとドキュメントが /api/v1 の重複なしに意図したパスを使用していることを確認します。既存のサイトに対してコマンドが成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

type: bug
Describe the bug

I am trying to retrieve information on site environment variables via getEnvVars and getSiteEnvVars using curl and the Netlify CLI. The combination of getSiteEnvVars with Netlify CLI fails for me with TextHTTPError: Not Found. Maybe it's just a typo in my commands, but I don't see it.

I have noticed that in the documentation when clicking on
GET /api/v1/sites/{site_id}/env
it shows
https://api.netlify.com/api/v1/api/v1/sites/{site_id}/env
This is wrong (duplicate /api/v1). Might be unrelated, but if I try with that path I get a Not Found error with curl too.

Steps to reproduce
  • make sure Netlify CLI and curl are installed and variables MY_TOKEN, MY_ACCOUNT_ID and MY_SITE_ID are set and point to an existing account / site.
  • run the following commands
# getEnvVars via curl
curl -s -H "Authorization: Bearer ${MY_TOKEN}" "https://api.netlify.com/api/v1/accounts/${MY_ACCOUNT_ID}/env?site_id=${MY_SITE_ID}"
# getSiteEnvVars via curl
curl -s -H "Authorization: Bearer ${MY_TOKEN}" "https://api.netlify.com/api/v1/sites/${MY_SITE_ID}/env"
# getEnvVars via CLI
netlify api getEnvVars --data '{ "account_id": "'${MY_ACCOUNT_ID}'", "site_id": "'${MY_SITE_ID}'" }'
# getSiteEnvVars via CLI
netlify api getSiteEnvVars --data '{ "site_id": "'${MY_SITE_ID}'" }'
  • see that the last command fails with exit code 1 and error message → › TextHTTPError: Not Found
Configuration

(no local project needed)

Environment

System:
OS: macOS 26.0.1
Shell: 5.9 - /opt/homebrew/bin/zsh
Binaries:
Node: 22.20.0 - /Users/johndoe/.nvm/versions/node/v22.20.0/bin/node
npm: 11.6.2 - /Users/johndoe/.nvm/versions/node/v22.20.0/bin/npm
npmGlobalPackages:
netlify-cli: 23.9.1

主要言語
TypeScript
スター
1.9k
フォーク
480
平均マージ
1日 15時間
マージ済み PR(30日)
66

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

netlify/cli のほかの issue

netlify/cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。