> This page is for API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.eon.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eon.io/_mcp/server.

# List S3 Buckets

GET https://%7Baccount-domain%7D.console.eon.io/api/projects/{projectId}/restore-accounts/{accountId}/aws/s3-buckets

Retrieves a list of S3 buckets available to Eon in the restore account.

Reference: https://docs.eon.io/api/api-reference/restore-connections/restore-accounts/aws-restore-account-assets/list-s-3-buckets

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `projectId` (string, required) — ID of the project the restore account is in. You can get your project ID from the [API Credentials](https://console.eon.io/global-management/api-credentials) page in your global management console.
- `accountId` (string, required) — Eon-assigned ID of the restore account.

## Response

### 200

Buckets retrieved.

- `buckets` (list of S3Bucket, required) — List of buckets.

## Types

### S3Bucket

- `bucketName` (string, required) — Name of the bucket.
- `regionName` (string, required) — Region where the bucket is located.

## Examples

**Response**

```json
{
  "buckets": [
    {
      "bucketName": "my-restore-bucket",
      "regionName": "us-east-1"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/projects/projectId/restore-accounts/accountId/aws/s3-buckets"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{account-domain}.console.eon.io/api/projects/projectId/restore-accounts/accountId/aws/s3-buckets';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://{account-domain}.console.eon.io/api/projects/projectId/restore-accounts/accountId/aws/s3-buckets")
  .header("Authorization", "Bearer <token>")
  .asString();
```