---
title: 'API - Interaction with Snapshots | Zomro'
description: 'This guide describes how to create, view existing, and delete snapshots using the API.'
image: 'https://dx86q6oq7ry0e.cloudfront.net/uploads/blog/a54%40server-panel.net/2024/07/23/screenshot-from-2024-07-23-15-31-16_q50.jpg'
---

![opened image]()

  * [Zomro](https://zomro.com/)
  * [Useful articles](https://zomro.com/blog/articles/)
  * API - Interaction with Snapshots 



# API - Interaction with Snapshots

23-07-2024

This document describes the process of creating, viewing, and deleting snapshots for an instance using the Zomro service API. The provided request examples will help you quickly understand the basic operations needed to manage snapshots through the API.

## 

## **Creating snapshots**

To create snapshots, execute the following request:

URL: 
    
    
    https://api.zomro.com/

Method: POST

Request body (Form-data):

Parameter | Example value | Required parameter | Value description  
---|---|---|---  
func | instances.snapshots.edit | Yes | Function to create snapshots  
auth | 21fc199...c43f71 | No | Session token. This is one of the authorization options. More details on other options are described [here](https://ispsystem.com/docs/b6c/developer-section/working-with-api/guide-to-ispsystem-software-api)  
out | json | Yes | Response type to expect  
sok | ok | Yes | Operation confirmation  
plid | 5203773 | Yes | ID of the instance for which to create a snapshot  
name | MySnapshot | Yes | Snapshot name  
  
Example of creating snapshots for a service

For example, we use the service:

![API - Interaction with Snapshots - 1](https://dx86q6oq7ry0e.cloudfront.net/uploads/blog/a54%40server-panel.net/2024/07/23/screenshot-from-2024-07-23-15-31-16_q50.jpg)

URL: 
    
    
    https://api.zomro.com/

Method: POST

Request body (Form-data):

Parameter | Value  
---|---  
func | instances.snapshots.edit  
auth | 21fc199...c43f71  
out | json  
sok | ok  
plid | 5203773  
name | MySnapshot  
  
Here is an example of a request that can be executed from the console:
    
    
    curl --location 'https://api.zomro.com/' \
    --form 'func="instances.snapshots.edit"' \
    --form 'auth="5acd1215da7a09eaae215987"' \
    --form 'out="json"' \
    --form 'sok="ok"' \
    --form 'plid="5203773"' \
    --form 'name="MySnapshot"'

After executing the request, we see that the snapshot is in the process of being created. This information can be obtained from the Status field, which has the value Saving:

![API - Interaction with Snapshots - 2](https://dx86q6oq7ry0e.cloudfront.net/uploads/blog/a54%40server-panel.net/2024/07/23/screenshot-from-2024-07-23-15-52-25_q50.jpg)

After the backup creation is complete, the snapshot status will change from Saving to Active:

![API - Interaction with Snapshots - 3](https://dx86q6oq7ry0e.cloudfront.net/uploads/blog/a54%40server-panel.net/2024/07/23/screenshot-from-2024-07-23-17-10-01_q50.jpg)

As we can see, the snapshot status is Active.

## **How to get a list of snapshots**

Also, using the API, it is possible to get a list of snapshots. To do this, execute the following request format:

URL: 
    
    
    https://api.zomro.com/

Method: POST

Request body (Form-data):

Parameter | Example value | Required parameter | Value description  
---|---|---|---  
func | instances.snapshots | Yes | Function to get all snapshots  
auth | 21fc199...c43f71 | No | Session token. This is one of the authorization options. More details on other options are described [here](https://ispsystem.com/docs/b6c/developer-section/working-with-api/guide-to-ispsystem-software-api)  
out | json | Yes | Response type to expect  
elid | 5203773 | Yes | ID of the instance whose snapshots are planned to be obtained  
  
For example, let's try to get snapshots for service 5203773. In the previous step, we created 1 snapshot. Let's try to get it.

Let's try to execute the following request in the console:
    
    
    curl --location 'https://api.zomro.com/' \
    --form 'func="instances.snapshots"' \
    --form 'auth="9046d78a8fda29dda83d42dd"' \
    --form 'out="json"' \
    --form 'elid="5203773"'

We get the following result:
    
    
    {
        "doc": {
            ...
            "elem": [
                {
                    "architecture": {
                        "$": "x86_64"
                    },
                    "createdate": {
                        "$": "2024-07-23"
                    },
                    "disk_format": {
                        "$": "qcow2"
                    },
                    "fleio_id": {
                        "$": "afd72725-81aa-43ad-984c-a3f3a05b4b84"
                    },
                    "fleio_status": {
                        "$": "Active"
                    },
                    "hypervisor_type": {
                        "$": "any_hypervisor"
                    },
                    "id": {
                        "$": "5204214"
                    },
                    "image_size": {         
                        "$": "3"
                    },
                    "item_real_status": {
                        "$": "2"
                    },
                    "min_disk": {
                        "$": "20"
                    },
                    "min_ram": {
                        "$": "0"
                    },
                    "name": {
                        "$": "MySnapshot"
                    },
                    "os_distro": {
                        "$": "Ubuntu"
                    },
                    "os_version": {
                        "$": "22.04 x64"
                    },
                    "protected": {
                        "$": "off"
                    },
                    "region": {
                        "$": "Netherlands-2"
                    },
                    "visibility": {
                        "$": "private"
                    }
                }
            ],
        }
    }

We are interested in the data obtained in the following nesting:
    
    
    doc.elem.[]

From this response, we get the following data:

Field name | Description  
---|---  
architecture | Virtual machine architecture  
createdate | Snapshot creation time  
disk_format | Snapshot file type  
fleio_id | Unique UUID in the fleio system  
fleio_status | Snapshot status. The value Active means the snapshot is created  
hypervisor_type | Hypervisor type for the virtual machine  
id | Snapshot ID within the bill manager  
image_size | Actual snapshot size. Determined after the snapshot creation is complete  
item_real_status | Service status within the bill manager  
min_disk | Minimum disk size on the server needed to restore this snapshot  
min_ram | Minimum RAM size on the server needed to restore this snapshot  
name | Snapshot name  
os_distro | Operating system name  
os_version | Operating system version  
protected | Indicates whether the snapshot can be deleted. If the value is "off", the snapshot can be deleted. If "on", the snapshot cannot be deleted.  
region | Data center name where the snapshot is located  
visibility | Snapshot access status. The only available value is "Private"  
  
To delete a snapshot, execute the following request:

URL: 
    
    
    https://api.zomro.com/

Method: POST

Request body (Form-data):

Parameter | Example value | Required parameter | Value description  
---|---|---|---  
func | image.delete | Yes | Function to delete a snapshot  
auth | 21fc199...c43f71 | No | Session token. This is one of the authorization options. More details on other options are described [here](https://ispsystem.com/docs/b6c/developer-section/working-with-api/guide-to-ispsystem-software-api)  
out | json | Yes | Response type to expect  
plid | 5203773 | Yes | ID of the instance whose snapshot is planned to be deleted  
elname |  5204214 | Yes | ID of the snapshot to be deleted  
plid |  5204214 | Yes | ID of the snapshot to be deleted  
sok | ok | Yes | Operation confirmation  
  
Let's try to execute the following request in the console:
    
    
    curl --location 'https://api.zomro.com/' \
    --form 'func="image.delete"' \
    --form 'auth="9046d78a8fda29dda83d42dd"' \
    --form 'out="json"' \
    --form 'sok="ok"' \
    --form 'plid="5203773"' \
    --form 'elname="5204214"' \
    --form 'elid="5204214"'

After executing the request, you can check the result using the "instances.fleio_bckps" function, or by viewing it through the web interface:

![API - Interaction with Snapshots - 4](https://dx86q6oq7ry0e.cloudfront.net/uploads/blog/a54%40server-panel.net/2024/07/23/screenshot-from-2024-07-23-17-20-42_q50.jpg)

As you can see, the snapshot was successfully deleted.

We also suggest studying articles that may be useful for interacting with [Cloud VPS](https://zomro.com/vps) products using the API:

  * [_API - Creating a Service_](https://zomro.com/blog/articles/462-api-creation-of-a-service)
  * [_API - Obtaining Information about Available Tariffs and Their Parameters_](https://zomro.com/blog/articles/464-api-obtaining-information-about-available-tariffs-and-their-parameters)
  * [_API - Operation Start & Stop_](https://zomro.com/blog/articles/468-api-operation-start-and-stop)
  * [_API - Operation Reboot_](https://zomro.com/blog/articles/465-api-operation-reboot)
  * [_API - Operation Rebuild_](https://zomro.com/blog/articles/466-api-operation-rebuild)
  * [_API - Operation Delete_](https://zomro.com/blog/articles/467-api-operation-delete)
  * [_API - Interaction with Image_](https://zomro.com/blog/faq/487-api-interaction-with-image)
  * [_API - Interaction with Backup Schedule_](https://zomro.com/blog/faq/486-api-interaction-with-backup-schedule)
  * [_API - Interaction with Rescue_](https://zomro.com/blog/faq/485-api-interacting-with-rescue)
  * [_API - Interaction with Backup_](https://zomro.com/blog/faq/482-api-interaction-with-backup)
  * [_API - Interaction with Boot From ISO_](https://zomro.com/blog/faq/484-api-interacting-with-boot-from-iso)



Similar articles:

[How to Choose a Forex VPS for Stable Trading](https://zomro.com/blog/articles/496-how-to-choose-forex-vps-for-stable-trading) [Effective work in the terminal: how to create and use aliases in Linux](https://zomro.com/blog/articles/522-working-effectively-in-the-terminal-how-to-create-and-use-aliases-in-linux) [API - Operation Delete](https://zomro.com/blog/articles/467-api-operation-delete) [A detailed guide to creating a responsive and user-friendly website: from idea to launch](https://zomro.com/blog/articles/596-guide-to-creating-responsive-user-friendly-website) [Popular errors on the site. Meaning and how to solve them.](https://zomro.com/blog/articles/185-populjarnye-oshibki-na-sajte-znachenie-i-kak-reshit)

[ Forex Server from €7.95/mon ](/server-for-forex)
