Closed johndanielk closed 1 month ago
you are using POST instead of PUT. Also the payload is wrong. The body below should work for you once you change the method to PUT
{ "action": "Link", "link": { "storage_group_name": tgtStorageGrpId } }
Let me know the result after making these changes.
Thank you/ its works !!
Glad to help. if you're not using it https://github.com/rawstorage/reSTclient10/ the rest client is very good, be sure to read the readme you need JDK 11 or higher to run.
hi I have a PowerMax 8500 ver 10.1
I want to do a link from the existing snapshot and attach the snapshot to the existing StorageGroup I see your script in Python from this site https://infohub.delltechnologies.com/en-us/p/local-replication-with-the-powermax-rest-api-working-with-snapvx-snapshots/ from my GUI everything works fine but on the Rest API, it is not
this is my Javascript and I will be glad to help me ( my first request in GitHub)
noted - all parameters I can take with other scripts that I wrote my script runs from VRA automation so some of the parameters are on the var input this is my script and the symmetric is like 111111111111 // start script function linkSnapshot(restHost, srcStorageGrpId, tgtStorageGrpId, snapName, snapId) { var url = "/univmax/restapi/101/replication/symmetrix/111111111111/storagegroup/" + srcStorageGrpId + "/snapshot/" + snapName + "/snapid/" + snapId; System.log("Link URL " + url) ;
req.setHeader("Authorization", authHeader); req.setHeader("Accept", "application/json"); req.setHeader("Content-Type", "application/json");
}
var srcStorageGrpId = "sg_PMAX"; var tgtStorageGrpId = "sg_PMAX_LNK_SG_002"; var snapName = "sg_pmax-03092024"; var snapId = '75526250497';
var linkResponse = linkSnapshot(restHost, srcStorageGrpId, tgtStorageGrpId, snapName, snapId); System.log("Snapshot Link Response: " + JSON.stringify(linkResponse)); // end script
the error message I get is Couldn't link snapshot: {"message":"Parameter [link] value is not valid, expecting non null: [SnapVxLinkOptions]"} any help will be great
thanks