Zerto Virtual Replication APIs : VRAs API : Code Examples
  
Code Examples
For complete code examples, see Code Samples.
/v1/vras cURL Code Example
Retrieve information about the VRAs in this site.
curl -D responseHeader -H "Content-Type: application/json" –H "Accept: application/json -H "x-zerto-session: 9UDQD6RG7YF33QJLWQXGJV8C453N277NA22P7FSNWVZCJTWCBRHQ" https://127.0.0.1:9669/v1/vras
For a more code examples, see cURL Code.
/v1/vras C# Code Example
Retrieve the list of all VRAs. For a full code example, including setting up a session, see C# Code.
/*
 * Example - get all VRAs, filtering is not used
 */
private void GetServiceProfiles() {
  Console.WriteLine("\n\nRequest the VRAs:");
  Console.WriteLine("\n=================\n");
  string apiAddress = m_baseAddress + "vras";
  string result = ExecuteHttpGet(apiAddress, m_format, m_sessionId);
  List<VraApi> vras = (List<VraApi>)DeserializeObjectFromJson(result, typeof(List<VraApi>));
  Console.WriteLine("Found " + vras.Count + " VRAs.");
  // Go Over all events fetching them one by one
  for (int i = 0;i < vras.Count;i++) {
    Console.WriteLine((i+1) + ". " + vras[i].Description);
  }
}