/// <summary> /// Check result of a download traces job. **API Key Scope**: systems / download_traces /// </summary> /// <exception cref="Io.Nodeum.Sdk.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="jobId">ID of active job</param> /// <returns>ApiResponse of System.IO.Stream</returns> public Io.Nodeum.Sdk.Client.ApiResponse <System.IO.Stream> ResultDownloadTracesWithHttpInfo(string jobId) { // verify the required parameter 'jobId' is set if (jobId == null) { throw new Io.Nodeum.Sdk.Client.ApiException(400, "Missing required parameter 'jobId' when calling SystemsApi->ResultDownloadTraces"); } Io.Nodeum.Sdk.Client.RequestOptions localVarRequestOptions = new Io.Nodeum.Sdk.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "application/json", "application/tar+gzip", "queued", "working", "failed", }; var localVarContentType = Io.Nodeum.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = Io.Nodeum.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } if (jobId != null) { localVarRequestOptions.QueryParameters.Add(Io.Nodeum.Sdk.Client.ClientUtils.ParameterToMultiMap("", "job_id", jobId)); } // authentication (BasicAuth) required // http basic authentication required if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Io.Nodeum.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } // authentication (BearerAuth) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); } // make the HTTP request var localVarResponse = this.Client.Get <System.IO.Stream>("/systems/download_traces", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ResultDownloadTraces", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// Trigger a download traces request. **API Key Scope**: systems / download_traces /// </summary> /// <exception cref="Io.Nodeum.Sdk.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="type">Type of traces to download</param> /// <returns>Task of ApiResponse (ActiveJobStatus)</returns> public async System.Threading.Tasks.Task <Io.Nodeum.Sdk.Client.ApiResponse <ActiveJobStatus> > TriggerDownloadTracesAsyncWithHttpInfo(string type) { // verify the required parameter 'type' is set if (type == null) { throw new Io.Nodeum.Sdk.Client.ApiException(400, "Missing required parameter 'type' when calling SystemsApi->TriggerDownloadTraces"); } Io.Nodeum.Sdk.Client.RequestOptions localVarRequestOptions = new Io.Nodeum.Sdk.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "application/json", "queued", "working", "failed" }; foreach (var _contentType in _contentTypes) { localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); } foreach (var _accept in _accepts) { localVarRequestOptions.HeaderParameters.Add("Accept", _accept); } if (type != null) { localVarRequestOptions.QueryParameters.Add(Io.Nodeum.Sdk.Client.ClientUtils.ParameterToMultiMap("", "type", type)); } // authentication (BasicAuth) required // http basic authentication required if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Io.Nodeum.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } // authentication (BearerAuth) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync <ActiveJobStatus>("/systems/download_traces", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("TriggerDownloadTraces", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// Creates a YAML file with selected tables and downloads it /// </summary> /// <exception cref="Io.Nodeum.Sdk.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="resetForm"></param> /// <returns>ApiResponse of System.IO.Stream</returns> public Io.Nodeum.Sdk.Client.ApiResponse <System.IO.Stream> DownloadResetVarsWithHttpInfo(Reset resetForm) { // verify the required parameter 'resetForm' is set if (resetForm == null) { throw new Io.Nodeum.Sdk.Client.ApiException(400, "Missing required parameter 'resetForm' when calling SystemsApi->DownloadResetVars"); } Io.Nodeum.Sdk.Client.RequestOptions localVarRequestOptions = new Io.Nodeum.Sdk.Client.RequestOptions(); String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] _accepts = new String[] { "application/x-yaml" }; var localVarContentType = Io.Nodeum.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = Io.Nodeum.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } localVarRequestOptions.Data = resetForm; // authentication (BasicAuth) required // http basic authentication required if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Io.Nodeum.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } // authentication (BearerAuth) required if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); } // make the HTTP request var localVarResponse = this.Client.Post <System.IO.Stream>("/systems/reset/generate_vars", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DownloadResetVars", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }