Example #1
0
        public string [] GetPropertyValues(string propertyName, string query, bool distinct, string caseId, string token)
        {
            string service = "http://" + url + ":" + port + "/nuix-restful-service/svc/v1/cases/" + caseId + "/itemProperties/" + propertyName + "?token=" + token;
            string method  = "POST";

            Request.Properties properties = new Request.Properties();
            properties.distinct = distinct;
            properties.query    = query;
            string data     = JsonConvert.SerializeObject(properties);
            string response = Call(service, method, data, true);

            try
            {
                return(JsonConvert.DeserializeObject <string[]>(response));
            }
            catch (Exception ex)
            {
                Console.WriteLine("Failed attempting to serialize the following JSON:");
                Console.WriteLine(response);
                Console.WriteLine(ex.Message);
                Console.WriteLine(ex.StackTrace);
                return(new string [] { ex.Message, ex.StackTrace });
            }
        }
Example #2
0
 public string[] GetPropertyValues(string propertyName, string query, bool distinct, string caseId, string token)
 {
     string service = "http://" + url + ":" + port + "/nuix-restful-service/svc/v1/cases/" + caseId + "/itemProperties/" + propertyName + "?token=" + token;
     string method = "POST";
     Request.Properties properties = new Request.Properties();
     properties.distinct = distinct;
     properties.query = query;
     string data = JsonConvert.SerializeObject(properties);
     string response = Call(service, method, data, true);
     try
     {
         return JsonConvert.DeserializeObject<string[]>(response);
     }
     catch (Exception ex)
     {
         Console.WriteLine("Failed attempting to serialize the following JSON:");
         Console.WriteLine(response);
         Console.WriteLine(ex.Message);
         Console.WriteLine(ex.StackTrace);
         return new string [] { ex.Message, ex.StackTrace};
     }
 }