comet_backup_ruby_sdk 0.3.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -0
- data/Gemfile.lock +1 -1
- data/RELEASING.md +1 -1
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +609 -263
- data/lib/comet/definitions.rb +19 -4
- data/lib/comet/models/add_bucket_response_message.rb +6 -6
- data/lib/comet/models/admin_account_properties_response.rb +11 -2
- data/lib/comet/models/admin_email_options.rb +84 -0
- data/lib/comet/models/admin_resource_response.rb +5 -5
- data/lib/comet/models/admin_security_options.rb +7 -7
- data/lib/comet/models/admin_u2fregistration.rb +4 -4
- data/lib/comet/models/admin_user_permissions.rb +2 -2
- data/lib/comet/models/available_download.rb +4 -4
- data/lib/comet/models/azure_destination_location.rb +7 -7
- data/lib/comet/models/b2destination_location.rb +7 -7
- data/lib/comet/models/b2storage_extra_info.rb +2 -2
- data/lib/comet/models/b2transaction_totals.rb +5 -5
- data/lib/comet/models/b2virtual_storage_role_settings.rb +93 -0
- data/lib/comet/models/backup_job_advanced_options.rb +4 -4
- data/lib/comet/models/backup_job_detail.rb +20 -20
- data/lib/comet/models/backup_job_progress.rb +7 -7
- data/lib/comet/models/backup_rule_config.rb +27 -11
- data/lib/comet/models/backup_rule_event_triggers.rb +2 -2
- data/lib/comet/models/branding_options.rb +27 -27
- data/lib/comet/models/branding_properties.rb +23 -23
- data/lib/comet/models/browse_disk_drives_response.rb +4 -4
- data/lib/comet/models/browse_edbresponse.rb +4 -4
- data/lib/comet/models/browse_hvresponse.rb +4 -4
- data/lib/comet/models/browse_vssresponse.rb +4 -4
- data/lib/comet/models/bucket_properties.rb +14 -5
- data/lib/comet/models/bucket_usage_info.rb +3 -3
- data/lib/comet/models/comet_apiresponse_message.rb +4 -4
- data/lib/comet/models/comet_destination_location.rb +5 -5
- data/lib/comet/models/constellation_check_report.rb +4 -4
- data/lib/comet/models/constellation_stats.rb +6 -6
- data/lib/comet/models/constellation_status_apiresponse.rb +4 -4
- data/lib/comet/models/content_measurement.rb +4 -4
- data/lib/comet/models/content_measurement_component.rb +4 -4
- data/lib/comet/models/create_group_policy_response.rb +5 -5
- data/lib/comet/models/default_email_report_policy.rb +2 -2
- data/lib/comet/models/destination_config.rb +65 -43
- data/lib/comet/models/destination_location.rb +34 -34
- data/lib/comet/models/destination_statistics.rb +5 -5
- data/lib/comet/models/device_config.rb +3 -3
- data/lib/comet/models/disk_drive.rb +13 -13
- data/lib/comet/models/dispatcher_admin_sources_response.rb +5 -5
- data/lib/comet/models/dispatcher_stored_objects_response.rb +4 -4
- data/lib/comet/models/dispatcher_vault_snapshots_response.rb +4 -4
- data/lib/comet/models/edbfile_info.rb +5 -5
- data/lib/comet/models/email_options.rb +9 -9
- data/lib/comet/models/email_report_config.rb +3 -3
- data/lib/comet/models/email_report_generated_preview.rb +7 -7
- data/lib/comet/models/external_ldapauthentication_source_settings.rb +102 -0
- data/lib/comet/models/extra_file_exclusion.rb +4 -4
- data/lib/comet/models/ftpdestination_location.rb +9 -9
- data/lib/comet/models/get_group_policy_response.rb +5 -5
- data/lib/comet/models/get_profile_and_hash_response_message.rb +5 -5
- data/lib/comet/models/get_profile_hash_response_message.rb +5 -5
- data/lib/comet/models/group_policy.rb +12 -3
- data/lib/comet/models/hyper_vmachine_info.rb +4 -4
- data/lib/comet/models/install_creds.rb +99 -0
- data/lib/comet/models/install_token.rb +117 -0
- data/lib/comet/models/install_token_response.rb +92 -0
- data/lib/comet/models/job_entry.rb +5 -5
- data/lib/comet/models/live_user_connection.rb +8 -8
- data/lib/comet/models/local_destination_location.rb +6 -6
- data/lib/comet/models/mac_oscode_sign_properties.rb +8 -8
- data/lib/comet/models/mongo_dbconnection.rb +15 -15
- data/lib/comet/models/new_bucket_detail.rb +4 -4
- data/lib/comet/models/news_entry.rb +13 -4
- data/lib/comet/models/organization.rb +145 -0
- data/lib/comet/models/organization_response.rb +101 -0
- data/lib/comet/models/osinfo.rb +5 -5
- data/lib/comet/models/partition.rb +13 -13
- data/lib/comet/models/private_branding_properties.rb +17 -17
- data/lib/comet/models/protected_item_engine_type_policy.rb +3 -3
- data/lib/comet/models/public_branding_properties.rb +8 -8
- data/lib/comet/models/remote_server_address.rb +7 -7
- data/lib/comet/models/remote_storage_option.rb +14 -8
- data/lib/comet/models/replicator_state_apiresponse.rb +14 -14
- data/lib/comet/models/request_storage_vault_response_message.rb +5 -5
- data/lib/comet/models/restore_job_advanced_options.rb +6 -6
- data/lib/comet/models/retention_policy.rb +3 -3
- data/lib/comet/models/retention_range.rb +10 -10
- data/lib/comet/models/s3destination_location.rb +7 -7
- data/lib/comet/models/schedule_config.rb +5 -5
- data/lib/comet/models/search_clause.rb +6 -6
- data/lib/comet/models/server_config_options_branding_fragment.rb +2 -2
- data/lib/comet/models/server_config_options_software_build_role_fragment.rb +2 -2
- data/lib/comet/models/server_meta_version_info.rb +17 -17
- data/lib/comet/models/session_key_regenerated_response.rb +6 -6
- data/lib/comet/models/sftpdestination_location.rb +9 -9
- data/lib/comet/models/size_measurement.rb +5 -5
- data/lib/comet/models/software_build_role_options.rb +2 -2
- data/lib/comet/models/software_update_news_response.rb +6 -6
- data/lib/comet/models/source_basic_info.rb +4 -4
- data/lib/comet/models/source_config.rb +26 -10
- data/lib/comet/models/source_statistics.rb +2 -2
- data/lib/comet/models/spanned_destination_location.rb +2 -2
- data/lib/comet/models/spanned_storage_extra_info.rb +2 -2
- data/lib/comet/models/sshconnection.rb +8 -8
- data/lib/comet/models/stat_result.rb +6 -6
- data/lib/comet/models/storage_free_space_info.rb +5 -5
- data/lib/comet/models/storage_vault_provider_policy.rb +3 -3
- data/lib/comet/models/stored_object.rb +10 -10
- data/lib/comet/models/streamable_event.rb +12 -3
- data/lib/comet/models/swift_destination_location.rb +15 -15
- data/lib/comet/models/test_response.rb +4 -4
- data/lib/comet/models/totp_regenerated_response.rb +7 -7
- data/lib/comet/models/u2fregister_request.rb +4 -4
- data/lib/comet/models/u2fregistered_key.rb +5 -5
- data/lib/comet/models/u2fregistration_challenge_response.rb +6 -6
- data/lib/comet/models/u2fsign_request.rb +5 -5
- data/lib/comet/models/u2fsign_response.rb +6 -6
- data/lib/comet/models/uninstall_config.rb +2 -2
- data/lib/comet/models/update_campaign_device_status.rb +3 -3
- data/lib/comet/models/update_campaign_options.rb +2 -2
- data/lib/comet/models/update_campaign_properties.rb +4 -4
- data/lib/comet/models/update_campaign_status.rb +4 -4
- data/lib/comet/models/update_campaign_status_device_entry.rb +5 -5
- data/lib/comet/models/user_custom_email_settings.rb +2 -2
- data/lib/comet/models/user_on_server.rb +4 -4
- data/lib/comet/models/user_policy.rb +6 -6
- data/lib/comet/models/user_profile_config.rb +28 -17
- data/lib/comet/models/user_profile_fragment.rb +3 -3
- data/lib/comet/models/vault_snapshot.rb +5 -5
- data/lib/comet/models/vsscomponent.rb +5 -5
- data/lib/comet/models/vsswriter_info.rb +3 -3
- data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +93 -0
- data/lib/comet/models/web_interface_branding_properties.rb +6 -6
- data/lib/comet/models/webhook_option.rb +4 -4
- data/lib/comet/models/win_smbauth.rb +6 -6
- data/lib/comet/models/windows_code_sign_properties.rb +11 -11
- data/lib/comet_backup_ruby_sdk.rb +9 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffe045abb4afab383a013a5da8d35ed80d576fa82361d1579421f23722393be7
|
4
|
+
data.tar.gz: cb90f69c80adce36b9277042ae4581a168d9cc4d820e8eed974c9a705cf9dca4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b239d4b53d1096c9acebdd9769a1f415081a7a74dcba8834bcef72ddb459b5ffda6d0a4d22ab8310661bacf0d577630dbb01ef7283f494dfabb922bfe17218fb
|
7
|
+
data.tar.gz: b9791ed93a89258fc608375ef5230e62dfbd35589c1bf5026aae2bd35816985cf5b2caf4ba3a5c3c39f0d61f409c92575a0a7f6f0b7f097abad08e0e48383697
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,34 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2020-11-24 v1.3.0
|
4
|
+
- Based on Comet 20.11.0
|
5
|
+
- Support new `AdminDispatcherDeleteSnapshots` API for deleting multiple snapshots in a single step
|
6
|
+
- Support `AdminMetaResourceNew` API using multipart request
|
7
|
+
- Fix an issue with properly raising `TypeError` for invalid parameters
|
8
|
+
|
9
|
+
## 2020-11-05 v1.2.0
|
10
|
+
- Based on Comet 20.9.10
|
11
|
+
- Support new `ThawExec` feature
|
12
|
+
|
13
|
+
## 2020-10-08 v1.1.0
|
14
|
+
- Based on Comet 20.9.6
|
15
|
+
- Support new `AdminStorageBucketProperties` API
|
16
|
+
- Allow passing in nil or no value for `AdminStorageFreeSpace` parameter
|
17
|
+
- Fix an issue with automatic SelfAddress parameters not containing a trailing slash
|
18
|
+
|
19
|
+
## 2020-09-16 v1.0.0
|
20
|
+
- Tag a v1.0.0 release as the SDK design has stabilized. Future v1.x.x SDK releases will remain compatible with code written against v1.0.0, according to [Semantic Versioning](https://semver.org/).
|
21
|
+
- Support new Organization feature
|
22
|
+
- Support new `AdminCreateInstallTokenRequest` API
|
23
|
+
- Support new Admin user management APIs
|
24
|
+
- Support new `RebrandStorage` property on Storage Vaults and on Requestable destination targets
|
25
|
+
- Update descriptions for `SEVT_META_HELLO` and `AdminMetaWebhookOptionsSet`
|
26
|
+
|
27
|
+
## 2020-08-28 v0.4.0
|
28
|
+
- Feature: Add definitions B2 and Wasabi `VirtualStorageRole` classes
|
29
|
+
- Feature: Add definitions for remote LDAP authentication data sources
|
30
|
+
- Fix an issue with floating point constant initializers
|
31
|
+
|
3
32
|
## 2020-08-24 v0.3.1
|
4
33
|
- Fix an issue with version number in gem packaging
|
5
34
|
- Fix an issue with `.clear` initializers for numeric types
|
data/Gemfile.lock
CHANGED
data/RELEASING.md
CHANGED
@@ -12,7 +12,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
12
12
|
|
13
13
|
Gem::Specification.new do |spec|
|
14
14
|
spec.name = 'comet_backup_ruby_sdk'
|
15
|
-
spec.version = '
|
15
|
+
spec.version = '1.3.0'
|
16
16
|
spec.authors = ['Comet Licensing Ltd.']
|
17
17
|
spec.email = ['hello@cometbackup.com']
|
18
18
|
|
data/lib/comet/comet_server.rb
CHANGED
@@ -26,15 +26,18 @@ module Comet
|
|
26
26
|
|
27
27
|
# Initialize a new CometServer class instance.
|
28
28
|
def initialize(server_address, username, password)
|
29
|
-
raise TypeError "'server_address' expected String, got #{server_address.class}" unless server_address.is_a? String
|
29
|
+
raise TypeError, "'server_address' expected String, got #{server_address.class}" unless server_address.is_a? String
|
30
30
|
|
31
|
-
raise TypeError "'username' expected String, got #{username.class}" unless username.is_a? String
|
31
|
+
raise TypeError, "'username' expected String, got #{username.class}" unless username.is_a? String
|
32
32
|
|
33
|
-
raise TypeError "'password' expected String, got #{password.class}" unless password.is_a? String
|
33
|
+
raise TypeError, "'password' expected String, got #{password.class}" unless password.is_a? String
|
34
34
|
|
35
35
|
@server_address = server_address
|
36
36
|
@username = username
|
37
37
|
@password = password
|
38
|
+
|
39
|
+
# Ensure Comet Server URL has a trailing slash
|
40
|
+
@server_address += '/' unless server_address.end_with?('/')
|
38
41
|
end
|
39
42
|
|
40
43
|
# AdminAccountProperties
|
@@ -46,7 +49,7 @@ module Comet
|
|
46
49
|
#
|
47
50
|
# @return [Comet::AdminAccountPropertiesResponse]
|
48
51
|
def admin_account_properties
|
49
|
-
body = perform_request('
|
52
|
+
body = perform_request('api/v1/admin/account/properties')
|
50
53
|
json_body = JSON.parse body
|
51
54
|
check_status json_body
|
52
55
|
ret = Comet::AdminAccountPropertiesResponse.new
|
@@ -63,7 +66,7 @@ module Comet
|
|
63
66
|
#
|
64
67
|
# @return [Comet::TotpRegeneratedResponse]
|
65
68
|
def admin_account_regenerate_totp
|
66
|
-
body = perform_request('
|
69
|
+
body = perform_request('api/v1/admin/account/regenerate-totp')
|
67
70
|
json_body = JSON.parse body
|
68
71
|
check_status json_body
|
69
72
|
ret = Comet::TotpRegeneratedResponse.new
|
@@ -79,7 +82,7 @@ module Comet
|
|
79
82
|
#
|
80
83
|
# @return [Comet::CometAPIResponseMessage]
|
81
84
|
def admin_account_session_revoke
|
82
|
-
body = perform_request('
|
85
|
+
body = perform_request('api/v1/admin/account/session-revoke')
|
83
86
|
json_body = JSON.parse body
|
84
87
|
check_status json_body
|
85
88
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -100,12 +103,12 @@ module Comet
|
|
100
103
|
if self_address.nil?
|
101
104
|
submit_params['SelfAddress'] = @server_address
|
102
105
|
else
|
103
|
-
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
106
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
104
107
|
|
105
108
|
submit_params['SelfAddress'] = self_address
|
106
109
|
end
|
107
110
|
|
108
|
-
body = perform_request('
|
111
|
+
body = perform_request('api/v1/admin/account/session-start', submit_params)
|
109
112
|
json_body = JSON.parse body
|
110
113
|
check_status json_body
|
111
114
|
ret = Comet::SessionKeyRegeneratedResponse.new
|
@@ -123,11 +126,11 @@ module Comet
|
|
123
126
|
# @return [Comet::SessionKeyRegeneratedResponse]
|
124
127
|
def admin_account_session_start_as_user(target_user)
|
125
128
|
submit_params = {}
|
126
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
129
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
127
130
|
|
128
131
|
submit_params['TargetUser'] = target_user
|
129
132
|
|
130
|
-
body = perform_request('
|
133
|
+
body = perform_request('api/v1/admin/account/session-start-as-user', submit_params)
|
131
134
|
json_body = JSON.parse body
|
132
135
|
check_status json_body
|
133
136
|
ret = Comet::SessionKeyRegeneratedResponse.new
|
@@ -148,11 +151,11 @@ module Comet
|
|
148
151
|
# @return [Comet::CometAPIResponseMessage]
|
149
152
|
def admin_account_set_properties(security)
|
150
153
|
submit_params = {}
|
151
|
-
raise TypeError "'security' expected Comet::AdminSecurityOptions, got #{security.class}" unless security.is_a? Comet::AdminSecurityOptions
|
154
|
+
raise TypeError, "'security' expected Comet::AdminSecurityOptions, got #{security.class}" unless security.is_a? Comet::AdminSecurityOptions
|
152
155
|
|
153
156
|
submit_params['Security'] = security.to_json
|
154
157
|
|
155
|
-
body = perform_request('
|
158
|
+
body = perform_request('api/v1/admin/account/set-properties', submit_params)
|
156
159
|
json_body = JSON.parse body
|
157
160
|
check_status json_body
|
158
161
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -170,11 +173,11 @@ module Comet
|
|
170
173
|
# @return [Comet::U2FRegistrationChallengeResponse]
|
171
174
|
def admin_account_u2f_request_registration_challenge(self_address)
|
172
175
|
submit_params = {}
|
173
|
-
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
176
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
174
177
|
|
175
178
|
submit_params['SelfAddress'] = self_address
|
176
179
|
|
177
|
-
body = perform_request('
|
180
|
+
body = perform_request('api/v1/admin/account/u2f/request-registration-challenge', submit_params)
|
178
181
|
json_body = JSON.parse body
|
179
182
|
check_status json_body
|
180
183
|
ret = Comet::U2FRegistrationChallengeResponse.new
|
@@ -196,23 +199,23 @@ module Comet
|
|
196
199
|
# @return [Comet::CometAPIResponseMessage]
|
197
200
|
def admin_account_u2f_submit_challenge_response(u2fchallenge_id, u2fclient_data, u2fregistration_data, u2fversion, description)
|
198
201
|
submit_params = {}
|
199
|
-
raise TypeError "'u2fchallenge_id' expected String, got #{u2fchallenge_id.class}" unless u2fchallenge_id.is_a? String
|
202
|
+
raise TypeError, "'u2fchallenge_id' expected String, got #{u2fchallenge_id.class}" unless u2fchallenge_id.is_a? String
|
200
203
|
|
201
204
|
submit_params['U2FChallengeID'] = u2fchallenge_id
|
202
|
-
raise TypeError "'u2fclient_data' expected String, got #{u2fclient_data.class}" unless u2fclient_data.is_a? String
|
205
|
+
raise TypeError, "'u2fclient_data' expected String, got #{u2fclient_data.class}" unless u2fclient_data.is_a? String
|
203
206
|
|
204
207
|
submit_params['U2FClientData'] = u2fclient_data
|
205
|
-
raise TypeError "'u2fregistration_data' expected String, got #{u2fregistration_data.class}" unless u2fregistration_data.is_a? String
|
208
|
+
raise TypeError, "'u2fregistration_data' expected String, got #{u2fregistration_data.class}" unless u2fregistration_data.is_a? String
|
206
209
|
|
207
210
|
submit_params['U2FRegistrationData'] = u2fregistration_data
|
208
|
-
raise TypeError "'u2fversion' expected String, got #{u2fversion.class}" unless u2fversion.is_a? String
|
211
|
+
raise TypeError, "'u2fversion' expected String, got #{u2fversion.class}" unless u2fversion.is_a? String
|
209
212
|
|
210
213
|
submit_params['U2FVersion'] = u2fversion
|
211
|
-
raise TypeError "'description' expected String, got #{description.class}" unless description.is_a? String
|
214
|
+
raise TypeError, "'description' expected String, got #{description.class}" unless description.is_a? String
|
212
215
|
|
213
216
|
submit_params['Description'] = description
|
214
217
|
|
215
|
-
body = perform_request('
|
218
|
+
body = perform_request('api/v1/admin/account/u2f/submit-challenge-response', submit_params)
|
216
219
|
json_body = JSON.parse body
|
217
220
|
check_status json_body
|
218
221
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -230,11 +233,11 @@ module Comet
|
|
230
233
|
# @return [Comet::CometAPIResponseMessage]
|
231
234
|
def admin_account_validate_totp(totpcode)
|
232
235
|
submit_params = {}
|
233
|
-
raise TypeError "'totpcode' expected String, got #{totpcode.class}" unless totpcode.is_a? String
|
236
|
+
raise TypeError, "'totpcode' expected String, got #{totpcode.class}" unless totpcode.is_a? String
|
234
237
|
|
235
238
|
submit_params['TOTPCode'] = totpcode
|
236
239
|
|
237
|
-
body = perform_request('
|
240
|
+
body = perform_request('api/v1/admin/account/validate-totp', submit_params)
|
238
241
|
json_body = JSON.parse body
|
239
242
|
check_status json_body
|
240
243
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -256,24 +259,24 @@ module Comet
|
|
256
259
|
# @return [Comet::CometAPIResponseMessage]
|
257
260
|
def admin_add_user(target_user, target_password, store_recovery_code = nil, require_password_change = nil)
|
258
261
|
submit_params = {}
|
259
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
262
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
260
263
|
|
261
264
|
submit_params['TargetUser'] = target_user
|
262
|
-
raise TypeError "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
|
265
|
+
raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
|
263
266
|
|
264
267
|
submit_params['TargetPassword'] = target_password
|
265
268
|
unless store_recovery_code.nil?
|
266
|
-
raise TypeError "'store_recovery_code' expected Numeric, got #{store_recovery_code.class}" unless store_recovery_code.is_a? Numeric
|
269
|
+
raise TypeError, "'store_recovery_code' expected Numeric, got #{store_recovery_code.class}" unless store_recovery_code.is_a? Numeric
|
267
270
|
|
268
271
|
submit_params['StoreRecoveryCode'] = store_recovery_code
|
269
272
|
end
|
270
273
|
unless require_password_change.nil?
|
271
|
-
raise TypeError "'require_password_change' expected Numeric, got #{require_password_change.class}" unless require_password_change.is_a? Numeric
|
274
|
+
raise TypeError, "'require_password_change' expected Numeric, got #{require_password_change.class}" unless require_password_change.is_a? Numeric
|
272
275
|
|
273
276
|
submit_params['RequirePasswordChange'] = require_password_change
|
274
277
|
end
|
275
278
|
|
276
|
-
body = perform_request('
|
279
|
+
body = perform_request('api/v1/admin/add-user', submit_params)
|
277
280
|
json_body = JSON.parse body
|
278
281
|
check_status json_body
|
279
282
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -294,14 +297,97 @@ module Comet
|
|
294
297
|
# @return [Comet::CometAPIResponseMessage]
|
295
298
|
def admin_add_user_from_profile(target_user, profile_data)
|
296
299
|
submit_params = {}
|
297
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
300
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
298
301
|
|
299
302
|
submit_params['TargetUser'] = target_user
|
300
|
-
raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
|
303
|
+
raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
|
301
304
|
|
302
305
|
submit_params['ProfileData'] = profile_data.to_json
|
303
306
|
|
304
|
-
body = perform_request('
|
307
|
+
body = perform_request('api/v1/admin/add-user-from-profile', submit_params)
|
308
|
+
json_body = JSON.parse body
|
309
|
+
check_status json_body
|
310
|
+
ret = Comet::CometAPIResponseMessage.new
|
311
|
+
ret.from_hash(json_body)
|
312
|
+
ret
|
313
|
+
end
|
314
|
+
|
315
|
+
# AdminAdminUserDelete
|
316
|
+
#
|
317
|
+
# Delete an administrator.
|
318
|
+
#
|
319
|
+
# You must supply administrator authentication credentials to use this API.
|
320
|
+
# Access to this API may be prevented on a per-administrator basis.
|
321
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
322
|
+
#
|
323
|
+
# @param [String] target_user the username of the admin to be deleted
|
324
|
+
# @return [Comet::CometAPIResponseMessage]
|
325
|
+
def admin_admin_user_delete(target_user)
|
326
|
+
submit_params = {}
|
327
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
328
|
+
|
329
|
+
submit_params['TargetUser'] = target_user
|
330
|
+
|
331
|
+
body = perform_request('api/v1/admin/admin-user/delete', submit_params)
|
332
|
+
json_body = JSON.parse body
|
333
|
+
check_status json_body
|
334
|
+
ret = Comet::CometAPIResponseMessage.new
|
335
|
+
ret.from_hash(json_body)
|
336
|
+
ret
|
337
|
+
end
|
338
|
+
|
339
|
+
# AdminAdminUserList
|
340
|
+
#
|
341
|
+
# List administrators.
|
342
|
+
#
|
343
|
+
# You must supply administrator authentication credentials to use this API.
|
344
|
+
# Access to this API may be prevented on a per-administrator basis.
|
345
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
346
|
+
#
|
347
|
+
# @return [Array<Comet::AllowedAdminUser>]
|
348
|
+
def admin_admin_user_list
|
349
|
+
body = perform_request('api/v1/admin/admin-user/list')
|
350
|
+
json_body = JSON.parse body
|
351
|
+
check_status json_body
|
352
|
+
if json_body.nil?
|
353
|
+
ret = []
|
354
|
+
else
|
355
|
+
ret = Array.new(json_body.length)
|
356
|
+
json_body.each_with_index do |v, i|
|
357
|
+
ret[i] = Comet::AllowedAdminUser.new
|
358
|
+
ret[i].from_hash(v)
|
359
|
+
end
|
360
|
+
end
|
361
|
+
ret
|
362
|
+
end
|
363
|
+
|
364
|
+
# AdminAdminUserNew
|
365
|
+
#
|
366
|
+
# Add a new administrator.
|
367
|
+
#
|
368
|
+
# You must supply administrator authentication credentials to use this API.
|
369
|
+
# Access to this API may be prevented on a per-administrator basis.
|
370
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
371
|
+
#
|
372
|
+
# @param [String] target_user the username for this new admin
|
373
|
+
# @param [String] target_password the password for this new admin user
|
374
|
+
# @param [String] target_org_id (Optional) provide the organization ID for this user, it will default to the org of the authenticating user otherwise
|
375
|
+
# @return [Comet::CometAPIResponseMessage]
|
376
|
+
def admin_admin_user_new(target_user, target_password, target_org_id = nil)
|
377
|
+
submit_params = {}
|
378
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
379
|
+
|
380
|
+
submit_params['TargetUser'] = target_user
|
381
|
+
raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
|
382
|
+
|
383
|
+
submit_params['TargetPassword'] = target_password
|
384
|
+
unless target_org_id.nil?
|
385
|
+
raise TypeError, "'target_org_id' expected String, got #{target_org_id.class}" unless target_org_id.is_a? String
|
386
|
+
|
387
|
+
submit_params['TargetOrgID'] = target_org_id
|
388
|
+
end
|
389
|
+
|
390
|
+
body = perform_request('api/v1/admin/admin-user/new', submit_params)
|
305
391
|
json_body = JSON.parse body
|
306
392
|
check_status json_body
|
307
393
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -319,7 +405,7 @@ module Comet
|
|
319
405
|
#
|
320
406
|
# @return [Hash{Number => Comet::AvailableDownload}]
|
321
407
|
def admin_branding_available_platforms
|
322
|
-
body = perform_request('
|
408
|
+
body = perform_request('api/v1/admin/branding/available-platforms')
|
323
409
|
json_body = JSON.parse body
|
324
410
|
check_status json_body
|
325
411
|
ret = {}
|
@@ -347,18 +433,18 @@ module Comet
|
|
347
433
|
# @return [String]
|
348
434
|
def admin_branding_generate_client_by_platform(platform, self_address = nil)
|
349
435
|
submit_params = {}
|
350
|
-
raise TypeError "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
|
436
|
+
raise TypeError, "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
|
351
437
|
|
352
438
|
submit_params['Platform'] = platform
|
353
439
|
if self_address.nil?
|
354
440
|
submit_params['SelfAddress'] = @server_address
|
355
441
|
else
|
356
|
-
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
442
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
357
443
|
|
358
444
|
submit_params['SelfAddress'] = self_address
|
359
445
|
end
|
360
446
|
|
361
|
-
perform_request('
|
447
|
+
perform_request('api/v1/admin/branding/generate-client/by-platform', submit_params)
|
362
448
|
end
|
363
449
|
|
364
450
|
# AdminBrandingGenerateClientLinuxgeneric
|
@@ -376,12 +462,12 @@ module Comet
|
|
376
462
|
if self_address.nil?
|
377
463
|
submit_params['SelfAddress'] = @server_address
|
378
464
|
else
|
379
|
-
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
465
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
380
466
|
|
381
467
|
submit_params['SelfAddress'] = self_address
|
382
468
|
end
|
383
469
|
|
384
|
-
perform_request('
|
470
|
+
perform_request('api/v1/admin/branding/generate-client/linuxgeneric', submit_params)
|
385
471
|
end
|
386
472
|
|
387
473
|
# AdminBrandingGenerateClientMacosX8664
|
@@ -399,12 +485,12 @@ module Comet
|
|
399
485
|
if self_address.nil?
|
400
486
|
submit_params['SelfAddress'] = @server_address
|
401
487
|
else
|
402
|
-
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
488
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
403
489
|
|
404
490
|
submit_params['SelfAddress'] = self_address
|
405
491
|
end
|
406
492
|
|
407
|
-
perform_request('
|
493
|
+
perform_request('api/v1/admin/branding/generate-client/macos-x86_64', submit_params)
|
408
494
|
end
|
409
495
|
|
410
496
|
# AdminBrandingGenerateClientTest
|
@@ -420,18 +506,18 @@ module Comet
|
|
420
506
|
# @return [Comet::CometAPIResponseMessage]
|
421
507
|
def admin_branding_generate_client_test(platform, self_address = nil)
|
422
508
|
submit_params = {}
|
423
|
-
raise TypeError "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
|
509
|
+
raise TypeError, "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
|
424
510
|
|
425
511
|
submit_params['Platform'] = platform
|
426
512
|
if self_address.nil?
|
427
513
|
submit_params['SelfAddress'] = @server_address
|
428
514
|
else
|
429
|
-
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
515
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
430
516
|
|
431
517
|
submit_params['SelfAddress'] = self_address
|
432
518
|
end
|
433
519
|
|
434
|
-
body = perform_request('
|
520
|
+
body = perform_request('api/v1/admin/branding/generate-client/test', submit_params)
|
435
521
|
json_body = JSON.parse body
|
436
522
|
check_status json_body
|
437
523
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -455,12 +541,12 @@ module Comet
|
|
455
541
|
if self_address.nil?
|
456
542
|
submit_params['SelfAddress'] = @server_address
|
457
543
|
else
|
458
|
-
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
544
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
459
545
|
|
460
546
|
submit_params['SelfAddress'] = self_address
|
461
547
|
end
|
462
548
|
|
463
|
-
perform_request('
|
549
|
+
perform_request('api/v1/admin/branding/generate-client/windows-anycpu-exe', submit_params)
|
464
550
|
end
|
465
551
|
|
466
552
|
# AdminBrandingGenerateClientWindowsAnycpuZip
|
@@ -479,12 +565,12 @@ module Comet
|
|
479
565
|
if self_address.nil?
|
480
566
|
submit_params['SelfAddress'] = @server_address
|
481
567
|
else
|
482
|
-
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
568
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
483
569
|
|
484
570
|
submit_params['SelfAddress'] = self_address
|
485
571
|
end
|
486
572
|
|
487
|
-
perform_request('
|
573
|
+
perform_request('api/v1/admin/branding/generate-client/windows-anycpu-zip', submit_params)
|
488
574
|
end
|
489
575
|
|
490
576
|
# AdminBrandingGenerateClientWindowsX8632Exe
|
@@ -503,12 +589,12 @@ module Comet
|
|
503
589
|
if self_address.nil?
|
504
590
|
submit_params['SelfAddress'] = @server_address
|
505
591
|
else
|
506
|
-
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
592
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
507
593
|
|
508
594
|
submit_params['SelfAddress'] = self_address
|
509
595
|
end
|
510
596
|
|
511
|
-
perform_request('
|
597
|
+
perform_request('api/v1/admin/branding/generate-client/windows-x86_32-exe', submit_params)
|
512
598
|
end
|
513
599
|
|
514
600
|
# AdminBrandingGenerateClientWindowsX8632Zip
|
@@ -527,12 +613,12 @@ module Comet
|
|
527
613
|
if self_address.nil?
|
528
614
|
submit_params['SelfAddress'] = @server_address
|
529
615
|
else
|
530
|
-
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
616
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
531
617
|
|
532
618
|
submit_params['SelfAddress'] = self_address
|
533
619
|
end
|
534
620
|
|
535
|
-
perform_request('
|
621
|
+
perform_request('api/v1/admin/branding/generate-client/windows-x86_32-zip', submit_params)
|
536
622
|
end
|
537
623
|
|
538
624
|
# AdminBrandingGenerateClientWindowsX8664Exe
|
@@ -551,12 +637,12 @@ module Comet
|
|
551
637
|
if self_address.nil?
|
552
638
|
submit_params['SelfAddress'] = @server_address
|
553
639
|
else
|
554
|
-
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
640
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
555
641
|
|
556
642
|
submit_params['SelfAddress'] = self_address
|
557
643
|
end
|
558
644
|
|
559
|
-
perform_request('
|
645
|
+
perform_request('api/v1/admin/branding/generate-client/windows-x86_64-exe', submit_params)
|
560
646
|
end
|
561
647
|
|
562
648
|
# AdminBrandingGenerateClientWindowsX8664Zip
|
@@ -575,12 +661,12 @@ module Comet
|
|
575
661
|
if self_address.nil?
|
576
662
|
submit_params['SelfAddress'] = @server_address
|
577
663
|
else
|
578
|
-
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
664
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
579
665
|
|
580
666
|
submit_params['SelfAddress'] = self_address
|
581
667
|
end
|
582
668
|
|
583
|
-
perform_request('
|
669
|
+
perform_request('api/v1/admin/branding/generate-client/windows-x86_64-zip', submit_params)
|
584
670
|
end
|
585
671
|
|
586
672
|
# AdminBulletinSubmit
|
@@ -595,14 +681,14 @@ module Comet
|
|
595
681
|
# @return [Comet::CometAPIResponseMessage]
|
596
682
|
def admin_bulletin_submit(subject, content)
|
597
683
|
submit_params = {}
|
598
|
-
raise TypeError "'subject' expected String, got #{subject.class}" unless subject.is_a? String
|
684
|
+
raise TypeError, "'subject' expected String, got #{subject.class}" unless subject.is_a? String
|
599
685
|
|
600
686
|
submit_params['Subject'] = subject
|
601
|
-
raise TypeError "'content' expected String, got #{content.class}" unless content.is_a? String
|
687
|
+
raise TypeError, "'content' expected String, got #{content.class}" unless content.is_a? String
|
602
688
|
|
603
689
|
submit_params['Content'] = content
|
604
690
|
|
605
|
-
body = perform_request('
|
691
|
+
body = perform_request('api/v1/admin/bulletin/submit', submit_params)
|
606
692
|
json_body = JSON.parse body
|
607
693
|
check_status json_body
|
608
694
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -615,11 +701,12 @@ module Comet
|
|
615
701
|
# Get Constellation bucket usage report (cached).
|
616
702
|
#
|
617
703
|
# You must supply administrator authentication credentials to use this API.
|
704
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
618
705
|
# This API requires the Constellation Role to be enabled.
|
619
706
|
#
|
620
707
|
# @return [Comet::ConstellationCheckReport]
|
621
708
|
def admin_constellation_last_report
|
622
|
-
body = perform_request('
|
709
|
+
body = perform_request('api/v1/admin/constellation/last-report')
|
623
710
|
json_body = JSON.parse body
|
624
711
|
check_status json_body
|
625
712
|
ret = Comet::ConstellationCheckReport.new
|
@@ -632,11 +719,12 @@ module Comet
|
|
632
719
|
# Get Constellation bucket usage report (regenerate).
|
633
720
|
#
|
634
721
|
# You must supply administrator authentication credentials to use this API.
|
722
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
635
723
|
# This API requires the Constellation Role to be enabled.
|
636
724
|
#
|
637
725
|
# @return [Comet::ConstellationCheckReport]
|
638
726
|
def admin_constellation_new_report
|
639
|
-
body = perform_request('
|
727
|
+
body = perform_request('api/v1/admin/constellation/new-report')
|
640
728
|
json_body = JSON.parse body
|
641
729
|
check_status json_body
|
642
730
|
ret = Comet::ConstellationCheckReport.new
|
@@ -649,11 +737,12 @@ module Comet
|
|
649
737
|
# Prune unused buckets.
|
650
738
|
#
|
651
739
|
# You must supply administrator authentication credentials to use this API.
|
740
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
652
741
|
# This API requires the Constellation Role to be enabled.
|
653
742
|
#
|
654
743
|
# @return [Comet::CometAPIResponseMessage]
|
655
744
|
def admin_constellation_prune_now
|
656
|
-
body = perform_request('
|
745
|
+
body = perform_request('api/v1/admin/constellation/prune-now')
|
657
746
|
json_body = JSON.parse body
|
658
747
|
check_status json_body
|
659
748
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -666,11 +755,12 @@ module Comet
|
|
666
755
|
# Get Constellation status.
|
667
756
|
#
|
668
757
|
# You must supply administrator authentication credentials to use this API.
|
758
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
669
759
|
# This API requires the Constellation Role to be enabled.
|
670
760
|
#
|
671
761
|
# @return [Comet::ConstellationStatusAPIResponse]
|
672
762
|
def admin_constellation_status
|
673
|
-
body = perform_request('
|
763
|
+
body = perform_request('api/v1/admin/constellation/status')
|
674
764
|
json_body = JSON.parse body
|
675
765
|
check_status json_body
|
676
766
|
ret = Comet::ConstellationStatusAPIResponse.new
|
@@ -678,6 +768,40 @@ module Comet
|
|
678
768
|
ret
|
679
769
|
end
|
680
770
|
|
771
|
+
# AdminCreateInstallToken
|
772
|
+
#
|
773
|
+
# Create token for silent installation (Windows only).
|
774
|
+
# Provide the installation token to silently install the client on windows `install.exe /TOKEN=<installtoken>`
|
775
|
+
#
|
776
|
+
# You must supply administrator authentication credentials to use this API.
|
777
|
+
# This API requires the Auth Role to be enabled.
|
778
|
+
#
|
779
|
+
# @param [String] target_user Selected account username
|
780
|
+
# @param [String] target_password Selected account password
|
781
|
+
# @param [String] server (Optional) External URL of the authentication server that is different from the current server
|
782
|
+
# @return [Comet::InstallTokenResponse]
|
783
|
+
def admin_create_install_token(target_user, target_password, server = nil)
|
784
|
+
submit_params = {}
|
785
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
786
|
+
|
787
|
+
submit_params['TargetUser'] = target_user
|
788
|
+
raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
|
789
|
+
|
790
|
+
submit_params['TargetPassword'] = target_password
|
791
|
+
unless server.nil?
|
792
|
+
raise TypeError, "'server' expected String, got #{server.class}" unless server.is_a? String
|
793
|
+
|
794
|
+
submit_params['Server'] = server
|
795
|
+
end
|
796
|
+
|
797
|
+
body = perform_request('api/v1/admin/create-install-token', submit_params)
|
798
|
+
json_body = JSON.parse body
|
799
|
+
check_status json_body
|
800
|
+
ret = Comet::InstallTokenResponse.new
|
801
|
+
ret.from_hash(json_body)
|
802
|
+
ret
|
803
|
+
end
|
804
|
+
|
681
805
|
# AdminDeleteUser
|
682
806
|
#
|
683
807
|
# Delete user account.
|
@@ -693,16 +817,16 @@ module Comet
|
|
693
817
|
# @return [Comet::CometAPIResponseMessage]
|
694
818
|
def admin_delete_user(target_user, uninstall_config = nil)
|
695
819
|
submit_params = {}
|
696
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
820
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
697
821
|
|
698
822
|
submit_params['TargetUser'] = target_user
|
699
823
|
unless uninstall_config.nil?
|
700
|
-
raise TypeError "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
|
824
|
+
raise TypeError, "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
|
701
825
|
|
702
826
|
submit_params['UninstallConfig'] = uninstall_config.to_json
|
703
827
|
end
|
704
828
|
|
705
|
-
body = perform_request('
|
829
|
+
body = perform_request('api/v1/admin/delete-user', submit_params)
|
706
830
|
json_body = JSON.parse body
|
707
831
|
check_status json_body
|
708
832
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -721,11 +845,11 @@ module Comet
|
|
721
845
|
# @return [Comet::CometAPIResponseMessage]
|
722
846
|
def admin_disable_user_totp(target_user)
|
723
847
|
submit_params = {}
|
724
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
848
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
725
849
|
|
726
850
|
submit_params['TargetUser'] = target_user
|
727
851
|
|
728
|
-
body = perform_request('
|
852
|
+
body = perform_request('api/v1/admin/disable-user-totp', submit_params)
|
729
853
|
json_body = JSON.parse body
|
730
854
|
check_status json_body
|
731
855
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -746,14 +870,14 @@ module Comet
|
|
746
870
|
# @return [Comet::CometAPIResponseMessage]
|
747
871
|
def admin_dispatcher_apply_retention_rules(target_id, destination)
|
748
872
|
submit_params = {}
|
749
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
873
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
750
874
|
|
751
875
|
submit_params['TargetID'] = target_id
|
752
|
-
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
876
|
+
raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
753
877
|
|
754
878
|
submit_params['Destination'] = destination
|
755
879
|
|
756
|
-
body = perform_request('
|
880
|
+
body = perform_request('api/v1/admin/dispatcher/apply-retention-rules', submit_params)
|
757
881
|
json_body = JSON.parse body
|
758
882
|
check_status json_body
|
759
883
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -774,14 +898,14 @@ module Comet
|
|
774
898
|
# @return [Comet::CometAPIResponseMessage]
|
775
899
|
def admin_dispatcher_deepverify_storage_vault(target_id, destination)
|
776
900
|
submit_params = {}
|
777
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
901
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
778
902
|
|
779
903
|
submit_params['TargetID'] = target_id
|
780
|
-
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
904
|
+
raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
781
905
|
|
782
906
|
submit_params['Destination'] = destination
|
783
907
|
|
784
|
-
body = perform_request('
|
908
|
+
body = perform_request('api/v1/admin/dispatcher/deepverify-storage-vault', submit_params)
|
785
909
|
json_body = JSON.parse body
|
786
910
|
check_status json_body
|
787
911
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -802,17 +926,49 @@ module Comet
|
|
802
926
|
# @return [Comet::CometAPIResponseMessage]
|
803
927
|
def admin_dispatcher_delete_snapshot(target_id, destination_id, snapshot_id)
|
804
928
|
submit_params = {}
|
805
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
929
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
806
930
|
|
807
931
|
submit_params['TargetID'] = target_id
|
808
|
-
raise TypeError "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String
|
932
|
+
raise TypeError, "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String
|
809
933
|
|
810
934
|
submit_params['DestinationID'] = destination_id
|
811
|
-
raise TypeError "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
|
935
|
+
raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
|
812
936
|
|
813
937
|
submit_params['SnapshotID'] = snapshot_id
|
814
938
|
|
815
|
-
body = perform_request('
|
939
|
+
body = perform_request('api/v1/admin/dispatcher/delete-snapshot', submit_params)
|
940
|
+
json_body = JSON.parse body
|
941
|
+
check_status json_body
|
942
|
+
ret = Comet::CometAPIResponseMessage.new
|
943
|
+
ret.from_hash(json_body)
|
944
|
+
ret
|
945
|
+
end
|
946
|
+
|
947
|
+
# AdminDispatcherDeleteSnapshots
|
948
|
+
#
|
949
|
+
# Instruct a live connected device to delete multiple stored snapshots.
|
950
|
+
# The target device must be running Comet 20.9.10 or later.
|
951
|
+
#
|
952
|
+
# You must supply administrator authentication credentials to use this API.
|
953
|
+
# This API requires the Auth Role to be enabled.
|
954
|
+
#
|
955
|
+
# @param [String] target_id The live connection GUID
|
956
|
+
# @param [String] destination_id The Storage Vault GUID
|
957
|
+
# @param [Array<String>] snapshot_ids The backup job snapshot IDs to delete
|
958
|
+
# @return [Comet::CometAPIResponseMessage]
|
959
|
+
def admin_dispatcher_delete_snapshots(target_id, destination_id, snapshot_ids)
|
960
|
+
submit_params = {}
|
961
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
962
|
+
|
963
|
+
submit_params['TargetID'] = target_id
|
964
|
+
raise TypeError, "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String
|
965
|
+
|
966
|
+
submit_params['DestinationID'] = destination_id
|
967
|
+
raise TypeError, "'snapshot_ids' expected Array, got #{snapshot_ids.class}" unless snapshot_ids.is_a? Array
|
968
|
+
|
969
|
+
submit_params['SnapshotIDs'] = snapshot_ids.to_json
|
970
|
+
|
971
|
+
body = perform_request('api/v1/admin/dispatcher/delete-snapshots', submit_params)
|
816
972
|
json_body = JSON.parse body
|
817
973
|
check_status json_body
|
818
974
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -832,11 +988,11 @@ module Comet
|
|
832
988
|
# @return [Comet::CometAPIResponseMessage]
|
833
989
|
def admin_dispatcher_drop_connection(target_id)
|
834
990
|
submit_params = {}
|
835
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
991
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
836
992
|
|
837
993
|
submit_params['TargetID'] = target_id
|
838
994
|
|
839
|
-
body = perform_request('
|
995
|
+
body = perform_request('api/v1/admin/dispatcher/drop-connection', submit_params)
|
840
996
|
json_body = JSON.parse body
|
841
997
|
check_status json_body
|
842
998
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -857,14 +1013,14 @@ module Comet
|
|
857
1013
|
# @return [Comet::CometAPIResponseMessage]
|
858
1014
|
def admin_dispatcher_import_apply(target_id, import_source_id)
|
859
1015
|
submit_params = {}
|
860
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1016
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
861
1017
|
|
862
1018
|
submit_params['TargetID'] = target_id
|
863
|
-
raise TypeError "'import_source_id' expected String, got #{import_source_id.class}" unless import_source_id.is_a? String
|
1019
|
+
raise TypeError, "'import_source_id' expected String, got #{import_source_id.class}" unless import_source_id.is_a? String
|
864
1020
|
|
865
1021
|
submit_params['ImportSourceID'] = import_source_id
|
866
1022
|
|
867
|
-
body = perform_request('
|
1023
|
+
body = perform_request('api/v1/admin/dispatcher/import-apply', submit_params)
|
868
1024
|
json_body = JSON.parse body
|
869
1025
|
check_status json_body
|
870
1026
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -884,11 +1040,11 @@ module Comet
|
|
884
1040
|
# @return [Comet::CometAPIResponseMessage]
|
885
1041
|
def admin_dispatcher_kill_process(target_id)
|
886
1042
|
submit_params = {}
|
887
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1043
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
888
1044
|
|
889
1045
|
submit_params['TargetID'] = target_id
|
890
1046
|
|
891
|
-
body = perform_request('
|
1047
|
+
body = perform_request('api/v1/admin/dispatcher/kill-process', submit_params)
|
892
1048
|
json_body = JSON.parse body
|
893
1049
|
check_status json_body
|
894
1050
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -905,7 +1061,7 @@ module Comet
|
|
905
1061
|
#
|
906
1062
|
# @return [Hash{String => Comet::LiveUserConnection}]
|
907
1063
|
def admin_dispatcher_list_active
|
908
|
-
body = perform_request('
|
1064
|
+
body = perform_request('api/v1/admin/dispatcher/list-active')
|
909
1065
|
json_body = JSON.parse body
|
910
1066
|
check_status json_body
|
911
1067
|
ret = {}
|
@@ -932,11 +1088,11 @@ module Comet
|
|
932
1088
|
# @return [Comet::CometAPIResponseMessage]
|
933
1089
|
def admin_dispatcher_refetch_profile(target_id)
|
934
1090
|
submit_params = {}
|
935
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1091
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
936
1092
|
|
937
1093
|
submit_params['TargetID'] = target_id
|
938
1094
|
|
939
|
-
body = perform_request('
|
1095
|
+
body = perform_request('api/v1/admin/dispatcher/refetch-profile', submit_params)
|
940
1096
|
json_body = JSON.parse body
|
941
1097
|
check_status json_body
|
942
1098
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -957,14 +1113,14 @@ module Comet
|
|
957
1113
|
# @return [Comet::CometAPIResponseMessage]
|
958
1114
|
def admin_dispatcher_reindex_storage_vault(target_id, destination)
|
959
1115
|
submit_params = {}
|
960
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1116
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
961
1117
|
|
962
1118
|
submit_params['TargetID'] = target_id
|
963
|
-
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1119
|
+
raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
964
1120
|
|
965
1121
|
submit_params['Destination'] = destination
|
966
1122
|
|
967
|
-
body = perform_request('
|
1123
|
+
body = perform_request('api/v1/admin/dispatcher/reindex-storage-vault', submit_params)
|
968
1124
|
json_body = JSON.parse body
|
969
1125
|
check_status json_body
|
970
1126
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -983,11 +1139,11 @@ module Comet
|
|
983
1139
|
# @return [Comet::BrowseDiskDrivesResponse]
|
984
1140
|
def admin_dispatcher_request_browse_disk_drives(target_id)
|
985
1141
|
submit_params = {}
|
986
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1142
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
987
1143
|
|
988
1144
|
submit_params['TargetID'] = target_id
|
989
1145
|
|
990
|
-
body = perform_request('
|
1146
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-disk-drives', submit_params)
|
991
1147
|
json_body = JSON.parse body
|
992
1148
|
check_status json_body
|
993
1149
|
ret = Comet::BrowseDiskDrivesResponse.new
|
@@ -1006,11 +1162,11 @@ module Comet
|
|
1006
1162
|
# @return [Comet::BrowseEDBResponse]
|
1007
1163
|
def admin_dispatcher_request_browse_exchange_edb(target_id)
|
1008
1164
|
submit_params = {}
|
1009
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1165
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1010
1166
|
|
1011
1167
|
submit_params['TargetID'] = target_id
|
1012
1168
|
|
1013
|
-
body = perform_request('
|
1169
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-exchange-edb', submit_params)
|
1014
1170
|
json_body = JSON.parse body
|
1015
1171
|
check_status json_body
|
1016
1172
|
ret = Comet::BrowseEDBResponse.new
|
@@ -1029,11 +1185,11 @@ module Comet
|
|
1029
1185
|
# @return [Comet::BrowseHVResponse]
|
1030
1186
|
def admin_dispatcher_request_browse_hyperv(target_id)
|
1031
1187
|
submit_params = {}
|
1032
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1188
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1033
1189
|
|
1034
1190
|
submit_params['TargetID'] = target_id
|
1035
1191
|
|
1036
|
-
body = perform_request('
|
1192
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-hyperv', submit_params)
|
1037
1193
|
json_body = JSON.parse body
|
1038
1194
|
check_status json_body
|
1039
1195
|
ret = Comet::BrowseHVResponse.new
|
@@ -1052,11 +1208,11 @@ module Comet
|
|
1052
1208
|
# @return [Comet::BrowseVSSResponse]
|
1053
1209
|
def admin_dispatcher_request_browse_vss_aaw(target_id)
|
1054
1210
|
submit_params = {}
|
1055
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1211
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1056
1212
|
|
1057
1213
|
submit_params['TargetID'] = target_id
|
1058
1214
|
|
1059
|
-
body = perform_request('
|
1215
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-vss-aaw', submit_params)
|
1060
1216
|
json_body = JSON.parse body
|
1061
1217
|
check_status json_body
|
1062
1218
|
ret = Comet::BrowseVSSResponse.new
|
@@ -1077,16 +1233,16 @@ module Comet
|
|
1077
1233
|
# @return [Array<Comet::StoredObject>]
|
1078
1234
|
def admin_dispatcher_request_filesystem_objects(target_id, path = nil)
|
1079
1235
|
submit_params = {}
|
1080
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1236
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1081
1237
|
|
1082
1238
|
submit_params['TargetID'] = target_id
|
1083
1239
|
unless path.nil?
|
1084
|
-
raise TypeError "'path' expected String, got #{path.class}" unless path.is_a? String
|
1240
|
+
raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String
|
1085
1241
|
|
1086
1242
|
submit_params['Path'] = path
|
1087
1243
|
end
|
1088
1244
|
|
1089
|
-
body = perform_request('
|
1245
|
+
body = perform_request('api/v1/admin/dispatcher/request-filesystem-objects', submit_params)
|
1090
1246
|
json_body = JSON.parse body
|
1091
1247
|
check_status json_body
|
1092
1248
|
if json_body.nil?
|
@@ -1112,11 +1268,11 @@ module Comet
|
|
1112
1268
|
# @return [Comet::DispatcherAdminSourcesResponse]
|
1113
1269
|
def admin_dispatcher_request_import_sources(target_id)
|
1114
1270
|
submit_params = {}
|
1115
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1271
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1116
1272
|
|
1117
1273
|
submit_params['TargetID'] = target_id
|
1118
1274
|
|
1119
|
-
body = perform_request('
|
1275
|
+
body = perform_request('api/v1/admin/dispatcher/request-import-sources', submit_params)
|
1120
1276
|
json_body = JSON.parse body
|
1121
1277
|
check_status json_body
|
1122
1278
|
ret = Comet::DispatcherAdminSourcesResponse.new
|
@@ -1139,22 +1295,22 @@ module Comet
|
|
1139
1295
|
# @return [Comet::DispatcherStoredObjectsResponse]
|
1140
1296
|
def admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = nil)
|
1141
1297
|
submit_params = {}
|
1142
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1298
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1143
1299
|
|
1144
1300
|
submit_params['TargetID'] = target_id
|
1145
|
-
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1301
|
+
raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1146
1302
|
|
1147
1303
|
submit_params['Destination'] = destination
|
1148
|
-
raise TypeError "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
|
1304
|
+
raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
|
1149
1305
|
|
1150
1306
|
submit_params['SnapshotID'] = snapshot_id
|
1151
1307
|
unless tree_id.nil?
|
1152
|
-
raise TypeError "'tree_id' expected String, got #{tree_id.class}" unless tree_id.is_a? String
|
1308
|
+
raise TypeError, "'tree_id' expected String, got #{tree_id.class}" unless tree_id.is_a? String
|
1153
1309
|
|
1154
1310
|
submit_params['TreeID'] = tree_id
|
1155
1311
|
end
|
1156
1312
|
|
1157
|
-
body = perform_request('
|
1313
|
+
body = perform_request('api/v1/admin/dispatcher/request-stored-objects', submit_params)
|
1158
1314
|
json_body = JSON.parse body
|
1159
1315
|
check_status json_body
|
1160
1316
|
ret = Comet::DispatcherStoredObjectsResponse.new
|
@@ -1174,14 +1330,14 @@ module Comet
|
|
1174
1330
|
# @return [Comet::DispatcherVaultSnapshotsResponse]
|
1175
1331
|
def admin_dispatcher_request_vault_snapshots(target_id, destination)
|
1176
1332
|
submit_params = {}
|
1177
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1333
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1178
1334
|
|
1179
1335
|
submit_params['TargetID'] = target_id
|
1180
|
-
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1336
|
+
raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1181
1337
|
|
1182
1338
|
submit_params['Destination'] = destination
|
1183
1339
|
|
1184
|
-
body = perform_request('
|
1340
|
+
body = perform_request('api/v1/admin/dispatcher/request-vault-snapshots', submit_params)
|
1185
1341
|
json_body = JSON.parse body
|
1186
1342
|
check_status json_body
|
1187
1343
|
ret = Comet::DispatcherVaultSnapshotsResponse.new
|
@@ -1201,14 +1357,14 @@ module Comet
|
|
1201
1357
|
# @return [Comet::CometAPIResponseMessage]
|
1202
1358
|
def admin_dispatcher_run_backup(target_id, backup_rule)
|
1203
1359
|
submit_params = {}
|
1204
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1360
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1205
1361
|
|
1206
1362
|
submit_params['TargetID'] = target_id
|
1207
|
-
raise TypeError "'backup_rule' expected String, got #{backup_rule.class}" unless backup_rule.is_a? String
|
1363
|
+
raise TypeError, "'backup_rule' expected String, got #{backup_rule.class}" unless backup_rule.is_a? String
|
1208
1364
|
|
1209
1365
|
submit_params['BackupRule'] = backup_rule
|
1210
1366
|
|
1211
|
-
body = perform_request('
|
1367
|
+
body = perform_request('api/v1/admin/dispatcher/run-backup', submit_params)
|
1212
1368
|
json_body = JSON.parse body
|
1213
1369
|
check_status json_body
|
1214
1370
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -1230,22 +1386,22 @@ module Comet
|
|
1230
1386
|
# @return [Comet::CometAPIResponseMessage]
|
1231
1387
|
def admin_dispatcher_run_backup_custom(target_id, source, destination, options = nil)
|
1232
1388
|
submit_params = {}
|
1233
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1389
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1234
1390
|
|
1235
1391
|
submit_params['TargetID'] = target_id
|
1236
|
-
raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
|
1392
|
+
raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
|
1237
1393
|
|
1238
1394
|
submit_params['Source'] = source
|
1239
|
-
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1395
|
+
raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1240
1396
|
|
1241
1397
|
submit_params['Destination'] = destination
|
1242
1398
|
unless options.nil?
|
1243
|
-
raise TypeError "'options' expected Comet::BackupJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::BackupJobAdvancedOptions
|
1399
|
+
raise TypeError, "'options' expected Comet::BackupJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::BackupJobAdvancedOptions
|
1244
1400
|
|
1245
1401
|
submit_params['Options'] = options.to_json
|
1246
1402
|
end
|
1247
1403
|
|
1248
|
-
body = perform_request('
|
1404
|
+
body = perform_request('api/v1/admin/dispatcher/run-backup-custom', submit_params)
|
1249
1405
|
json_body = JSON.parse body
|
1250
1406
|
check_status json_body
|
1251
1407
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -1270,30 +1426,30 @@ module Comet
|
|
1270
1426
|
# @return [Comet::CometAPIResponseMessage]
|
1271
1427
|
def admin_dispatcher_run_restore(target_id, path, source, destination, snapshot = nil, paths = nil)
|
1272
1428
|
submit_params = {}
|
1273
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1429
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1274
1430
|
|
1275
1431
|
submit_params['TargetID'] = target_id
|
1276
|
-
raise TypeError "'path' expected String, got #{path.class}" unless path.is_a? String
|
1432
|
+
raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String
|
1277
1433
|
|
1278
1434
|
submit_params['Path'] = path
|
1279
|
-
raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
|
1435
|
+
raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
|
1280
1436
|
|
1281
1437
|
submit_params['Source'] = source
|
1282
|
-
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1438
|
+
raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1283
1439
|
|
1284
1440
|
submit_params['Destination'] = destination
|
1285
1441
|
unless snapshot.nil?
|
1286
|
-
raise TypeError "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
|
1442
|
+
raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
|
1287
1443
|
|
1288
1444
|
submit_params['Snapshot'] = snapshot
|
1289
1445
|
end
|
1290
1446
|
unless paths.nil?
|
1291
|
-
raise TypeError "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
|
1447
|
+
raise TypeError, "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
|
1292
1448
|
|
1293
1449
|
submit_params['Paths'] = paths.to_json
|
1294
1450
|
end
|
1295
1451
|
|
1296
|
-
body = perform_request('
|
1452
|
+
body = perform_request('api/v1/admin/dispatcher/run-restore', submit_params)
|
1297
1453
|
json_body = JSON.parse body
|
1298
1454
|
check_status json_body
|
1299
1455
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -1318,30 +1474,30 @@ module Comet
|
|
1318
1474
|
# @return [Comet::CometAPIResponseMessage]
|
1319
1475
|
def admin_dispatcher_run_restore_custom(target_id, source, destination, options, snapshot = nil, paths = nil)
|
1320
1476
|
submit_params = {}
|
1321
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1477
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1322
1478
|
|
1323
1479
|
submit_params['TargetID'] = target_id
|
1324
|
-
raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
|
1480
|
+
raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
|
1325
1481
|
|
1326
1482
|
submit_params['Source'] = source
|
1327
|
-
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1483
|
+
raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1328
1484
|
|
1329
1485
|
submit_params['Destination'] = destination
|
1330
|
-
raise TypeError "'options' expected Comet::RestoreJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::RestoreJobAdvancedOptions
|
1486
|
+
raise TypeError, "'options' expected Comet::RestoreJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::RestoreJobAdvancedOptions
|
1331
1487
|
|
1332
1488
|
submit_params['Options'] = options.to_json
|
1333
1489
|
unless snapshot.nil?
|
1334
|
-
raise TypeError "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
|
1490
|
+
raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
|
1335
1491
|
|
1336
1492
|
submit_params['Snapshot'] = snapshot
|
1337
1493
|
end
|
1338
1494
|
unless paths.nil?
|
1339
|
-
raise TypeError "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
|
1495
|
+
raise TypeError, "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
|
1340
1496
|
|
1341
1497
|
submit_params['Paths'] = paths.to_json
|
1342
1498
|
end
|
1343
1499
|
|
1344
|
-
body = perform_request('
|
1500
|
+
body = perform_request('api/v1/admin/dispatcher/run-restore-custom', submit_params)
|
1345
1501
|
json_body = JSON.parse body
|
1346
1502
|
check_status json_body
|
1347
1503
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -1361,12 +1517,12 @@ module Comet
|
|
1361
1517
|
# @return [Comet::CometAPIResponseMessage]
|
1362
1518
|
def admin_dispatcher_uninstall_software(target_id, remove_config_file)
|
1363
1519
|
submit_params = {}
|
1364
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1520
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1365
1521
|
|
1366
1522
|
submit_params['TargetID'] = target_id
|
1367
1523
|
submit_params['RemoveConfigFile'] = (remove_config_file ? 1 : 0)
|
1368
1524
|
|
1369
|
-
body = perform_request('
|
1525
|
+
body = perform_request('api/v1/admin/dispatcher/uninstall-software', submit_params)
|
1370
1526
|
json_body = JSON.parse body
|
1371
1527
|
check_status json_body
|
1372
1528
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -1388,14 +1544,14 @@ module Comet
|
|
1388
1544
|
# @return [Comet::CometAPIResponseMessage]
|
1389
1545
|
def admin_dispatcher_unlock(target_id, destination)
|
1390
1546
|
submit_params = {}
|
1391
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1547
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1392
1548
|
|
1393
1549
|
submit_params['TargetID'] = target_id
|
1394
|
-
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1550
|
+
raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1395
1551
|
|
1396
1552
|
submit_params['Destination'] = destination
|
1397
1553
|
|
1398
|
-
body = perform_request('
|
1554
|
+
body = perform_request('api/v1/admin/dispatcher/unlock', submit_params)
|
1399
1555
|
json_body = JSON.parse body
|
1400
1556
|
check_status json_body
|
1401
1557
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -1416,14 +1572,14 @@ module Comet
|
|
1416
1572
|
# @return [Comet::CometAPIResponseMessage]
|
1417
1573
|
def admin_dispatcher_update_login_url(target_id, new_url)
|
1418
1574
|
submit_params = {}
|
1419
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1575
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1420
1576
|
|
1421
1577
|
submit_params['TargetID'] = target_id
|
1422
|
-
raise TypeError "'new_url' expected String, got #{new_url.class}" unless new_url.is_a? String
|
1578
|
+
raise TypeError, "'new_url' expected String, got #{new_url.class}" unless new_url.is_a? String
|
1423
1579
|
|
1424
1580
|
submit_params['NewURL'] = new_url
|
1425
1581
|
|
1426
|
-
body = perform_request('
|
1582
|
+
body = perform_request('api/v1/admin/dispatcher/update-login-url', submit_params)
|
1427
1583
|
json_body = JSON.parse body
|
1428
1584
|
check_status json_body
|
1429
1585
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -1444,18 +1600,18 @@ module Comet
|
|
1444
1600
|
# @return [Comet::CometAPIResponseMessage]
|
1445
1601
|
def admin_dispatcher_update_software(target_id, self_address = nil)
|
1446
1602
|
submit_params = {}
|
1447
|
-
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1603
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1448
1604
|
|
1449
1605
|
submit_params['TargetID'] = target_id
|
1450
1606
|
if self_address.nil?
|
1451
1607
|
submit_params['SelfAddress'] = @server_address
|
1452
1608
|
else
|
1453
|
-
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
1609
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
1454
1610
|
|
1455
1611
|
submit_params['SelfAddress'] = self_address
|
1456
1612
|
end
|
1457
1613
|
|
1458
|
-
body = perform_request('
|
1614
|
+
body = perform_request('api/v1/admin/dispatcher/update-software', submit_params)
|
1459
1615
|
json_body = JSON.parse body
|
1460
1616
|
check_status json_body
|
1461
1617
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -1474,11 +1630,11 @@ module Comet
|
|
1474
1630
|
# @return [String]
|
1475
1631
|
def admin_get_job_log(job_id)
|
1476
1632
|
submit_params = {}
|
1477
|
-
raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
|
1633
|
+
raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
|
1478
1634
|
|
1479
1635
|
submit_params['JobID'] = job_id
|
1480
1636
|
|
1481
|
-
perform_request('
|
1637
|
+
perform_request('api/v1/admin/get-job-log', submit_params)
|
1482
1638
|
end
|
1483
1639
|
|
1484
1640
|
# AdminGetJobLogEntries
|
@@ -1492,11 +1648,11 @@ module Comet
|
|
1492
1648
|
# @return [Array<Comet::JobEntry>]
|
1493
1649
|
def admin_get_job_log_entries(job_id)
|
1494
1650
|
submit_params = {}
|
1495
|
-
raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
|
1651
|
+
raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
|
1496
1652
|
|
1497
1653
|
submit_params['JobID'] = job_id
|
1498
1654
|
|
1499
|
-
body = perform_request('
|
1655
|
+
body = perform_request('api/v1/admin/get-job-log-entries', submit_params)
|
1500
1656
|
json_body = JSON.parse body
|
1501
1657
|
check_status json_body
|
1502
1658
|
if json_body.nil?
|
@@ -1522,11 +1678,11 @@ module Comet
|
|
1522
1678
|
# @return [Comet::BackupJobDetail]
|
1523
1679
|
def admin_get_job_properties(job_id)
|
1524
1680
|
submit_params = {}
|
1525
|
-
raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
|
1681
|
+
raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
|
1526
1682
|
|
1527
1683
|
submit_params['JobID'] = job_id
|
1528
1684
|
|
1529
|
-
body = perform_request('
|
1685
|
+
body = perform_request('api/v1/admin/get-job-properties', submit_params)
|
1530
1686
|
json_body = JSON.parse body
|
1531
1687
|
check_status json_body
|
1532
1688
|
ret = Comet::BackupJobDetail.new
|
@@ -1544,7 +1700,7 @@ module Comet
|
|
1544
1700
|
#
|
1545
1701
|
# @return [Array<Comet::BackupJobDetail>]
|
1546
1702
|
def admin_get_jobs_all
|
1547
|
-
body = perform_request('
|
1703
|
+
body = perform_request('api/v1/admin/get-jobs-all')
|
1548
1704
|
json_body = JSON.parse body
|
1549
1705
|
check_status json_body
|
1550
1706
|
if json_body.nil?
|
@@ -1571,11 +1727,11 @@ module Comet
|
|
1571
1727
|
# @return [Array<Comet::BackupJobDetail>]
|
1572
1728
|
def admin_get_jobs_for_custom_search(query)
|
1573
1729
|
submit_params = {}
|
1574
|
-
raise TypeError "'query' expected Comet::SearchClause, got #{query.class}" unless query.is_a? Comet::SearchClause
|
1730
|
+
raise TypeError, "'query' expected Comet::SearchClause, got #{query.class}" unless query.is_a? Comet::SearchClause
|
1575
1731
|
|
1576
1732
|
submit_params['Query'] = query.to_json
|
1577
1733
|
|
1578
|
-
body = perform_request('
|
1734
|
+
body = perform_request('api/v1/admin/get-jobs-for-custom-search', submit_params)
|
1579
1735
|
json_body = JSON.parse body
|
1580
1736
|
check_status json_body
|
1581
1737
|
if json_body.nil?
|
@@ -1609,14 +1765,14 @@ module Comet
|
|
1609
1765
|
# @return [Array<Comet::BackupJobDetail>]
|
1610
1766
|
def admin_get_jobs_for_date_range(start_value, end_value)
|
1611
1767
|
submit_params = {}
|
1612
|
-
raise TypeError "'start_value' expected Numeric, got #{start_value.class}" unless start_value.is_a? Numeric
|
1768
|
+
raise TypeError, "'start_value' expected Numeric, got #{start_value.class}" unless start_value.is_a? Numeric
|
1613
1769
|
|
1614
1770
|
submit_params['Start'] = start_value
|
1615
|
-
raise TypeError "'end_value' expected Numeric, got #{end_value.class}" unless end_value.is_a? Numeric
|
1771
|
+
raise TypeError, "'end_value' expected Numeric, got #{end_value.class}" unless end_value.is_a? Numeric
|
1616
1772
|
|
1617
1773
|
submit_params['End'] = end_value
|
1618
1774
|
|
1619
|
-
body = perform_request('
|
1775
|
+
body = perform_request('api/v1/admin/get-jobs-for-date-range', submit_params)
|
1620
1776
|
json_body = JSON.parse body
|
1621
1777
|
check_status json_body
|
1622
1778
|
if json_body.nil?
|
@@ -1643,11 +1799,11 @@ module Comet
|
|
1643
1799
|
# @return [Array<Comet::BackupJobDetail>]
|
1644
1800
|
def admin_get_jobs_for_user(target_user)
|
1645
1801
|
submit_params = {}
|
1646
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
1802
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
1647
1803
|
|
1648
1804
|
submit_params['TargetUser'] = target_user
|
1649
1805
|
|
1650
|
-
body = perform_request('
|
1806
|
+
body = perform_request('api/v1/admin/get-jobs-for-user', submit_params)
|
1651
1807
|
json_body = JSON.parse body
|
1652
1808
|
check_status json_body
|
1653
1809
|
if json_body.nil?
|
@@ -1672,7 +1828,7 @@ module Comet
|
|
1672
1828
|
#
|
1673
1829
|
# @return [Array<Comet::BackupJobDetail>]
|
1674
1830
|
def admin_get_jobs_recent
|
1675
|
-
body = perform_request('
|
1831
|
+
body = perform_request('api/v1/admin/get-jobs-recent')
|
1676
1832
|
json_body = JSON.parse body
|
1677
1833
|
check_status json_body
|
1678
1834
|
if json_body.nil?
|
@@ -1698,11 +1854,11 @@ module Comet
|
|
1698
1854
|
# @return [Comet::UserProfileConfig]
|
1699
1855
|
def admin_get_user_profile(target_user)
|
1700
1856
|
submit_params = {}
|
1701
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
1857
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
1702
1858
|
|
1703
1859
|
submit_params['TargetUser'] = target_user
|
1704
1860
|
|
1705
|
-
body = perform_request('
|
1861
|
+
body = perform_request('api/v1/admin/get-user-profile', submit_params)
|
1706
1862
|
json_body = JSON.parse body
|
1707
1863
|
check_status json_body
|
1708
1864
|
ret = Comet::UserProfileConfig.new
|
@@ -1723,11 +1879,11 @@ module Comet
|
|
1723
1879
|
# @return [Comet::GetProfileAndHashResponseMessage]
|
1724
1880
|
def admin_get_user_profile_and_hash(target_user)
|
1725
1881
|
submit_params = {}
|
1726
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
1882
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
1727
1883
|
|
1728
1884
|
submit_params['TargetUser'] = target_user
|
1729
1885
|
|
1730
|
-
body = perform_request('
|
1886
|
+
body = perform_request('api/v1/admin/get-user-profile-and-hash', submit_params)
|
1731
1887
|
json_body = JSON.parse body
|
1732
1888
|
check_status json_body
|
1733
1889
|
ret = Comet::GetProfileAndHashResponseMessage.new
|
@@ -1748,11 +1904,11 @@ module Comet
|
|
1748
1904
|
# @return [Comet::GetProfileHashResponseMessage]
|
1749
1905
|
def admin_get_user_profile_hash(target_user)
|
1750
1906
|
submit_params = {}
|
1751
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
1907
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
1752
1908
|
|
1753
1909
|
submit_params['TargetUser'] = target_user
|
1754
1910
|
|
1755
|
-
body = perform_request('
|
1911
|
+
body = perform_request('api/v1/admin/get-user-profile-hash', submit_params)
|
1756
1912
|
json_body = JSON.parse body
|
1757
1913
|
check_status json_body
|
1758
1914
|
ret = Comet::GetProfileHashResponseMessage.new
|
@@ -1774,14 +1930,14 @@ module Comet
|
|
1774
1930
|
# @return [Comet::CometAPIResponseMessage]
|
1775
1931
|
def admin_job_cancel(target_user, job_id)
|
1776
1932
|
submit_params = {}
|
1777
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
1933
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
1778
1934
|
|
1779
1935
|
submit_params['TargetUser'] = target_user
|
1780
|
-
raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
|
1936
|
+
raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
|
1781
1937
|
|
1782
1938
|
submit_params['JobID'] = job_id
|
1783
1939
|
|
1784
|
-
body = perform_request('
|
1940
|
+
body = perform_request('api/v1/admin/job/cancel', submit_params)
|
1785
1941
|
json_body = JSON.parse body
|
1786
1942
|
check_status json_body
|
1787
1943
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -1798,7 +1954,7 @@ module Comet
|
|
1798
1954
|
#
|
1799
1955
|
# @return [Array<String>]
|
1800
1956
|
def admin_list_users
|
1801
|
-
body = perform_request('
|
1957
|
+
body = perform_request('api/v1/admin/list-users')
|
1802
1958
|
json_body = JSON.parse body
|
1803
1959
|
check_status json_body
|
1804
1960
|
if json_body.nil?
|
@@ -1806,7 +1962,7 @@ module Comet
|
|
1806
1962
|
else
|
1807
1963
|
ret = Array.new(json_body.length)
|
1808
1964
|
json_body.each_with_index do |v, i|
|
1809
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
1965
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
1810
1966
|
|
1811
1967
|
ret[i] = v
|
1812
1968
|
end
|
@@ -1823,7 +1979,7 @@ module Comet
|
|
1823
1979
|
#
|
1824
1980
|
# @return [Hash{String => Comet::UserProfileConfig}]
|
1825
1981
|
def admin_list_users_full
|
1826
|
-
body = perform_request('
|
1982
|
+
body = perform_request('api/v1/admin/list-users-full')
|
1827
1983
|
json_body = JSON.parse body
|
1828
1984
|
check_status json_body
|
1829
1985
|
ret = {}
|
@@ -1847,7 +2003,7 @@ module Comet
|
|
1847
2003
|
#
|
1848
2004
|
# @return [Comet::ServerConfigOptionsBrandingFragment]
|
1849
2005
|
def admin_meta_branding_config_get
|
1850
|
-
body = perform_request('
|
2006
|
+
body = perform_request('api/v1/admin/meta/branding-config/get')
|
1851
2007
|
json_body = JSON.parse body
|
1852
2008
|
check_status json_body
|
1853
2009
|
ret = Comet::ServerConfigOptionsBrandingFragment.new
|
@@ -1867,11 +2023,11 @@ module Comet
|
|
1867
2023
|
# @return [Comet::CometAPIResponseMessage]
|
1868
2024
|
def admin_meta_branding_config_set(branding_config)
|
1869
2025
|
submit_params = {}
|
1870
|
-
raise TypeError "'branding_config' expected Comet::BrandingOptions, got #{branding_config.class}" unless branding_config.is_a? Comet::BrandingOptions
|
2026
|
+
raise TypeError, "'branding_config' expected Comet::BrandingOptions, got #{branding_config.class}" unless branding_config.is_a? Comet::BrandingOptions
|
1871
2027
|
|
1872
2028
|
submit_params['BrandingConfig'] = branding_config.to_json
|
1873
2029
|
|
1874
|
-
body = perform_request('
|
2030
|
+
body = perform_request('api/v1/admin/meta/branding-config/set', submit_params)
|
1875
2031
|
json_body = JSON.parse body
|
1876
2032
|
check_status json_body
|
1877
2033
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -1888,7 +2044,7 @@ module Comet
|
|
1888
2044
|
#
|
1889
2045
|
# @return [Comet::ServerConfigOptionsSoftwareBuildRoleFragment]
|
1890
2046
|
def admin_meta_build_config_get
|
1891
|
-
body = perform_request('
|
2047
|
+
body = perform_request('api/v1/admin/meta/build-config/get')
|
1892
2048
|
json_body = JSON.parse body
|
1893
2049
|
check_status json_body
|
1894
2050
|
ret = Comet::ServerConfigOptionsSoftwareBuildRoleFragment.new
|
@@ -1907,11 +2063,11 @@ module Comet
|
|
1907
2063
|
# @return [Comet::CometAPIResponseMessage]
|
1908
2064
|
def admin_meta_build_config_set(software_build_role_config)
|
1909
2065
|
submit_params = {}
|
1910
|
-
raise TypeError "'software_build_role_config' expected Comet::SoftwareBuildRoleOptions, got #{software_build_role_config.class}" unless software_build_role_config.is_a? Comet::SoftwareBuildRoleOptions
|
2066
|
+
raise TypeError, "'software_build_role_config' expected Comet::SoftwareBuildRoleOptions, got #{software_build_role_config.class}" unless software_build_role_config.is_a? Comet::SoftwareBuildRoleOptions
|
1911
2067
|
|
1912
2068
|
submit_params['SoftwareBuildRoleConfig'] = software_build_role_config.to_json
|
1913
2069
|
|
1914
|
-
body = perform_request('
|
2070
|
+
body = perform_request('api/v1/admin/meta/build-config/set', submit_params)
|
1915
2071
|
json_body = JSON.parse body
|
1916
2072
|
check_status json_body
|
1917
2073
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -1924,10 +2080,11 @@ module Comet
|
|
1924
2080
|
# Get log files.
|
1925
2081
|
#
|
1926
2082
|
# You must supply administrator authentication credentials to use this API.
|
2083
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
1927
2084
|
#
|
1928
2085
|
# @return [Array<Number>]
|
1929
2086
|
def admin_meta_list_available_log_days
|
1930
|
-
body = perform_request('
|
2087
|
+
body = perform_request('api/v1/admin/meta/list-available-log-days')
|
1931
2088
|
json_body = JSON.parse body
|
1932
2089
|
check_status json_body
|
1933
2090
|
if json_body.nil?
|
@@ -1935,7 +2092,7 @@ module Comet
|
|
1935
2092
|
else
|
1936
2093
|
ret = Array.new(json_body.length)
|
1937
2094
|
json_body.each_with_index do |v, i|
|
1938
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
2095
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
1939
2096
|
|
1940
2097
|
ret[i] = v
|
1941
2098
|
end
|
@@ -1950,16 +2107,17 @@ module Comet
|
|
1950
2107
|
# This API does not automatically convert line endings; around the 18.3.2 timeframe, log content may even contain mixed line-endings.
|
1951
2108
|
#
|
1952
2109
|
# You must supply administrator authentication credentials to use this API.
|
2110
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
1953
2111
|
#
|
1954
2112
|
# @param [Number] log A log day, selected from the options returned by the Get Log Files API
|
1955
2113
|
# @return [String]
|
1956
2114
|
def admin_meta_read_logs(log)
|
1957
2115
|
submit_params = {}
|
1958
|
-
raise TypeError "'log' expected Numeric, got #{log.class}" unless log.is_a? Numeric
|
2116
|
+
raise TypeError, "'log' expected Numeric, got #{log.class}" unless log.is_a? Numeric
|
1959
2117
|
|
1960
2118
|
submit_params['Log'] = log
|
1961
2119
|
|
1962
|
-
perform_request('
|
2120
|
+
perform_request('api/v1/admin/meta/read-logs', submit_params)
|
1963
2121
|
end
|
1964
2122
|
|
1965
2123
|
# AdminMetaRemoteStorageVaultGet
|
@@ -1971,7 +2129,7 @@ module Comet
|
|
1971
2129
|
#
|
1972
2130
|
# @return [Array<Comet::RemoteStorageOption>]
|
1973
2131
|
def admin_meta_remote_storage_vault_get
|
1974
|
-
body = perform_request('
|
2132
|
+
body = perform_request('api/v1/admin/meta/remote-storage-vault/get')
|
1975
2133
|
json_body = JSON.parse body
|
1976
2134
|
check_status json_body
|
1977
2135
|
if json_body.nil?
|
@@ -1997,11 +2155,11 @@ module Comet
|
|
1997
2155
|
# @return [Comet::CometAPIResponseMessage]
|
1998
2156
|
def admin_meta_remote_storage_vault_set(remote_storage_options)
|
1999
2157
|
submit_params = {}
|
2000
|
-
raise TypeError "'remote_storage_options' expected Array, got #{remote_storage_options.class}" unless remote_storage_options.is_a? Array
|
2158
|
+
raise TypeError, "'remote_storage_options' expected Array, got #{remote_storage_options.class}" unless remote_storage_options.is_a? Array
|
2001
2159
|
|
2002
2160
|
submit_params['RemoteStorageOptions'] = remote_storage_options.to_json
|
2003
2161
|
|
2004
|
-
body = perform_request('
|
2162
|
+
body = perform_request('api/v1/admin/meta/remote-storage-vault/set', submit_params)
|
2005
2163
|
json_body = JSON.parse body
|
2006
2164
|
check_status json_body
|
2007
2165
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2020,11 +2178,36 @@ module Comet
|
|
2020
2178
|
# @return [String]
|
2021
2179
|
def admin_meta_resource_get(hash)
|
2022
2180
|
submit_params = {}
|
2023
|
-
raise TypeError "'hash' expected String, got #{hash.class}" unless hash.is_a? String
|
2181
|
+
raise TypeError, "'hash' expected String, got #{hash.class}" unless hash.is_a? String
|
2024
2182
|
|
2025
2183
|
submit_params['Hash'] = hash
|
2026
2184
|
|
2027
|
-
perform_request('
|
2185
|
+
perform_request('api/v1/admin/meta/resource/get', submit_params)
|
2186
|
+
end
|
2187
|
+
|
2188
|
+
# AdminMetaResourceNew
|
2189
|
+
#
|
2190
|
+
# Upload a resource file.
|
2191
|
+
# Resources are used to upload files within the server configuration.
|
2192
|
+
# The resulting resource ID is autogenerated.
|
2193
|
+
# The lifespan of an uploaded resource is undefined. Resources may be deleted automatically, but it should remain available until the next call to AdminMetaServerConfigSet, and will remain available for as long as it is referenced by the server configuration.
|
2194
|
+
#
|
2195
|
+
# You must supply administrator authentication credentials to use this API.
|
2196
|
+
#
|
2197
|
+
# @param [String] upload The uploaded file contents, as a multipart/form-data part.
|
2198
|
+
# @return [Comet::AdminResourceResponse]
|
2199
|
+
def admin_meta_resource_new(upload)
|
2200
|
+
submit_params = {}
|
2201
|
+
raise TypeError, "'upload' expected String, got #{upload.class}" unless upload.is_a? String
|
2202
|
+
|
2203
|
+
submit_params['upload'] = upload
|
2204
|
+
|
2205
|
+
body = perform_request_multipart('api/v1/admin/meta/resource/new', submit_params)
|
2206
|
+
json_body = JSON.parse body
|
2207
|
+
check_status json_body
|
2208
|
+
ret = Comet::AdminResourceResponse.new
|
2209
|
+
ret.from_hash(json_body)
|
2210
|
+
ret
|
2028
2211
|
end
|
2029
2212
|
|
2030
2213
|
# AdminMetaRestartService
|
@@ -2035,11 +2218,12 @@ module Comet
|
|
2035
2218
|
# Prior to 18.9.2, this API terminated the server immediately without returning a response. In 18.9.2 and later, it returns a successful response before shutting down.
|
2036
2219
|
#
|
2037
2220
|
# You must supply administrator authentication credentials to use this API.
|
2221
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
2038
2222
|
# Access to this API may be prevented on a per-administrator basis.
|
2039
2223
|
#
|
2040
2224
|
# @return [Comet::CometAPIResponseMessage]
|
2041
2225
|
def admin_meta_restart_service
|
2042
|
-
body = perform_request('
|
2226
|
+
body = perform_request('api/v1/admin/meta/restart-service')
|
2043
2227
|
json_body = JSON.parse body
|
2044
2228
|
check_status json_body
|
2045
2229
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2053,6 +2237,7 @@ module Comet
|
|
2053
2237
|
# This allows the Comet Server web interface to support testing different email credentials during setup.
|
2054
2238
|
#
|
2055
2239
|
# You must supply administrator authentication credentials to use this API.
|
2240
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
2056
2241
|
# Access to this API may be prevented on a per-administrator basis.
|
2057
2242
|
#
|
2058
2243
|
# @param [Comet::EmailOptions] email_options Updated configuration content
|
@@ -2060,14 +2245,14 @@ module Comet
|
|
2060
2245
|
# @return [Comet::CometAPIResponseMessage]
|
2061
2246
|
def admin_meta_send_test_email(email_options, recipient)
|
2062
2247
|
submit_params = {}
|
2063
|
-
raise TypeError "'email_options' expected Comet::EmailOptions, got #{email_options.class}" unless email_options.is_a? Comet::EmailOptions
|
2248
|
+
raise TypeError, "'email_options' expected Comet::EmailOptions, got #{email_options.class}" unless email_options.is_a? Comet::EmailOptions
|
2064
2249
|
|
2065
2250
|
submit_params['EmailOptions'] = email_options.to_json
|
2066
|
-
raise TypeError "'recipient' expected String, got #{recipient.class}" unless recipient.is_a? String
|
2251
|
+
raise TypeError, "'recipient' expected String, got #{recipient.class}" unless recipient.is_a? String
|
2067
2252
|
|
2068
2253
|
submit_params['Recipient'] = recipient
|
2069
2254
|
|
2070
|
-
body = perform_request('
|
2255
|
+
body = perform_request('api/v1/admin/meta/send-test-email', submit_params)
|
2071
2256
|
json_body = JSON.parse body
|
2072
2257
|
check_status json_body
|
2073
2258
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2081,10 +2266,11 @@ module Comet
|
|
2081
2266
|
#
|
2082
2267
|
# You must supply administrator authentication credentials to use this API.
|
2083
2268
|
# Access to this API may be prevented on a per-administrator basis.
|
2269
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
2084
2270
|
#
|
2085
2271
|
# @return [Comet::ServerConfigOptions]
|
2086
2272
|
def admin_meta_server_config_get
|
2087
|
-
body = perform_request('
|
2273
|
+
body = perform_request('api/v1/admin/meta/server-config/get')
|
2088
2274
|
json_body = JSON.parse body
|
2089
2275
|
check_status json_body
|
2090
2276
|
ret = Comet::ServerConfigOptions.new
|
@@ -2099,10 +2285,11 @@ module Comet
|
|
2099
2285
|
#
|
2100
2286
|
# You must supply administrator authentication credentials to use this API.
|
2101
2287
|
# Access to this API may be prevented on a per-administrator basis.
|
2288
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
2102
2289
|
#
|
2103
2290
|
# @return [Array<String>]
|
2104
2291
|
def admin_meta_server_config_network_interfaces
|
2105
|
-
body = perform_request('
|
2292
|
+
body = perform_request('api/v1/admin/meta/server-config/network-interfaces')
|
2106
2293
|
json_body = JSON.parse body
|
2107
2294
|
check_status json_body
|
2108
2295
|
if json_body.nil?
|
@@ -2110,7 +2297,7 @@ module Comet
|
|
2110
2297
|
else
|
2111
2298
|
ret = Array.new(json_body.length)
|
2112
2299
|
json_body.each_with_index do |v, i|
|
2113
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
2300
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
2114
2301
|
|
2115
2302
|
ret[i] = v
|
2116
2303
|
end
|
@@ -2127,16 +2314,17 @@ module Comet
|
|
2127
2314
|
#
|
2128
2315
|
# You must supply administrator authentication credentials to use this API.
|
2129
2316
|
# Access to this API may be prevented on a per-administrator basis.
|
2317
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
2130
2318
|
#
|
2131
2319
|
# @param [Comet::ServerConfigOptions] config Updated configuration content
|
2132
2320
|
# @return [Comet::CometAPIResponseMessage]
|
2133
2321
|
def admin_meta_server_config_set(config)
|
2134
2322
|
submit_params = {}
|
2135
|
-
raise TypeError "'config' expected Comet::ServerConfigOptions, got #{config.class}" unless config.is_a? Comet::ServerConfigOptions
|
2323
|
+
raise TypeError, "'config' expected Comet::ServerConfigOptions, got #{config.class}" unless config.is_a? Comet::ServerConfigOptions
|
2136
2324
|
|
2137
2325
|
submit_params['Config'] = config.to_json
|
2138
2326
|
|
2139
|
-
body = perform_request('
|
2327
|
+
body = perform_request('api/v1/admin/meta/server-config/set', submit_params)
|
2140
2328
|
json_body = JSON.parse body
|
2141
2329
|
check_status json_body
|
2142
2330
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2152,11 +2340,12 @@ module Comet
|
|
2152
2340
|
# Prior to 18.9.2, this API terminated the server immediately without returning a response. In 18.9.2 and later, it returns a successful response before shutting down.
|
2153
2341
|
#
|
2154
2342
|
# You must supply administrator authentication credentials to use this API.
|
2343
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
2155
2344
|
# Access to this API may be prevented on a per-administrator basis.
|
2156
2345
|
#
|
2157
2346
|
# @return [Comet::CometAPIResponseMessage]
|
2158
2347
|
def admin_meta_shutdown_service
|
2159
|
-
body = perform_request('
|
2348
|
+
body = perform_request('api/v1/admin/meta/shutdown-service')
|
2160
2349
|
json_body = JSON.parse body
|
2161
2350
|
check_status json_body
|
2162
2351
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2172,7 +2361,7 @@ module Comet
|
|
2172
2361
|
#
|
2173
2362
|
# @return [Comet::SoftwareUpdateNewsResponse]
|
2174
2363
|
def admin_meta_software_update_news
|
2175
|
-
body = perform_request('
|
2364
|
+
body = perform_request('api/v1/admin/meta/software-update-news')
|
2176
2365
|
json_body = JSON.parse body
|
2177
2366
|
check_status json_body
|
2178
2367
|
ret = Comet::SoftwareUpdateNewsResponse.new
|
@@ -2193,7 +2382,7 @@ module Comet
|
|
2193
2382
|
submit_params = {}
|
2194
2383
|
submit_params['Simple'] = (simple ? 1 : 0)
|
2195
2384
|
|
2196
|
-
body = perform_request('
|
2385
|
+
body = perform_request('api/v1/admin/meta/stats', submit_params)
|
2197
2386
|
json_body = JSON.parse body
|
2198
2387
|
check_status json_body
|
2199
2388
|
ret = {}
|
@@ -2217,7 +2406,7 @@ module Comet
|
|
2217
2406
|
#
|
2218
2407
|
# @return [Comet::ServerMetaVersionInfo]
|
2219
2408
|
def admin_meta_version
|
2220
|
-
body = perform_request('
|
2409
|
+
body = perform_request('api/v1/admin/meta/version')
|
2221
2410
|
json_body = JSON.parse body
|
2222
2411
|
check_status json_body
|
2223
2412
|
ret = Comet::ServerMetaVersionInfo.new
|
@@ -2233,7 +2422,7 @@ module Comet
|
|
2233
2422
|
#
|
2234
2423
|
# @return [Hash{String => Comet::WebhookOption}]
|
2235
2424
|
def admin_meta_webhook_options_get
|
2236
|
-
body = perform_request('
|
2425
|
+
body = perform_request('api/v1/admin/meta/webhook-options/get')
|
2237
2426
|
json_body = JSON.parse body
|
2238
2427
|
check_status json_body
|
2239
2428
|
ret = {}
|
@@ -2255,15 +2444,15 @@ module Comet
|
|
2255
2444
|
#
|
2256
2445
|
# You must supply administrator authentication credentials to use this API.
|
2257
2446
|
#
|
2258
|
-
# @param [Hash{String => Comet::WebhookOption}] webhook_options
|
2447
|
+
# @param [Hash{String => Comet::WebhookOption}] webhook_options The replacement webhook target options.
|
2259
2448
|
# @return [Comet::CometAPIResponseMessage]
|
2260
2449
|
def admin_meta_webhook_options_set(webhook_options)
|
2261
2450
|
submit_params = {}
|
2262
|
-
raise TypeError "'webhook_options' expected Hash, got #{webhook_options.class}" unless webhook_options.is_a? Hash
|
2451
|
+
raise TypeError, "'webhook_options' expected Hash, got #{webhook_options.class}" unless webhook_options.is_a? Hash
|
2263
2452
|
|
2264
2453
|
submit_params['WebhookOptions'] = webhook_options.to_json
|
2265
2454
|
|
2266
|
-
body = perform_request('
|
2455
|
+
body = perform_request('api/v1/admin/meta/webhook-options/set', submit_params)
|
2267
2456
|
json_body = JSON.parse body
|
2268
2457
|
check_status json_body
|
2269
2458
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2280,7 +2469,7 @@ module Comet
|
|
2280
2469
|
#
|
2281
2470
|
# @return [Hash{String => Comet::NewsEntry}]
|
2282
2471
|
def admin_news_get_all
|
2283
|
-
body = perform_request('
|
2472
|
+
body = perform_request('api/v1/admin/news/get-all')
|
2284
2473
|
json_body = JSON.parse body
|
2285
2474
|
check_status json_body
|
2286
2475
|
ret = {}
|
@@ -2306,11 +2495,11 @@ module Comet
|
|
2306
2495
|
# @return [Comet::CometAPIResponseMessage]
|
2307
2496
|
def admin_news_remove(news_item)
|
2308
2497
|
submit_params = {}
|
2309
|
-
raise TypeError "'news_item' expected String, got #{news_item.class}" unless news_item.is_a? String
|
2498
|
+
raise TypeError, "'news_item' expected String, got #{news_item.class}" unless news_item.is_a? String
|
2310
2499
|
|
2311
2500
|
submit_params['NewsItem'] = news_item
|
2312
2501
|
|
2313
|
-
body = perform_request('
|
2502
|
+
body = perform_request('api/v1/admin/news/remove', submit_params)
|
2314
2503
|
json_body = JSON.parse body
|
2315
2504
|
check_status json_body
|
2316
2505
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2329,11 +2518,11 @@ module Comet
|
|
2329
2518
|
# @return [Comet::CometAPIResponseMessage]
|
2330
2519
|
def admin_news_submit(news_content)
|
2331
2520
|
submit_params = {}
|
2332
|
-
raise TypeError "'news_content' expected String, got #{news_content.class}" unless news_content.is_a? String
|
2521
|
+
raise TypeError, "'news_content' expected String, got #{news_content.class}" unless news_content.is_a? String
|
2333
2522
|
|
2334
2523
|
submit_params['NewsContent'] = news_content
|
2335
2524
|
|
2336
|
-
body = perform_request('
|
2525
|
+
body = perform_request('api/v1/admin/news/submit', submit_params)
|
2337
2526
|
json_body = JSON.parse body
|
2338
2527
|
check_status json_body
|
2339
2528
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2341,6 +2530,92 @@ module Comet
|
|
2341
2530
|
ret
|
2342
2531
|
end
|
2343
2532
|
|
2533
|
+
# AdminOrganizationDelete
|
2534
|
+
#
|
2535
|
+
# Delete an organization and all related users.
|
2536
|
+
#
|
2537
|
+
# You must supply administrator authentication credentials to use this API.
|
2538
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
2539
|
+
#
|
2540
|
+
# @param [String] organization_id (Optional) (No description available)
|
2541
|
+
# @param [Comet::UninstallConfig] uninstall_config (Optional) Uninstall software configuration
|
2542
|
+
# @return [Comet::OrganizationResponse]
|
2543
|
+
def admin_organization_delete(organization_id = nil, uninstall_config = nil)
|
2544
|
+
submit_params = {}
|
2545
|
+
unless organization_id.nil?
|
2546
|
+
raise TypeError, "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
|
2547
|
+
|
2548
|
+
submit_params['OrganizationID'] = organization_id
|
2549
|
+
end
|
2550
|
+
unless uninstall_config.nil?
|
2551
|
+
raise TypeError, "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
|
2552
|
+
|
2553
|
+
submit_params['UninstallConfig'] = uninstall_config.to_json
|
2554
|
+
end
|
2555
|
+
|
2556
|
+
body = perform_request('api/v1/admin/organization/delete', submit_params)
|
2557
|
+
json_body = JSON.parse body
|
2558
|
+
check_status json_body
|
2559
|
+
ret = Comet::OrganizationResponse.new
|
2560
|
+
ret.from_hash(json_body)
|
2561
|
+
ret
|
2562
|
+
end
|
2563
|
+
|
2564
|
+
# AdminOrganizationList
|
2565
|
+
#
|
2566
|
+
# List Organizations.
|
2567
|
+
#
|
2568
|
+
# You must supply administrator authentication credentials to use this API.
|
2569
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
2570
|
+
#
|
2571
|
+
# @return [Hash{String => Comet::Organization}]
|
2572
|
+
def admin_organization_list
|
2573
|
+
body = perform_request('api/v1/admin/organization/list')
|
2574
|
+
json_body = JSON.parse body
|
2575
|
+
check_status json_body
|
2576
|
+
ret = {}
|
2577
|
+
if json_body.nil?
|
2578
|
+
ret = {}
|
2579
|
+
else
|
2580
|
+
json_body.each do |k, v|
|
2581
|
+
ret[k] = Comet::Organization.new
|
2582
|
+
ret[k].from_hash(v)
|
2583
|
+
end
|
2584
|
+
end
|
2585
|
+
ret
|
2586
|
+
end
|
2587
|
+
|
2588
|
+
# AdminOrganizationSet
|
2589
|
+
#
|
2590
|
+
# Create or Update an Organization.
|
2591
|
+
#
|
2592
|
+
# You must supply administrator authentication credentials to use this API.
|
2593
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
2594
|
+
#
|
2595
|
+
# @param [String] organization_id (Optional) (No description available)
|
2596
|
+
# @param [Comet::Organization] organization (Optional) (No description available)
|
2597
|
+
# @return [Comet::OrganizationResponse]
|
2598
|
+
def admin_organization_set(organization_id = nil, organization = nil)
|
2599
|
+
submit_params = {}
|
2600
|
+
unless organization_id.nil?
|
2601
|
+
raise TypeError, "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
|
2602
|
+
|
2603
|
+
submit_params['OrganizationID'] = organization_id
|
2604
|
+
end
|
2605
|
+
unless organization.nil?
|
2606
|
+
raise TypeError, "'organization' expected Comet::Organization, got #{organization.class}" unless organization.is_a? Comet::Organization
|
2607
|
+
|
2608
|
+
submit_params['Organization'] = organization.to_json
|
2609
|
+
end
|
2610
|
+
|
2611
|
+
body = perform_request('api/v1/admin/organization/set', submit_params)
|
2612
|
+
json_body = JSON.parse body
|
2613
|
+
check_status json_body
|
2614
|
+
ret = Comet::OrganizationResponse.new
|
2615
|
+
ret.from_hash(json_body)
|
2616
|
+
ret
|
2617
|
+
end
|
2618
|
+
|
2344
2619
|
# AdminPoliciesDelete
|
2345
2620
|
#
|
2346
2621
|
# Delete an existing policy object.
|
@@ -2352,11 +2627,11 @@ module Comet
|
|
2352
2627
|
# @return [Comet::CometAPIResponseMessage]
|
2353
2628
|
def admin_policies_delete(policy_id)
|
2354
2629
|
submit_params = {}
|
2355
|
-
raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
|
2630
|
+
raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
|
2356
2631
|
|
2357
2632
|
submit_params['PolicyID'] = policy_id
|
2358
2633
|
|
2359
|
-
body = perform_request('
|
2634
|
+
body = perform_request('api/v1/admin/policies/delete', submit_params)
|
2360
2635
|
json_body = JSON.parse body
|
2361
2636
|
check_status json_body
|
2362
2637
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2376,11 +2651,11 @@ module Comet
|
|
2376
2651
|
# @return [Comet::GetGroupPolicyResponse]
|
2377
2652
|
def admin_policies_get(policy_id)
|
2378
2653
|
submit_params = {}
|
2379
|
-
raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
|
2654
|
+
raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
|
2380
2655
|
|
2381
2656
|
submit_params['PolicyID'] = policy_id
|
2382
2657
|
|
2383
|
-
body = perform_request('
|
2658
|
+
body = perform_request('api/v1/admin/policies/get', submit_params)
|
2384
2659
|
json_body = JSON.parse body
|
2385
2660
|
check_status json_body
|
2386
2661
|
ret = Comet::GetGroupPolicyResponse.new
|
@@ -2397,7 +2672,7 @@ module Comet
|
|
2397
2672
|
#
|
2398
2673
|
# @return [Hash{String => String}]
|
2399
2674
|
def admin_policies_list
|
2400
|
-
body = perform_request('
|
2675
|
+
body = perform_request('api/v1/admin/policies/list')
|
2401
2676
|
json_body = JSON.parse body
|
2402
2677
|
check_status json_body
|
2403
2678
|
ret = {}
|
@@ -2405,7 +2680,7 @@ module Comet
|
|
2405
2680
|
ret = {}
|
2406
2681
|
else
|
2407
2682
|
json_body.each do |k, v|
|
2408
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
2683
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
2409
2684
|
|
2410
2685
|
ret[k] = v
|
2411
2686
|
end
|
@@ -2422,7 +2697,7 @@ module Comet
|
|
2422
2697
|
#
|
2423
2698
|
# @return [Hash{String => Comet::GroupPolicy}]
|
2424
2699
|
def admin_policies_list_full
|
2425
|
-
body = perform_request('
|
2700
|
+
body = perform_request('api/v1/admin/policies/list-full')
|
2426
2701
|
json_body = JSON.parse body
|
2427
2702
|
check_status json_body
|
2428
2703
|
ret = {}
|
@@ -2448,11 +2723,11 @@ module Comet
|
|
2448
2723
|
# @return [Comet::CreateGroupPolicyResponse]
|
2449
2724
|
def admin_policies_new(policy)
|
2450
2725
|
submit_params = {}
|
2451
|
-
raise TypeError "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
|
2726
|
+
raise TypeError, "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
|
2452
2727
|
|
2453
2728
|
submit_params['Policy'] = policy.to_json
|
2454
2729
|
|
2455
|
-
body = perform_request('
|
2730
|
+
body = perform_request('api/v1/admin/policies/new', submit_params)
|
2456
2731
|
json_body = JSON.parse body
|
2457
2732
|
check_status json_body
|
2458
2733
|
ret = Comet::CreateGroupPolicyResponse.new
|
@@ -2475,19 +2750,19 @@ module Comet
|
|
2475
2750
|
# @return [Comet::CometAPIResponseMessage]
|
2476
2751
|
def admin_policies_set(policy_id, policy, check_policy_hash = nil)
|
2477
2752
|
submit_params = {}
|
2478
|
-
raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
|
2753
|
+
raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
|
2479
2754
|
|
2480
2755
|
submit_params['PolicyID'] = policy_id
|
2481
|
-
raise TypeError "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
|
2756
|
+
raise TypeError, "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
|
2482
2757
|
|
2483
2758
|
submit_params['Policy'] = policy.to_json
|
2484
2759
|
unless check_policy_hash.nil?
|
2485
|
-
raise TypeError "'check_policy_hash' expected String, got #{check_policy_hash.class}" unless check_policy_hash.is_a? String
|
2760
|
+
raise TypeError, "'check_policy_hash' expected String, got #{check_policy_hash.class}" unless check_policy_hash.is_a? String
|
2486
2761
|
|
2487
2762
|
submit_params['CheckPolicyHash'] = check_policy_hash
|
2488
2763
|
end
|
2489
2764
|
|
2490
|
-
body = perform_request('
|
2765
|
+
body = perform_request('api/v1/admin/policies/set', submit_params)
|
2491
2766
|
json_body = JSON.parse body
|
2492
2767
|
check_status json_body
|
2493
2768
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2508,19 +2783,19 @@ module Comet
|
|
2508
2783
|
# @return [Comet::EmailReportGeneratedPreview]
|
2509
2784
|
def admin_preview_user_email_report(target_user, email_report_config, email_address = nil)
|
2510
2785
|
submit_params = {}
|
2511
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
2786
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
2512
2787
|
|
2513
2788
|
submit_params['TargetUser'] = target_user
|
2514
|
-
raise TypeError "'email_report_config' expected Comet::EmailReportConfig, got #{email_report_config.class}" unless email_report_config.is_a? Comet::EmailReportConfig
|
2789
|
+
raise TypeError, "'email_report_config' expected Comet::EmailReportConfig, got #{email_report_config.class}" unless email_report_config.is_a? Comet::EmailReportConfig
|
2515
2790
|
|
2516
2791
|
submit_params['EmailReportConfig'] = email_report_config.to_json
|
2517
2792
|
unless email_address.nil?
|
2518
|
-
raise TypeError "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
|
2793
|
+
raise TypeError, "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
|
2519
2794
|
|
2520
2795
|
submit_params['EmailAddress'] = email_address
|
2521
2796
|
end
|
2522
2797
|
|
2523
|
-
body = perform_request('
|
2798
|
+
body = perform_request('api/v1/admin/preview-user-email-report', submit_params)
|
2524
2799
|
json_body = JSON.parse body
|
2525
2800
|
check_status json_body
|
2526
2801
|
ret = Comet::EmailReportGeneratedPreview.new
|
@@ -2533,10 +2808,11 @@ module Comet
|
|
2533
2808
|
# Get Replication status.
|
2534
2809
|
#
|
2535
2810
|
# You must supply administrator authentication credentials to use this API.
|
2811
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
2536
2812
|
#
|
2537
2813
|
# @return [Array<Comet::ReplicatorStateAPIResponse>]
|
2538
2814
|
def admin_replication_state
|
2539
|
-
body = perform_request('
|
2815
|
+
body = perform_request('api/v1/admin/replication/state')
|
2540
2816
|
json_body = JSON.parse body
|
2541
2817
|
check_status json_body
|
2542
2818
|
if json_body.nil?
|
@@ -2566,21 +2842,21 @@ module Comet
|
|
2566
2842
|
# @return [Comet::RequestStorageVaultResponseMessage]
|
2567
2843
|
def admin_request_storage_vault(target_user, storage_provider, self_address = nil)
|
2568
2844
|
submit_params = {}
|
2569
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
2845
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
2570
2846
|
|
2571
2847
|
submit_params['TargetUser'] = target_user
|
2572
|
-
raise TypeError "'storage_provider' expected String, got #{storage_provider.class}" unless storage_provider.is_a? String
|
2848
|
+
raise TypeError, "'storage_provider' expected String, got #{storage_provider.class}" unless storage_provider.is_a? String
|
2573
2849
|
|
2574
2850
|
submit_params['StorageProvider'] = storage_provider
|
2575
2851
|
if self_address.nil?
|
2576
2852
|
submit_params['SelfAddress'] = @server_address
|
2577
2853
|
else
|
2578
|
-
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
2854
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
2579
2855
|
|
2580
2856
|
submit_params['SelfAddress'] = self_address
|
2581
2857
|
end
|
2582
2858
|
|
2583
|
-
body = perform_request('
|
2859
|
+
body = perform_request('api/v1/admin/request-storage-vault', submit_params)
|
2584
2860
|
json_body = JSON.parse body
|
2585
2861
|
check_status json_body
|
2586
2862
|
ret = Comet::RequestStorageVaultResponseMessage.new
|
@@ -2597,7 +2873,7 @@ module Comet
|
|
2597
2873
|
#
|
2598
2874
|
# @return [Hash{String => String}]
|
2599
2875
|
def admin_request_storage_vault_providers
|
2600
|
-
body = perform_request('
|
2876
|
+
body = perform_request('api/v1/admin/request-storage-vault-providers')
|
2601
2877
|
json_body = JSON.parse body
|
2602
2878
|
check_status json_body
|
2603
2879
|
ret = {}
|
@@ -2605,7 +2881,7 @@ module Comet
|
|
2605
2881
|
ret = {}
|
2606
2882
|
else
|
2607
2883
|
json_body.each do |k, v|
|
2608
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
2884
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
2609
2885
|
|
2610
2886
|
ret[k] = v
|
2611
2887
|
end
|
@@ -2627,17 +2903,17 @@ module Comet
|
|
2627
2903
|
# @return [Comet::CometAPIResponseMessage]
|
2628
2904
|
def admin_reset_user_password(target_user, new_password, old_password)
|
2629
2905
|
submit_params = {}
|
2630
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
2906
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
2631
2907
|
|
2632
2908
|
submit_params['TargetUser'] = target_user
|
2633
|
-
raise TypeError "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String
|
2909
|
+
raise TypeError, "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String
|
2634
2910
|
|
2635
2911
|
submit_params['NewPassword'] = new_password
|
2636
|
-
raise TypeError "'old_password' expected String, got #{old_password.class}" unless old_password.is_a? String
|
2912
|
+
raise TypeError, "'old_password' expected String, got #{old_password.class}" unless old_password.is_a? String
|
2637
2913
|
|
2638
2914
|
submit_params['OldPassword'] = old_password
|
2639
2915
|
|
2640
|
-
body = perform_request('
|
2916
|
+
body = perform_request('api/v1/admin/reset-user-password', submit_params)
|
2641
2917
|
json_body = JSON.parse body
|
2642
2918
|
check_status json_body
|
2643
2919
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2658,14 +2934,14 @@ module Comet
|
|
2658
2934
|
# @return [Comet::CometAPIResponseMessage]
|
2659
2935
|
def admin_revoke_device(target_user, target_device)
|
2660
2936
|
submit_params = {}
|
2661
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
2937
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
2662
2938
|
|
2663
2939
|
submit_params['TargetUser'] = target_user
|
2664
|
-
raise TypeError "'target_device' expected String, got #{target_device.class}" unless target_device.is_a? String
|
2940
|
+
raise TypeError, "'target_device' expected String, got #{target_device.class}" unless target_device.is_a? String
|
2665
2941
|
|
2666
2942
|
submit_params['TargetDevice'] = target_device
|
2667
2943
|
|
2668
|
-
body = perform_request('
|
2944
|
+
body = perform_request('api/v1/admin/revoke-device', submit_params)
|
2669
2945
|
json_body = JSON.parse body
|
2670
2946
|
check_status json_body
|
2671
2947
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2685,14 +2961,14 @@ module Comet
|
|
2685
2961
|
# @return [Comet::CometAPIResponseMessage]
|
2686
2962
|
def admin_set_user_profile(target_user, profile_data)
|
2687
2963
|
submit_params = {}
|
2688
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
2964
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
2689
2965
|
|
2690
2966
|
submit_params['TargetUser'] = target_user
|
2691
|
-
raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
|
2967
|
+
raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
|
2692
2968
|
|
2693
2969
|
submit_params['ProfileData'] = profile_data.to_json
|
2694
2970
|
|
2695
|
-
body = perform_request('
|
2971
|
+
body = perform_request('api/v1/admin/set-user-profile', submit_params)
|
2696
2972
|
json_body = JSON.parse body
|
2697
2973
|
check_status json_body
|
2698
2974
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2715,17 +2991,17 @@ module Comet
|
|
2715
2991
|
# @return [Comet::CometAPIResponseMessage]
|
2716
2992
|
def admin_set_user_profile_hash(target_user, profile_data, require_hash)
|
2717
2993
|
submit_params = {}
|
2718
|
-
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
2994
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
2719
2995
|
|
2720
2996
|
submit_params['TargetUser'] = target_user
|
2721
|
-
raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
|
2997
|
+
raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
|
2722
2998
|
|
2723
2999
|
submit_params['ProfileData'] = profile_data.to_json
|
2724
|
-
raise TypeError "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String
|
3000
|
+
raise TypeError, "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String
|
2725
3001
|
|
2726
3002
|
submit_params['RequireHash'] = require_hash
|
2727
3003
|
|
2728
|
-
body = perform_request('
|
3004
|
+
body = perform_request('api/v1/admin/set-user-profile-hash', submit_params)
|
2729
3005
|
json_body = JSON.parse body
|
2730
3006
|
check_status json_body
|
2731
3007
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2733,6 +3009,36 @@ module Comet
|
|
2733
3009
|
ret
|
2734
3010
|
end
|
2735
3011
|
|
3012
|
+
# AdminStorageBucketProperties
|
3013
|
+
#
|
3014
|
+
# Retrieve properties for a single bucket.
|
3015
|
+
# This API can also be used to refresh the size measurement for a single bucket by passing a valid AfterTimestamp parameter.
|
3016
|
+
#
|
3017
|
+
# You must supply administrator authentication credentials to use this API.
|
3018
|
+
# This API requires the Storage Role to be enabled.
|
3019
|
+
#
|
3020
|
+
# @param [String] bucket_id Bucket ID
|
3021
|
+
# @param [Number] after_timestamp (Optional) Allow a stale size measurement if it is at least as new as the supplied Unix timestamp. Timestamps in the future may produce a result clamped down to the Comet Server's current time. If not present, the size measurement may be arbitrarily stale.
|
3022
|
+
# @return [Comet::BucketProperties]
|
3023
|
+
def admin_storage_bucket_properties(bucket_id, after_timestamp = nil)
|
3024
|
+
submit_params = {}
|
3025
|
+
raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
|
3026
|
+
|
3027
|
+
submit_params['BucketID'] = bucket_id
|
3028
|
+
unless after_timestamp.nil?
|
3029
|
+
raise TypeError, "'after_timestamp' expected Numeric, got #{after_timestamp.class}" unless after_timestamp.is_a? Numeric
|
3030
|
+
|
3031
|
+
submit_params['AfterTimestamp'] = after_timestamp
|
3032
|
+
end
|
3033
|
+
|
3034
|
+
body = perform_request('api/v1/admin/storage/bucket-properties', submit_params)
|
3035
|
+
json_body = JSON.parse body
|
3036
|
+
check_status json_body
|
3037
|
+
ret = Comet::BucketProperties.new
|
3038
|
+
ret.from_hash(json_body)
|
3039
|
+
ret
|
3040
|
+
end
|
3041
|
+
|
2736
3042
|
# AdminStorageDeleteBucket
|
2737
3043
|
#
|
2738
3044
|
# Delete a bucket.
|
@@ -2745,11 +3051,11 @@ module Comet
|
|
2745
3051
|
# @return [Comet::CometAPIResponseMessage]
|
2746
3052
|
def admin_storage_delete_bucket(bucket_id)
|
2747
3053
|
submit_params = {}
|
2748
|
-
raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
|
3054
|
+
raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
|
2749
3055
|
|
2750
3056
|
submit_params['BucketID'] = bucket_id
|
2751
3057
|
|
2752
|
-
body = perform_request('
|
3058
|
+
body = perform_request('api/v1/admin/storage/delete-bucket', submit_params)
|
2753
3059
|
json_body = JSON.parse body
|
2754
3060
|
check_status json_body
|
2755
3061
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2764,16 +3070,19 @@ module Comet
|
|
2764
3070
|
# You must supply administrator authentication credentials to use this API.
|
2765
3071
|
# Access to this API may be prevented on a per-administrator basis.
|
2766
3072
|
# This API requires the Storage Role to be enabled.
|
3073
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
2767
3074
|
#
|
2768
|
-
# @param [String] bucket_id
|
3075
|
+
# @param [String] bucket_id (Optional) (This parameter is not used)
|
2769
3076
|
# @return [Comet::StorageFreeSpaceInfo]
|
2770
|
-
def admin_storage_free_space(bucket_id)
|
3077
|
+
def admin_storage_free_space(bucket_id = nil)
|
2771
3078
|
submit_params = {}
|
2772
|
-
|
3079
|
+
unless bucket_id.nil?
|
3080
|
+
raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
|
2773
3081
|
|
2774
|
-
|
3082
|
+
submit_params['BucketID'] = bucket_id
|
3083
|
+
end
|
2775
3084
|
|
2776
|
-
body = perform_request('
|
3085
|
+
body = perform_request('api/v1/admin/storage/free-space', submit_params)
|
2777
3086
|
json_body = JSON.parse body
|
2778
3087
|
check_status json_body
|
2779
3088
|
ret = Comet::StorageFreeSpaceInfo.new
|
@@ -2790,7 +3099,7 @@ module Comet
|
|
2790
3099
|
#
|
2791
3100
|
# @return [Hash{String => Comet::BucketProperties}]
|
2792
3101
|
def admin_storage_list_buckets
|
2793
|
-
body = perform_request('
|
3102
|
+
body = perform_request('api/v1/admin/storage/list-buckets')
|
2794
3103
|
json_body = JSON.parse body
|
2795
3104
|
check_status json_body
|
2796
3105
|
ret = {}
|
@@ -2817,26 +3126,32 @@ module Comet
|
|
2817
3126
|
# @param [String] set_bucket_value (Optional) Bucket ID
|
2818
3127
|
# @param [String] set_key_hash_format (Optional) Bucket key hashing format
|
2819
3128
|
# @param [String] set_key_hash_value (Optional) Bucket key hash
|
3129
|
+
# @param [String] set_organization_id (Optional) Target organization ID (>= 20.9.0)
|
2820
3130
|
# @return [Comet::AddBucketResponseMessage]
|
2821
|
-
def admin_storage_register_bucket(set_bucket_value = nil, set_key_hash_format = nil, set_key_hash_value = nil)
|
3131
|
+
def admin_storage_register_bucket(set_bucket_value = nil, set_key_hash_format = nil, set_key_hash_value = nil, set_organization_id = nil)
|
2822
3132
|
submit_params = {}
|
2823
3133
|
unless set_bucket_value.nil?
|
2824
|
-
raise TypeError "'set_bucket_value' expected String, got #{set_bucket_value.class}" unless set_bucket_value.is_a? String
|
3134
|
+
raise TypeError, "'set_bucket_value' expected String, got #{set_bucket_value.class}" unless set_bucket_value.is_a? String
|
2825
3135
|
|
2826
3136
|
submit_params['SetBucketValue'] = set_bucket_value
|
2827
3137
|
end
|
2828
3138
|
unless set_key_hash_format.nil?
|
2829
|
-
raise TypeError "'set_key_hash_format' expected String, got #{set_key_hash_format.class}" unless set_key_hash_format.is_a? String
|
3139
|
+
raise TypeError, "'set_key_hash_format' expected String, got #{set_key_hash_format.class}" unless set_key_hash_format.is_a? String
|
2830
3140
|
|
2831
3141
|
submit_params['SetKeyHashFormat'] = set_key_hash_format
|
2832
3142
|
end
|
2833
3143
|
unless set_key_hash_value.nil?
|
2834
|
-
raise TypeError "'set_key_hash_value' expected String, got #{set_key_hash_value.class}" unless set_key_hash_value.is_a? String
|
3144
|
+
raise TypeError, "'set_key_hash_value' expected String, got #{set_key_hash_value.class}" unless set_key_hash_value.is_a? String
|
2835
3145
|
|
2836
3146
|
submit_params['SetKeyHashValue'] = set_key_hash_value
|
2837
3147
|
end
|
3148
|
+
unless set_organization_id.nil?
|
3149
|
+
raise TypeError, "'set_organization_id' expected String, got #{set_organization_id.class}" unless set_organization_id.is_a? String
|
2838
3150
|
|
2839
|
-
|
3151
|
+
submit_params['SetOrganizationID'] = set_organization_id
|
3152
|
+
end
|
3153
|
+
|
3154
|
+
body = perform_request('api/v1/admin/storage/register-bucket', submit_params)
|
2840
3155
|
json_body = JSON.parse body
|
2841
3156
|
check_status json_body
|
2842
3157
|
ret = Comet::AddBucketResponseMessage.new
|
@@ -2849,6 +3164,7 @@ module Comet
|
|
2849
3164
|
# Start a new software update campaign.
|
2850
3165
|
#
|
2851
3166
|
# You must supply administrator authentication credentials to use this API.
|
3167
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
2852
3168
|
# This API requires the Software Build Role to be enabled.
|
2853
3169
|
# This API requires the Auth Role to be enabled.
|
2854
3170
|
#
|
@@ -2856,11 +3172,11 @@ module Comet
|
|
2856
3172
|
# @return [Comet::CometAPIResponseMessage]
|
2857
3173
|
def admin_update_campaign_start(options)
|
2858
3174
|
submit_params = {}
|
2859
|
-
raise TypeError "'options' expected Comet::UpdateCampaignOptions, got #{options.class}" unless options.is_a? Comet::UpdateCampaignOptions
|
3175
|
+
raise TypeError, "'options' expected Comet::UpdateCampaignOptions, got #{options.class}" unless options.is_a? Comet::UpdateCampaignOptions
|
2860
3176
|
|
2861
3177
|
submit_params['Options'] = options.to_json
|
2862
3178
|
|
2863
|
-
body = perform_request('
|
3179
|
+
body = perform_request('api/v1/admin/update-campaign/start', submit_params)
|
2864
3180
|
json_body = JSON.parse body
|
2865
3181
|
check_status json_body
|
2866
3182
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2873,12 +3189,13 @@ module Comet
|
|
2873
3189
|
# Get current campaign status.
|
2874
3190
|
#
|
2875
3191
|
# You must supply administrator authentication credentials to use this API.
|
3192
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
2876
3193
|
# This API requires the Software Build Role to be enabled.
|
2877
3194
|
# This API requires the Auth Role to be enabled.
|
2878
3195
|
#
|
2879
3196
|
# @return [Comet::UpdateCampaignStatus]
|
2880
3197
|
def admin_update_campaign_status
|
2881
|
-
body = perform_request('
|
3198
|
+
body = perform_request('api/v1/admin/update-campaign/status')
|
2882
3199
|
json_body = JSON.parse body
|
2883
3200
|
check_status json_body
|
2884
3201
|
ret = Comet::UpdateCampaignStatus.new
|
@@ -2894,7 +3211,7 @@ module Comet
|
|
2894
3211
|
#
|
2895
3212
|
# @return [Comet::SessionKeyRegeneratedResponse]
|
2896
3213
|
def hybrid_session_start
|
2897
|
-
body = perform_request('
|
3214
|
+
body = perform_request('api/v1/hybrid/session/start')
|
2898
3215
|
json_body = JSON.parse body
|
2899
3216
|
check_status json_body
|
2900
3217
|
ret = Comet::SessionKeyRegeneratedResponse.new
|
@@ -2911,7 +3228,7 @@ module Comet
|
|
2911
3228
|
#
|
2912
3229
|
# @return [Comet::CometAPIResponseMessage]
|
2913
3230
|
def user_web_session_revoke
|
2914
|
-
body = perform_request('
|
3231
|
+
body = perform_request('api/v1/user/web/session/revoke')
|
2915
3232
|
json_body = JSON.parse body
|
2916
3233
|
check_status json_body
|
2917
3234
|
ret = Comet::CometAPIResponseMessage.new
|
@@ -2928,7 +3245,7 @@ module Comet
|
|
2928
3245
|
#
|
2929
3246
|
# @return [Comet::SessionKeyRegeneratedResponse]
|
2930
3247
|
def user_web_session_start
|
2931
|
-
body = perform_request('
|
3248
|
+
body = perform_request('api/v1/user/web/session/start')
|
2932
3249
|
json_body = JSON.parse body
|
2933
3250
|
check_status json_body
|
2934
3251
|
ret = Comet::SessionKeyRegeneratedResponse.new
|
@@ -2969,6 +3286,35 @@ module Comet
|
|
2969
3286
|
|
2970
3287
|
res.body
|
2971
3288
|
end
|
3289
|
+
|
3290
|
+
# Perform a synchronous HTTP request, using multipart/form-data.
|
3291
|
+
#
|
3292
|
+
# @param [String] endpoint The URL suffix
|
3293
|
+
# @param [Hash<String,String>] params Form post parameters to submit to the target API
|
3294
|
+
# @return [String] Response body
|
3295
|
+
def perform_request_multipart(endpoint, params = {})
|
3296
|
+
full_uri = URI(@server_address + endpoint)
|
3297
|
+
|
3298
|
+
req = Net::HTTP::Post.new(full_uri)
|
3299
|
+
req['X-Comet-Admin-Username'] = @username
|
3300
|
+
req['X-Comet-Admin-AuthType'] = 'Password'
|
3301
|
+
req['X-Comet-Admin-Password'] = @password
|
3302
|
+
|
3303
|
+
form_params = []
|
3304
|
+
params.each do |k, v|
|
3305
|
+
form_params.append [k, v, {:filename => k}]
|
3306
|
+
end
|
3307
|
+
req.set_form(form_params, 'multipart/form-data')
|
3308
|
+
|
3309
|
+
http = Net::HTTP.new(full_uri.hostname, full_uri.port)
|
3310
|
+
res = http.request(req)
|
3311
|
+
|
3312
|
+
unless res.is_a?(Net::HTTPSuccess)
|
3313
|
+
raise res
|
3314
|
+
end
|
3315
|
+
|
3316
|
+
res.body
|
3317
|
+
end
|
2972
3318
|
end
|
2973
3319
|
|
2974
3320
|
end
|