> 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 Resource Snapshots

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

Retrieves a list of Eon snapshots for the given resource.


Reference: https://docs.eon.io/api/api-reference/backup-management/snapshots/list-resource-snapshots

## 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 resource 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.
- `id` (string, required) — Eon-assigned ID of the resource whose Eon snapshots you want to retrieve.

### 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, default: 50) — Maximum number of items to return in the response.

### Body (application/json)

This endpoint expects a ListInventorySnapshotsRequest.

- `filters` (SnapshotFilterConditions, optional) — Filter conditions. If omitted, no filtering is applied.
- `sorts` (list of SortSnapshotsBy, optional) — List of sorting options. Sorting is applied in the order passed in the list.

## Response

### 200

Snapshots retrieved.

- `snapshots` (list of Snapshot, required) — List of Eon snapshots.
- `totalCount` (integer, required) — The total number of Eon snapshots.
- `nextToken` (string, optional) — Cursor that points to the first record of the next page of results. Pass this value in the next request.

## Errors

### 404 Not Found Error

Resource wasn't found.

- `any`

## Types

### SnapshotFilterConditions

- `pointInTime` (SnapshotDateFilters, optional)

### SortSnapshotsBy

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

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

### Snapshot

Eon snapshot.

- `id` (string, required) — Eon snapshot ID.
- `createdTime` (datetime, required) — Date and time the snapshot creation was started. This doesn't represent the point in time the resource is backed up from, which is instead represented by the `pointInTime` property.
- `resourceId` (string, required) — Eon-assigned ID of the resource the snapshot is backing up.
- `projectId` (string, optional) — ID of the snapshot's parent project.
- `pointInTime` (datetime, optional) — Date and time of the resource that's preserved by the snapshot.
- `vaultId` (string, optional) — ID of the vault the snapshot is stored in. Empty for native snapshots.
- `jobId` (string, optional) — Backup job ID.
- `expirationTime` (datetime, optional) — Date and time the snapshot's retention is expected to expire, after which it's marked for deletion.
- `resource` (ResourceSnapshot, optional) — Details about the backed-up resource at the time the snapshot was taken.
- `onHold` (boolean, optional) — Whether the snapshot is on user hold.
- `holdDescription` (string, optional) — Note explaining why the snapshot is on hold. Cleared when the hold is removed.

### SnapshotDateFilters

- `startDate` (string, optional) — Matches if `pointInTime` is on or later than this date. Must be in ISO 8601 YYYY-MM-DD format.
- `endDate` (string, optional) — Matches if `pointInTime` is on or earlier than this date. Must be in ISO 8601 YYYY-MM-DD format.

### ResourceSnapshot

Details about the backed-up resource at the time the snapshot was taken.

- `properties` (ResourceSnapshotProperties, optional) — Properties of the original resource at the time the snapshot was taken. The properties present in this object change depending on the value set in `resourceType`.
- `tags` (map from string to string, optional) — Resource tags as key-value pairs. Both keys and values are strings. If a tag is a key with no value, the value is presented as an empty string. **Example:** `{"Name": "customers"}`
- `resourceType` (enum, optional) — Resource type identifier combining cloud provider and service type. `RESOURCE_TYPE_UNSPECIFIED` is supported only in responses.
  - Allowed values: `AWS_EC2`, `AWS_RDS`, `AWS_S3`, `AWS_EFS`, `AWS_FSX`, `AWS_EKS_NAMESPACE`, `AWS_DYNAMO_DB`, `AZURE_VIRTUAL_MACHINE`, `AZURE_FILE_SHARE`, `AZURE_STORAGE_ACCOUNT`, `AZURE_DISK`, `AZURE_SQL_DATABASE`, `AZURE_SQL_MANAGED_INSTANCE`, `AZURE_SQL_VIRTUAL_MACHINE`, `AZURE_MYSQL`, `AZURE_POSTGRESQL`, `AZURE_COSMOSDB_MONGODB`, `AZURE_COSMOSDB_NOSQL`, `ATLAS_MONGODB_CLUSTER`, `GCP_COMPUTE_ENGINE_INSTANCE`, `GCP_CLOUD_SQL_INSTANCE`, `GCP_CLOUD_STORAGE_BUCKET`, `RESOURCE_TYPE_UNSPECIFIED`

### ResourceSnapshotProperties

Properties of the original resource at the time the snapshot was taken. The properties present in this object change depending on the value set in `resourceType`.

- `awsEc2` (AwsEc2SnapshotProperties, optional) — Properties of the original AWS EC2 instance at the time the snapshot was taken. Present only when `resourceType` is set to `AWS_EC2`.
- `azureVm` (AzureVmSnapshotProperties, optional) — Properties of the original Azure Virtual Machine instance at the time the snapshot was taken. Present only when `resourceType` is set to `AZURE_VIRTUAL_MACHINE`.

### AwsEc2SnapshotProperties

Properties of the original AWS EC2 instance at the time the snapshot was taken. Present only when `resourceType` is set to `AWS_EC2`.

