> 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 Restore Accounts

POST https://%7Baccount-domain%7D.console.eon.io/api/v1/projects/{projectId}/restore-accounts/list
Content-Type: application/json

Retrieves a list of restore accounts for the given project.

Reference: https://docs.eon.io/api/api-reference/restore-connections/restore-accounts/list-restore-accounts

## 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 whose restore accounts you want to retrieve. You can get your project ID from the [API Credentials](https://console.eon.io/global-management/api-credentials) page in your global management console.

### Query parameters

- `pageToken` (string, optional) — Cursor that points to the first record of the next page of results. Get this value from the previous response. To preserve the results in the same order, use the same sorting and filters in the first request as all subsequent requests.
- `pageSize` (integer, optional) — Maximum number of items to return in the response.

### Body (application/json)

This endpoint expects a ListRestoreAccountsRequest.

- `filters` (RestoreAccountsFilterConditions, optional) — Filter conditions. If omitted, no filtering is applied.
- `sorts` (list of SortRestoreAccountsBy, optional)

## Response

### 200

Restore accounts retrieved.

- `accounts` (list of RestoreAccount, required) — List of restore accounts.
- `totalCount` (integer, required) — Total number of restore accounts that matched the filter options.
- `nextToken` (string, optional) — Cursor that points to the first record of the next page of results. Pass this value in the next request.

## Types

### RestoreAccountsFilterConditions

Filter conditions. If omitted, no filtering is applied.

- `id` (IdFilters, optional) — Filters for the Eon-assigned account ID.
- `providerAccountId` (ProviderAccountIdFilters, optional) — Filters for the cloud-provider-assigned account ID.
- `accountStatus` (AccountStatusFilters, optional) — Filters for the account status.
- `cloudProvider` (CloudProviderFilters, optional) — Filters for the cloud provider.
- `accountName` (AccountNameFilters, optional) — Filters for the account name.

### SortRestoreAccountsBy

List of sorting options. Sorting is applied in the order passed in the list.

- `field` (enum, required) — Field to sort by.
  - Allowed values: `accountName`, `installedVersion`, `createdAt`
- `order` (enum, required) — Sort order. Use `ASC` for ascending order and `DESC` for descending order.
  - Allowed values: `ASC`, `DESC`

### RestoreAccount

- `id` (string, required) — Eon-assigned restore account ID.
- `providerAccountId` (string, required) — Cloud-provider-assigned account ID.
- `name` (string, required) — Account display name in Eon.
- `status` (enum, required) — Connection status of the AWS account, Azure subscription, or GCP project. Only `CONNECTED` restore accounts can be restored to. For an explanation of statuses, see [Restore Account Statuses](/data-protection/restoring/restore-accounts/restore-account-statuses).
  - Allowed values: `CONNECTED`, `DISCONNECTED`, `INSUFFICIENT_PERMISSIONS`, `ACCOUNT_STATUS_UNSPECIFIED`
- `restoreAccountAttributes` (RestoreAccountCloudAttributes, required) — Cloud provider-specific configuration for the restore account.
- `isRestoreAllowed` (boolean, required) — Whether the current role's restore destination limits permit restoring to the restore account.
- `providerAccountName` (string, optional) — Display name inherited from the cloud provider.
- `version` (AccountVersion, optional) — Details on the Eon permissions version and installation method.
- `connectedTime` (datetime, optional) — Date and time the account was connected to Eon.

### IdFilters

- `in` (list of string, optional) — Matches if any string in this list equals `id`.
- `notIn` (list of string, optional) — Matches if no string in this list equals `id`.

### ProviderAccountIdFilters

- `in` (list of string, optional) — Matches if any value in this list equals `providerAccountId`.
- `notIn` (list of string, optional) — Matches if none of the values in this list equal `providerAccountId`.

### AccountStatusFilters

- `in` (list of enum, optional) — Matches if any value in this list equals `accountStatus`.
  - Allowed values: `CONNECTED`, `DISCONNECTED`, `INSUFFICIENT_PERMISSIONS`, `ACCOUNT_STATUS_UNSPECIFIED`
- `notIn` (list of enum, optional) — Matches if no value in this list equals `accountStatus`.
  - Allowed values: `CONNECTED`, `DISCONNECTED`, `INSUFFICIENT_PERMISSIONS`, `ACCOUNT_STATUS_UNSPECIFIED`

### CloudProviderFilters

- `in` (list of enum, optional) — Matches if any value in this list equals `cloudProvider`.
  - Allowed values: `AWS`, `AZURE`, `GCP`, `MONGO_ATLAS`, `PROVIDER_UNSPECIFIED`
- `notIn` (list of enum, optional) — Matches if none of the values in this list equal `cloudProvider`.
  - Allowed values: `AWS`, `AZURE`, `GCP`, `MONGO_ATLAS`, `PROVIDER_UNSPECIFIED`

### AccountNameFilters

