Class: CloudmersiveDataintegrationApiClient::BackupConvertApi

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudmersive-dataintegration-api-client/api/backup_convert_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ BackupConvertApi

Returns a new instance of BackupConvertApi.



19
20
21
# File 'lib/cloudmersive-dataintegration-api-client/api/backup_convert_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/cloudmersive-dataintegration-api-client/api/backup_convert_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#dataintegration_backup_convert_mssql_bak_get_tables_post(opts = {}) ⇒ MssqlBakEnumerateTablesResult

Lists all tables stored in a SQL Server Backup (.BAK) file

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :input_file (File)

    Input file to perform the operation on

Returns:



26
27
28
29
# File 'lib/cloudmersive-dataintegration-api-client/api/backup_convert_api.rb', line 26

def dataintegration_backup_convert_mssql_bak_get_tables_post(opts = {})
  data, _status_code, _headers = dataintegration_backup_convert_mssql_bak_get_tables_post_with_http_info(opts)
  data
end

#dataintegration_backup_convert_mssql_bak_get_tables_post_with_http_info(opts = {}) ⇒ Array<(MssqlBakEnumerateTablesResult, Fixnum, Hash)>

Lists all tables stored in a SQL Server Backup (.BAK) file

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :input_file (File)

    Input file to perform the operation on

Returns:



35
36
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
# File 'lib/cloudmersive-dataintegration-api-client/api/backup_convert_api.rb', line 35

def dataintegration_backup_convert_mssql_bak_get_tables_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BackupConvertApi.dataintegration_backup_convert_mssql_bak_get_tables_post ...'
  end
  # resource path
  local_var_path = '/dataintegration/backup/convert/mssql/bak/get/tables'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  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 => 'MssqlBakEnumerateTablesResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BackupConvertApi#dataintegration_backup_convert_mssql_bak_get_tables_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#dataintegration_backup_convert_mssql_bak_to_csv_post(opts = {}) ⇒ String

Converts a SQL Server Backup (.BAK) file into CSV for a specified table Input the target table to extract the data as a CSV format file. Supports a wide array of SQL Server .BAK files and SQL Server backup file versions. Consumes 1 API call per MB of input data.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :table_name (String)

    Name of the table to return

  • :input_file (File)

    Input file to perform the operation on

Returns:

  • (String)


77
78
79
80
# File 'lib/cloudmersive-dataintegration-api-client/api/backup_convert_api.rb', line 77

def dataintegration_backup_convert_mssql_bak_to_csv_post(opts = {})
  data, _status_code, _headers = dataintegration_backup_convert_mssql_bak_to_csv_post_with_http_info(opts)
  data
end

#dataintegration_backup_convert_mssql_bak_to_csv_post_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Converts a SQL Server Backup (.BAK) file into CSV for a specified table Input the target table to extract the data as a CSV format file. Supports a wide array of SQL Server .BAK files and SQL Server backup file versions. Consumes 1 API call per MB of input data.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :table_name (String)

    Name of the table to return

  • :input_file (File)

    Input file to perform the operation on

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



88
89
90
91
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
# File 'lib/cloudmersive-dataintegration-api-client/api/backup_convert_api.rb', line 88

def dataintegration_backup_convert_mssql_bak_to_csv_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BackupConvertApi.dataintegration_backup_convert_mssql_bak_to_csv_post ...'
  end
  # resource path
  local_var_path = '/dataintegration/backup/convert/mssql/bak/to/csv'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/csv'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'tableName'] = opts[:'table_name'] if !opts[:'table_name'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  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 => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BackupConvertApi#dataintegration_backup_convert_mssql_bak_to_csv_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end