# RPC delete-snapshot

RPC removes the snapshot from CONFIG datastore of UniConfig transaction. RPC input contains the name of the snapshot topology which should be removed. RPC output contains result of the operation.

RPC delete-snapshot
RPC delete-snapshot

# RPC Examples

# Successful Example

RPC input contains the name of the snapshot topology which should be removed. RPC output contains the results of the operation.

RPC Request
curl --location --request POST 'http://localhost:8181/rests/operations/snapshot-manager:delete-snapshot' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "input": {
        "name" : "snapshot1"
    }
}'
RPC Response, Status: 200

# Failed example

RPC input contains the name of the snapshot topology which should be removed. The input snapshot name does not exist. RPC output contains the results of the operation.

RPC Request
curl --location --request POST 'http://localhost:8181/rests/operations/snapshot-manager:delete-snapshot' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "input": {
        "name" : "snapshot1"
    }
}'
RPC Response, Status: 404
{
    "errors": {
        "error": [
            {
                "error-tag": "data-missing",
                "error-type": "application",
                "error-message": "Snapshot with name snapshot1 does not exist. Cannot delete snapshot."
            }
        ]
    }
}