Unsolved
14 Posts
0
2684
Request for help : RP4VM V5.2 REST API
Hello,
I am creating a script for book marking and failover processes in our lab using PowerShell.
So far my understanding is for any operation on the copy the following information is required.
ClusterID
GroupID
CopyID
Question 1
As per REST API guide for 5.2
Enable image access
PUT
https://{vRPA_IP_address}/fapi/rest/5_2/groups/{groupId}/
clusters/{ clusterId}/copies/{copyId}/image_access/latest/enable
Which clusterId is this? The Production side or remote side where the copy resides?
Question 2
When I try to find copyID using $URL="https:// :7225/fapi/rest/5_2/groups/472133857/state
Invoke-RestMethod -Credential $rpcreds -Uri $URL
My copyUIDs are blank even though the transfer is enabled and everything looks good on the RP4VM monitor in the vCenter.
roupUID : @{id=472133857}
enabled : True
sourceCopiesUIDs : {@{groupUID=; globalCopyUID=}}
groupCopiesState : { @{copyUID=; enabled=True; regulated=False; suspended=False; active=False; removable=True; activePrimaryRPA=2; activeSecondaryRPAsList=System.Object[];
NOTE: This RP4VM environment is not licensed, could this be an issue?
Any help will be greatly appreciated.
Idan
675 Posts
0
January 26th, 2020 05:00
Hi there,
I sent some examples offline, should you have other questions/comments, please reach out.
Regards,
Idan
chalies
1 Message
0
February 17th, 2020 17:00
Hello.
I have the same problem.
ex)
https://{vRPA_IP_address}/fapi/rest/5_2/groups/{groupId}/clusters/{clusterId}/copies/{copyId}/failover
I can't find groupId, clusterId, copyId
I would be grateful if you could give me an example.
Thank you.
Idan
675 Posts
0
February 18th, 2020 01:00
Hi there,
Here's a failover example:
PUT https://10.0.0.1/fapi/rest/5_2/groups/321612967/clusters/7060873902970707117/copies/0/failover?startTransfer=true&usePredefinedFailoverNetworks=true
Note that failover (as well as recover production) requires Test (AKA image access) to be performed first.
To get the cluster UID, run:
GET /clusters
To get the group UID, run:
GET /groups
To get copyId, run:
GET /groups/{groupId}/settings
Hope that helps,
Idan
Andrew_Madsen
6 Posts
0
April 28th, 2020 02:00
Thank you for the insight. I have a similar issue in trying to get the cluster ID with /clusters. All I return is the cluster name:
clustersInformation
-------------------
{@{clusterUID=; clusterName=NA2-PDVRPACL01}, @{clusterUID=; clusterName=NA1-PDVRPACL01}}
This is not so critical as I can obtain the cluster ID through the CLI and that is static. However, I also need to obtain the splitter ID so I can dynamically check the state of the splitters since we add and remove hosts periodically form the protected cluster. I cannot find where to obtain that information.
Idan
675 Posts
0
April 28th, 2020 05:00
Take a look at GET /splitters/settings.
Andrew_Madsen
6 Posts
0
April 28th, 2020 06:00
That returns a null for splitter ID:
clusterUID splittersSettings
---------- -----------------
@{id=6691660245944692135} {@{JsonSubType=EsxSplitterSettings; splitterUID=; splitterName=NA1-PROD; attachedUserVolumes=System.Object[]; arrayUID=; singleSplittersInfo=System.Object[]; singleSplitterName=ESX}}
Andrew_Madsen
6 Posts
0
April 29th, 2020 06:00
I misunderstood when you said try /splitters/settings I thought you were looking for /cluster/{clusterID}/splitters/settings which gives the above output. Just /splitters/settings gives this:
innerSet
--------
{@{clusterUID=; splittersSettings=System.Object[]}, @{clusterUID=; splittersSettings=System.Object[]}}
If I use a format-list on /cluster/{clusterID}/splitters/settings the return is a bit different but still no splitter ID
clusterUID : @{id=5065980402614411360}
splittersSettings : {@{JsonSubType=EsxSplitterSettings; splitterUID=; splitterName=SA1-PROD; attachedUserVolumes=System.Object[]; arrayUID=; singleSplittersInfo=System.Object[]; singleSplitterName=ESX}}
Idan
675 Posts
0
April 30th, 2020 04:00
Can you please attach the full raw output ? and please send over the full call you're trying to run.
Regards,
Idan
Andrew_Madsen
6 Posts
1
June 4th, 2020 06:00
@Idan ,
I am sorry I did not get back to this post. I eventually figured this out I am using PowerShell for the scripting. Here is the script: