> 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.

# Take Snapshot

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

Takes an on-demand snapshot of the specified resource.

This operation is asynchronous.
It triggers a backup job and returns a job ID, which can be used to track the progress of the backup job.
You can follow the progress of the backup job by calling [Get Backup Job](/api/api-reference/jobs/backup-jobs/get-backup-job) with the job ID.


Reference: https://docs.eon.io/api/api-reference/backup-management/take-snapshot

## 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 to back up.

### Body (application/json)

This endpoint expects a TakeSnapshotRequest.

- `vaultId` (string, required) — Eon-assigned ID of the vault to store the snapshot in.
- `retentionDays` (integer, required) — Number of days to retain the snapshot.

## Response

### 202

Backup job started.

- `jobId` (string, required) — Backup job ID.

## Errors

### 429 Too Many Requests Error

Limit exceeded for the number of simultaneous on-demand backup jobs.

- `any`

## Examples

**Request**

```json
{
  "vaultId": "0d79d713-78df-5870-882f-0089d05396b6",
  "retentionDays": 30
}
```

**Response**

```json
{
  "jobId": "9892ecab-22d5-47ca-b2b4-70369e80b90a"
}
```

**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/take-snapshot"

payload = {
    "vaultId": "0d79d713-78df-5870-882f-0089d05396b6",
    "retentionDays": 30
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

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/take-snapshot';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"vaultId":"0d79d713-78df-5870-882f-0089d05396b6","retentionDays":30}'
};

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/take-snapshot")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"vaultId\": \"0d79d713-78df-5870-882f-0089d05396b6\",\n  \"retentionDays\": 30\n}")
  .asString();
```