kinetic_sdk 5.0.28 → 5.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/kinetic_sdk/core/lib/webapis.rb +74 -13
- data/lib/kinetic_sdk/integrator/lib/connections.rb +20 -0
- data/lib/kinetic_sdk/integrator/lib/operations.rb +33 -0
- data/lib/kinetic_sdk/version.rb +1 -1
- metadata +2 -3
- data/lib/kinetic_sdk/integrator/lib/executions.rb +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 054f33cf19229075e84310cbec30fd1e7273dcb7b170ca72b47ce3ac2e4247e1
|
4
|
+
data.tar.gz: f0f73ed401f108470103e98e2ac7463199cfcd499127cc9e49123a882dee6000
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8288d007b340bf2f81b05b2504ff4a2af7892966ea5319910916aa5566e32897b8353ccc4963df962cb8f8dbc6460b1e3c25e2586ad3a049d60f76ad441439da
|
7
|
+
data.tar.gz: 9f274fe9504a7121b73dfe89d6fa90a87e1154bf2a1e30503726c7847793e4323ce2edf3357372f6bdfe9f657a62e2a28d38d636e3b029ccd56b25d3372ccdf9
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [5.0.30](https://github.com/kineticdata/kinetic-sdk-rb/tree/5.0.30) (2025-10-02)
|
4
|
+
|
5
|
+
**Implemented enhancements:**
|
6
|
+
|
7
|
+
- Add import/export methods for WebAPIs.
|
8
|
+
|
9
|
+
## [5.0.29](https://github.com/kineticdata/kinetic-sdk-rb/tree/5.0.29) (2025-01-11)
|
10
|
+
|
11
|
+
**Implemented enhancements:**
|
12
|
+
|
13
|
+
- Fix integrator sdk methods for executing and inspecting operations.
|
14
|
+
- Fix integrator sdk methods for testing connections.
|
15
|
+
|
3
16
|
## [5.0.28](https://github.com/kineticdata/kinetic-sdk-rb/tree/5.0.28) (2025-01-10)
|
4
17
|
|
5
18
|
**Implemented enhancements:**
|
@@ -17,7 +17,7 @@ module KineticSdk
|
|
17
17
|
@logger.info("Adding the \"#{body['slug']}\" to the Space.")
|
18
18
|
post("#{@api_url}/webApis", body, headers)
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
# Add a Web API on a Kapp
|
22
22
|
#
|
23
23
|
# @param kapp_slug [String] the Kapp slug
|
@@ -35,7 +35,7 @@ module KineticSdk
|
|
35
35
|
@logger.info("Adding the \"#{body['slug']}\" to the \"#{kapp_slug}\" Kapp.")
|
36
36
|
post("#{@api_url}/kapps/#{kapp_slug}/webApis", body, headers)
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
39
|
# Find all Web APIs for the Space
|
40
40
|
#
|
41
41
|
# @param params [Hash] Query parameters that are added to the URL, such as +include+
|
@@ -45,7 +45,7 @@ module KineticSdk
|
|
45
45
|
@logger.info("Finding all Web APIs on the Space")
|
46
46
|
get("#{@api_url}/webApis", params, headers)
|
47
47
|
end
|
48
|
-
|
48
|
+
|
49
49
|
# Find a single Web API on the Space
|
50
50
|
#
|
51
51
|
# @param slug [String] slug of the Web API
|
@@ -55,8 +55,8 @@ module KineticSdk
|
|
55
55
|
def find_space_webapi(slug, params={}, headers=default_headers)
|
56
56
|
@logger.info("Finding the \"#{slug}\" Web API on the Space")
|
57
57
|
get("#{@api_url}/webApis/#{slug}", params, headers)
|
58
|
-
end
|
59
|
-
|
58
|
+
end
|
59
|
+
|
60
60
|
# Find all Web APIs for a Kapp
|
61
61
|
#
|
62
62
|
# @param kapp_slug [String] the Kapp slug
|
@@ -66,8 +66,8 @@ module KineticSdk
|
|
66
66
|
def find_kapp_webapis(kapp_slug, params={}, headers=default_headers)
|
67
67
|
@logger.info("Finding all Web APIs on the \"#{kapp_slug}\" Kapp.")
|
68
68
|
get("#{@api_url}/kapps/#{kapp_slug}/webApis", params, headers)
|
69
|
-
end
|
70
|
-
|
69
|
+
end
|
70
|
+
|
71
71
|
# Find a single Web API on the Kapp
|
72
72
|
#
|
73
73
|
# @param kapp_slug [String] the Kapp slug
|
@@ -79,7 +79,7 @@ module KineticSdk
|
|
79
79
|
@logger.info("Finding the \"#{slug}\" Web API on the \"#{kapp_slug}\" Kapp.")
|
80
80
|
get("#{@api_url}/kapps/#{kapp_slug}/webApis/#{slug}", params, headers)
|
81
81
|
end
|
82
|
-
|
82
|
+
|
83
83
|
# Update a Web API on the Space
|
84
84
|
#
|
85
85
|
# All of the Web API properties are optional. Only the properties provided
|
@@ -99,7 +99,7 @@ module KineticSdk
|
|
99
99
|
@logger.info("Updating the \"#{slug}\" Web API on the Space.")
|
100
100
|
put("#{@api_url}/webApis/#{slug}", body, headers)
|
101
101
|
end
|
102
|
-
|
102
|
+
|
103
103
|
# Update a Web API on a Kapp
|
104
104
|
#
|
105
105
|
# All of the Web API properties are optional. Only the properties provided
|
@@ -120,8 +120,9 @@ module KineticSdk
|
|
120
120
|
@logger.info("Updating the \"#{slug}\" Web API on the \"#{kapp_slug}\" Kapp.")
|
121
121
|
put("#{@api_url}/kapps/#{kapp_slug}/webApis/#{slug}", body, headers)
|
122
122
|
end
|
123
|
-
|
123
|
+
|
124
124
|
# Delete a Web API on the Space
|
125
|
+
#
|
125
126
|
# @param slug [String] the slug of the Web API
|
126
127
|
# @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
|
127
128
|
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
@@ -129,8 +130,9 @@ module KineticSdk
|
|
129
130
|
@logger.info("Deleting the \"#{slug}\" Web API on the Space.")
|
130
131
|
delete("#{@api_url}/webApis/#{slug}", headers)
|
131
132
|
end
|
132
|
-
|
133
|
+
|
133
134
|
# Delete a Web API on a Kapp
|
135
|
+
#
|
134
136
|
# @param kapp_slug [String] the Kapp slug
|
135
137
|
# @param slug [String] the slug of the Web API
|
136
138
|
# @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
|
@@ -138,7 +140,66 @@ module KineticSdk
|
|
138
140
|
def delete_kapp_webapi(kapp_slug, slug, headers=default_headers)
|
139
141
|
@logger.info("Deleting the \"#{slug}\" Web API on the \"#{kapp_slug}\" Kapp.")
|
140
142
|
delete("#{@api_url}/kapps/#{kapp_slug}/webApis/#{slug}", headers)
|
141
|
-
end
|
142
|
-
|
143
|
+
end
|
144
|
+
|
145
|
+
# Export a single Web API on the Space
|
146
|
+
#
|
147
|
+
# @param slug [String] slug of the Web API
|
148
|
+
# @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
|
149
|
+
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
150
|
+
def export_space_webapi(slug, headers=default_headers)
|
151
|
+
@logger.info("Exporting the \"#{slug}\" Web API on the Space")
|
152
|
+
get("#{@api_url}/webApis/#{slug}/export", {}, headers)
|
153
|
+
end
|
154
|
+
|
155
|
+
# Import a Web API on the Space
|
156
|
+
#
|
157
|
+
# @param body [Hash] hash of Web API properties. Must contain one of either +treeXml+ or +treeJson+, but not both.
|
158
|
+
# - +method+ - The method of the Web API - "GET", "POST", "PUT", or "DELETE"
|
159
|
+
# - +slug+ - The slug of the Web API
|
160
|
+
# - +securityPolicies+ - [Array] Array of hashes
|
161
|
+
# - - +endpoint+ - "Execution"
|
162
|
+
# - - +name+ - Name of an existing Space Security Definition
|
163
|
+
# - +treeJson+ - JSON string representing the Web API's tree structure
|
164
|
+
# - +treeXml+ - XML string representing the Web API's tree structure
|
165
|
+
# @param force_overwrite [Boolean] whether to overwrite a WebAPI if it exists, default is false
|
166
|
+
# @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
|
167
|
+
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
168
|
+
def import_space_webapi(body, force_overwrite=false, headers=default_headers)
|
169
|
+
raise StandardError.new "Web API properties is not valid, must be a Hash." unless body.is_a? Hash
|
170
|
+
@logger.info("Importing the \"#{body['slug']}\" Web API to the Space.")
|
171
|
+
post("#{@api_url}/webApiImport?force=#{force_overwrite}", body, headers)
|
172
|
+
end
|
173
|
+
|
174
|
+
# Export a single Web API on a Kapp
|
175
|
+
#
|
176
|
+
# @param kapp_slug [String] the Kapp slug
|
177
|
+
# @param slug [String] the slug of the Web API
|
178
|
+
# @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
|
179
|
+
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
180
|
+
def export_kapp_webapi(kapp_slug, slug, headers=default_headers)
|
181
|
+
@logger.info("Exporting the \"#{slug}\" Web API on the \"#{kapp_slug}\" Kapp.")
|
182
|
+
get("#{@api_url}/kapps/#{kapp_slug}/webApis/#{slug}/export", {}, headers)
|
183
|
+
end
|
184
|
+
|
185
|
+
# Import a Web API on a Kapp
|
186
|
+
#
|
187
|
+
# @param kapp_slug [String] the Kapp slug
|
188
|
+
# @param body [Hash] hash of Web API properties. Must contain one of either +treeXml+ or +treeJson+, but not both.
|
189
|
+
# - +method+ - The method of the Web API - "GET", "POST", "PUT", or "DELETE"
|
190
|
+
# - +slug+ - The slug of the Web API
|
191
|
+
# - +securityPolicies+ - [Array] Array of hashes
|
192
|
+
# - - +endpoint+ - "Execution"
|
193
|
+
# - - +name+ - Name of an existing Space Security Definition
|
194
|
+
# - +treeJson+ - JSON string representing the Web API's tree structure
|
195
|
+
# - +treeXml+ - XML string representing the Web API's tree structure
|
196
|
+
# @param force_overwrite [Boolean] whether to overwrite a WebAPI if it exists, default is false
|
197
|
+
# @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
|
198
|
+
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
199
|
+
def import_kapp_webapi(kapp_slug, body, force_overwrite=false, headers=default_headers)
|
200
|
+
raise StandardError.new "Web API properties is not valid, must be a Hash." unless body.is_a? Hash
|
201
|
+
@logger.info("Importing the \"#{body['slug']}\" Web API to the \"#{kapp_slug}\" Kapp.")
|
202
|
+
post("#{@api_url}/kapps/#{kapp_slug}/webApiImport?force=#{force_overwrite}", body, headers)
|
203
|
+
end
|
143
204
|
end
|
144
205
|
end
|
@@ -58,5 +58,25 @@ module KineticSdk
|
|
58
58
|
put("#{@api_url}/connections/#{connection_id}", properties, headers)
|
59
59
|
end
|
60
60
|
|
61
|
+
# Test an unsaved Connection
|
62
|
+
#
|
63
|
+
# @param properties [Hash] connection properties to test
|
64
|
+
# @param headers [Hash] hash of headers to send, default is bearer authentication and accept JSON content type
|
65
|
+
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
66
|
+
def test_unsaved_connection(properties={}, headers=default_jwt_headers)
|
67
|
+
@logger.info("Testing unsaved connection")
|
68
|
+
post("#{@api_url}/test", properties, headers)
|
69
|
+
end
|
70
|
+
|
71
|
+
# Test a saved Connection
|
72
|
+
#
|
73
|
+
# @param connection_id [String] id of the Connection
|
74
|
+
# @param properties [Hash] connection properties to test
|
75
|
+
# @param headers [Hash] hash of headers to send, default is bearer authentication and accept JSON content type
|
76
|
+
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
77
|
+
def test_saved_connection(connection_id, properties={}, headers=default_jwt_headers)
|
78
|
+
@logger.info("Testing saved connection: #{connection_id}")
|
79
|
+
post("#{@api_url}/connections/#{connection_id}/test", properties, headers)
|
80
|
+
end
|
61
81
|
end
|
62
82
|
end
|
@@ -65,5 +65,38 @@ module KineticSdk
|
|
65
65
|
put("#{@api_url}/connections/#{connection_id}/operations/#{operation_id}", properties, headers)
|
66
66
|
end
|
67
67
|
|
68
|
+
# Execute an Operation
|
69
|
+
#
|
70
|
+
# @param connection_id [String] id of the Connection
|
71
|
+
# @param operation_id [String] id of the Operation
|
72
|
+
# @param parameters [Hash] operation execution parameters
|
73
|
+
# @param debug [boolean] execute in debug mode
|
74
|
+
# @param headers [Hash] hash of headers to send, default is bearer authentication and accept JSON content type
|
75
|
+
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
76
|
+
def execute_operation(connection_id, operation_id, parameters={}, debug=false, headers=default_jwt_headers)
|
77
|
+
@logger.info("Executing operation #{operation_id}")
|
78
|
+
payload = {
|
79
|
+
"connectionId" => connection_id,
|
80
|
+
"operationId" => operation_id,
|
81
|
+
"parameters" => parameters
|
82
|
+
}
|
83
|
+
url = "#{@api_url}/execute"
|
84
|
+
url = "#{url}?debug=true" if debug
|
85
|
+
post(url, payload, headers)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Inspect an Operation
|
89
|
+
#
|
90
|
+
# @param operation_id [String] id of the Operation
|
91
|
+
# @param headers [Hash] hash of headers to send, default is bearer authentication and accept JSON content type
|
92
|
+
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
93
|
+
def inspect_operation(operation_id, headers=default_jwt_headers)
|
94
|
+
@logger.info("Inspecting operation #{operation_id}")
|
95
|
+
payload = {
|
96
|
+
"operationId" => operation_id
|
97
|
+
}
|
98
|
+
url = "#{@api_url}/inspect"
|
99
|
+
post(url, payload, headers)
|
100
|
+
end
|
68
101
|
end
|
69
102
|
end
|
data/lib/kinetic_sdk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kinetic_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kinetic Data
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slugify
|
@@ -663,7 +663,6 @@ files:
|
|
663
663
|
- lib/kinetic_sdk/filehub/lib/filestores.rb
|
664
664
|
- lib/kinetic_sdk/integrator/integrator-sdk.rb
|
665
665
|
- lib/kinetic_sdk/integrator/lib/connections.rb
|
666
|
-
- lib/kinetic_sdk/integrator/lib/executions.rb
|
667
666
|
- lib/kinetic_sdk/integrator/lib/metadata.rb
|
668
667
|
- lib/kinetic_sdk/integrator/lib/operations.rb
|
669
668
|
- lib/kinetic_sdk/task/lib/access_keys.rb
|
@@ -1,38 +0,0 @@
|
|
1
|
-
module KineticSdk
|
2
|
-
class Integrator
|
3
|
-
|
4
|
-
# Execute an Operation
|
5
|
-
#
|
6
|
-
# @param connection_id [String] id of the Connection
|
7
|
-
# @param operation_id [String] id of the Operation
|
8
|
-
# @param parameters [Hash] operation execution parameters
|
9
|
-
# @param debug [boolean] execute in debug mode
|
10
|
-
# @param headers [Hash] hash of headers to send, default is bearer authentication and accept JSON content type
|
11
|
-
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
12
|
-
def execute_operation(connection_id, operation_id, parameters={}, debug=false, headers=default_jwt_headers)
|
13
|
-
@logger.info("Executing operation #{operation_id}")
|
14
|
-
payload = {
|
15
|
-
"connection" => connection_id,
|
16
|
-
"operation" => operation_id,
|
17
|
-
"parameters" => parameters
|
18
|
-
}
|
19
|
-
url = "#{@api_url}/execute"
|
20
|
-
url = "#{url}?debug=true" if debug
|
21
|
-
post(url, payload, headers)
|
22
|
-
end
|
23
|
-
|
24
|
-
# Inspect an Operation
|
25
|
-
#
|
26
|
-
# @param operation_id [String] id of the Operation
|
27
|
-
# @param headers [Hash] hash of headers to send, default is bearer authentication and accept JSON content type
|
28
|
-
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
29
|
-
def inspect_operation(operation_id, headers=default_jwt_headers)
|
30
|
-
@logger.info("Inspecting operation #{operation_id}")
|
31
|
-
payload = {
|
32
|
-
"operation" => operation_id
|
33
|
-
}
|
34
|
-
url = "#{@api_url}/inspect"
|
35
|
-
post(url, payload, headers)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|