Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

"TextHTTPError: Not Found" when calling API method getSiteEnvVars

Abierto
#7,709 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
typescript
Área
api, cli

Línea de trabajo

Empieza reproduciendo el comando getSiteEnvVars documentado con Netlify CLI y curl; después, compara la ruta solicitada con la operación de OpenAPI en la URL de documentación enlazada. Sigue cómo la CLI construye la solicitud getSiteEnvVars y verifica que el endpoint y la documentación usen la ruta prevista sin un /api/v1 duplicado; se considera terminado cuando el comando se ejecuta correctamente contra un sitio existente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
1.9k
Forks
480
Merge medio
1 d 15 h
PR fusionados (30 d)
66

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de netlify/cli

Todos los issues de netlify/cli

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.