//{sampleeventid:<id>, datatype:<det type>} //returns map of [{type:<det type>, id:<detfileid>}, ...] // note datatype is optional - if omitted, get list of all dets for that sample event internal static void Get(UserSecurityContext user, JToken dat, HttpContext context, CancellationToken cancel) { if (dat != null) { JObject payload = dat as JObject; if (payload != null) { CompoundIdentity seId = JsonUtils.ToId(dat[JsonUtils.Id]); if (seId != null) { GeneralDetProcessor prov = DetProcessorManager.Instance.GetProvider(user); if (prov != null) { SampleEventMap map = prov.GetMap(seId); if (map != null) { RestUtils.Push(context.Response, RestUtils.JsonOpStatus(JsonOpStatus.Ok, ToJson(map).ToString())); return; } else { RestUtils.Push(context.Response, RestUtils.JsonOpStatus(JsonOpStatus.Ok)); //no dets in sample event return; } } } } } context.Response.StatusCode = HttpStatusCodes.Status400BadRequest; }