public async Task <string> PostProcessGroupsLogAnalysisJobAsync(string pgId, string logPath, IEnumerable <string> hostFilter = null, string query = null, long?startTimestamp = null, long?endTimestamp = null, ExtractFields body = null, CancellationToken cancellationToken = default) { var queryParamValues = new Dictionary <string, object> { [nameof(hostFilter)] = hostFilter == null ? null : string.Join(",", hostFilter), [nameof(query)] = query, [nameof(startTimestamp)] = startTimestamp, [nameof(endTimestamp)] = endTimestamp }; string response = await GetLogMonitoringProcessGroupsUrl(pgId) .AppendPathSegment(logPath) .SetQueryParams(queryParamValues) .PostJsonAsync(body, cancellationToken) .ReceiveString() .ConfigureAwait(false); return(response); }
public async Task <string> PostHostLogAnalysisJobAsync(string hostId, string logPath, string query = null, long?startTimestamp = null, long?endTimestamp = null, ExtractFields body = null, CancellationToken cancellationToken = default) { var queryParamValues = new Dictionary <string, object> { [nameof(query)] = query, [nameof(startTimestamp)] = startTimestamp, [nameof(endTimestamp)] = endTimestamp }; string response = await GetLogMonitoringHostsUrl(hostId) .AppendPathSegment(logPath) .SetQueryParams(queryParamValues) .PostJsonAsync(body, cancellationToken) .ReceiveString() .ConfigureAwait(false); return(response); }