Example #1
0
        /// <summary>
        /// Data dump Do a complete data dump of your data, devices, outputs and collections.
        /// </summary>
        /// <exception cref="spanclient.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body"></param>
        /// <returns>ApiResponse of DataDumpResponse</returns>
        public spanclient.Client.ApiResponse <DataDumpResponse> DataDumpWithHttpInfo(Object body)
        {
            // verify the required parameter 'body' is set
            if (body == null)
            {
                throw new spanclient.Client.ApiException(400, "Missing required parameter 'body' when calling DatadumpApi->DataDump");
            }

            spanclient.Client.RequestOptions localVarRequestOptions = new spanclient.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = spanclient.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = spanclient.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = body;

            // authentication (APIToken) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-API-Token")))
            {
                localVarRequestOptions.HeaderParameters.Add("X-API-Token", this.Configuration.GetApiKeyWithPrefix("X-API-Token"));
            }

            // make the HTTP request
            var localVarResponse = this.Client.Post <DataDumpResponse>("/datadump", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("DataDump", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Example #2
0
        /// <summary>
        /// Data dump Do a complete data dump of your data, devices, outputs and collections.
        /// </summary>
        /// <exception cref="spanclient.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body"></param>
        /// <returns>Task of ApiResponse (DataDumpResponse)</returns>
        public async System.Threading.Tasks.Task <spanclient.Client.ApiResponse <DataDumpResponse> > DataDumpAsyncWithHttpInfo(Object body)
        {
            // verify the required parameter 'body' is set
            if (body == null)
            {
                throw new spanclient.Client.ApiException(400, "Missing required parameter 'body' when calling DatadumpApi->DataDump");
            }


            spanclient.Client.RequestOptions localVarRequestOptions = new spanclient.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.Data = body;

            // authentication (APIToken) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-API-Token")))
            {
                localVarRequestOptions.HeaderParameters.Add("X-API-Token", this.Configuration.GetApiKeyWithPrefix("X-API-Token"));
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PostAsync <DataDumpResponse>("/datadump", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("DataDump", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Example #3
0
        /// <summary>
        /// System information
        /// </summary>
        /// <exception cref="spanclient.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>ApiResponse of SystemInfoResponse</returns>
        public spanclient.Client.ApiResponse <SystemInfoResponse> GetSystemInfoWithHttpInfo()
        {
            spanclient.Client.RequestOptions localVarRequestOptions = new spanclient.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = spanclient.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = spanclient.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }


            // authentication (APIToken) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-API-Token")))
            {
                localVarRequestOptions.HeaderParameters.Add("X-API-Token", this.Configuration.GetApiKeyWithPrefix("X-API-Token"));
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <SystemInfoResponse>("/system", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetSystemInfo", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Example #4
0
        /// <summary>
        /// System information
        /// </summary>
        /// <exception cref="spanclient.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>Task of ApiResponse (SystemInfoResponse)</returns>
        public async System.Threading.Tasks.Task <spanclient.Client.ApiResponse <SystemInfoResponse> > GetSystemInfoAsyncWithHttpInfo()
        {
            spanclient.Client.RequestOptions localVarRequestOptions = new spanclient.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }


            // authentication (APIToken) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-API-Token")))
            {
                localVarRequestOptions.HeaderParameters.Add("X-API-Token", this.Configuration.GetApiKeyWithPrefix("X-API-Token"));
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <SystemInfoResponse>("/system", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetSystemInfo", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }