> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Leer S3

> Lee la configuración de almacenamiento S3 de la instancia

**Auth:** `TokenAccount` o `TokenInstance` • **Rate-limit:** `Global` (100/min) • **Idempotente:** sí

## Descripción

Devuelve la configuración individual de S3 de la instancia. La `secretKey` **nunca** se devuelve.

## Ejemplo

Realiza un `GET` en la ruta de la instancia y devuelve el objeto `s3` con la configuración de almacenamiento. El campo `secretKey` siempre se devuelve como `null` por seguridad.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://ryzeapi.cloud/api/instance/getS3/my-instance" \
    -H "token: $Token_Instance"
  ```

  ```javascript JavaScript theme={null}
  await fetch("https://ryzeapi.cloud/api/instance/getS3/my-instance", {
    method: "GET",
    headers: {
      "token": process.env.Token_Instance
    }
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.get(
      "https://ryzeapi.cloud/api/instance/getS3/my-instance",
      headers={
          "token": os.environ["Token_Instance"]
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
  )

  func main() {
      req, _ := http.NewRequest("GET", "https://ryzeapi.cloud/api/instance/getS3/my-instance", nil)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

## Respuesta exitosa

<Tabs>
  <Tab title="S3 activo">
    ```json 200 OK theme={null}
    {
      "success": true,
      "s3": {
        "enabled": true,
        "region": "us-east-1",
        "bucket": "ryzeapi-media",
        "accessKey": "AKIA...",
        "secretKey": null,
        "endpoint": "",
        "pathPrefix": "media/myinstance/"
      }
    }
    ```
  </Tab>

  <Tab title="S3 deshabilitado">
    ```json 200 OK theme={null}
    {
      "success": true,
      "s3": {
        "enabled": false,
        "region": null,
        "bucket": null,
        "accessKey": null,
        "secretKey": null,
        "endpoint": null,
        "pathPrefix": null
      }
    }
    ```
  </Tab>
</Tabs>

<Note>
  `secretKey` se devuelve como `null`, el servidor nunca devuelve la secret key en texto plano.
</Note>

## Parámetros de ruta

<ParamField path="instance" type="string" required>
  Nombre de la instancia.
</ParamField>

## Cabeceras

<ParamField header="token" type="string" required>
  TokenAccount o TokenInstance.
</ParamField>

## Errores

| HTTP | `error.message`                         | Cuándo                     |
| :--: | --------------------------------------- | -------------------------- |
|  401 | `Invalid token`                         | Token faltante o inválido. |
|  404 | `Instance not found`                    | Nombre no existe.          |
|  429 | `Rate limit exceeded. Try again later.` | Más de 100 req/min.        |
|  500 | `Failed to get S3 configuration`        | Error de base de datos.    |

```json theme={null}
{
  "success": false,
  "error": {
    "message": "Instance not found"
  }
}
```

## Notas

<Note>
  Un `endpoint` vacío (`""`) o `null` indica AWS S3 oficial; para MinIO, DigitalOcean Spaces o Backblaze, este campo almacena la URL completa del endpoint.
</Note>

## Siguiente

<CardGroup cols={2}>
  <Card title="Actualizar S3" icon="pen-to-square" href="/es/api/instance/s3-update">
    `POST /api/instance/s3/:instance` para cambiar.
  </Card>
</CardGroup>