- `in` (list of string, optional) — Matches if any string in this list equals `accountName`.
- `notIn` (list of string, optional) — Matches if no string in this list equals `accountName`.
- `contains` (list of string, optional) — Matches if any string in this list is a substring of `accountName`.
- `notContains` (list of string, optional) — Matches if no string in this list is a substring of `accountName`.

### RestoreAccountCloudAttributes

- `cloudProvider` (enum, required) — Cloud provider. `PROVIDER_UNSPECIFIED` is supported only in responses.
  - Allowed values: `AWS`, `AZURE`, `GCP`, `MONGO_ATLAS`, `PROVIDER_UNSPECIFIED`
- `aws` (AwsRestoreAccountAttributes, optional) — AWS account configuration. Applicable if `cloudProvider` is set to `AWS`.
- `gcp` (GcpRestoreAccountAttributes, optional) — GCP project configuration. Applicable if `cloudProvider` is set to `GCP`.
- `azure` (AzureRestoreAccountAttributes, optional) — Azure subscription configuration. Applicable if `cloudProvider` is set to `AZURE`.

### AccountVersion

Details on the Eon permissions version and installation method.

- `installed` (string, required) — Currently installed permissions version.
- `installationMethod` (enum, optional, default: UNSPECIFIED) — Method used to deploy the cloud permissions. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `UNSPECIFIED`, `CLOUDFORMATION`, `TERRAFORM`, `BASH_SCRIPT`
- `latest` (string, optional) — Latest available permissions version.

### AwsRestoreAccountAttributes

AWS account configuration. Applicable if `cloudProvider` is set to `AWS`.

- `roleArn` (string, required) — ARN of the role Eon assumes to access the account in AWS.
- `organizationId` (string, optional) — Cloud-provider-assigned ID of the AWS organization the account belongs to.

### GcpRestoreAccountAttributes

GCP project configuration. Applicable if `cloudProvider` is set to `GCP`.

- `serviceAccount` (string, required)

### AzureRestoreAccountAttributes

Azure subscription configuration. Applicable if `cloudProvider` is set to `AZURE`.

- `tenantId` (string, required) — ID of the tenant the subscription belongs to.
- `subscriptionId` (string, required) — ID of the Azure subscription.
- `resourceGroupName` (string, optional) — Name of the Azure resource group to scope permissions to. When provided, restoring is limited to this specific resource group. When omitted, permissions are scoped to the subscription.
- `eonInternalResourceGroupName` (string, optional) — Name of the Eon internal resource group for temporary restore resources.
- `managementGroupId` (string, optional) — ID of the Azure management group the restore account is scoped to.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "accounts": [
    {
      "id": "9b76a8a2-a918-57e6-94d5-0316ebab663c",
      "providerAccountId": "123412341234",
      "name": "prod-eu",
      "status": "CONNECTED",
      "restoreAccountAttributes": {
        "cloudProvider": "AWS",
        "aws": {
          "roleArn": "arn:aws:iam::123412341234:role/EonSourceAccountRole",
          "organizationId": "o-1234567890"
        },
        "gcp": {
          "serviceAccount": "string"
        },
        "azure": {
          "tenantId": "12345678-1234-1234-1234-123456789012",
          "subscriptionId": "12345678-1234-1234-1234-123456789012",
          "resourceGroupName": "my-resource-group",
          "eonInternalResourceGroupName": "eon-restore-internal-rg",
          "managementGroupId": "3eca9074-011f-5008-9605-a7ccf00aa93e"
        }
      },
      "isRestoreAllowed": true,
      "providerAccountName": "string",
      "version": {
        "installed": "1.0.0",
        "installationMethod": "TERRAFORM",
        "latest": "1.2.0"
      },
      "connectedTime": "2024-08-29T13:24:03Z"
    }
  ],
  "totalCount": 13,
  "nextToken": "Y2NiMGYyZmMtYjYyZi00OTc5LTgzNjQtYmQ2YjEyYzdjZTNifDE="
}
```

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/v1/projects/043090df-9fe5-4f89-9859-45db589c2936/restore-accounts/list"

querystring = {"pageSize":"10","pageToken":"Yjk3ODZjNjktZTIwZC00NjAxLWE1MzktZjg2NGExM2IxYTZlfDE="}

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://{account-domain}.console.eon.io/api/v1/projects/043090df-9fe5-4f89-9859-45db589c2936/restore-accounts/list?pageSize=10&pageToken=Yjk3ODZjNjktZTIwZC00NjAxLWE1MzktZjg2NGExM2IxYTZlfDE%3D';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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.post("https://{account-domain}.console.eon.io/api/v1/projects/043090df-9fe5-4f89-9859-45db589c2936/restore-accounts/list?pageSize=10&pageToken=Yjk3ODZjNjktZTIwZC00NjAxLWE1MzktZjg2NGExM2IxYTZlfDE%3D")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```