public void MineLog(MineLogRequest mineLogRequest, Uri callback) { var searchJobRequest = new SearchJobRequest { Query = mineLogRequest.Query, From = mineLogRequest.From.ToUnixTimeMilliseconds(), To = mineLogRequest.To.ToUnixTimeMilliseconds() }; CreateSearchJob(searchJobRequest); }
protected void Page_Load(object sender, EventArgs e) { SearchJobRequest prvPage = Page.PreviousPage as SearchJobRequest; this.SampleID = (prvPage == null) ? this.SampleID : prvPage.SampleID; this.PreviousPath = Constants.LINK_SEARCH_JOB_REQUEST; if (!Page.IsPostBack) { initialPage(); } }
private void CreateSearchJob(SearchJobRequest searchJobRequest) { var jsonPayload = JsonConvert.SerializeObject(new { query = searchJobRequest.Query, from = searchJobRequest.From, to = searchJobRequest.To }); var apiData = new ApiData { SearchApi = SearchApi.CreateSearchJob, HttpMethod = HttpMethod.Post, RequestUri = new Uri(_sumoLogicSettings.BaseUri, "search/jobs"), JsonPayload = jsonPayload }; ScheduleApiCall(apiData); }