Class: ArtikCloud::ExportApi
- Inherits:
-
Object
- Object
- ArtikCloud::ExportApi
- Defined in:
- lib/artikcloud/api/export_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#export_request(export_request_info, opts = {}) ⇒ ExportRequestResponse
Create Export Request Export normalized messages.
-
#export_request_with_http_info(export_request_info, opts = {}) ⇒ Array<(ExportRequestResponse, Fixnum, Hash)>
Create Export Request Export normalized messages.
-
#get_export_history(opts = {}) ⇒ ExportHistoryResponse
Get Export History Get the history of export requests.
-
#get_export_history_with_http_info(opts = {}) ⇒ Array<(ExportHistoryResponse, Fixnum, Hash)>
Get Export History Get the history of export requests.
-
#get_export_result(export_id, opts = {}) ⇒ String
Get Export Result Retrieve result of the export query in tgz format.
-
#get_export_result_with_http_info(export_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get Export Result Retrieve result of the export query in tgz format.
-
#get_export_status(export_id, opts = {}) ⇒ ExportStatusResponse
Check Export Status Check status of the export query.
-
#get_export_status_with_http_info(export_id, opts = {}) ⇒ Array<(ExportStatusResponse, Fixnum, Hash)>
Check Export Status Check status of the export query.
-
#initialize(api_client = ApiClient.default) ⇒ ExportApi
constructor
A new instance of ExportApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ExportApi
Returns a new instance of ExportApi.
18 19 20 |
# File 'lib/artikcloud/api/export_api.rb', line 18 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/artikcloud/api/export_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#export_request(export_request_info, opts = {}) ⇒ ExportRequestResponse
Create Export Request Export normalized messages. The following input combinations are supported:<br/><table><tr><th>Combination</th><th>Parameters</th><th>Description</th></tr><tr><td>Get by users</td><td>uids</td><td>Search by a list of User IDs. For each user in the list, the current authenticated user must have read access over the specified user.</td></tr><tr><td>Get by devices</td><td>sdids</td><td>Search by Source Device IDs.</td></tr><tr><td>Get by device types</td><td>uids,sdtids</td><td>Search by list of Source Device Type IDs for the given list of users.</td></tr><tr><td>Get by trial</td><td>trialId</td><td>Search by Trial ID.</td></tr><tr><td>Get by combination of parameters</td><td>uids,sdids,sdtids</td><td>Search by list of Source Device IDs. Each Device ID must belong to a Source Device Type ID and a User ID.</td></tr><tr><td>Common</td><td>startDate,endDate,order,format,url,csvHeaders</td><td>Parameters that can be used with the above combinations.</td></tr></table>
27 28 29 30 |
# File 'lib/artikcloud/api/export_api.rb', line 27 def export_request(export_request_info, opts = {}) data, _status_code, _headers = export_request_with_http_info(export_request_info, opts) return data end |
#export_request_with_http_info(export_request_info, opts = {}) ⇒ Array<(ExportRequestResponse, Fixnum, Hash)>
Create Export Request Export normalized messages. The following input combinations are supported:<br/><table><tr><th>Combination</th><th>Parameters</th><th>Description</th></tr><tr><td>Get by users</td><td>uids</td><td>Search by a list of User IDs. For each user in the list, the current authenticated user must have read access over the specified user.</td></tr><tr><td>Get by devices</td><td>sdids</td><td>Search by Source Device IDs.</td></tr><tr><td>Get by device types</td><td>uids,sdtids</td><td>Search by list of Source Device Type IDs for the given list of users.</td></tr><tr><td>Get by trial</td><td>trialId</td><td>Search by Trial ID.</td></tr><tr><td>Get by combination of parameters</td><td>uids,sdids,sdtids</td><td>Search by list of Source Device IDs. Each Device ID must belong to a Source Device Type ID and a User ID.</td></tr><tr><td>Common</td><td>startDate,endDate,order,format,url,csvHeaders</td><td>Parameters that can be used with the above combinations.</td></tr></table>
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/artikcloud/api/export_api.rb', line 37 def export_request_with_http_info(export_request_info, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExportApi.export_request ..." end # verify the required parameter 'export_request_info' is set fail ArgumentError, "Missing the required parameter 'export_request_info' when calling ExportApi.export_request" if export_request_info.nil? # resource path local_var_path = "/messages/export".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(export_request_info) auth_names = ['artikcloud_oauth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ExportRequestResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExportApi#export_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_export_history(opts = {}) ⇒ ExportHistoryResponse
Get Export History Get the history of export requests.
80 81 82 83 |
# File 'lib/artikcloud/api/export_api.rb', line 80 def get_export_history(opts = {}) data, _status_code, _headers = get_export_history_with_http_info(opts) return data end |
#get_export_history_with_http_info(opts = {}) ⇒ Array<(ExportHistoryResponse, Fixnum, Hash)>
Get Export History Get the history of export requests.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/artikcloud/api/export_api.rb', line 92 def get_export_history_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExportApi.get_export_history ..." end # resource path local_var_path = "/messages/export/history".sub('{format}','json') # query parameters query_params = {} query_params[:'trialId'] = opts[:'trial_id'] if !opts[:'trial_id'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['artikcloud_oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ExportHistoryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExportApi#get_export_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_export_result(export_id, opts = {}) ⇒ String
Get Export Result Retrieve result of the export query in tgz format. The tar file may contain one or more files with the results.
134 135 136 137 |
# File 'lib/artikcloud/api/export_api.rb', line 134 def get_export_result(export_id, opts = {}) data, _status_code, _headers = get_export_result_with_http_info(export_id, opts) return data end |
#get_export_result_with_http_info(export_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get Export Result Retrieve result of the export query in tgz format. The tar file may contain one or more files with the results.
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/artikcloud/api/export_api.rb', line 144 def get_export_result_with_http_info(export_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExportApi.get_export_result ..." end # verify the required parameter 'export_id' is set fail ArgumentError, "Missing the required parameter 'export_id' when calling ExportApi.get_export_result" if export_id.nil? # resource path local_var_path = "/messages/export/{exportId}/result".sub('{format}','json').sub('{' + 'exportId' + '}', export_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['artikcloud_oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExportApi#get_export_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_export_status(export_id, opts = {}) ⇒ ExportStatusResponse
Check Export Status Check status of the export query.
185 186 187 188 |
# File 'lib/artikcloud/api/export_api.rb', line 185 def get_export_status(export_id, opts = {}) data, _status_code, _headers = get_export_status_with_http_info(export_id, opts) return data end |
#get_export_status_with_http_info(export_id, opts = {}) ⇒ Array<(ExportStatusResponse, Fixnum, Hash)>
Check Export Status Check status of the export query.
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/artikcloud/api/export_api.rb', line 195 def get_export_status_with_http_info(export_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExportApi.get_export_status ..." end # verify the required parameter 'export_id' is set fail ArgumentError, "Missing the required parameter 'export_id' when calling ExportApi.get_export_status" if export_id.nil? # resource path local_var_path = "/messages/export/{exportId}/status".sub('{format}','json').sub('{' + 'exportId' + '}', export_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['artikcloud_oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ExportStatusResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExportApi#get_export_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |