cloudmersive-dataintegration-api-client 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +105 -0
- data/Rakefile +8 -0
- data/cloudmersive-dataintegration-api-client.gemspec +45 -0
- data/docs/BackupConvertApi.md +120 -0
- data/docs/MssqlBakEnumerateTablesResult.md +9 -0
- data/docs/MssqlTable.md +9 -0
- data/git_push.sh +55 -0
- data/lib/cloudmersive-dataintegration-api-client.rb +42 -0
- data/lib/cloudmersive-dataintegration-api-client/api/backup_convert_api.rb +126 -0
- data/lib/cloudmersive-dataintegration-api-client/api_client.rb +391 -0
- data/lib/cloudmersive-dataintegration-api-client/api_error.rb +38 -0
- data/lib/cloudmersive-dataintegration-api-client/configuration.rb +209 -0
- data/lib/cloudmersive-dataintegration-api-client/models/mssql_bak_enumerate_tables_result.rb +198 -0
- data/lib/cloudmersive-dataintegration-api-client/models/mssql_table.rb +196 -0
- data/lib/cloudmersive-dataintegration-api-client/version.rb +15 -0
- data/spec/api/backup_convert_api_spec.rb +59 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/mssql_bak_enumerate_tables_result_spec.rb +47 -0
- data/spec/models/mssql_table_spec.rb +47 -0
- data/spec/spec_helper.rb +111 -0
- metadata +247 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 997d508810ebae42eee11eab2efe3eb9b591a49f261a4706a331b62d9cc34bc1
|
4
|
+
data.tar.gz: 180ece39415c9c29f6a829207dd1a2237c1fa603c09d86130245b74ae631a622
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f022ed0767a3c0f66b0f4c73354d60c9cd72e51166ec96818a0c8555439c533991efd7e37b95bf12b696303788296c6801628bb02137e7b3d776042b0ce2d882
|
7
|
+
data.tar.gz: 6ff9f38efe436d59add07e116f7faf66a55d6f49b861c01b25f031fa095af136c0a7b00a8d7b899d1e7d88b1d591d9706b00b194b91011039f94d8afc1528786
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
# cloudmersive-dataintegration-api-client
|
2
|
+
|
3
|
+
CloudmersiveDataintegrationApiClient - the Ruby gem for the Data Integration API
|
4
|
+
|
5
|
+
Easily and directly query database backup files, convert into other file formats.
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
|
+
|
9
|
+
- API version: v1
|
10
|
+
- Package version: 2.0.1
|
11
|
+
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
### Build a gem
|
16
|
+
|
17
|
+
To build the Ruby code into a gem:
|
18
|
+
|
19
|
+
```shell
|
20
|
+
gem build cloudmersive-dataintegration-api-client.gemspec
|
21
|
+
```
|
22
|
+
|
23
|
+
Then either install the gem locally:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
gem install ./cloudmersive-dataintegration-api-client-2.0.1.gem
|
27
|
+
```
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-dataintegration-api-client-2.0.1.gem` to install the development dependencies)
|
29
|
+
|
30
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
|
+
|
32
|
+
Finally add this to the Gemfile:
|
33
|
+
|
34
|
+
gem 'cloudmersive-dataintegration-api-client', '~> 2.0.1'
|
35
|
+
|
36
|
+
### Install from Git
|
37
|
+
|
38
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
39
|
+
|
40
|
+
gem 'cloudmersive-dataintegration-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
41
|
+
|
42
|
+
### Include the Ruby code directly
|
43
|
+
|
44
|
+
Include the Ruby code directly using `-I` as follows:
|
45
|
+
|
46
|
+
```shell
|
47
|
+
ruby -Ilib script.rb
|
48
|
+
```
|
49
|
+
|
50
|
+
## Getting Started
|
51
|
+
|
52
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
53
|
+
```ruby
|
54
|
+
# Load the gem
|
55
|
+
require 'cloudmersive-dataintegration-api-client'
|
56
|
+
|
57
|
+
# Setup authorization
|
58
|
+
CloudmersiveDataintegrationApiClient.configure do |config|
|
59
|
+
# Configure API key authorization: Apikey
|
60
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
61
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
62
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
63
|
+
end
|
64
|
+
|
65
|
+
api_instance = CloudmersiveDataintegrationApiClient::BackupConvertApi.new
|
66
|
+
|
67
|
+
opts = {
|
68
|
+
input_file: File.new('/path/to/file.txt') # File | Input file to perform the operation on
|
69
|
+
}
|
70
|
+
|
71
|
+
begin
|
72
|
+
#Lists all tables stored in a SQL Server Backup (.BAK) file
|
73
|
+
result = api_instance.dataintegration_backup_convert_mssql_bak_get_tables_post(opts)
|
74
|
+
p result
|
75
|
+
rescue CloudmersiveDataintegrationApiClient::ApiError => e
|
76
|
+
puts "Exception when calling BackupConvertApi->dataintegration_backup_convert_mssql_bak_get_tables_post: #{e}"
|
77
|
+
end
|
78
|
+
|
79
|
+
```
|
80
|
+
|
81
|
+
## Documentation for API Endpoints
|
82
|
+
|
83
|
+
All URIs are relative to *https://localhost*
|
84
|
+
|
85
|
+
Class | Method | HTTP request | Description
|
86
|
+
------------ | ------------- | ------------- | -------------
|
87
|
+
*CloudmersiveDataintegrationApiClient::BackupConvertApi* | [**dataintegration_backup_convert_mssql_bak_get_tables_post**](docs/BackupConvertApi.md#dataintegration_backup_convert_mssql_bak_get_tables_post) | **POST** /dataintegration/backup/convert/mssql/bak/get/tables | Lists all tables stored in a SQL Server Backup (.BAK) file
|
88
|
+
*CloudmersiveDataintegrationApiClient::BackupConvertApi* | [**dataintegration_backup_convert_mssql_bak_to_csv_post**](docs/BackupConvertApi.md#dataintegration_backup_convert_mssql_bak_to_csv_post) | **POST** /dataintegration/backup/convert/mssql/bak/to/csv | Converts a SQL Server Backup (.BAK) file into CSV for a specified table
|
89
|
+
|
90
|
+
|
91
|
+
## Documentation for Models
|
92
|
+
|
93
|
+
- [CloudmersiveDataintegrationApiClient::MssqlBakEnumerateTablesResult](docs/MssqlBakEnumerateTablesResult.md)
|
94
|
+
- [CloudmersiveDataintegrationApiClient::MssqlTable](docs/MssqlTable.md)
|
95
|
+
|
96
|
+
|
97
|
+
## Documentation for Authorization
|
98
|
+
|
99
|
+
|
100
|
+
### Apikey
|
101
|
+
|
102
|
+
- **Type**: API key
|
103
|
+
- **API key parameter name**: Apikey
|
104
|
+
- **Location**: HTTP header
|
105
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#Data Integration API
|
5
|
+
|
6
|
+
#Easily and directly query database backup files, convert into other file formats.
|
7
|
+
|
8
|
+
OpenAPI spec version: v1
|
9
|
+
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
+
Swagger Codegen version: 2.4.14
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "cloudmersive-dataintegration-api-client/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "cloudmersive-dataintegration-api-client"
|
20
|
+
s.version = CloudmersiveDataintegrationApiClient::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["Cloudmersive"]
|
23
|
+
s.email = [""]
|
24
|
+
s.homepage = "https://cloudmersive.com/data-integration-api"
|
25
|
+
s.summary = "Easily and directly query database backup files, convert into other file formats."
|
26
|
+
s.description = "Easily and directly query database backup files, convert into other file formats."
|
27
|
+
s.license = 'Apache 2.0'
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
35
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
36
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
37
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
38
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
39
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
40
|
+
|
41
|
+
s.files = Dir['./**/*']
|
42
|
+
s.test_files = `find spec/*`.split("\n")
|
43
|
+
s.executables = []
|
44
|
+
s.require_paths = ["lib"]
|
45
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
# CloudmersiveDataintegrationApiClient::BackupConvertApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://localhost*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**dataintegration_backup_convert_mssql_bak_get_tables_post**](BackupConvertApi.md#dataintegration_backup_convert_mssql_bak_get_tables_post) | **POST** /dataintegration/backup/convert/mssql/bak/get/tables | Lists all tables stored in a SQL Server Backup (.BAK) file
|
8
|
+
[**dataintegration_backup_convert_mssql_bak_to_csv_post**](BackupConvertApi.md#dataintegration_backup_convert_mssql_bak_to_csv_post) | **POST** /dataintegration/backup/convert/mssql/bak/to/csv | Converts a SQL Server Backup (.BAK) file into CSV for a specified table
|
9
|
+
|
10
|
+
|
11
|
+
# **dataintegration_backup_convert_mssql_bak_get_tables_post**
|
12
|
+
> MssqlBakEnumerateTablesResult dataintegration_backup_convert_mssql_bak_get_tables_post(opts)
|
13
|
+
|
14
|
+
Lists all tables stored in a SQL Server Backup (.BAK) file
|
15
|
+
|
16
|
+
### Example
|
17
|
+
```ruby
|
18
|
+
# load the gem
|
19
|
+
require 'cloudmersive-dataintegration-api-client'
|
20
|
+
# setup authorization
|
21
|
+
CloudmersiveDataintegrationApiClient.configure do |config|
|
22
|
+
# Configure API key authorization: Apikey
|
23
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
24
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
25
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
26
|
+
end
|
27
|
+
|
28
|
+
api_instance = CloudmersiveDataintegrationApiClient::BackupConvertApi.new
|
29
|
+
|
30
|
+
opts = {
|
31
|
+
input_file: File.new('/path/to/file.txt') # File | Input file to perform the operation on
|
32
|
+
}
|
33
|
+
|
34
|
+
begin
|
35
|
+
#Lists all tables stored in a SQL Server Backup (.BAK) file
|
36
|
+
result = api_instance.dataintegration_backup_convert_mssql_bak_get_tables_post(opts)
|
37
|
+
p result
|
38
|
+
rescue CloudmersiveDataintegrationApiClient::ApiError => e
|
39
|
+
puts "Exception when calling BackupConvertApi->dataintegration_backup_convert_mssql_bak_get_tables_post: #{e}"
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
### Parameters
|
44
|
+
|
45
|
+
Name | Type | Description | Notes
|
46
|
+
------------- | ------------- | ------------- | -------------
|
47
|
+
**input_file** | **File**| Input file to perform the operation on | [optional]
|
48
|
+
|
49
|
+
### Return type
|
50
|
+
|
51
|
+
[**MssqlBakEnumerateTablesResult**](MssqlBakEnumerateTablesResult.md)
|
52
|
+
|
53
|
+
### Authorization
|
54
|
+
|
55
|
+
[Apikey](../README.md#Apikey)
|
56
|
+
|
57
|
+
### HTTP request headers
|
58
|
+
|
59
|
+
- **Content-Type**: multipart/form-data
|
60
|
+
- **Accept**: text/plain, application/json, text/json
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
# **dataintegration_backup_convert_mssql_bak_to_csv_post**
|
65
|
+
> String dataintegration_backup_convert_mssql_bak_to_csv_post(opts)
|
66
|
+
|
67
|
+
Converts a SQL Server Backup (.BAK) file into CSV for a specified table
|
68
|
+
|
69
|
+
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.
|
70
|
+
|
71
|
+
### Example
|
72
|
+
```ruby
|
73
|
+
# load the gem
|
74
|
+
require 'cloudmersive-dataintegration-api-client'
|
75
|
+
# setup authorization
|
76
|
+
CloudmersiveDataintegrationApiClient.configure do |config|
|
77
|
+
# Configure API key authorization: Apikey
|
78
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
79
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
80
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
81
|
+
end
|
82
|
+
|
83
|
+
api_instance = CloudmersiveDataintegrationApiClient::BackupConvertApi.new
|
84
|
+
|
85
|
+
opts = {
|
86
|
+
table_name: 'table_name_example', # String | Name of the table to return
|
87
|
+
input_file: File.new('/path/to/file.txt') # File | Input file to perform the operation on
|
88
|
+
}
|
89
|
+
|
90
|
+
begin
|
91
|
+
#Converts a SQL Server Backup (.BAK) file into CSV for a specified table
|
92
|
+
result = api_instance.dataintegration_backup_convert_mssql_bak_to_csv_post(opts)
|
93
|
+
p result
|
94
|
+
rescue CloudmersiveDataintegrationApiClient::ApiError => e
|
95
|
+
puts "Exception when calling BackupConvertApi->dataintegration_backup_convert_mssql_bak_to_csv_post: #{e}"
|
96
|
+
end
|
97
|
+
```
|
98
|
+
|
99
|
+
### Parameters
|
100
|
+
|
101
|
+
Name | Type | Description | Notes
|
102
|
+
------------- | ------------- | ------------- | -------------
|
103
|
+
**table_name** | **String**| Name of the table to return | [optional]
|
104
|
+
**input_file** | **File**| Input file to perform the operation on | [optional]
|
105
|
+
|
106
|
+
### Return type
|
107
|
+
|
108
|
+
**String**
|
109
|
+
|
110
|
+
### Authorization
|
111
|
+
|
112
|
+
[Apikey](../README.md#Apikey)
|
113
|
+
|
114
|
+
### HTTP request headers
|
115
|
+
|
116
|
+
- **Content-Type**: multipart/form-data
|
117
|
+
- **Accept**: text/csv
|
118
|
+
|
119
|
+
|
120
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveDataintegrationApiClient::MssqlBakEnumerateTablesResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if successful, False otherwise | [optional]
|
7
|
+
**tables** | [**Array<MssqlTable>**](MssqlTable.md) | SQL Server Tables in the backup file | [optional]
|
8
|
+
|
9
|
+
|
data/docs/MssqlTable.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveDataintegrationApiClient::MssqlTable
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**schema_name** | **String** | Name of the schema containing the table | [optional]
|
7
|
+
**table_name** | **String** | Name of the table | [optional]
|
8
|
+
|
9
|
+
|
data/git_push.sh
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
#
|
3
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
4
|
+
#
|
5
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
6
|
+
#
|
7
|
+
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
8
|
+
|
9
|
+
git_user_id=$1
|
10
|
+
git_repo_id=$2
|
11
|
+
release_note=$3
|
12
|
+
|
13
|
+
if [ "$git_user_id" = "" ]; then
|
14
|
+
git_user_id="GIT_USER_ID"
|
15
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
16
|
+
fi
|
17
|
+
|
18
|
+
if [ "$git_repo_id" = "" ]; then
|
19
|
+
git_repo_id="GIT_REPO_ID"
|
20
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
21
|
+
fi
|
22
|
+
|
23
|
+
if [ "$release_note" = "" ]; then
|
24
|
+
release_note="Minor update"
|
25
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
26
|
+
fi
|
27
|
+
|
28
|
+
# Initialize the local directory as a Git repository
|
29
|
+
git init
|
30
|
+
|
31
|
+
# Adds the files in the local repository and stages them for commit.
|
32
|
+
git add .
|
33
|
+
|
34
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
35
|
+
git commit -m "$release_note"
|
36
|
+
|
37
|
+
# Sets the new remote
|
38
|
+
git_remote=`git remote`
|
39
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
40
|
+
|
41
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
42
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
43
|
+
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
44
|
+
else
|
45
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
46
|
+
fi
|
47
|
+
|
48
|
+
fi
|
49
|
+
|
50
|
+
git pull origin master
|
51
|
+
|
52
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
53
|
+
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
54
|
+
git push origin master 2>&1 | grep -v 'To https'
|
55
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
=begin
|
2
|
+
#Data Integration API
|
3
|
+
|
4
|
+
#Easily and directly query database backup files, convert into other file formats.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
# Common files
|
14
|
+
require 'cloudmersive-dataintegration-api-client/api_client'
|
15
|
+
require 'cloudmersive-dataintegration-api-client/api_error'
|
16
|
+
require 'cloudmersive-dataintegration-api-client/version'
|
17
|
+
require 'cloudmersive-dataintegration-api-client/configuration'
|
18
|
+
|
19
|
+
# Models
|
20
|
+
require 'cloudmersive-dataintegration-api-client/models/mssql_bak_enumerate_tables_result'
|
21
|
+
require 'cloudmersive-dataintegration-api-client/models/mssql_table'
|
22
|
+
|
23
|
+
# APIs
|
24
|
+
require 'cloudmersive-dataintegration-api-client/api/backup_convert_api'
|
25
|
+
|
26
|
+
module CloudmersiveDataintegrationApiClient
|
27
|
+
class << self
|
28
|
+
# Customize default settings for the SDK using block.
|
29
|
+
# CloudmersiveDataintegrationApiClient.configure do |config|
|
30
|
+
# config.username = "xxx"
|
31
|
+
# config.password = "xxx"
|
32
|
+
# end
|
33
|
+
# If no block given, return the default Configuration object.
|
34
|
+
def configure
|
35
|
+
if block_given?
|
36
|
+
yield(Configuration.default)
|
37
|
+
else
|
38
|
+
Configuration.default
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,126 @@
|
|
1
|
+
=begin
|
2
|
+
#Data Integration API
|
3
|
+
|
4
|
+
#Easily and directly query database backup files, convert into other file formats.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module CloudmersiveDataintegrationApiClient
|
16
|
+
class BackupConvertApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Lists all tables stored in a SQL Server Backup (.BAK) file
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @option opts [File] :input_file Input file to perform the operation on
|
25
|
+
# @return [MssqlBakEnumerateTablesResult]
|
26
|
+
def dataintegration_backup_convert_mssql_bak_get_tables_post(opts = {})
|
27
|
+
data, _status_code, _headers = dataintegration_backup_convert_mssql_bak_get_tables_post_with_http_info(opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Lists all tables stored in a SQL Server Backup (.BAK) file
|
32
|
+
# @param [Hash] opts the optional parameters
|
33
|
+
# @option opts [File] :input_file Input file to perform the operation on
|
34
|
+
# @return [Array<(MssqlBakEnumerateTablesResult, Fixnum, Hash)>] MssqlBakEnumerateTablesResult data, response status code and response headers
|
35
|
+
def dataintegration_backup_convert_mssql_bak_get_tables_post_with_http_info(opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: BackupConvertApi.dataintegration_backup_convert_mssql_bak_get_tables_post ...'
|
38
|
+
end
|
39
|
+
# resource path
|
40
|
+
local_var_path = '/dataintegration/backup/convert/mssql/bak/get/tables'
|
41
|
+
|
42
|
+
# query parameters
|
43
|
+
query_params = {}
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
49
|
+
# HTTP header 'Content-Type'
|
50
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
51
|
+
|
52
|
+
# form parameters
|
53
|
+
form_params = {}
|
54
|
+
form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
|
55
|
+
|
56
|
+
# http body (model)
|
57
|
+
post_body = nil
|
58
|
+
auth_names = ['Apikey']
|
59
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
60
|
+
:header_params => header_params,
|
61
|
+
:query_params => query_params,
|
62
|
+
:form_params => form_params,
|
63
|
+
:body => post_body,
|
64
|
+
:auth_names => auth_names,
|
65
|
+
:return_type => 'MssqlBakEnumerateTablesResult')
|
66
|
+
if @api_client.config.debugging
|
67
|
+
@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}"
|
68
|
+
end
|
69
|
+
return data, status_code, headers
|
70
|
+
end
|
71
|
+
# Converts a SQL Server Backup (.BAK) file into CSV for a specified table
|
72
|
+
# 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.
|
73
|
+
# @param [Hash] opts the optional parameters
|
74
|
+
# @option opts [String] :table_name Name of the table to return
|
75
|
+
# @option opts [File] :input_file Input file to perform the operation on
|
76
|
+
# @return [String]
|
77
|
+
def dataintegration_backup_convert_mssql_bak_to_csv_post(opts = {})
|
78
|
+
data, _status_code, _headers = dataintegration_backup_convert_mssql_bak_to_csv_post_with_http_info(opts)
|
79
|
+
data
|
80
|
+
end
|
81
|
+
|
82
|
+
# Converts a SQL Server Backup (.BAK) file into CSV for a specified table
|
83
|
+
# 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.
|
84
|
+
# @param [Hash] opts the optional parameters
|
85
|
+
# @option opts [String] :table_name Name of the table to return
|
86
|
+
# @option opts [File] :input_file Input file to perform the operation on
|
87
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
88
|
+
def dataintegration_backup_convert_mssql_bak_to_csv_post_with_http_info(opts = {})
|
89
|
+
if @api_client.config.debugging
|
90
|
+
@api_client.config.logger.debug 'Calling API: BackupConvertApi.dataintegration_backup_convert_mssql_bak_to_csv_post ...'
|
91
|
+
end
|
92
|
+
# resource path
|
93
|
+
local_var_path = '/dataintegration/backup/convert/mssql/bak/to/csv'
|
94
|
+
|
95
|
+
# query parameters
|
96
|
+
query_params = {}
|
97
|
+
|
98
|
+
# header parameters
|
99
|
+
header_params = {}
|
100
|
+
# HTTP header 'Accept' (if needed)
|
101
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/csv'])
|
102
|
+
# HTTP header 'Content-Type'
|
103
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
104
|
+
header_params[:'tableName'] = opts[:'table_name'] if !opts[:'table_name'].nil?
|
105
|
+
|
106
|
+
# form parameters
|
107
|
+
form_params = {}
|
108
|
+
form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
|
109
|
+
|
110
|
+
# http body (model)
|
111
|
+
post_body = nil
|
112
|
+
auth_names = ['Apikey']
|
113
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
114
|
+
:header_params => header_params,
|
115
|
+
:query_params => query_params,
|
116
|
+
:form_params => form_params,
|
117
|
+
:body => post_body,
|
118
|
+
:auth_names => auth_names,
|
119
|
+
:return_type => 'String')
|
120
|
+
if @api_client.config.debugging
|
121
|
+
@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}"
|
122
|
+
end
|
123
|
+
return data, status_code, headers
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|