- `instanceType` (string, optional) — Instance type.
- `subnetId` (string, optional) — ID of the subnet the instance is in.
- `securityGroupIds` (list of string, optional) — IDs of security groups associated with the resource.
- `instanceProfileName` (string, optional) — The resource's instance profile.
- `volumes` (list of InventorySnapshotVolume, optional) — List of volumes attached to the resource.

### AzureVmSnapshotProperties

Properties of the original Azure Virtual Machine instance at the time the snapshot was taken. Present only when `resourceType` is set to `AZURE_VIRTUAL_MACHINE`.

- `name` (string, optional) — VM name.
- `sizeBytes` (string, optional) — VM size, in bytes.
- `disks` (list of AzureDisk, optional) — List of disks attached to the resource.

### InventorySnapshotVolume

- `providerVolumeId` (string, required) — Cloud-provider-assigned volume ID.
- `region` (string, required) — Region the volume is hosted in.
- `availabilityZone` (string, required) — Availability zone the volume is hosted in.
- `tags` (map from string to string, required) — Volume tags as key-value pairs. Both keys and values are strings. **Example**: `{"env": "prod", "db": ""}`
- `volumeSettings` (VolumeSettings, required) — Provisioned volume settings.

### AzureDisk

- `providerDiskId` (string, required) — Cloud-provider-assigned disk ID.
- `settings` (AzureDiskSettings, required)

### VolumeSettings

Provisioned volume settings.

- `type` (string, required) — Volume type.
- `sizeBytes` (long, required) — Volume size in bytes.
- `iops` (integer, optional) — Volume IOPS.
- `throughput` (integer, optional) — Volume throughput.

### AzureDiskSettings

- `name` (string, required) — Disk name.
- `type` (string, required) — Disk type.
- `tier` (string, required) — Disk tier.
- `hyperVGeneration` (string, optional) — Hyper-V generation of the disk. When restoring, defaults to the original Hyper-V generation captured by the snapshot.
- `sizeBytes` (long, optional) — Size of the disk, in bytes. When restoring, defaults to the original disk size captured by the snapshot.
- `tags` (map from string to string, optional) — Tags to apply to the restored disk as key-value pairs, where key and value are both strings. If not provided, defaults to an empty object, with no tags applied. **Example:** `{"eon_api_restore": "true"}`

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "snapshots": [
    {
      "id": "043090df-9fe5-4f89-9859-45db589c2936",
      "createdTime": "2024-10-29T23:01:24.841897Z",
      "resourceId": "b06bc01a-b08a-4fc7-933d-3f26ed434a29",
      "projectId": "1ee34dc5-0a7c-4e56-a820-917371e05c8d",
      "pointInTime": "2024-10-29T23:01:30Z",
      "vaultId": "0c71a8aa-edcc-4bf3-8498-fdea45621953",
      "jobId": "2cfe604d-1fc3-5db2-9f4c-2044f08e9411",
      "expirationTime": "2025-01-20T09:40:26Z",
      "resource": {
        "properties": {
          "awsEc2": {
            "instanceType": "t3.micro",
            "subnetId": "subnet-062510159bedef64a",
            "securityGroupIds": [
              "sg-0997af14f8095fc57"
            ],
            "instanceProfileName": "public-database-profile",
            "volumes": [
              {
                "providerVolumeId": "vol-00b7506c1a2bc8cfd",
                "region": "us-east-1",
                "availabilityZone": "us-east-1a",
                "tags": {},
                "volumeSettings": {
                  "type": "gp3",
                  "sizeBytes": 10000000000,
                  "iops": 3000,
                  "throughput": 125
                }
              }
            ]
          },
          "azureVm": {
            "name": "string",
            "sizeBytes": "string",
            "disks": [
              {
                "providerDiskId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group-12345/providers/Microsoft.Compute/disks/my-disk-12345",
                "settings": {
                  "name": "my-disk-12345",
                  "type": "Standard_LRS",
                  "tier": "Standard",
                  "hyperVGeneration": "V1",
                  "sizeBytes": 10737418240,
                  "tags": {}
                }
              }
            ]
          }
        },
        "tags": {
          "Name": "customers"
        },
        "resourceType": "AWS_EC2"
      },
      "onHold": false,
      "holdDescription": "Keeping for the Q3 audit until finance signs off."
    }
  ],
  "totalCount": 58,
  "nextToken": "ZjRmYmQ4Y2YtYmEzNi00Yjc1LWI1ZjMtMzUyMmYzMTA5OTYzfDE="
}
```

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/v1/projects/1ee34dc5-0a7c-4e56-a820-917371e05c8d/resources/043090df-9fe5-4f89-9859-45db589c2936/snapshots"

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

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/1ee34dc5-0a7c-4e56-a820-917371e05c8d/resources/043090df-9fe5-4f89-9859-45db589c2936/snapshots?pageSize=10&pageToken=OGRjZmRkNjYtZjJiMy00MmQ3LWIyMjMtNzU2M2NmMThiYWM2fDE%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/1ee34dc5-0a7c-4e56-a820-917371e05c8d/resources/043090df-9fe5-4f89-9859-45db589c2936/snapshots?pageSize=10&pageToken=OGRjZmRkNjYtZjJiMy00MmQ3LWIyMjMtNzU2M2NmMThiYWM2fDE%3D")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```