curl -D responseHeader -H "Content-Type: application/json" –H "Accept: application/json -H "x-zerto-session: 9UDQD6RG7YF33QJLWQXGJV8C453N277NA22P7FSNWVZCJTWCBRHQ" https://127.0.0.1:9669/v1/events |
curl -D responseHeader -H "Content-Type: application/json" –H "Accept: application/json -H "x-zerto-session: 9UDQD6RG7YF33QJLWQXGJV8C453N277NA22P7FSNWVZCJTWCBRHQ" https://127.0.0.1:9669/v1/events?eventType=CreateProtectionGroup |
/* * Example - get all events, filtering is not used */ private void GetEvents() { Console.WriteLine("\nRequest the list of events:"); Console.WriteLine("============================="); string apiAddress = m_baseAddress + "events"; string result = ExecuteHttpGet(apiAddress, m_format, m_sessionId); List<EventApi> events = (List<EventApi>)DeserializeObjectFromJson(result, typeof(List<EventApi>)); Console.WriteLine("Found " + events.Count + " events."); // Go Over all events fetching them one by one for (int i = 0;i < events.Count;i++) { Console.WriteLine((i+1) + ". " + events[i].Description); } } |