#Using APIs for snapshot delta

1 messages · Page 1 of 1 (latest)

gleaming lava
#

Hello folks, I'm trying to get snapshot delta through REST api private/cli, anyone done that before ?

curl -k -u admin:Netapp01 "https://cluster1/api/private/cli/volume/snapshot/delta?vserver=docker&volume=rancher_trident&snapshot1=daily.2023-01-06_0010&snapshot2=daily.2023-01-07_0010"
{
  "error": {
    "message": "API not found",
    "code": "3"
  }
}

EDIT : looks like that’s not gonna be possible. Following question is, as I have to do it using NMSDK, is there an actual documentation for netapp-lib in python or do I have to use NMSDK ?

gleaming lava
#

Well, I actually can't even find this with ZAPI, I see no API to get Snapshots Deltas, looks like it only exists in powershell

gleaming lava
#

End of story : I finally found the zapi call under Vserver API as snapshot-delta-info.
I used zexplorer to get the proper XML to send the POST request to /servlets/netapp.servlets.admin.XMLrequest_filer on the cluster management IP, making sure I use vserver tunneling by adding the vfiler attribute like :

<netapp  xmlns="http://www.netapp.com/filer/admin" version="1.170" vfiler="{0}">

I didn't want to embed nmsdk in the code, or reverse engineer netapp_lib, for this raw XML was just fine.

zinc vigil
#

ZAPI will not be supported with 9.13 and following releases. Also, you're showing a password in clear, even though it's an easy one.

gleaming lava
#

I’ll take my chances exposing my lab credentials to the world 😄. Hopefully by the time we remove ZAPI the conversion will be complete. I just need that for a one off on 9.8 systems.