Class: Comet::CometServer

Inherits:
Object
  • Object
show all
Defined in:
lib/comet/comet_server.rb

Overview

The CometServer class enables making network requests to the Comet Server API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server_address, username, password) ⇒ CometServer

Initialize a new CometServer class instance.

Raises:

  • (TypeError)


26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/comet/comet_server.rb', line 26

def initialize(server_address, username, password)
  raise TypeError, "'server_address' expected String, got #{server_address.class}" unless server_address.is_a? String

  raise TypeError, "'username' expected String, got #{username.class}" unless username.is_a? String

  raise TypeError, "'password' expected String, got #{password.class}" unless password.is_a? String

  @server_address = server_address
  @username = username
  @password = password

  # Ensure Comet Server URL has a trailing slash
  @server_address += '/' unless server_address.end_with?('/')
end

Instance Attribute Details

#passwordObject

Returns the value of attribute password.



23
24
25
# File 'lib/comet/comet_server.rb', line 23

def password
  @password
end

#server_addressObject

Returns the value of attribute server_address.



17
18
19
# File 'lib/comet/comet_server.rb', line 17

def server_address
  @server_address
end

#usernameObject

Returns the value of attribute username.



20
21
22
# File 'lib/comet/comet_server.rb', line 20

def username
  @username
end

Instance Method Details

#admin_account_propertiesComet::AdminAccountPropertiesResponse

AdminAccountProperties

Retrieve properties about the current admin account. Some key parameters are obscured, but the obscured values are safely recognised by the corresponding AdminAccountSetProperties API.

You must supply administrator authentication credentials to use this API.



49
50
51
52
53
54
55
56
# File 'lib/comet/comet_server.rb', line 49

def 
  body = perform_request('api/v1/admin/account/properties')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::AdminAccountPropertiesResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_account_regenerate_totpComet::TotpRegeneratedResponse

AdminAccountRegenerateTotp

Generate a new TOTP secret. The secret is returned as a ‘data-uri` image of a QR code. The new secret is immediately applied to the current admin account.

You must supply administrator authentication credentials to use this API.



66
67
68
69
70
71
72
73
# File 'lib/comet/comet_server.rb', line 66

def 
  body = perform_request('api/v1/admin/account/regenerate-totp')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::TotpRegeneratedResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_account_session_revokeComet::CometAPIResponseMessage

AdminAccountSessionRevoke

Revoke a session key (log out).

You must supply administrator authentication credentials to use this API.



82
83
84
85
86
87
88
89
# File 'lib/comet/comet_server.rb', line 82

def 
  body = perform_request('api/v1/admin/account/session-revoke')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_account_session_start(self_address = nil) ⇒ Comet::SessionKeyRegeneratedResponse

AdminAccountSessionStart

Generate a session key (log in).

You must supply administrator authentication credentials to use this API.

Parameters:

  • self_address (String) (defaults to: nil)

    (Optional) External URL of this server

Returns:



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/comet/comet_server.rb', line 99

def (self_address = nil)
  submit_params = {}
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  body = perform_request('api/v1/admin/account/session-start', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::SessionKeyRegeneratedResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_account_session_start_as_user(target_user) ⇒ Comet::SessionKeyRegeneratedResponse

AdminAccountSessionStartAsUser

Generate a session key for an end-user (log in as end-user).

You must supply administrator authentication credentials to use this API.

Parameters:

  • target_user (String)

    Target account username

Returns:

Raises:

  • (TypeError)


125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/comet/comet_server.rb', line 125

def (target_user)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user

  body = perform_request('api/v1/admin/account/session-start-as-user', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::SessionKeyRegeneratedResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_account_session_upgrade(session_key) ⇒ Comet::CometAPIResponseMessage

AdminAccountSessionUpgrade

Upgrade a session key which is pending an MFA upgrade to a full session key.

You must supply administrator authentication credentials to use this API.

Parameters:

  • session_key (String)

    The session key to upgrade

Returns:

Raises:

  • (TypeError)


147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/comet/comet_server.rb', line 147

def (session_key)
  submit_params = {}
  raise TypeError, "'session_key' expected String, got #{session_key.class}" unless session_key.is_a? String

  submit_params['SessionKey'] = session_key

  body = perform_request('api/v1/admin/account/session-upgrade', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_account_set_properties(security) ⇒ Comet::CometAPIResponseMessage

AdminAccountSetProperties

Update settings for your own admin account. Updating your account password requires you to supply your current password. To set a new plaintext password, use a password format of 0 (PASSWORD_FORMAT_PLAINTEXT). This API does not currently allow you to modify your TOTP secret. In Comet 24.12.2 and later, this API can change the IPWhitelist field. Prior to this, changes to the IPWhitelist field were ignored.

You must supply administrator authentication credentials to use this API.

Parameters:

Returns:

Raises:

  • (TypeError)


173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/comet/comet_server.rb', line 173

def (security)
  submit_params = {}
  raise TypeError, "'security' expected Comet::AdminSecurityOptions, got #{security.class}" unless security.is_a? Comet::AdminSecurityOptions

  submit_params['Security'] = security.to_json

  body = perform_request('api/v1/admin/account/set-properties', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_account_u2f_request_registration_challenge(self_address) ⇒ Comet::U2FRegistrationChallengeResponse

AdminAccountU2fRequestRegistrationChallenge

Register a new FIDO U2F token. Browser support for U2F is ending in February 2022. WebAuthn is backwards compatible with U2F keys, and Comet will automatically migrate existing U2F keys to allow their use with the WebAuthn endpoints.

You must supply administrator authentication credentials to use this API.

Parameters:

  • self_address (String)

    External URL of this server, used as U2F AppID and Facet

Returns:

Raises:

  • (TypeError)


198
199
200
201
202
203
204
205
206
207
208
209
210
# File 'lib/comet/comet_server.rb', line 198

def (self_address)
  submit_params = {}
  raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

  submit_params['SelfAddress'] = self_address

  body = perform_request('api/v1/admin/account/u2f/request-registration-challenge', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::U2FRegistrationChallengeResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_account_u2f_submit_challenge_response(u2fchallenge_id, u2fclient_data, u2fregistration_data, u2fversion, description = nil) ⇒ Comet::CometAPIResponseMessage

AdminAccountU2fSubmitChallengeResponse

Register a new FIDO U2F token. Browser support for U2F is ending in February 2022. WebAuthn is backwards compatible with U2F keys, and Comet will automatically migrate existing U2F keys to allow their use with the WebAuthn endpoints.

You must supply administrator authentication credentials to use this API.

Parameters:

  • u2fchallenge_id (String)

    Associated value from AdminAccountU2fRequestRegistrationChallenge API

  • u2fclient_data (String)

    U2F response data supplied by hardware token

  • u2fregistration_data (String)

    U2F response data supplied by hardware token

  • u2fversion (String)

    U2F response data supplied by hardware token

  • description (String) (defaults to: nil)

    (Optional) Description of the token

Returns:

Raises:

  • (TypeError)


227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/comet/comet_server.rb', line 227

def (u2fchallenge_id, u2fclient_data, u2fregistration_data, u2fversion, description = nil)
  submit_params = {}
  raise TypeError, "'u2fchallenge_id' expected String, got #{u2fchallenge_id.class}" unless u2fchallenge_id.is_a? String

  submit_params['U2FChallengeID'] = u2fchallenge_id
  raise TypeError, "'u2fclient_data' expected String, got #{u2fclient_data.class}" unless u2fclient_data.is_a? String

  submit_params['U2FClientData'] = u2fclient_data
  raise TypeError, "'u2fregistration_data' expected String, got #{u2fregistration_data.class}" unless u2fregistration_data.is_a? String

  submit_params['U2FRegistrationData'] = u2fregistration_data
  raise TypeError, "'u2fversion' expected String, got #{u2fversion.class}" unless u2fversion.is_a? String

  submit_params['U2FVersion'] = u2fversion
  unless description.nil?
    raise TypeError, "'description' expected String, got #{description.class}" unless description.is_a? String

    submit_params['Description'] = description
  end

  body = perform_request('api/v1/admin/account/u2f/submit-challenge-response', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_account_validate_totp(totpcode) ⇒ Comet::CometAPIResponseMessage

AdminAccountValidateTotp

Validate the TOTP code before turning 2fa(TOTP) on.

You must supply administrator authentication credentials to use this API.

Parameters:

  • totpcode (String)

    Six-digit code after scanning barcode image

Returns:

Raises:

  • (TypeError)


263
264
265
266
267
268
269
270
271
272
273
274
275
# File 'lib/comet/comet_server.rb', line 263

def (totpcode)
  submit_params = {}
  raise TypeError, "'totpcode' expected String, got #{totpcode.class}" unless totpcode.is_a? String

  submit_params['TOTPCode'] = totpcode

  body = perform_request('api/v1/admin/account/validate-totp', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_account_webauthn_request_registration_challenge(self_address) ⇒ Comet::WebAuthnRegistrationChallengeResponse

AdminAccountWebauthnRequestRegistrationChallenge

Register a new FIDO2 WebAuthn token.

You must supply administrator authentication credentials to use this API.

Parameters:

  • self_address (String)

    External URL of this server, used as WebAuthn ID

Returns:

Raises:

  • (TypeError)


285
286
287
288
289
290
291
292
293
294
295
296
297
# File 'lib/comet/comet_server.rb', line 285

def (self_address)
  submit_params = {}
  raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

  submit_params['SelfAddress'] = self_address

  body = perform_request('api/v1/admin/account/webauthn/request-registration-challenge', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::WebAuthnRegistrationChallengeResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_account_webauthn_submit_challenge_response(self_address, challenge_id, credential) ⇒ Comet::CometAPIResponseMessage

AdminAccountWebauthnSubmitChallengeResponse

Register a new FIDO2 WebAuthn token.

You must supply administrator authentication credentials to use this API.

Parameters:

  • self_address (String)

    External URL of this server, used as WebAuthn ID

  • challenge_id (String)

    Associated value from AdminAccountWebAuthnRequestRegistrationChallenge API

  • credential (String)

    JSON-encoded credential

Returns:

Raises:

  • (TypeError)


309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
# File 'lib/comet/comet_server.rb', line 309

def (self_address, challenge_id, credential)
  submit_params = {}
  raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

  submit_params['SelfAddress'] = self_address
  raise TypeError, "'challenge_id' expected String, got #{challenge_id.class}" unless challenge_id.is_a? String

  submit_params['ChallengeID'] = challenge_id
  raise TypeError, "'credential' expected String, got #{credential.class}" unless credential.is_a? String

  submit_params['Credential'] = credential

  body = perform_request('api/v1/admin/account/webauthn/submit-challenge-response', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_add_first_admin_user(target_user, target_password) ⇒ Comet::CometAPIResponseMessage

AdminAddFirstAdminUser

Add first admin user account on new server.

Parameters:

  • target_user (String)

    the username for this new admin

  • target_password (String)

    the password for this new admin user

Returns:

Raises:

  • (TypeError)


336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/comet/comet_server.rb', line 336

def admin_add_first_admin_user(target_user, target_password)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String

  submit_params['TargetPassword'] = target_password

  body = perform_request('api/v1/admin/add-first-admin-user', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_add_user(target_user, target_password, store_recovery_code = nil, require_password_change = nil, target_organization = nil) ⇒ Comet::CometAPIResponseMessage

AdminAddUser

Add a new user account.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    New account username

  • target_password (String)

    New account password

  • store_recovery_code (Number) (defaults to: nil)

    (Optional) If set to 1, store and keep a password recovery code for the generated user (>= 18.3.9)

  • require_password_change (Number) (defaults to: nil)

    (Optional) If set to 1, require to reset password at the first login for the generated user (>= 20.3.4)

  • target_organization (String) (defaults to: nil)

    (Optional) If present, create the user account on behalf of another organization. Only allowed for administrator accounts in the top-level organization. (>= 22.3.7)

Returns:

Raises:

  • (TypeError)


366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'lib/comet/comet_server.rb', line 366

def admin_add_user(target_user, target_password, store_recovery_code = nil, require_password_change = nil, target_organization = nil)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String

  submit_params['TargetPassword'] = target_password
  unless store_recovery_code.nil?
    raise TypeError, "'store_recovery_code' expected Numeric, got #{store_recovery_code.class}" unless store_recovery_code.is_a? Numeric

    submit_params['StoreRecoveryCode'] = store_recovery_code
  end
  unless require_password_change.nil?
    raise TypeError, "'require_password_change' expected Numeric, got #{require_password_change.class}" unless require_password_change.is_a? Numeric

    submit_params['RequirePasswordChange'] = require_password_change
  end
  unless target_organization.nil?
    raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String

    submit_params['TargetOrganization'] = target_organization
  end

  body = perform_request('api/v1/admin/add-user', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_add_user_from_profile(target_user, profile_data, target_organization = nil) ⇒ Comet::CometAPIResponseMessage

AdminAddUserFromProfile

Add a new user account (with all information). This allows you to create a new account and set all its properties at once (e.g. during account replication). Developers creating a signup form may find it simpler to use the AdminAddUser and AdminGetUserProfile / AdminSetUserProfile APIs separately.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    New account username

  • profile_data (Comet::UserProfileConfig)

    New account profile

  • target_organization (String) (defaults to: nil)

    (Optional) If present, create the user account on behalf of another organization. Only allowed for administrator accounts in the top-level organization. (>= 22.3.7)

Returns:

Raises:

  • (TypeError)


410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
# File 'lib/comet/comet_server.rb', line 410

def admin_add_user_from_profile(target_user, profile_data, target_organization = nil)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig

  submit_params['ProfileData'] = profile_data.to_json
  unless target_organization.nil?
    raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String

    submit_params['TargetOrganization'] = target_organization
  end

  body = perform_request('api/v1/admin/add-user-from-profile', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_admin_user_delete(target_user) ⇒ Comet::CometAPIResponseMessage

AdminAdminUserDelete

Delete an administrator.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Parameters:

  • target_user (String)

    the username of the admin to be deleted

Returns:

Raises:

  • (TypeError)


442
443
444
445
446
447
448
449
450
451
452
453
454
# File 'lib/comet/comet_server.rb', line 442

def admin_admin_user_delete(target_user)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user

  body = perform_request('api/v1/admin/admin-user/delete', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_admin_user_listArray<Comet::AllowedAdminUser>

AdminAdminUserList

List administrators.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Returns:



465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/comet/comet_server.rb', line 465

def admin_admin_user_list
  body = perform_request('api/v1/admin/admin-user/list')
  json_body = JSON.parse body
  check_status json_body
  if json_body.nil?
    ret = []
  else
    ret = Array.new(json_body.length)
    json_body.each_with_index do |v, i|
      ret[i] = Comet::AllowedAdminUser.new
      ret[i].from_hash(v)
    end
  end
  ret
end

#admin_admin_user_new(target_user, target_password, target_org_id = nil) ⇒ Comet::CometAPIResponseMessage

AdminAdminUserNew

Add a new administrator.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Parameters:

  • target_user (String)

    the username for this new admin

  • target_password (String)

    the password for this new admin user

  • target_org_id (String) (defaults to: nil)

    (Optional) provide the organization ID for this user, it will default to the org of the authenticating user otherwise

Returns:

Raises:

  • (TypeError)


493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
# File 'lib/comet/comet_server.rb', line 493

def admin_admin_user_new(target_user, target_password, target_org_id = nil)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String

  submit_params['TargetPassword'] = target_password
  unless target_org_id.nil?
    raise TypeError, "'target_org_id' expected String, got #{target_org_id.class}" unless target_org_id.is_a? String

    submit_params['TargetOrgID'] = target_org_id
  end

  body = perform_request('api/v1/admin/admin-user/new', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_branding_available_platformsHash{Number => Comet::AvailableDownload}

AdminBrandingAvailablePlatforms

List available software download platforms.

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Returns:



524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
# File 'lib/comet/comet_server.rb', line 524

def admin_branding_available_platforms
  body = perform_request('api/v1/admin/branding/available-platforms')
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      ret[k] = Comet::AvailableDownload.new
      ret[k].from_hash(v)
    end
  end
  ret
end

#admin_branding_generate_client_by_platform(platform, self_address = nil) ⇒ String

AdminBrandingGenerateClientByPlatform

Download software.

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

  • platform (Number)

    The selected download platform, from the AdminBrandingAvailablePlatforms API

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts

Returns:

  • (String)

Raises:

  • (TypeError)


551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
# File 'lib/comet/comet_server.rb', line 551

def admin_branding_generate_client_by_platform(platform, self_address = nil)
  submit_params = {}
  raise TypeError, "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric

  submit_params['Platform'] = platform
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  perform_request('api/v1/admin/branding/generate-client/by-platform', submit_params)
end

#admin_branding_generate_client_linux_deb(self_address = nil) ⇒ String

AdminBrandingGenerateClientLinuxDeb

Download software (Linux Debian Package).

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts

Returns:

  • (String)


577
578
579
580
581
582
583
584
585
586
587
588
# File 'lib/comet/comet_server.rb', line 577

def admin_branding_generate_client_linux_deb(self_address = nil)
  submit_params = {}
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  perform_request('api/v1/admin/branding/generate-client/linux-deb', submit_params)
end

#admin_branding_generate_client_linuxgeneric(self_address = nil) ⇒ String

AdminBrandingGenerateClientLinuxgeneric

Download software (Linux Server .run).

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts

Returns:

  • (String)


600
601
602
603
604
605
606
607
608
609
610
611
# File 'lib/comet/comet_server.rb', line 600

def admin_branding_generate_client_linuxgeneric(self_address = nil)
  submit_params = {}
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  perform_request('api/v1/admin/branding/generate-client/linuxgeneric', submit_params)
end

#admin_branding_generate_client_macos_arm_64(self_address = nil) ⇒ String

AdminBrandingGenerateClientMacosArm64

Download software (macOS arm64 pkg).

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts

Returns:

  • (String)


623
624
625
626
627
628
629
630
631
632
633
634
# File 'lib/comet/comet_server.rb', line 623

def admin_branding_generate_client_macos_arm_64(self_address = nil)
  submit_params = {}
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  perform_request('api/v1/admin/branding/generate-client/macos-arm64', submit_params)
end

#admin_branding_generate_client_macos_x8664(self_address = nil) ⇒ String

AdminBrandingGenerateClientMacosX8664

Download software (macOS x86_64 pkg).

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts

Returns:

  • (String)


646
647
648
649
650
651
652
653
654
655
656
657
# File 'lib/comet/comet_server.rb', line 646

def admin_branding_generate_client_macos_x8664(self_address = nil)
  submit_params = {}
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  perform_request('api/v1/admin/branding/generate-client/macos-x86_64', submit_params)
end

#admin_branding_generate_client_spk_dsm_6(self_address = nil) ⇒ String

AdminBrandingGenerateClientSpkDsm6

Download software (Synology SPK for DSM 6).

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts

Returns:

  • (String)


669
670
671
672
673
674
675
676
677
678
679
680
# File 'lib/comet/comet_server.rb', line 669

def admin_branding_generate_client_spk_dsm_6(self_address = nil)
  submit_params = {}
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  perform_request('api/v1/admin/branding/generate-client/spk-dsm6', submit_params)
end

#admin_branding_generate_client_spk_dsm_7(self_address = nil) ⇒ String

AdminBrandingGenerateClientSpkDsm7

Download software (Synology SPK for DSM 7).

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts

Returns:

  • (String)


692
693
694
695
696
697
698
699
700
701
702
703
# File 'lib/comet/comet_server.rb', line 692

def admin_branding_generate_client_spk_dsm_7(self_address = nil)
  submit_params = {}
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  perform_request('api/v1/admin/branding/generate-client/spk-dsm7', submit_params)
end

#admin_branding_generate_client_test(platform, self_address = nil) ⇒ Comet::CometAPIResponseMessage

AdminBrandingGenerateClientTest

Check if a software download is available.

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

  • platform (Number)

    The selected download platform, from the AdminBrandingAvailablePlatforms API

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts

Returns:

Raises:

  • (TypeError)


716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
# File 'lib/comet/comet_server.rb', line 716

def admin_branding_generate_client_test(platform, self_address = nil)
  submit_params = {}
  raise TypeError, "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric

  submit_params['Platform'] = platform
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  body = perform_request('api/v1/admin/branding/generate-client/test', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_branding_generate_client_windows_anycpu_exe(self_address = nil) ⇒ String

AdminBrandingGenerateClientWindowsAnycpuExe

Download software update (Windows AnyCPU exe). The exe endpoints are not recommended for end-users, as they may not be able to provide a codesigned installer if no custom codesigning certificate is present.

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts

Returns:

  • (String)


748
749
750
751
752
753
754
755
756
757
758
759
# File 'lib/comet/comet_server.rb', line 748

def admin_branding_generate_client_windows_anycpu_exe(self_address = nil)
  submit_params = {}
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  perform_request('api/v1/admin/branding/generate-client/windows-anycpu-exe', submit_params)
end

#admin_branding_generate_client_windows_anycpu_zip(self_address = nil) ⇒ String

AdminBrandingGenerateClientWindowsAnycpuZip

Download software (Windows AnyCPU zip). The zip endpoints are recommended for end-users, as they may be able to provide a codesigned installer even when no custom codesigning certificate is present.

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts

Returns:

  • (String)


772
773
774
775
776
777
778
779
780
781
782
783
# File 'lib/comet/comet_server.rb', line 772

def admin_branding_generate_client_windows_anycpu_zip(self_address = nil)
  submit_params = {}
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  perform_request('api/v1/admin/branding/generate-client/windows-anycpu-zip', submit_params)
end

#admin_branding_generate_client_windows_x8632exe(self_address = nil) ⇒ String

AdminBrandingGenerateClientWindowsX8632Exe

Download software update (Windows x86_32 exe). The exe endpoints are not recommended for end-users, as they may not be able to provide a codesigned installer if no custom codesigning certificate is present.

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts

Returns:

  • (String)


796
797
798
799
800
801
802
803
804
805
806
807
# File 'lib/comet/comet_server.rb', line 796

def admin_branding_generate_client_windows_x8632exe(self_address = nil)
  submit_params = {}
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  perform_request('api/v1/admin/branding/generate-client/windows-x86_32-exe', submit_params)
end

#admin_branding_generate_client_windows_x8632zip(self_address = nil) ⇒ String

AdminBrandingGenerateClientWindowsX8632Zip

Download software (Windows x86_32 zip). The zip endpoints are recommended for end-users, as they may be able to provide a codesigned installer even when no custom codesigning certificate is present.

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts

Returns:

  • (String)


820
821
822
823
824
825
826
827
828
829
830
831
# File 'lib/comet/comet_server.rb', line 820

def admin_branding_generate_client_windows_x8632zip(self_address = nil)
  submit_params = {}
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  perform_request('api/v1/admin/branding/generate-client/windows-x86_32-zip', submit_params)
end

#admin_branding_generate_client_windows_x8664exe(self_address = nil) ⇒ String

AdminBrandingGenerateClientWindowsX8664Exe

Download software update (Windows x86_64 exe). The exe endpoints are not recommended for end-users, as they may not be able to provide a codesigned installer if no custom codesigning certificate is present.

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts

Returns:

  • (String)


844
845
846
847
848
849
850
851
852
853
854
855
# File 'lib/comet/comet_server.rb', line 844

def admin_branding_generate_client_windows_x8664exe(self_address = nil)
  submit_params = {}
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  perform_request('api/v1/admin/branding/generate-client/windows-x86_64-exe', submit_params)
end

#admin_branding_generate_client_windows_x8664zip(self_address = nil) ⇒ String

AdminBrandingGenerateClientWindowsX8664Zip

Download software (Windows x86_64 zip). The zip endpoints are recommended for end-users, as they may be able to provide a codesigned installer even when no custom codesigning certificate is present.

This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts

Returns:

  • (String)


868
869
870
871
872
873
874
875
876
877
878
879
# File 'lib/comet/comet_server.rb', line 868

def admin_branding_generate_client_windows_x8664zip(self_address = nil)
  submit_params = {}
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  perform_request('api/v1/admin/branding/generate-client/windows-x86_64-zip', submit_params)
end

#admin_bulletin_submit(subject, content) ⇒ Comet::CometAPIResponseMessage

AdminBulletinSubmit

Send an email bulletin to all users.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • subject (String)

    Bulletin subject line

  • content (String)

    Bulletin message content

Returns:

Raises:

  • (TypeError)


891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
# File 'lib/comet/comet_server.rb', line 891

def admin_bulletin_submit(subject, content)
  submit_params = {}
  raise TypeError, "'subject' expected String, got #{subject.class}" unless subject.is_a? String

  submit_params['Subject'] = subject
  raise TypeError, "'content' expected String, got #{content.class}" unless content.is_a? String

  submit_params['Content'] = content

  body = perform_request('api/v1/admin/bulletin/submit', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_constellation_last_reportComet::ConstellationCheckReport

AdminConstellationLastReport

Get Constellation bucket usage report (cached).

You must supply administrator authentication credentials to use this API. This API requires the Constellation Role to be enabled.



916
917
918
919
920
921
922
923
# File 'lib/comet/comet_server.rb', line 916

def admin_constellation_last_report
  body = perform_request('api/v1/admin/constellation/last-report')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::ConstellationCheckReport.new
  ret.from_hash(json_body)
  ret
end

#admin_constellation_new_reportComet::ConstellationCheckReport

AdminConstellationNewReport

Get Constellation bucket usage report (regenerate).

You must supply administrator authentication credentials to use this API. This API requires the Constellation Role to be enabled.



933
934
935
936
937
938
939
940
# File 'lib/comet/comet_server.rb', line 933

def admin_constellation_new_report
  body = perform_request('api/v1/admin/constellation/new-report')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::ConstellationCheckReport.new
  ret.from_hash(json_body)
  ret
end

#admin_constellation_prune_nowComet::CometAPIResponseMessage

AdminConstellationPruneNow

Prune unused buckets.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts. This API requires the Constellation Role to be enabled.



951
952
953
954
955
956
957
958
# File 'lib/comet/comet_server.rb', line 951

def admin_constellation_prune_now
  body = perform_request('api/v1/admin/constellation/prune-now')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_constellation_statusComet::ConstellationStatusAPIResponse

AdminConstellationStatus

Get Constellation status.

You must supply administrator authentication credentials to use this API. This API requires the Constellation Role to be enabled.



968
969
970
971
972
973
974
975
# File 'lib/comet/comet_server.rb', line 968

def admin_constellation_status
  body = perform_request('api/v1/admin/constellation/status')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::ConstellationStatusAPIResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_convert_storage_role(target_user, destination_id) ⇒ Comet::RequestStorageVaultResponseMessage

AdminConvertStorageRole

Convert IAM Storage Role vault to its underlying S3 type.

You must supply administrator authentication credentials to use this API.

Parameters:

  • target_user (String)

    The user to receive the new Storage Vault

  • destination_id (String)

    The id of the old storage role destination to convert

Returns:

Raises:

  • (TypeError)


986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
# File 'lib/comet/comet_server.rb', line 986

def admin_convert_storage_role(target_user, destination_id)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String

  submit_params['DestinationId'] = destination_id

  body = perform_request('api/v1/admin/convert-storage-role', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::RequestStorageVaultResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_count_jobs_for_custom_search(query) ⇒ Comet::CountJobsResponse

AdminCountJobsForCustomSearch

Count jobs (for custom search).

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

Returns:

Raises:

  • (TypeError)


1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
# File 'lib/comet/comet_server.rb', line 1012

def admin_count_jobs_for_custom_search(query)
  submit_params = {}
  raise TypeError, "'query' expected Comet::SearchClause, got #{query.class}" unless query.is_a? Comet::SearchClause

  submit_params['Query'] = query.to_json

  body = perform_request('api/v1/admin/count-jobs-for-custom-search', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CountJobsResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_create_install_token(target_user, target_password, server = nil) ⇒ Comet::InstallTokenResponse

AdminCreateInstallToken

Create token for silent installation. Currently only supported for Windows & macOS only Provide the installation token to silently install the client on windows ‘install.exe /TOKEN=<installtoken>` Provide the installation token to silently install the client on Mac OS `sudo launchctl setenv BACKUP_APP_TOKEN “installtoken” && sudo /usr/sbin/installer -allowUntrusted -pkg “Comet Backup.pkg” -target /`

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Selected account username

  • target_password (String)

    Selected account password

  • server (String) (defaults to: nil)

    (Optional) External URL of the authentication server that is different from the current server

Returns:

Raises:

  • (TypeError)


1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
# File 'lib/comet/comet_server.rb', line 1040

def admin_create_install_token(target_user, target_password, server = nil)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String

  submit_params['TargetPassword'] = target_password
  unless server.nil?
    raise TypeError, "'server' expected String, got #{server.class}" unless server.is_a? String

    submit_params['Server'] = server
  end

  body = perform_request('api/v1/admin/create-install-token', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::InstallTokenResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_delete_protected_item(target_user, source_id) ⇒ Comet::CometAPIResponseMessage

AdminDeleteProtectedItem

Delete a Protected Item.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Selected account username

  • source_id (String)

    Selected Protected Item GUID

Returns:

Raises:

  • (TypeError)


1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
# File 'lib/comet/comet_server.rb', line 1072

def admin_delete_protected_item(target_user, source_id)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'source_id' expected String, got #{source_id.class}" unless source_id.is_a? String

  submit_params['SourceID'] = source_id

  body = perform_request('api/v1/admin/delete-protected-item', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_delete_user(target_user, uninstall_config = nil) ⇒ Comet::CometAPIResponseMessage

AdminDeleteUser

Delete user account. This does not remove any storage buckets. Unused storage buckets will be cleaned up by the Constellation Role. Any stored data can not be decrypted without the user profile. Misuse can cause data loss! This also allows to uninstall software from active devices under the user account This also removes all job history for the user account.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Selected account username

  • uninstall_config (Comet::UninstallConfig) (defaults to: nil)

    (Optional) Uninstall software configuration (>= 20.3.5)

Returns:

Raises:

  • (TypeError)


1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
# File 'lib/comet/comet_server.rb', line 1103

def admin_delete_user(target_user, uninstall_config = nil)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  unless uninstall_config.nil?
    raise TypeError, "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig

    submit_params['UninstallConfig'] = uninstall_config.to_json
  end

  body = perform_request('api/v1/admin/delete-user', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_disable_user_totp(target_user) ⇒ Comet::CometAPIResponseMessage

AdminDisableUserTotp

Disable user account 2FA(TOTP) authentication.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Selected account username

Returns:

Raises:

  • (TypeError)


1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
# File 'lib/comet/comet_server.rb', line 1131

def admin_disable_user_totp(target_user)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user

  body = perform_request('api/v1/admin/disable-user-totp', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_apply_retention_rules(target_id, destination) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherApplyRetentionRules

Instruct a live connected device to apply retention rules now. This command is understood by Comet Backup 17.6.9 and newer.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • destination (String)

    The Storage Vault GUID

Returns:

Raises:

  • (TypeError)


1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
# File 'lib/comet/comet_server.rb', line 1156

def admin_dispatcher_apply_retention_rules(target_id, destination)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String

  submit_params['Destination'] = destination

  body = perform_request('api/v1/admin/dispatcher/apply-retention-rules', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_browse_virtual_machines(target_id, destination_id, snapshot_id) ⇒ Comet::DispatcherListSnapshotVirtualMachinesResponse

AdminDispatcherBrowseVirtualMachines

Browse virtual machines in target snapshot.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • destination_id (String)

    The Storage Vault GUID

  • snapshot_id (String)

    Snapshot to search

Returns:

Raises:

  • (TypeError)


1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
# File 'lib/comet/comet_server.rb', line 1184

def admin_dispatcher_browse_virtual_machines(target_id, destination_id, snapshot_id)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String

  submit_params['DestinationID'] = destination_id
  raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String

  submit_params['SnapshotID'] = snapshot_id

  body = perform_request('api/v1/admin/dispatcher/browse-virtual-machines', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::DispatcherListSnapshotVirtualMachinesResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_deepverify_storage_vault(target_id, destination) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherDeepverifyStorageVault

Instruct a live connected device to deeply verify Storage Vault content. This command is understood by Comet Backup 18.8.2 and newer.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • destination (String)

    The Storage Vault GUID

Returns:

Raises:

  • (TypeError)


1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
# File 'lib/comet/comet_server.rb', line 1215

def admin_dispatcher_deepverify_storage_vault(target_id, destination)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String

  submit_params['Destination'] = destination

  body = perform_request('api/v1/admin/dispatcher/deepverify-storage-vault', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_delete_snapshot(target_id, destination_id, snapshot_id) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherDeleteSnapshot

Instruct a live connected device to delete a stored snapshot.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • destination_id (String)

    The Storage Vault GUID

  • snapshot_id (String)

    The backup job snapshot ID to delete

Returns:

Raises:

  • (TypeError)


1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
# File 'lib/comet/comet_server.rb', line 1243

def admin_dispatcher_delete_snapshot(target_id, destination_id, snapshot_id)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String

  submit_params['DestinationID'] = destination_id
  raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String

  submit_params['SnapshotID'] = snapshot_id

  body = perform_request('api/v1/admin/dispatcher/delete-snapshot', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_delete_snapshots(target_id, destination_id, snapshot_ids) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherDeleteSnapshots

Instruct a live connected device to delete multiple stored snapshots. The target device must be running Comet 20.9.10 or later.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • destination_id (String)

    The Storage Vault GUID

  • snapshot_ids (Array<String>)

    The backup job snapshot IDs to delete

Returns:

Raises:

  • (TypeError)


1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
# File 'lib/comet/comet_server.rb', line 1275

def admin_dispatcher_delete_snapshots(target_id, destination_id, snapshot_ids)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String

  submit_params['DestinationID'] = destination_id
  raise TypeError, "'snapshot_ids' expected Array, got #{snapshot_ids.class}" unless snapshot_ids.is_a? Array

  submit_params['SnapshotIDs'] = snapshot_ids.to_json

  body = perform_request('api/v1/admin/dispatcher/delete-snapshots', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_drop_connection(target_id) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherDropConnection

Disconnect a live connected device. The device will almost certainly attempt to reconnect.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

Returns:

Raises:

  • (TypeError)


1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
# File 'lib/comet/comet_server.rb', line 1305

def admin_dispatcher_drop_connection(target_id)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id

  body = perform_request('api/v1/admin/dispatcher/drop-connection', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_email_preview(target_id, snapshot, destination, path) ⇒ Comet::EmailReportGeneratedPreview

AdminDispatcherEmailPreview

Request HTML content of an email. The remote device must have given consent for an MSP to browse their mail

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • snapshot (String)

    where the email belongs to

  • destination (String)

    The Storage Vault ID

  • path (String)

    of the email to view

Returns:

Raises:

  • (TypeError)


1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
# File 'lib/comet/comet_server.rb', line 1332

def admin_dispatcher_email_preview(target_id, snapshot, destination, path)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String

  submit_params['Snapshot'] = snapshot
  raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String

  submit_params['Destination'] = destination
  raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String

  submit_params['Path'] = path

  body = perform_request('api/v1/admin/dispatcher/email-preview', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::EmailReportGeneratedPreview.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_force_login(target_id) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherForceLogin

Instruct a live connected device to re-enter login credentials. The device will terminate its live-connection process and will not reconnect.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

Returns:

Raises:

  • (TypeError)


1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
# File 'lib/comet/comet_server.rb', line 1365

def (target_id)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id

  body = perform_request('api/v1/admin/dispatcher/force-login', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_get_default_login_url(organization_id) ⇒ Comet::OrganizationLoginURLResponse

AdminDispatcherGetDefaultLoginUrl

Get the default login URL for a tenant.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Parameters:

  • organization_id (String)

    Target organization

Returns:

Raises:

  • (TypeError)


1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
# File 'lib/comet/comet_server.rb', line 1389

def (organization_id)
  submit_params = {}
  raise TypeError, "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String

  submit_params['OrganizationID'] = organization_id

  body = perform_request('api/v1/admin/dispatcher/get-default-login-url', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::OrganizationLoginURLResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_import_apply(target_id, import_source_id) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherImportApply

Instruct a live connected device to import settings from an installed product. This command is understood by Comet Backup 17.12.0 and newer.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • import_source_id (String)

    The selected import source, as found by the AdminDispatcherRequestImportSources API

Returns:

Raises:

  • (TypeError)


1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
# File 'lib/comet/comet_server.rb', line 1414

def admin_dispatcher_import_apply(target_id, import_source_id)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'import_source_id' expected String, got #{import_source_id.class}" unless import_source_id.is_a? String

  submit_params['ImportSourceID'] = import_source_id

  body = perform_request('api/v1/admin/dispatcher/import-apply', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_kill_process(target_id) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherKillProcess

Instruct a live connected device to disconnect. The device will terminate its live-connection process and will not reconnect.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

Returns:

Raises:

  • (TypeError)


1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
# File 'lib/comet/comet_server.rb', line 1441

def admin_dispatcher_kill_process(target_id)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id

  body = perform_request('api/v1/admin/dispatcher/kill-process', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_list_active(user_name_filter = nil) ⇒ Hash{String => Comet::LiveUserConnection}

AdminDispatcherListActive

List live connected devices.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • user_name_filter (String) (defaults to: nil)

    (Optional) User name filter string

Returns:



1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
# File 'lib/comet/comet_server.rb', line 1464

def admin_dispatcher_list_active(user_name_filter = nil)
  submit_params = {}
  unless user_name_filter.nil?
    raise TypeError, "'user_name_filter' expected String, got #{user_name_filter.class}" unless user_name_filter.is_a? String

    submit_params['UserNameFilter'] = user_name_filter
  end

  body = perform_request('api/v1/admin/dispatcher/list-active', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      ret[k] = Comet::LiveUserConnection.new
      ret[k].from_hash(v)
    end
  end
  ret
end

#admin_dispatcher_office_365list_virtual_accounts(target_id, credentials) ⇒ Comet::BrowseOffice365ListVirtualAccountsResponse

AdminDispatcherOffice365ListVirtualAccounts

Request a list of Office365 Resources (groups, sites, teams groups and users). The remote device must have given consent for an MSP to browse their files.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

Returns:

Raises:

  • (TypeError)


1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
# File 'lib/comet/comet_server.rb', line 1498

def admin_dispatcher_office_365list_virtual_accounts(target_id, credentials)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'credentials' expected Comet::Office365Credential, got #{credentials.class}" unless credentials.is_a? Comet::Office365Credential

  submit_params['Credentials'] = credentials.to_json

  body = perform_request('api/v1/admin/dispatcher/office365-list-virtual-accounts', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseOffice365ListVirtualAccountsResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_ping_destination(target_id, extra_data) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherPingDestination

Test the connection to the storage bucket.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

Returns:

Raises:

  • (TypeError)


1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
# File 'lib/comet/comet_server.rb', line 1525

def admin_dispatcher_ping_destination(target_id, extra_data)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'extra_data' expected Comet::DestinationLocation, got #{extra_data.class}" unless extra_data.is_a? Comet::DestinationLocation

  submit_params['ExtraData'] = extra_data.to_json

  body = perform_request('api/v1/admin/dispatcher/ping-destination', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_refetch_profile(target_id) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherRefetchProfile

Instruct a live connected device to refresh their profile. This command is understood by Comet Backup 17.12.0 and newer.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

Returns:

Raises:

  • (TypeError)


1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
# File 'lib/comet/comet_server.rb', line 1552

def admin_dispatcher_refetch_profile(target_id)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id

  body = perform_request('api/v1/admin/dispatcher/refetch-profile', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_register_office_application_begin(target_id, email_address) ⇒ Comet::RegisterOfficeApplicationBeginResponse

AdminDispatcherRegisterOfficeApplicationBegin

Begin the process of registering a new Azure AD application that can access Office 365 for backup. After calling this API, you should supply the login details to the end-user, and then begin polling the AdminDispatcherRegisterOfficeApplicationCheck with the supplied “Continuation” parameter to check on the registration process.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • email_address (String)

    The email address of the Azure AD administrator

Returns:

Raises:

  • (TypeError)


1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
# File 'lib/comet/comet_server.rb', line 1577

def admin_dispatcher_register_office_application_begin(target_id, email_address)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String

  submit_params['EmailAddress'] = email_address

  body = perform_request('api/v1/admin/dispatcher/register-office-application/begin', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::RegisterOfficeApplicationBeginResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_register_office_application_check(target_id, continuation) ⇒ Comet::RegisterOfficeApplicationCheckResponse

AdminDispatcherRegisterOfficeApplicationCheck

Check the process of registering a new Azure AD application that can access Office 365 for backup. You should begin the process by calling AdminDispatcherRegisterOfficeApplicationBegin and asking the end-user to complete the Azure authentication steps.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • continuation (String)

    The ID returned from the AdminDispatcherRegisterOfficeApplicationBegin endpoint

Returns:

Raises:

  • (TypeError)


1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
# File 'lib/comet/comet_server.rb', line 1605

def admin_dispatcher_register_office_application_check(target_id, continuation)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'continuation' expected String, got #{continuation.class}" unless continuation.is_a? String

  submit_params['Continuation'] = continuation

  body = perform_request('api/v1/admin/dispatcher/register-office-application/check', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::RegisterOfficeApplicationCheckResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_reindex_storage_vault(target_id, destination) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherReindexStorageVault

Instruct a live connected device to rebuild Storage Vault indexes now. This command is understood by Comet Backup 18.6.9 and newer.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • destination (String)

    The Storage Vault GUID

Returns:

Raises:

  • (TypeError)


1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
# File 'lib/comet/comet_server.rb', line 1633

def admin_dispatcher_reindex_storage_vault(target_id, destination)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String

  submit_params['Destination'] = destination

  body = perform_request('api/v1/admin/dispatcher/reindex-storage-vault', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_disk_drives(target_id) ⇒ Comet::BrowseDiskDrivesResponse

AdminDispatcherRequestBrowseDiskDrives

Request a list of physical disk drive information from a live connected device.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

Returns:

Raises:

  • (TypeError)


1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
# File 'lib/comet/comet_server.rb', line 1659

def admin_dispatcher_request_browse_disk_drives(target_id)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id

  body = perform_request('api/v1/admin/dispatcher/request-browse-disk-drives', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseDiskDrivesResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_exchange_edb(target_id) ⇒ Comet::BrowseEDBResponse

AdminDispatcherRequestBrowseExchangeEdb

Request a list of Exchange EDB databases from a live connected device.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

Returns:

Raises:

  • (TypeError)


1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
# File 'lib/comet/comet_server.rb', line 1682

def admin_dispatcher_request_browse_exchange_edb(target_id)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id

  body = perform_request('api/v1/admin/dispatcher/request-browse-exchange-edb', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseEDBResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_hyperv(target_id) ⇒ Comet::BrowseHVResponse

AdminDispatcherRequestBrowseHyperv

Request a list of Hyper-V virtual machines from a live connected device.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

Returns:

Raises:

  • (TypeError)


1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
# File 'lib/comet/comet_server.rb', line 1705

def admin_dispatcher_request_browse_hyperv(target_id)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id

  body = perform_request('api/v1/admin/dispatcher/request-browse-hyperv', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseHVResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_mongodb(target_id, credentials) ⇒ Comet::BrowseSQLServerResponse

AdminDispatcherRequestBrowseMongodb

Request a list of tables in MongoDB database. The remote device must have given consent for an MSP to browse their files.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • credentials (Comet::MongoDBConnection)

    The Mongo database authentication settings

Returns:

Raises:

  • (TypeError)


1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
# File 'lib/comet/comet_server.rb', line 1730

def admin_dispatcher_request_browse_mongodb(target_id, credentials)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'credentials' expected Comet::MongoDBConnection, got #{credentials.class}" unless credentials.is_a? Comet::MongoDBConnection

  submit_params['Credentials'] = credentials.to_json

  body = perform_request('api/v1/admin/dispatcher/request-browse-mongodb', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseSQLServerResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_mssql(target_id, credentials) ⇒ Comet::BrowseSQLServerResponse

AdminDispatcherRequestBrowseMssql

Request a list of tables in MSSQL database. The remote device must have given consent for an MSP to browse their files.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • credentials (Comet::MSSQLConnection)

    The MSSQL database authentication settings

Returns:

Raises:

  • (TypeError)


1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
# File 'lib/comet/comet_server.rb', line 1758

def admin_dispatcher_request_browse_mssql(target_id, credentials)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'credentials' expected Comet::MSSQLConnection, got #{credentials.class}" unless credentials.is_a? Comet::MSSQLConnection

  submit_params['Credentials'] = credentials.to_json

  body = perform_request('api/v1/admin/dispatcher/request-browse-mssql', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseSQLServerResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_mysql(target_id, credentials) ⇒ Comet::BrowseSQLServerResponse

AdminDispatcherRequestBrowseMysql

Request a list of tables in MySQL database. The remote device must have given consent for an MSP to browse their files.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • credentials (Comet::MySQLConnection)

    The MySQL database authentication settings

Returns:

Raises:

  • (TypeError)


1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
# File 'lib/comet/comet_server.rb', line 1786

def admin_dispatcher_request_browse_mysql(target_id, credentials)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'credentials' expected Comet::MySQLConnection, got #{credentials.class}" unless credentials.is_a? Comet::MySQLConnection

  submit_params['Credentials'] = credentials.to_json

  body = perform_request('api/v1/admin/dispatcher/request-browse-mysql', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseSQLServerResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_proxmox(target_id, credentials) ⇒ Comet::BrowseProxmoxResponse

AdminDispatcherRequestBrowseProxmox

Request a list of Proxmox virtual machines and containers.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • credentials (Comet::ProxmoxConnection)

    The Proxmox connection settings

Returns:

Raises:

  • (TypeError)


1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
# File 'lib/comet/comet_server.rb', line 1813

def admin_dispatcher_request_browse_proxmox(target_id, credentials)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'credentials' expected Comet::ProxmoxConnection, got #{credentials.class}" unless credentials.is_a? Comet::ProxmoxConnection

  submit_params['Credentials'] = credentials.to_json

  body = perform_request('api/v1/admin/dispatcher/request-browse-proxmox', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseProxmoxResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_proxmox_nodes(target_id, credentials) ⇒ Comet::BrowseProxmoxNodesResponse

AdminDispatcherRequestBrowseProxmoxNodes

Request a list of Proxmox nodes.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • credentials (Comet::SSHConnection)

    The SSH connection settings

Returns:

Raises:

  • (TypeError)


1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
# File 'lib/comet/comet_server.rb', line 1840

def admin_dispatcher_request_browse_proxmox_nodes(target_id, credentials)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'credentials' expected Comet::SSHConnection, got #{credentials.class}" unless credentials.is_a? Comet::SSHConnection

  submit_params['Credentials'] = credentials.to_json

  body = perform_request('api/v1/admin/dispatcher/request-browse-proxmox/nodes', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseProxmoxNodesResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_proxmox_storage(target_id, credentials) ⇒ Comet::BrowseProxmoxStorageResponse

AdminDispatcherRequestBrowseProxmoxStorage

Request a list of configured Proxmox storage.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • credentials (Comet::SSHConnection)

    The SSH connection settings

Returns:

Raises:

  • (TypeError)


1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
# File 'lib/comet/comet_server.rb', line 1867

def admin_dispatcher_request_browse_proxmox_storage(target_id, credentials)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'credentials' expected Comet::SSHConnection, got #{credentials.class}" unless credentials.is_a? Comet::SSHConnection

  submit_params['Credentials'] = credentials.to_json

  body = perform_request('api/v1/admin/dispatcher/request-browse-proxmox/storage', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseProxmoxStorageResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_vmware(target_id, credentials) ⇒ Comet::BrowseVMwareResponse

AdminDispatcherRequestBrowseVmware

Request a list of VMware vSphere virtual machines. The remote device must have given consent for an MSP to browse their files.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • credentials (Comet::VMwareConnection)

    The VMware vSphere connection settings

Returns:

Raises:

  • (TypeError)


1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
# File 'lib/comet/comet_server.rb', line 1895

def admin_dispatcher_request_browse_vmware(target_id, credentials)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'credentials' expected Comet::VMwareConnection, got #{credentials.class}" unless credentials.is_a? Comet::VMwareConnection

  submit_params['Credentials'] = credentials.to_json

  body = perform_request('api/v1/admin/dispatcher/request-browse-vmware', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseVMwareResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_vmware_datacenters(target_id, credentials) ⇒ Comet::BrowseVMwareDatacentersResponse

AdminDispatcherRequestBrowseVmwareDatacenters

Request a list of VMware vSphere Datacenters on a VMware vSphere connection. The remote device must have given consent for an MSP to browse their files.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • credentials (Comet::VMwareConnection)

    The VMware vSphere connection settings

Returns:

Raises:

  • (TypeError)


1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
# File 'lib/comet/comet_server.rb', line 1923

def admin_dispatcher_request_browse_vmware_datacenters(target_id, credentials)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'credentials' expected Comet::VMwareConnection, got #{credentials.class}" unless credentials.is_a? Comet::VMwareConnection

  submit_params['Credentials'] = credentials.to_json

  body = perform_request('api/v1/admin/dispatcher/request-browse-vmware/datacenters', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseVMwareDatacentersResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_vmware_datastores(target_id, credentials, filter) ⇒ Comet::BrowseVMwareDatastoresResponse

AdminDispatcherRequestBrowseVmwareDatastores

Request a list of VMware vSphere Datastores on a VMware vSphere connection, for a specified VMware Datacenter. The remote device must have given consent for an MSP to browse their files.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • credentials (Comet::VMwareConnection)

    The VMware vSphere connection settings

  • filter (String)

    The name of the target VMware Datacenter

Returns:

Raises:

  • (TypeError)


1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
# File 'lib/comet/comet_server.rb', line 1952

def admin_dispatcher_request_browse_vmware_datastores(target_id, credentials, filter)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'credentials' expected Comet::VMwareConnection, got #{credentials.class}" unless credentials.is_a? Comet::VMwareConnection

  submit_params['Credentials'] = credentials.to_json
  raise TypeError, "'filter' expected String, got #{filter.class}" unless filter.is_a? String

  submit_params['Filter'] = filter

  body = perform_request('api/v1/admin/dispatcher/request-browse-vmware/datastores', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseVMwareDatastoresResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_vmware_hosts(target_id, credentials, filter) ⇒ Comet::BrowseVMwareHostsResponse

AdminDispatcherRequestBrowseVmwareHosts

Request a list of VMware vSphere Hosts on a VMware vSphere connection, for a specified VMware Datacenter. The remote device must have given consent for an MSP to browse their files.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • credentials (Comet::VMwareConnection)

    The VMware vSphere connection settings

  • filter (String)

    The name of the target VMware Datacenter

Returns:

Raises:

  • (TypeError)


1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
# File 'lib/comet/comet_server.rb', line 1984

def admin_dispatcher_request_browse_vmware_hosts(target_id, credentials, filter)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'credentials' expected Comet::VMwareConnection, got #{credentials.class}" unless credentials.is_a? Comet::VMwareConnection

  submit_params['Credentials'] = credentials.to_json
  raise TypeError, "'filter' expected String, got #{filter.class}" unless filter.is_a? String

  submit_params['Filter'] = filter

  body = perform_request('api/v1/admin/dispatcher/request-browse-vmware/hosts', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseVMwareHostsResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_vmware_networks(target_id, credentials, filter) ⇒ Comet::BrowseVMwareNetworksResponse

AdminDispatcherRequestBrowseVmwareNetworks

Request a list of VMware vSphere Networks on a VMware vSphere connection, for a specified VMware Datacenter. The remote device must have given consent for an MSP to browse their files.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • credentials (Comet::VMwareConnection)

    The VMware vSphere connection settings

  • filter (String)

    The name of the target VMware Datacenter

Returns:

Raises:

  • (TypeError)


2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
# File 'lib/comet/comet_server.rb', line 2016

def admin_dispatcher_request_browse_vmware_networks(target_id, credentials, filter)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'credentials' expected Comet::VMwareConnection, got #{credentials.class}" unless credentials.is_a? Comet::VMwareConnection

  submit_params['Credentials'] = credentials.to_json
  raise TypeError, "'filter' expected String, got #{filter.class}" unless filter.is_a? String

  submit_params['Filter'] = filter

  body = perform_request('api/v1/admin/dispatcher/request-browse-vmware/networks', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseVMwareNetworksResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_browse_vss_aaw(target_id) ⇒ Comet::BrowseVSSResponse

AdminDispatcherRequestBrowseVssAaw

Request a list of installed VSS Writers (Application-Aware Writers) from a live connected device.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

Returns:

Raises:

  • (TypeError)


2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
# File 'lib/comet/comet_server.rb', line 2045

def admin_dispatcher_request_browse_vss_aaw(target_id)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id

  body = perform_request('api/v1/admin/dispatcher/request-browse-vss-aaw', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseVSSResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_filesystem_objects(target_id, path = nil) ⇒ Comet::DispatcherStoredObjectsResponse

AdminDispatcherRequestFilesystemObjects

Request a list of filesystem objects from a live connected device. The device must have granted the administrator permission to view its filenames.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • path (String) (defaults to: nil)

    (Optional) Browse objects inside this path. If empty or not present, returns the top-level device paths

Returns:

Raises:

  • (TypeError)


2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
# File 'lib/comet/comet_server.rb', line 2070

def admin_dispatcher_request_filesystem_objects(target_id, path = nil)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  unless path.nil?
    raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String

    submit_params['Path'] = path
  end

  body = perform_request('api/v1/admin/dispatcher/request-filesystem-objects', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::DispatcherStoredObjectsResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_import_sources(target_id) ⇒ Comet::DispatcherAdminSourcesResponse

AdminDispatcherRequestImportSources

Request a list of import sources from a live connected device.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

Returns:

Raises:

  • (TypeError)


2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
# File 'lib/comet/comet_server.rb', line 2098

def admin_dispatcher_request_import_sources(target_id)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id

  body = perform_request('api/v1/admin/dispatcher/request-import-sources', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::DispatcherAdminSourcesResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_office_365accounts(target_id, credentials) ⇒ Comet::BrowseOffice365ObjectsResponse

AdminDispatcherRequestOffice365Accounts

Request a list of Office365 mailbox accounts. The remote device must have given consent for an MSP to browse their files. This is primarily used for testing the connection to Graph API, not for actual listing

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

Returns:

Raises:

  • (TypeError)


2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
# File 'lib/comet/comet_server.rb', line 2124

def admin_dispatcher_request_office_365accounts(target_id, credentials)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'credentials' expected Comet::Office365Credential, got #{credentials.class}" unless credentials.is_a? Comet::Office365Credential

  submit_params['Credentials'] = credentials.to_json

  body = perform_request('api/v1/admin/dispatcher/request-office365-accounts', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseOffice365ObjectsResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_office_365sites(target_id, credentials) ⇒ Comet::BrowseOffice365ObjectsResponse

AdminDispatcherRequestOffice365Sites

Request a list of Office365 sites. The remote device must have given consent for an MSP to browse their files.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

Returns:

Raises:

  • (TypeError)


2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
# File 'lib/comet/comet_server.rb', line 2152

def admin_dispatcher_request_office_365sites(target_id, credentials)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'credentials' expected Comet::Office365Credential, got #{credentials.class}" unless credentials.is_a? Comet::Office365Credential

  submit_params['Credentials'] = credentials.to_json

  body = perform_request('api/v1/admin/dispatcher/request-office365-sites', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BrowseOffice365ObjectsResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = nil, options = nil) ⇒ Comet::DispatcherStoredObjectsResponse

AdminDispatcherRequestStoredObjects

Request a list of stored objects inside an existing backup job. The remote device must have given consent for an MSP to browse their files. To service this request, the remote device must connect to the Storage Vault and load index data. There may be a small delay. If the remote device is running Comet 20.12.0 or later, the necessary index data is cached when this API is first called, for 15 minutes after the last repeated call. This can improve performance for interactively browsing an entire tree of stored objects.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • destination (String)

    The Storage Vault ID

  • snapshot_id (String)

    The selected backup job snapshot

  • tree_id (String) (defaults to: nil)

    (Optional) Browse objects inside subdirectory of backup snapshot. If it is for VMDK single file restore, it should be the disk image’s subtree ID.

  • options (Comet::VMDKSnapshotViewOptions) (defaults to: nil)

    (Optional) Request a list of stored objects in vmdk file

Returns:

Raises:

  • (TypeError)


2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
# File 'lib/comet/comet_server.rb', line 2184

def admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = nil, options = nil)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String

  submit_params['Destination'] = destination
  raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String

  submit_params['SnapshotID'] = snapshot_id
  unless tree_id.nil?
    raise TypeError, "'tree_id' expected String, got #{tree_id.class}" unless tree_id.is_a? String

    submit_params['TreeID'] = tree_id
  end
  unless options.nil?
    raise TypeError, "'options' expected Comet::VMDKSnapshotViewOptions, got #{options.class}" unless options.is_a? Comet::VMDKSnapshotViewOptions

    submit_params['Options'] = options.to_json
  end

  body = perform_request('api/v1/admin/dispatcher/request-stored-objects', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::DispatcherStoredObjectsResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_vault_snapshots(target_id, destination) ⇒ Comet::DispatcherVaultSnapshotsResponse

AdminDispatcherRequestVaultSnapshots

Request a list of Storage Vault snapshots from a live connected device.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • destination (String)

    The Storage Vault ID

Returns:

Raises:

  • (TypeError)


2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
# File 'lib/comet/comet_server.rb', line 2224

def admin_dispatcher_request_vault_snapshots(target_id, destination)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String

  submit_params['Destination'] = destination

  body = perform_request('api/v1/admin/dispatcher/request-vault-snapshots', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::DispatcherVaultSnapshotsResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_request_windisk_snapshot(target_id, destination, snapshot_id) ⇒ Comet::DispatcherWindiskSnapshotResponse

AdminDispatcherRequestWindiskSnapshot

Request a Disk Image snapshot with the windiskbrowse-style from a live connected device.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • destination (String)

    The Storage Vault ID

  • snapshot_id (String)

    The Snapshot ID

Returns:

Raises:

  • (TypeError)


2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
# File 'lib/comet/comet_server.rb', line 2252

def admin_dispatcher_request_windisk_snapshot(target_id, destination, snapshot_id)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String

  submit_params['Destination'] = destination
  raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String

  submit_params['SnapshotID'] = snapshot_id

  body = perform_request('api/v1/admin/dispatcher/request-windisk-snapshot', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::DispatcherWindiskSnapshotResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_run_backup(target_id, backup_rule) ⇒ Comet::DispatchWithJobIDResponse

AdminDispatcherRunBackup

Instruct a live connected device to run a scheduled backup.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • backup_rule (String)

    The schedule GUID

Returns:

Raises:

  • (TypeError)


2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
# File 'lib/comet/comet_server.rb', line 2282

def admin_dispatcher_run_backup(target_id, backup_rule)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'backup_rule' expected String, got #{backup_rule.class}" unless backup_rule.is_a? String

  submit_params['BackupRule'] = backup_rule

  body = perform_request('api/v1/admin/dispatcher/run-backup', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::DispatchWithJobIDResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_run_backup_custom(target_id, source, destination, options = nil) ⇒ Comet::DispatchWithJobIDResponse

AdminDispatcherRunBackupCustom

Instruct a live connected device to run a backup.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • source (String)

    The Protected Item GUID

  • destination (String)

    The Storage Vault GUID

  • options (Comet::BackupJobAdvancedOptions) (defaults to: nil)

    (Optional) Extra job parameters (>= 19.3.6)

Returns:

Raises:

  • (TypeError)


2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
# File 'lib/comet/comet_server.rb', line 2311

def admin_dispatcher_run_backup_custom(target_id, source, destination, options = nil)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String

  submit_params['Source'] = source
  raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String

  submit_params['Destination'] = destination
  unless options.nil?
    raise TypeError, "'options' expected Comet::BackupJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::BackupJobAdvancedOptions

    submit_params['Options'] = options.to_json
  end

  body = perform_request('api/v1/admin/dispatcher/run-backup-custom', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::DispatchWithJobIDResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_run_restore(target_id, path, source, destination, snapshot = nil, paths = nil) ⇒ Comet::DispatchWithJobIDResponse

AdminDispatcherRunRestore

Instruct a live connected device to perform a local restore. This command is understood by Comet Backup 17.9.3 and newer.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • path (String)

    The local path to restore to

  • source (String)

    The Protected Item ID

  • destination (String)

    The Storage Vault ID

  • snapshot (String) (defaults to: nil)

    (Optional) If present, restore a specific snapshot. Otherwise, restore the latest snapshot for the selected Protected Item + Storage Vault pair

  • paths (Array<String>) (defaults to: nil)

    (Optional) If present, restore these paths only. Otherwise, restore all data (>= 19.3.0)

Returns:

Raises:

  • (TypeError)


2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
# File 'lib/comet/comet_server.rb', line 2351

def admin_dispatcher_run_restore(target_id, path, source, destination, snapshot = nil, paths = nil)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String

  submit_params['Path'] = path
  raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String

  submit_params['Source'] = source
  raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String

  submit_params['Destination'] = destination
  unless snapshot.nil?
    raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String

    submit_params['Snapshot'] = snapshot
  end
  unless paths.nil?
    raise TypeError, "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array

    submit_params['Paths'] = paths.to_json
  end

  body = perform_request('api/v1/admin/dispatcher/run-restore', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::DispatchWithJobIDResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_run_restore_custom(target_id, source, destination, options, snapshot = nil, paths = nil, known_file_count = nil, known_byte_count = nil, known_dir_count = nil) ⇒ Comet::DispatchWithJobIDResponse

AdminDispatcherRunRestoreCustom

Instruct a live connected device to perform a local restore. This command is understood by Comet Backup 18.6.0 and newer.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • source (String)

    The Protected Item ID

  • destination (String)

    The Storage Vault ID

  • options (Comet::RestoreJobAdvancedOptions)

    Restore targets

  • snapshot (String) (defaults to: nil)

    (Optional) If present, restore a specific snapshot. Otherwise, restore the latest snapshot for the selected Protected Item + Storage Vault pair

  • paths (Array<String>) (defaults to: nil)

    (Optional) If present, restore these paths only. Otherwise, restore all data

  • known_file_count (Number) (defaults to: nil)

    (Optional) The number of files to restore, if known. Supplying this means we don’t need to walk the entire tree just to find the file count and will speed up the restoration process.

  • known_byte_count (Number) (defaults to: nil)

    (Optional) The total size in bytes of files to restore, if known. Supplying this means we don’t need to walk the entire tree just to find the total file size and will speed up the restoration process.

  • known_dir_count (Number) (defaults to: nil)

    (Optional) The number of directories to restore, if known. Supplying this means we don’t need to walk the entire tree just to find the number of directories and will speed up the restoration process.

Returns:

Raises:

  • (TypeError)


2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
# File 'lib/comet/comet_server.rb', line 2402

def admin_dispatcher_run_restore_custom(target_id, source, destination, options, snapshot = nil, paths = nil, known_file_count = nil, known_byte_count = nil, known_dir_count = nil)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String

  submit_params['Source'] = source
  raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String

  submit_params['Destination'] = destination
  raise TypeError, "'options' expected Comet::RestoreJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::RestoreJobAdvancedOptions

  submit_params['Options'] = options.to_json
  unless snapshot.nil?
    raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String

    submit_params['Snapshot'] = snapshot
  end
  unless paths.nil?
    raise TypeError, "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array

    submit_params['Paths'] = paths.to_json
  end
  unless known_file_count.nil?
    raise TypeError, "'known_file_count' expected Numeric, got #{known_file_count.class}" unless known_file_count.is_a? Numeric

    submit_params['KnownFileCount'] = known_file_count
  end
  unless known_byte_count.nil?
    raise TypeError, "'known_byte_count' expected Numeric, got #{known_byte_count.class}" unless known_byte_count.is_a? Numeric

    submit_params['KnownByteCount'] = known_byte_count
  end
  unless known_dir_count.nil?
    raise TypeError, "'known_dir_count' expected Numeric, got #{known_dir_count.class}" unless known_dir_count.is_a? Numeric

    submit_params['KnownDirCount'] = known_dir_count
  end

  body = perform_request('api/v1/admin/dispatcher/run-restore-custom', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::DispatchWithJobIDResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_search_snapshots(target_id, destination_id, snapshot_ids, filter) ⇒ Comet::SearchSnapshotsResponse

AdminDispatcherSearchSnapshots

Search storage vault snapshots.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • destination_id (String)

    The Storage Vault GUID

  • snapshot_ids (Array<String>)

    Snapshots to search

  • filter (Comet::SearchClause)

    The search filter

Returns:

Raises:

  • (TypeError)


2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
# File 'lib/comet/comet_server.rb', line 2462

def admin_dispatcher_search_snapshots(target_id, destination_id, snapshot_ids, filter)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String

  submit_params['DestinationID'] = destination_id
  raise TypeError, "'snapshot_ids' expected Array, got #{snapshot_ids.class}" unless snapshot_ids.is_a? Array

  submit_params['SnapshotIDs'] = snapshot_ids.to_json
  raise TypeError, "'filter' expected Comet::SearchClause, got #{filter.class}" unless filter.is_a? Comet::SearchClause

  submit_params['Filter'] = filter.to_json

  body = perform_request('api/v1/admin/dispatcher/search-snapshots', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::SearchSnapshotsResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_test_smb_auth(target_id, wsa) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherTestSmbAuth

Test a set of Windows SMB credentials.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • wsa (Comet::WinSMBAuth)

    The target credentials to test

Returns:

Raises:

  • (TypeError)


2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
# File 'lib/comet/comet_server.rb', line 2495

def admin_dispatcher_test_smb_auth(target_id, wsa)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'wsa' expected Comet::WinSMBAuth, got #{wsa.class}" unless wsa.is_a? Comet::WinSMBAuth

  submit_params['Wsa'] = wsa.to_json

  body = perform_request('api/v1/admin/dispatcher/test-smb-auth', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_uninstall_software(target_id, remove_config_file) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherUninstallSoftware

Instruct a live connected device to self-uninstall the software.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • remove_config_file (Boolean)

    Determine if the config.dat file will be deleted at the same time

Returns:

Raises:

  • (TypeError)


2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
# File 'lib/comet/comet_server.rb', line 2522

def admin_dispatcher_uninstall_software(target_id, remove_config_file)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  submit_params['RemoveConfigFile'] = (remove_config_file ? 1 : 0)

  body = perform_request('api/v1/admin/dispatcher/uninstall-software', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_unlock(target_id, destination, allow_unsafe = nil) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherUnlock

Instruct a live connected device to remove lock files from a Storage Vault. Misuse can cause data loss! This command is understood by Comet Backup 17.9.4 and newer.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • destination (String)

    The Storage Vault GUID

  • allow_unsafe (Boolean) (defaults to: nil)

    (Optional) Allow legacy Storage Vault unlocking, which is unsafe in some cases.

Returns:

Raises:

  • (TypeError)


2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
# File 'lib/comet/comet_server.rb', line 2550

def admin_dispatcher_unlock(target_id, destination, allow_unsafe = nil)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String

  submit_params['Destination'] = destination
  unless allow_unsafe.nil?
    submit_params['AllowUnsafe'] = (allow_unsafe ? 1 : 0)
  end

  body = perform_request('api/v1/admin/dispatcher/unlock', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_update_login_password(target_id, new_password) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherUpdateLoginPassword

Instruct a live connected device to update its login password.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • new_password (String)

    The new password of this user

Returns:

Raises:

  • (TypeError)


2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
# File 'lib/comet/comet_server.rb', line 2580

def (target_id, new_password)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String

  submit_params['NewPassword'] = new_password

  body = perform_request('api/v1/admin/dispatcher/update-login-password', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_update_login_url(target_id, new_url, force = nil) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherUpdateLoginUrl

Instruct a live connected device to update its login server URL. The device will attempt to connect to the new Auth Role Comet Server using its current username and password. If the test connection succeeds, the device migrates its saved connection settings and live connections to the new server. If the device is not registered on the new URL, or if the credentials are incorrect, the device remains on the current Auth Role server.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • new_url (String)

    The new external URL of this server

  • force (Boolean) (defaults to: nil)

    (Optional) No checks will be done using previous URL

Returns:

Raises:

  • (TypeError)


2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
# File 'lib/comet/comet_server.rb', line 2609

def (target_id, new_url, force = nil)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  raise TypeError, "'new_url' expected String, got #{new_url.class}" unless new_url.is_a? String

  submit_params['NewURL'] = new_url
  unless force.nil?
    submit_params['Force'] = (force ? 1 : 0)
  end

  body = perform_request('api/v1/admin/dispatcher/update-login-url', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_dispatcher_update_software(target_id, self_address = nil) ⇒ Comet::CometAPIResponseMessage

AdminDispatcherUpdateSoftware

Instruct a live connected device to download a software update.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled. This API requires the Software Build Role to be enabled.

Parameters:

  • target_id (String)

    The live connection GUID

  • self_address (String) (defaults to: nil)

    (Optional) The external URL of this server, used to resolve conflicts (>= 19.3.11)

Returns:

Raises:

  • (TypeError)


2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
# File 'lib/comet/comet_server.rb', line 2640

def admin_dispatcher_update_software(target_id, self_address = nil)
  submit_params = {}
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String

  submit_params['TargetID'] = target_id
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end

  body = perform_request('api/v1/admin/dispatcher/update-software', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_external_auth_sources_delete(source_id) ⇒ Comet::CometAPIResponseMessage

AdminExternalAuthSourcesDelete

Delete an external admin authentication source.

You must supply administrator authentication credentials to use this API.

Parameters:

  • source_id (String)

    (No description available)

Returns:

Raises:

  • (TypeError)


2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
# File 'lib/comet/comet_server.rb', line 2669

def admin_external_auth_sources_delete(source_id)
  submit_params = {}
  raise TypeError, "'source_id' expected String, got #{source_id.class}" unless source_id.is_a? String

  submit_params['SourceID'] = source_id

  body = perform_request('api/v1/admin/external-auth-sources/delete', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_external_auth_sources_getHash{String => Comet::ExternalAuthenticationSource}

AdminExternalAuthSourcesGet

Get a map of all external admin authentication sources.

You must supply administrator authentication credentials to use this API.

Returns:



2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
# File 'lib/comet/comet_server.rb', line 2690

def admin_external_auth_sources_get
  body = perform_request('api/v1/admin/external-auth-sources/get')
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      ret[k] = Comet::ExternalAuthenticationSource.new
      ret[k].from_hash(v)
    end
  end
  ret
end

#admin_external_auth_sources_new(source, source_id = nil) ⇒ Comet::ExternalAuthenticationSourceResponse

AdminExternalAuthSourcesNew

Create an external admin authentication source.

You must supply administrator authentication credentials to use this API.

Parameters:

Returns:

Raises:

  • (TypeError)


2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
# File 'lib/comet/comet_server.rb', line 2715

def admin_external_auth_sources_new(source, source_id = nil)
  submit_params = {}
  raise TypeError, "'source' expected Comet::ExternalAuthenticationSource, got #{source.class}" unless source.is_a? Comet::ExternalAuthenticationSource

  submit_params['Source'] = source.to_json
  unless source_id.nil?
    raise TypeError, "'source_id' expected String, got #{source_id.class}" unless source_id.is_a? String

    submit_params['SourceID'] = source_id
  end

  body = perform_request('api/v1/admin/external-auth-sources/new', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::ExternalAuthenticationSourceResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_external_auth_sources_set(sources) ⇒ Comet::CometAPIResponseMessage

AdminExternalAuthSourcesSet

Updates the current tenant’s external admin authentication sources. This will set all. sources for the tenant; none will be preserved.

You must supply administrator authentication credentials to use this API.

Parameters:

Returns:

Raises:

  • (TypeError)


2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
# File 'lib/comet/comet_server.rb', line 2743

def admin_external_auth_sources_set(sources)
  submit_params = {}
  raise TypeError, "'sources' expected Hash, got #{sources.class}" unless sources.is_a? Hash

  submit_params['Sources'] = sources.to_json

  body = perform_request('api/v1/admin/external-auth-sources/set', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_get_job_log(job_id) ⇒ String

AdminGetJobLog

Get the report log entries for a single job, in plaintext format.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • job_id (String)

    Selected job ID

Returns:

  • (String)

Raises:

  • (TypeError)


2766
2767
2768
2769
2770
2771
2772
2773
# File 'lib/comet/comet_server.rb', line 2766

def admin_get_job_log(job_id)
  submit_params = {}
  raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String

  submit_params['JobID'] = job_id

  perform_request('api/v1/admin/get-job-log', submit_params)
end

#admin_get_job_log_entries(job_id, min_severity = nil, message_contains = nil) ⇒ Array<Comet::JobEntry>

AdminGetJobLogEntries

Get the report log entries for a single job.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • job_id (String)

    Selected job ID

  • min_severity (String) (defaults to: nil)

    (Optional) Return only job log entries with equal or higher severity

  • message_contains (String) (defaults to: nil)

    (Optional) Return only job log entries that contain exact string

Returns:

Raises:

  • (TypeError)


2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
# File 'lib/comet/comet_server.rb', line 2786

def admin_get_job_log_entries(job_id, min_severity = nil, message_contains = nil)
  submit_params = {}
  raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String

  submit_params['JobID'] = job_id
  unless min_severity.nil?
    raise TypeError, "'min_severity' expected String, got #{min_severity.class}" unless min_severity.is_a? String

    submit_params['MinSeverity'] = min_severity
  end
  unless message_contains.nil?
    raise TypeError, "'message_contains' expected String, got #{message_contains.class}" unless message_contains.is_a? String

    submit_params['MessageContains'] = message_contains
  end

  body = perform_request('api/v1/admin/get-job-log-entries', submit_params)
  json_body = JSON.parse body
  check_status json_body
  if json_body.nil?
    ret = []
  else
    ret = Array.new(json_body.length)
    json_body.each_with_index do |v, i|
      ret[i] = Comet::JobEntry.new
      ret[i].from_hash(v)
    end
  end
  ret
end

#admin_get_job_properties(job_id) ⇒ Comet::BackupJobDetail

AdminGetJobProperties

Get properties of a single job.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • job_id (String)

    Selected job ID

Returns:

Raises:

  • (TypeError)


2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
# File 'lib/comet/comet_server.rb', line 2826

def admin_get_job_properties(job_id)
  submit_params = {}
  raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String

  submit_params['JobID'] = job_id

  body = perform_request('api/v1/admin/get-job-properties', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BackupJobDetail.new
  ret.from_hash(json_body)
  ret
end

#admin_get_jobs_allArray<Comet::BackupJobDetail>

AdminGetJobsAll

Get jobs (All). The jobs are returned in an unspecified order.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Returns:



2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
# File 'lib/comet/comet_server.rb', line 2849

def admin_get_jobs_all
  body = perform_request('api/v1/admin/get-jobs-all')
  json_body = JSON.parse body
  check_status json_body
  if json_body.nil?
    ret = []
  else
    ret = Array.new(json_body.length)
    json_body.each_with_index do |v, i|
      ret[i] = Comet::BackupJobDetail.new
      ret[i].from_hash(v)
    end
  end
  ret
end

#admin_get_jobs_for_custom_search(query) ⇒ Array<Comet::BackupJobDetail>

AdminGetJobsForCustomSearch

Get jobs (for custom search). The jobs are returned in an unspecified order.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

Returns:

Raises:

  • (TypeError)


2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
# File 'lib/comet/comet_server.rb', line 2875

def admin_get_jobs_for_custom_search(query)
  submit_params = {}
  raise TypeError, "'query' expected Comet::SearchClause, got #{query.class}" unless query.is_a? Comet::SearchClause

  submit_params['Query'] = query.to_json

  body = perform_request('api/v1/admin/get-jobs-for-custom-search', submit_params)
  json_body = JSON.parse body
  check_status json_body
  if json_body.nil?
    ret = []
  else
    ret = Array.new(json_body.length)
    json_body.each_with_index do |v, i|
      ret[i] = Comet::BackupJobDetail.new
      ret[i].from_hash(v)
    end
  end
  ret
end

#admin_get_jobs_for_date_range(start_value, end_value) ⇒ Array<Comet::BackupJobDetail>

AdminGetJobsForDateRange

Get jobs (for date range). The jobs are returned in an unspecified order.

If the ‘Start` parameter is later than `End`, they will be swapped.

This API will return all jobs that either started or ended within the supplied range.

Incomplete jobs have an end time of ‘0`. You can use this API to find only incomplete jobs by setting both `Start` and `End` to `0`.

Prior to Comet Server 22.6.0, additional Incomplete jobs may have been returned if you specified non-zero arguments for both ‘Start` and `End`.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • start_value (Number)

    Timestamp (Unix)

  • end_value (Number)

    Timestamp (Unix)

Returns:

Raises:

  • (TypeError)


2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
# File 'lib/comet/comet_server.rb', line 2915

def admin_get_jobs_for_date_range(start_value, end_value)
  submit_params = {}
  raise TypeError, "'start_value' expected Numeric, got #{start_value.class}" unless start_value.is_a? Numeric

  submit_params['Start'] = start_value
  raise TypeError, "'end_value' expected Numeric, got #{end_value.class}" unless end_value.is_a? Numeric

  submit_params['End'] = end_value

  body = perform_request('api/v1/admin/get-jobs-for-date-range', submit_params)
  json_body = JSON.parse body
  check_status json_body
  if json_body.nil?
    ret = []
  else
    ret = Array.new(json_body.length)
    json_body.each_with_index do |v, i|
      ret[i] = Comet::BackupJobDetail.new
      ret[i].from_hash(v)
    end
  end
  ret
end

#admin_get_jobs_for_user(target_user) ⇒ Array<Comet::BackupJobDetail>

AdminGetJobsForUser

Get jobs (for user). The jobs are returned in an unspecified order.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Selected username

Returns:

Raises:

  • (TypeError)


2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
# File 'lib/comet/comet_server.rb', line 2949

def admin_get_jobs_for_user(target_user)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user

  body = perform_request('api/v1/admin/get-jobs-for-user', submit_params)
  json_body = JSON.parse body
  check_status json_body
  if json_body.nil?
    ret = []
  else
    ret = Array.new(json_body.length)
    json_body.each_with_index do |v, i|
      ret[i] = Comet::BackupJobDetail.new
      ret[i].from_hash(v)
    end
  end
  ret
end

#admin_get_jobs_recentArray<Comet::BackupJobDetail>

AdminGetJobsRecent

Get jobs (Recent and incomplete). The jobs are returned in an unspecified order.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Returns:



2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
# File 'lib/comet/comet_server.rb', line 2979

def admin_get_jobs_recent
  body = perform_request('api/v1/admin/get-jobs-recent')
  json_body = JSON.parse body
  check_status json_body
  if json_body.nil?
    ret = []
  else
    ret = Array.new(json_body.length)
    json_body.each_with_index do |v, i|
      ret[i] = Comet::BackupJobDetail.new
      ret[i].from_hash(v)
    end
  end
  ret
end

#admin_get_protected_item_with_backup_rules(target_user, source_id) ⇒ Comet::ProtectedItemWithBackupRulesResponse

AdminGetProtectedItemWithBackupRules

Get a Protected Item with its backup rules.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Selected account username

  • source_id (String)

    Selected Protected Item GUID

Returns:

Raises:

  • (TypeError)


3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
# File 'lib/comet/comet_server.rb', line 3005

def admin_get_protected_item_with_backup_rules(target_user, source_id)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'source_id' expected String, got #{source_id.class}" unless source_id.is_a? String

  submit_params['SourceID'] = source_id

  body = perform_request('api/v1/admin/get-protected-item-with-backup-rules', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::ProtectedItemWithBackupRulesResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_get_user_profile(target_user) ⇒ Comet::UserProfileConfig

AdminGetUserProfile

Get user account profile.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Selected account username

Returns:

Raises:

  • (TypeError)


3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
# File 'lib/comet/comet_server.rb', line 3031

def (target_user)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user

  body = perform_request('api/v1/admin/get-user-profile', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::UserProfileConfig.new
  ret.from_hash(json_body)
  ret
end

#admin_get_user_profile_and_hash(target_user) ⇒ Comet::GetProfileAndHashResponseMessage

AdminGetUserProfileAndHash

Get user account profile (atomic). The resulting hash parameter can be passed to the corresponding update API, to atomically ensure that no changes occur between get/set operations. The hash format is not publicly documented and may change in a future server version. Use server APIs to retrieve current hash values.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Selected account username

Returns:

Raises:

  • (TypeError)


3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
# File 'lib/comet/comet_server.rb', line 3056

def (target_user)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user

  body = perform_request('api/v1/admin/get-user-profile-and-hash', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::GetProfileAndHashResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_get_user_profile_hash(target_user) ⇒ Comet::GetProfileHashResponseMessage

AdminGetUserProfileHash

Get user account profile (hash). The profile hash can be used to determine if a user account profile has changed. The hash format is not publicly documented and may change in a future server version. Use server APIs to retrieve current hash values.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Selected account username

Returns:

Raises:

  • (TypeError)


3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
# File 'lib/comet/comet_server.rb', line 3081

def (target_user)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user

  body = perform_request('api/v1/admin/get-user-profile-hash', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::GetProfileHashResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_installation_dispatch_drop_connection(device_id) ⇒ Comet::CometAPIResponseMessage

AdminInstallationDispatchDropConnection

Instruct a live connected device to disconnect. The device will terminate its live-connection process and will not reconnect.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • device_id (String)

    The live connection Device GUID

Returns:

Raises:

  • (TypeError)


3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
# File 'lib/comet/comet_server.rb', line 3105

def admin_installation_dispatch_drop_connection(device_id)
  submit_params = {}
  raise TypeError, "'device_id' expected String, got #{device_id.class}" unless device_id.is_a? String

  submit_params['DeviceID'] = device_id

  body = perform_request('api/v1/admin/installation/dispatch/drop-connection', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_installation_dispatch_register_device(device_id, target_user, target_password, target_totpcode = nil) ⇒ String

AdminInstallationDispatchRegisterDevice

Instruct an unregistered device to authenticate with a given user.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • device_id (String)

    The live connection Device GUID

  • target_user (String)

    Selected account username

  • target_password (String)

    Selected account password

  • target_totpcode (String) (defaults to: nil)

    (Optional) Selected account TOTP code

Returns:

  • (String)

Raises:

  • (TypeError)


3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
# File 'lib/comet/comet_server.rb', line 3131

def admin_installation_dispatch_register_device(device_id, target_user, target_password, target_totpcode = nil)
  submit_params = {}
  raise TypeError, "'device_id' expected String, got #{device_id.class}" unless device_id.is_a? String

  submit_params['DeviceID'] = device_id
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String

  submit_params['TargetPassword'] = target_password
  unless target_totpcode.nil?
    raise TypeError, "'target_totpcode' expected String, got #{target_totpcode.class}" unless target_totpcode.is_a? String

    submit_params['TargetTOTPCode'] = target_totpcode
  end

  body = perform_request('api/v1/admin/installation/dispatch/register-device', submit_params)
  json_body = JSON.parse body
  check_status json_body
  raise TypeError, "'json_body' expected String, got #{json_body.class}" unless json_body.is_a? String

  ret = json_body
  ret
end

#admin_installation_list_activeHash{String => Comet::RegistrationLobbyConnection}

AdminInstallationListActive

List live connected devices in lobby mode.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Returns:



3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
# File 'lib/comet/comet_server.rb', line 3165

def admin_installation_list_active
  body = perform_request('api/v1/admin/installation/list-active')
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      ret[k] = Comet::RegistrationLobbyConnection.new
      ret[k].from_hash(v)
    end
  end
  ret
end

#admin_job_abandon(target_user, job_id) ⇒ Comet::CometAPIResponseMessage

AdminJobAbandon

Mark a running job as abandoned. This will change the status of a running job to abandoned. This is intended to be used on jobs which are definitely no longer running but are stuck in the running state; it will not attempt to cancel the job. If the job is detected to still be running after being marked as abandoned, it will be revived.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Username

  • job_id (String)

    Job ID

Returns:

Raises:

  • (TypeError)


3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
# File 'lib/comet/comet_server.rb', line 3193

def admin_job_abandon(target_user, job_id)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String

  submit_params['JobID'] = job_id

  body = perform_request('api/v1/admin/job/abandon', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_job_cancel(target_user, job_id) ⇒ Comet::CometAPIResponseMessage

AdminJobCancel

Cancel a running job. A request is sent to the live-connected device, asking it to cancel the operation. This may fail if there is no live-connection. Only jobs from Comet 18.3.5 or newer can be cancelled. A job can only be cancelled if it has a non-empty CancellationID field in its properties. If the device is running Comet 21.9.5 or later, this API will wait up to ten seconds for a confirmation from the client.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Username

  • job_id (String)

    Job ID

Returns:

Raises:

  • (TypeError)


3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
# File 'lib/comet/comet_server.rb', line 3223

def admin_job_cancel(target_user, job_id)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String

  submit_params['JobID'] = job_id

  body = perform_request('api/v1/admin/job/cancel', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_list_usersArray<String>

AdminListUsers

List all user accounts.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Returns:

  • (Array<String>)


3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
# File 'lib/comet/comet_server.rb', line 3248

def admin_list_users
  body = perform_request('api/v1/admin/list-users')
  json_body = JSON.parse body
  check_status json_body
  if json_body.nil?
    ret = []
  else
    ret = Array.new(json_body.length)
    json_body.each_with_index do |v, i|
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String

      ret[i] = v
    end
  end
  ret
end

#admin_list_users_fullHash{String => Comet::UserProfileConfig}

AdminListUsersFull

List all user account profiles.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Returns:



3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
# File 'lib/comet/comet_server.rb', line 3273

def admin_list_users_full
  body = perform_request('api/v1/admin/list-users-full')
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      ret[k] = Comet::UserProfileConfig.new
      ret[k].from_hash(v)
    end
  end
  ret
end

#admin_meta_branding_config_getComet::ServerConfigOptionsBrandingFragment

AdminMetaBrandingConfigGet

Get Branding configuration.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis.



3297
3298
3299
3300
3301
3302
3303
3304
# File 'lib/comet/comet_server.rb', line 3297

def admin_meta_branding_config_get
  body = perform_request('api/v1/admin/meta/branding-config/get')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::ServerConfigOptionsBrandingFragment.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_branding_config_set(branding_config) ⇒ Comet::CometAPIResponseMessage

AdminMetaBrandingConfigSet

Set Branding configuration. Note that file resources must be provided using a resource URI, i.e ‘“resource://05ba0b90ee66bda433169581188aba8d29faa938f9464cccd651a02fdf2e5b57”`. See AdminMetaResourceNew for the API documentation to create new file resources.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis.

Parameters:

Returns:

Raises:

  • (TypeError)


3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
# File 'lib/comet/comet_server.rb', line 3316

def admin_meta_branding_config_set(branding_config)
  submit_params = {}
  raise TypeError, "'branding_config' expected Comet::BrandingOptions, got #{branding_config.class}" unless branding_config.is_a? Comet::BrandingOptions

  submit_params['BrandingConfig'] = branding_config.to_json

  body = perform_request('api/v1/admin/meta/branding-config/set', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_build_config_getComet::ServerConfigOptionsSoftwareBuildRoleFragment

AdminMetaBuildConfigGet

Get Software Build Role configuration.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis.



3338
3339
3340
3341
3342
3343
3344
3345
# File 'lib/comet/comet_server.rb', line 3338

def admin_meta_build_config_get
  body = perform_request('api/v1/admin/meta/build-config/get')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::ServerConfigOptionsSoftwareBuildRoleFragment.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_build_config_set(software_build_role_config) ⇒ Comet::CometAPIResponseMessage

AdminMetaBuildConfigSet

Set Build Role configuration.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis.

Parameters:

Returns:

Raises:

  • (TypeError)


3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
# File 'lib/comet/comet_server.rb', line 3356

def admin_meta_build_config_set(software_build_role_config)
  submit_params = {}
  raise TypeError, "'software_build_role_config' expected Comet::SoftwareBuildRoleOptions, got #{software_build_role_config.class}" unless software_build_role_config.is_a? Comet::SoftwareBuildRoleOptions

  submit_params['SoftwareBuildRoleConfig'] = software_build_role_config.to_json

  body = perform_request('api/v1/admin/meta/build-config/set', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_constellation_config_getComet::ConstellationRoleOptions

AdminMetaConstellationConfigGet

Get Constellation configuration for the current organization.

You must supply administrator authentication credentials to use this API. This API requires the Constellation Role to be enabled.



3378
3379
3380
3381
3382
3383
3384
3385
# File 'lib/comet/comet_server.rb', line 3378

def admin_meta_constellation_config_get
  body = perform_request('api/v1/admin/meta/constellation/config/get')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::ConstellationRoleOptions.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_constellation_config_set(constellation_role_options) ⇒ Comet::CometAPIResponseMessage

AdminMetaConstellationConfigSet

Set Constellation configuration for the current organization.

You must supply administrator authentication credentials to use this API. This API requires the Constellation Role to be enabled.

Parameters:

Returns:

Raises:

  • (TypeError)


3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
# File 'lib/comet/comet_server.rb', line 3396

def admin_meta_constellation_config_set(constellation_role_options)
  submit_params = {}
  raise TypeError, "'constellation_role_options' expected Comet::ConstellationRoleOptions, got #{constellation_role_options.class}" unless constellation_role_options.is_a? Comet::ConstellationRoleOptions

  submit_params['ConstellationRoleOptions'] = constellation_role_options.to_json

  body = perform_request('api/v1/admin/meta/constellation/config/set', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_email_options_getComet::EmailOptions

AdminMetaEmailOptionsGet

Get the email options.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis.

Returns:



3418
3419
3420
3421
3422
3423
3424
3425
# File 'lib/comet/comet_server.rb', line 3418

def admin_meta_email_options_get
  body = perform_request('api/v1/admin/meta/email-options/get')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::EmailOptions.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_email_options_set(email_options) ⇒ Comet::CometAPIResponseMessage

AdminMetaEmailOptionsSet

Set the email options.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis.

Parameters:

Returns:

Raises:

  • (TypeError)


3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
# File 'lib/comet/comet_server.rb', line 3436

def admin_meta_email_options_set(email_options)
  submit_params = {}
  raise TypeError, "'email_options' expected Comet::EmailOptions, got #{email_options.class}" unless email_options.is_a? Comet::EmailOptions

  submit_params['EmailOptions'] = email_options.to_json

  body = perform_request('api/v1/admin/meta/email-options/set', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_list_available_log_daysArray<Number>

AdminMetaListAvailableLogDays

Get log files.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Returns:

  • (Array<Number>)


3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
# File 'lib/comet/comet_server.rb', line 3458

def admin_meta_list_available_log_days
  body = perform_request('api/v1/admin/meta/list-available-log-days')
  json_body = JSON.parse body
  check_status json_body
  if json_body.nil?
    ret = []
  else
    ret = Array.new(json_body.length)
    json_body.each_with_index do |v, i|
      raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric

      ret[i] = v
    end
  end
  ret
end

#admin_meta_psa_config_list_getArray<Comet::PSAConfig>

AdminMetaPsaConfigListGet

Get the server PSA configuration.

You must supply administrator authentication credentials to use this API.

Returns:



3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
# File 'lib/comet/comet_server.rb', line 3482

def admin_meta_psa_config_list_get
  body = perform_request('api/v1/admin/meta/psa-config-list/get')
  json_body = JSON.parse body
  check_status json_body
  if json_body.nil?
    ret = []
  else
    ret = Array.new(json_body.length)
    json_body.each_with_index do |v, i|
      ret[i] = Comet::PSAConfig.new
      ret[i].from_hash(v)
    end
  end
  ret
end

#admin_meta_psa_config_list_set(psaconfig_list) ⇒ Comet::CometAPIResponseMessage

AdminMetaPsaConfigListSet

Update the server PSA configuration.

You must supply administrator authentication credentials to use this API.

Parameters:

  • psaconfig_list (Array<Comet::PSAConfig>)

    The replacement PSA configuration list

Returns:

Raises:

  • (TypeError)


3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
# File 'lib/comet/comet_server.rb', line 3506

def admin_meta_psa_config_list_set(psaconfig_list)
  submit_params = {}
  raise TypeError, "'psaconfig_list' expected Array, got #{psaconfig_list.class}" unless psaconfig_list.is_a? Array

  submit_params['PSAConfigList'] = psaconfig_list.to_json

  body = perform_request('api/v1/admin/meta/psa-config-list/set', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_psa_config_list_sync_nowComet::CometAPIResponseMessage

AdminMetaPsaConfigListSyncNow

Synchronize all PSA services now. This API applies to the current Organization’s PSAConfig’s only.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.



3529
3530
3531
3532
3533
3534
3535
3536
# File 'lib/comet/comet_server.rb', line 3529

def admin_meta_psa_config_list_sync_now
  body = perform_request('api/v1/admin/meta/psa-config-list/sync-now')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_read_all_logsString

AdminMetaReadAllLogs

Get a ZIP file of all of the server’s log files. On non-Windows platforms, log content uses LF line endings. On Windows, Comet changed from LF to CRLF line endings in 18.3.2. This API does not automatically convert line endings; around the 18.3.2 timeframe, log content may even contain mixed line-endings.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Returns:

  • (String)


3548
3549
3550
# File 'lib/comet/comet_server.rb', line 3548

def admin_meta_read_all_logs
  perform_request('api/v1/admin/meta/read-all-logs')
end

#admin_meta_read_logs(log) ⇒ String

AdminMetaReadLogs

Get log file content. On non-Windows platforms, log content uses LF line endings. On Windows, Comet changed from LF to CRLF line endings in 18.3.2. This API does not automatically convert line endings; around the 18.3.2 timeframe, log content may even contain mixed line-endings.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Parameters:

  • log (Number)

    A log day, selected from the options returned by the Get Log Files API

Returns:

  • (String)

Raises:

  • (TypeError)


3563
3564
3565
3566
3567
3568
3569
3570
# File 'lib/comet/comet_server.rb', line 3563

def admin_meta_read_logs(log)
  submit_params = {}
  raise TypeError, "'log' expected Numeric, got #{log.class}" unless log.is_a? Numeric

  submit_params['Log'] = log

  perform_request('api/v1/admin/meta/read-logs', submit_params)
end

#admin_meta_read_select_logs(logs) ⇒ String

AdminMetaReadSelectLogs

Get logs file content. On non-Windows platforms, log content uses LF line endings. On Windows, Comet changed from LF to CRLF line endings in 18.3.2. This API does not automatically convert line endings; around the 18.3.2 timeframe, log content may even contain mixed line-endings.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Parameters:

  • logs (Array<Number>)

    An array of log days, selected from the options returned by the Get Log Files API

Returns:

  • (String)

Raises:

  • (TypeError)


3583
3584
3585
3586
3587
3588
3589
3590
# File 'lib/comet/comet_server.rb', line 3583

def admin_meta_read_select_logs(logs)
  submit_params = {}
  raise TypeError, "'logs' expected Array, got #{logs.class}" unless logs.is_a? Array

  submit_params['Logs'] = logs.to_json

  perform_request('api/v1/admin/meta/read-select-logs', submit_params)
end

#admin_meta_remote_storage_vault_getArray<Comet::RemoteStorageOption>

AdminMetaRemoteStorageVaultGet

Get Requesting Remote Storage Vault Config.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis.

Returns:



3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
# File 'lib/comet/comet_server.rb', line 3600

def admin_meta_remote_storage_vault_get
  body = perform_request('api/v1/admin/meta/remote-storage-vault/get')
  json_body = JSON.parse body
  check_status json_body
  if json_body.nil?
    ret = []
  else
    ret = Array.new(json_body.length)
    json_body.each_with_index do |v, i|
      ret[i] = Comet::RemoteStorageOption.new
      ret[i].from_hash(v)
    end
  end
  ret
end

#admin_meta_remote_storage_vault_set(remote_storage_options, replacement_auto_vault_id = nil) ⇒ Comet::CometAPIResponseMessage

AdminMetaRemoteStorageVaultSet

Set Storage template vault options.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis.

Parameters:

  • remote_storage_options (Array<Comet::RemoteStorageOption>)

    Updated configuration content

  • replacement_auto_vault_id (String) (defaults to: nil)

    (Optional) Replacement Storage Template ID for auto Storage Vault configurations that use deleted Storage Templates

Returns:

Raises:

  • (TypeError)


3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
# File 'lib/comet/comet_server.rb', line 3626

def admin_meta_remote_storage_vault_set(remote_storage_options, replacement_auto_vault_id = nil)
  submit_params = {}
  raise TypeError, "'remote_storage_options' expected Array, got #{remote_storage_options.class}" unless remote_storage_options.is_a? Array

  submit_params['RemoteStorageOptions'] = remote_storage_options.to_json
  unless replacement_auto_vault_id.nil?
    raise TypeError, "'replacement_auto_vault_id' expected String, got #{replacement_auto_vault_id.class}" unless replacement_auto_vault_id.is_a? String

    submit_params['ReplacementAutoVaultID'] = replacement_auto_vault_id
  end

  body = perform_request('api/v1/admin/meta/remote-storage-vault/set', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_remote_storage_vault_test(template_options) ⇒ Comet::CometAPIResponseMessage

AdminMetaRemoteStorageVaultTest

Test the connection to the storage template.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis.

Parameters:

Returns:

Raises:

  • (TypeError)


3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
# File 'lib/comet/comet_server.rb', line 3654

def admin_meta_remote_storage_vault_test(template_options)
  submit_params = {}
  raise TypeError, "'template_options' expected Comet::RemoteStorageOption, got #{template_options.class}" unless template_options.is_a? Comet::RemoteStorageOption

  submit_params['TemplateOptions'] = template_options.to_json

  body = perform_request('api/v1/admin/meta/remote-storage-vault/test', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_resource_get(hash) ⇒ String

AdminMetaResourceGet

Get a resource file. Resources are used to upload files within the server configuration.

You must supply administrator authentication credentials to use this API.

Parameters:

  • hash (String)

    The resource identifier

Returns:

  • (String)

Raises:

  • (TypeError)


3677
3678
3679
3680
3681
3682
3683
3684
# File 'lib/comet/comet_server.rb', line 3677

def admin_meta_resource_get(hash)
  submit_params = {}
  raise TypeError, "'hash' expected String, got #{hash.class}" unless hash.is_a? String

  submit_params['Hash'] = hash

  perform_request('api/v1/admin/meta/resource/get', submit_params)
end

#admin_meta_resource_new(upload) ⇒ Comet::AdminResourceResponse

AdminMetaResourceNew

Upload a resource file. Resources are used to upload files within the server configuration. The resulting resource ID is autogenerated. 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.

You must supply administrator authentication credentials to use this API.

Parameters:

  • upload (String)

    The uploaded file contents, as a multipart/form-data part.

Returns:

Raises:

  • (TypeError)


3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
# File 'lib/comet/comet_server.rb', line 3697

def admin_meta_resource_new(upload)
  submit_params = {}
  raise TypeError, "'upload' expected String, got #{upload.class}" unless upload.is_a? String

  submit_params['upload'] = upload

  body = perform_request_multipart('api/v1/admin/meta/resource/new', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::AdminResourceResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_restart_serviceComet::CometAPIResponseMessage

AdminMetaRestartService

Restart server. The Comet Server process will exit. The service manager should restart the server automatically.

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.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts. Access to this API may be prevented on a per-administrator basis.



3723
3724
3725
3726
3727
3728
3729
3730
# File 'lib/comet/comet_server.rb', line 3723

def admin_meta_restart_service
  body = perform_request('api/v1/admin/meta/restart-service')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_send_test_email(email_options, recipient) ⇒ Comet::CometAPIResponseMessage

AdminMetaSendTestEmail

Send a test email message. This allows the Comet Server web interface to support testing different email credentials during setup.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis.

Parameters:

  • email_options (Comet::EmailOptions)

    Updated configuration content

  • recipient (String)

    Target email address to send test email

Returns:

Raises:

  • (TypeError)


3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
# File 'lib/comet/comet_server.rb', line 3743

def admin_meta_send_test_email(email_options, recipient)
  submit_params = {}
  raise TypeError, "'email_options' expected Comet::EmailOptions, got #{email_options.class}" unless email_options.is_a? Comet::EmailOptions

  submit_params['EmailOptions'] = email_options.to_json
  raise TypeError, "'recipient' expected String, got #{recipient.class}" unless recipient.is_a? String

  submit_params['Recipient'] = recipient

  body = perform_request('api/v1/admin/meta/send-test-email', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_send_test_report(email_reporting_option, target_organization = nil) ⇒ Comet::CometAPIResponseMessage

AdminMetaSendTestReport

Send a test admin email report. This allows a user to send a test email report

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis.

Parameters:

  • email_reporting_option (Comet::EmailReportingOption)

    Test email reporting option for sending

  • target_organization (String) (defaults to: nil)

    (Optional) If present, Testing email with a target organization. Only allowed for top-level admins. (>= 24.3.0)

Returns:

Raises:

  • (TypeError)


3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
# File 'lib/comet/comet_server.rb', line 3771

def admin_meta_send_test_report(email_reporting_option, target_organization = nil)
  submit_params = {}
  raise TypeError, "'email_reporting_option' expected Comet::EmailReportingOption, got #{email_reporting_option.class}" unless email_reporting_option.is_a? Comet::EmailReportingOption

  submit_params['EmailReportingOption'] = email_reporting_option.to_json
  unless target_organization.nil?
    raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String

    submit_params['TargetOrganization'] = target_organization
  end

  body = perform_request('api/v1/admin/meta/send-test-report', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_server_config_getComet::ServerConfigOptions

AdminMetaServerConfigGet

Get server configuration.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.



3799
3800
3801
3802
3803
3804
3805
3806
# File 'lib/comet/comet_server.rb', line 3799

def admin_meta_server_config_get
  body = perform_request('api/v1/admin/meta/server-config/get')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::ServerConfigOptions.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_server_config_network_interfacesArray<String>

AdminMetaServerConfigNetworkInterfaces

List the available network interfaces on the PC running Comet Server. Any IPv6 addresses are listed in compressed form without square-brackets.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Returns:

  • (Array<String>)


3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
# File 'lib/comet/comet_server.rb', line 3818

def admin_meta_server_config_network_interfaces
  body = perform_request('api/v1/admin/meta/server-config/network-interfaces')
  json_body = JSON.parse body
  check_status json_body
  if json_body.nil?
    ret = []
  else
    ret = Array.new(json_body.length)
    json_body.each_with_index do |v, i|
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String

      ret[i] = v
    end
  end
  ret
end

#admin_meta_server_config_set(config) ⇒ Comet::CometAPIResponseMessage

AdminMetaServerConfigSet

Set server configuration. The Comet Server process will exit. The service manager should restart the server automatically.

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.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Parameters:

Returns:

Raises:

  • (TypeError)


3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
# File 'lib/comet/comet_server.rb', line 3848

def admin_meta_server_config_set(config)
  submit_params = {}
  raise TypeError, "'config' expected Comet::ServerConfigOptions, got #{config.class}" unless config.is_a? Comet::ServerConfigOptions

  submit_params['Config'] = config.to_json

  body = perform_request('api/v1/admin/meta/server-config/set', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_shutdown_serviceComet::CometAPIResponseMessage

AdminMetaShutdownService

Shut down server. The Comet Server process will exit.

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.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts. Access to this API may be prevented on a per-administrator basis.



3874
3875
3876
3877
3878
3879
3880
3881
# File 'lib/comet/comet_server.rb', line 3874

def admin_meta_shutdown_service
  body = perform_request('api/v1/admin/meta/shutdown-service')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_software_update_newsComet::SoftwareUpdateNewsResponse

AdminMetaSoftwareUpdateNews

Get software update news from the software provider.

You must supply administrator authentication credentials to use this API.



3890
3891
3892
3893
3894
3895
3896
3897
# File 'lib/comet/comet_server.rb', line 3890

def admin_meta_software_update_news
  body = perform_request('api/v1/admin/meta/software-update-news')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::SoftwareUpdateNewsResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_stats(simple) ⇒ Hash{Number => Comet::StatResult}

AdminMetaStats

Get Comet Server historical statistics. The returned key-value map is not necessarily ordered. Client-side code should sort the result before display.

You must supply administrator authentication credentials to use this API.

Parameters:

  • simple (Boolean)

    Remove redundant statistics

Returns:



3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
# File 'lib/comet/comet_server.rb', line 3908

def admin_meta_stats(simple)
  submit_params = {}
  submit_params['Simple'] = (simple ? 1 : 0)

  body = perform_request('api/v1/admin/meta/stats', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      ret[k] = Comet::StatResult.new
      ret[k].from_hash(v)
    end
  end
  ret
end

#admin_meta_versionComet::ServerMetaVersionInfo

AdminMetaVersion

Get server properties. Retrieve the version number and basic properties about the server.

You must supply administrator authentication credentials to use this API.



3935
3936
3937
3938
3939
3940
3941
3942
# File 'lib/comet/comet_server.rb', line 3935

def admin_meta_version
  body = perform_request('api/v1/admin/meta/version')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::ServerMetaVersionInfo.new
  ret.from_hash(json_body)
  ret
end

#admin_meta_webhook_options_getHash{String => Comet::WebhookOption}

AdminMetaWebhookOptionsGet

Get the server webhook configuration.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis.

Returns:



3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
# File 'lib/comet/comet_server.rb', line 3952

def admin_meta_webhook_options_get
  body = perform_request('api/v1/admin/meta/webhook-options/get')
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      ret[k] = Comet::WebhookOption.new
      ret[k].from_hash(v)
    end
  end
  ret
end

#admin_meta_webhook_options_set(webhook_options) ⇒ Comet::CometAPIResponseMessage

AdminMetaWebhookOptionsSet

Update the server webhook configuration. Calling this endpoint will interrupt any messages currently queued for existing webhook destinations.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis.

Parameters:

  • webhook_options (Hash{String => Comet::WebhookOption})

    The replacement webhook target options.

Returns:

Raises:

  • (TypeError)


3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
# File 'lib/comet/comet_server.rb', line 3978

def admin_meta_webhook_options_set(webhook_options)
  submit_params = {}
  raise TypeError, "'webhook_options' expected Hash, got #{webhook_options.class}" unless webhook_options.is_a? Hash

  submit_params['WebhookOptions'] = webhook_options.to_json

  body = perform_request('api/v1/admin/meta/webhook-options/set', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_news_get_allHash{String => Comet::NewsEntry}

AdminNewsGetAll

Get News entries (Admin).

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Returns:



4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
# File 'lib/comet/comet_server.rb', line 4000

def admin_news_get_all
  body = perform_request('api/v1/admin/news/get-all')
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      ret[k] = Comet::NewsEntry.new
      ret[k].from_hash(v)
    end
  end
  ret
end

#admin_news_remove(news_item) ⇒ Comet::CometAPIResponseMessage

AdminNewsRemove

Remove news item.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • news_item (String)

    Selected news item GUID

Returns:

Raises:

  • (TypeError)


4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
# File 'lib/comet/comet_server.rb', line 4025

def admin_news_remove(news_item)
  submit_params = {}
  raise TypeError, "'news_item' expected String, got #{news_item.class}" unless news_item.is_a? String

  submit_params['NewsItem'] = news_item

  body = perform_request('api/v1/admin/news/remove', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_news_submit(news_content) ⇒ Comet::CometAPIResponseMessage

AdminNewsSubmit

Submit news item.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • news_content (String)

    Content of news item

Returns:

Raises:

  • (TypeError)


4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
# File 'lib/comet/comet_server.rb', line 4048

def admin_news_submit(news_content)
  submit_params = {}
  raise TypeError, "'news_content' expected String, got #{news_content.class}" unless news_content.is_a? String

  submit_params['NewsContent'] = news_content

  body = perform_request('api/v1/admin/news/submit', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_organization_delete(organization_id = nil, uninstall_config = nil) ⇒ Comet::CometAPIResponseMessage

AdminOrganizationDelete

Delete an organization and all related users.

Prior to Comet 22.6.0, this API was documented as returning the OrganizationResponse type. However, it always has returned only a CometAPIResponseMessage.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Parameters:

  • organization_id (String) (defaults to: nil)

    (Optional) (No description available)

  • uninstall_config (Comet::UninstallConfig) (defaults to: nil)

    (Optional) Uninstall software configuration

Returns:



4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
# File 'lib/comet/comet_server.rb', line 4074

def admin_organization_delete(organization_id = nil, uninstall_config = nil)
  submit_params = {}
  unless organization_id.nil?
    raise TypeError, "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String

    submit_params['OrganizationID'] = organization_id
  end
  unless uninstall_config.nil?
    raise TypeError, "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig

    submit_params['UninstallConfig'] = uninstall_config.to_json
  end

  body = perform_request('api/v1/admin/organization/delete', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_organization_export(options) ⇒ Comet::CometAPIResponseMessage

AdminOrganizationExport

Run self-backup for a specific tenant.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Parameters:

Returns:

Raises:

  • (TypeError)


4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
# File 'lib/comet/comet_server.rb', line 4104

def admin_organization_export(options)
  submit_params = {}
  raise TypeError, "'options' expected Comet::SelfBackupExportOptions, got #{options.class}" unless options.is_a? Comet::SelfBackupExportOptions

  submit_params['Options'] = options.to_json

  body = perform_request('api/v1/admin/organization/export', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_organization_listHash{String => Comet::Organization}

AdminOrganizationList

List Organizations.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Returns:



4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
# File 'lib/comet/comet_server.rb', line 4126

def admin_organization_list
  body = perform_request('api/v1/admin/organization/list')
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      ret[k] = Comet::Organization.new
      ret[k].from_hash(v)
    end
  end
  ret
end

#admin_organization_set(organization_id = nil, organization = nil) ⇒ Comet::OrganizationResponse

AdminOrganizationSet

Create or Update an Organization.

Prior to Comet 22.6.0, the ‘ID’ and ‘Organization’ fields were not present in the response.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Parameters:

  • organization_id (String) (defaults to: nil)

    (Optional) (No description available)

  • organization (Comet::Organization) (defaults to: nil)

    (Optional) (No description available)

Returns:



4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
# File 'lib/comet/comet_server.rb', line 4154

def admin_organization_set(organization_id = nil, organization = nil)
  submit_params = {}
  unless organization_id.nil?
    raise TypeError, "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String

    submit_params['OrganizationID'] = organization_id
  end
  unless organization.nil?
    raise TypeError, "'organization' expected Comet::Organization, got #{organization.class}" unless organization.is_a? Comet::Organization

    submit_params['Organization'] = organization.to_json
  end

  body = perform_request('api/v1/admin/organization/set', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::OrganizationResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_policies_delete(policy_id) ⇒ Comet::CometAPIResponseMessage

AdminPoliciesDelete

Delete an existing policy object.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • policy_id (String)

    The policy ID to update or create

Returns:

Raises:

  • (TypeError)


4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
# File 'lib/comet/comet_server.rb', line 4184

def admin_policies_delete(policy_id)
  submit_params = {}
  raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String

  submit_params['PolicyID'] = policy_id

  body = perform_request('api/v1/admin/policies/delete', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_policies_get(policy_id) ⇒ Comet::GetGroupPolicyResponse

AdminPoliciesGet

Retrieve a single policy object. A hash is also returned, to allow atomic modification operations.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • policy_id (String)

    The policy ID to retrieve

Returns:

Raises:

  • (TypeError)


4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
# File 'lib/comet/comet_server.rb', line 4208

def admin_policies_get(policy_id)
  submit_params = {}
  raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String

  submit_params['PolicyID'] = policy_id

  body = perform_request('api/v1/admin/policies/get', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::GetGroupPolicyResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_policies_list(target_organization = nil) ⇒ Hash{String => String}

AdminPoliciesList

List all policy object names. For the top-level organization, the API result includes all policies for all organizations, unless the TargetOrganization parameter is present.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_organization (String) (defaults to: nil)

    (Optional) If present, list the policies belonging to another organization. Only allowed for administrator accounts in the top-level organization. (>= 22.3.7)

Returns:

  • (Hash{String => String})


4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
# File 'lib/comet/comet_server.rb', line 4232

def admin_policies_list(target_organization = nil)
  submit_params = {}
  unless target_organization.nil?
    raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String

    submit_params['TargetOrganization'] = target_organization
  end

  body = perform_request('api/v1/admin/policies/list', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String

      ret[k] = v
    end
  end
  ret
end

#admin_policies_list_full(target_organization = nil) ⇒ Hash{String => Comet::GroupPolicy}

AdminPoliciesListFull

Get all policy objects. For the top-level organization, the API result includes all policies for all organizations, unless the TargetOrganization parameter is present.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_organization (String) (defaults to: nil)

    (Optional) If present, list the policies belonging to another organization. Only allowed for administrator accounts in the top-level organization. (>= 22.3.7)

Returns:



4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
# File 'lib/comet/comet_server.rb', line 4266

def admin_policies_list_full(target_organization = nil)
  submit_params = {}
  unless target_organization.nil?
    raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String

    submit_params['TargetOrganization'] = target_organization
  end

  body = perform_request('api/v1/admin/policies/list-full', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      ret[k] = Comet::GroupPolicy.new
      ret[k].from_hash(v)
    end
  end
  ret
end

#admin_policies_new(policy) ⇒ Comet::CreateGroupPolicyResponse

AdminPoliciesNew

Create a new policy object.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

Returns:

Raises:

  • (TypeError)


4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
# File 'lib/comet/comet_server.rb', line 4298

def admin_policies_new(policy)
  submit_params = {}
  raise TypeError, "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy

  submit_params['Policy'] = policy.to_json

  body = perform_request('api/v1/admin/policies/new', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CreateGroupPolicyResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_policies_set(policy_id, policy, check_policy_hash = nil, options = nil) ⇒ Comet::CometAPIResponseMessage

AdminPoliciesSet

Update an existing policy object. An optional hash may be used, to ensure the modification was atomic. This API can also be used to create a new policy object with a specific hash.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • policy_id (String)

    The policy ID to update or create

  • policy (Comet::GroupPolicy)

    The policy data

  • check_policy_hash (String) (defaults to: nil)

    (Optional) An atomic verification hash as supplied by the AdminPoliciesGet API

  • options (Comet::PolicyOptions) (defaults to: nil)

    (Optional) An array of PolicySourceID that will be explicitly deleted.

Returns:

Raises:

  • (TypeError)


4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
# File 'lib/comet/comet_server.rb', line 4326

def admin_policies_set(policy_id, policy, check_policy_hash = nil, options = nil)
  submit_params = {}
  raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String

  submit_params['PolicyID'] = policy_id
  raise TypeError, "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy

  submit_params['Policy'] = policy.to_json
  unless check_policy_hash.nil?
    raise TypeError, "'check_policy_hash' expected String, got #{check_policy_hash.class}" unless check_policy_hash.is_a? String

    submit_params['CheckPolicyHash'] = check_policy_hash
  end
  unless options.nil?
    raise TypeError, "'options' expected Comet::PolicyOptions, got #{options.class}" unless options.is_a? Comet::PolicyOptions

    submit_params['Options'] = options.to_json
  end

  body = perform_request('api/v1/admin/policies/set', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_preview_user_email_report(target_user, email_report_config, email_address = nil) ⇒ Comet::EmailReportGeneratedPreview

AdminPreviewUserEmailReport

Preview an email report for a customer.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Selected account username

  • email_report_config (Comet::EmailReportConfig)

    Email report configuration to preview

  • email_address (String) (defaults to: nil)

    (Optional) Email address that may be included in the report body (>= 20.3.3)

Returns:

Raises:

  • (TypeError)


4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
# File 'lib/comet/comet_server.rb', line 4364

def admin_preview_user_email_report(target_user, email_report_config, email_address = nil)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'email_report_config' expected Comet::EmailReportConfig, got #{email_report_config.class}" unless email_report_config.is_a? Comet::EmailReportConfig

  submit_params['EmailReportConfig'] = email_report_config.to_json
  unless email_address.nil?
    raise TypeError, "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String

    submit_params['EmailAddress'] = email_address
  end

  body = perform_request('api/v1/admin/preview-user-email-report', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::EmailReportGeneratedPreview.new
  ret.from_hash(json_body)
  ret
end

#admin_replication_stateArray<Comet::ReplicatorStateAPIResponse>

AdminReplicationState

Get Replication status.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.



4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
# File 'lib/comet/comet_server.rb', line 4394

def admin_replication_state
  body = perform_request('api/v1/admin/replication/state')
  json_body = JSON.parse body
  check_status json_body
  if json_body.nil?
    ret = []
  else
    ret = Array.new(json_body.length)
    json_body.each_with_index do |v, i|
      ret[i] = Comet::ReplicatorStateAPIResponse.new
      ret[i].from_hash(v)
    end
  end
  ret
end

#admin_request_storage_vault(target_user, storage_provider, self_address = nil, device_id = nil, profile_hash = nil) ⇒ Comet::RequestStorageVaultResponseMessage

AdminRequestStorageVault

Request a new Storage Vault on behalf of a user. This action does not respect the “Prevent creating new Storage Vaults (via Request)” policy setting. New Storage Vaults can be requested regardless of the policy setting. Prior to Comet 19.8.0, the response type was CometAPIResponseMessage (i.e. no DestinationID field in response). The StorageProvider must exist for the target user account’s organization.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    The user to receive the new Storage Vault

  • storage_provider (String)

    ID for the storage template destination

  • self_address (String) (defaults to: nil)

    (Optional) The external URL for this server. Used to resolve conflicts

  • device_id (String) (defaults to: nil)

    (Optional) The ID of the device to be added as a associated device of the Storage Vault

  • profile_hash (String) (defaults to: nil)

    (Optional) The profile hash of the user profile

Returns:

Raises:

  • (TypeError)


4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
# File 'lib/comet/comet_server.rb', line 4426

def admin_request_storage_vault(target_user, storage_provider, self_address = nil, device_id = nil, profile_hash = nil)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'storage_provider' expected String, got #{storage_provider.class}" unless storage_provider.is_a? String

  submit_params['StorageProvider'] = storage_provider
  if self_address.nil?
    submit_params['SelfAddress'] = @server_address
  else
    raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String

    submit_params['SelfAddress'] = self_address
  end
  unless device_id.nil?
    raise TypeError, "'device_id' expected String, got #{device_id.class}" unless device_id.is_a? String

    submit_params['DeviceID'] = device_id
  end
  unless profile_hash.nil?
    raise TypeError, "'profile_hash' expected String, got #{profile_hash.class}" unless profile_hash.is_a? String

    submit_params['ProfileHash'] = profile_hash
  end

  body = perform_request('api/v1/admin/request-storage-vault', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::RequestStorageVaultResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_request_storage_vault_providers(target_organization = nil) ⇒ Hash{String => String}

AdminRequestStorageVaultProviders

Get the available options for Requesting a Storage Vault.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_organization (String) (defaults to: nil)

    (Optional) If present, list the storage template options belonging to another organization. Only allowed for administrator accounts in the top-level organization. (>= 22.3.7)

Returns:

  • (Hash{String => String})


4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
# File 'lib/comet/comet_server.rb', line 4469

def admin_request_storage_vault_providers(target_organization = nil)
  submit_params = {}
  unless target_organization.nil?
    raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String

    submit_params['TargetOrganization'] = target_organization
  end

  body = perform_request('api/v1/admin/request-storage-vault-providers', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String

      ret[k] = v
    end
  end
  ret
end

#admin_reset_user_password(target_user, new_password, old_password = nil) ⇒ Comet::CometAPIResponseMessage

AdminResetUserPassword

Reset user account password. The user account must have a recovery code present. A new replacement recovery code will be generated automatically.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Selected account username

  • new_password (String)

    New account password

  • old_password (String) (defaults to: nil)

    (Optional) Old account password. Required if no recovery code is present for the user account.

Returns:

Raises:

  • (TypeError)


4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
# File 'lib/comet/comet_server.rb', line 4505

def admin_reset_user_password(target_user, new_password, old_password = nil)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String

  submit_params['NewPassword'] = new_password
  unless old_password.nil?
    raise TypeError, "'old_password' expected String, got #{old_password.class}" unless old_password.is_a? String

    submit_params['OldPassword'] = old_password
  end

  body = perform_request('api/v1/admin/reset-user-password', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_revoke_device(target_user, target_device) ⇒ Comet::CometAPIResponseMessage

AdminRevokeDevice

Revoke device from user account. It’s possible to simply remove the Device section from the user’s profile, however, using this dedicated API will also gracefully handle live connections.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Selected account username

  • target_device (String)

    Selected Device ID

Returns:

Raises:

  • (TypeError)


4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
# File 'lib/comet/comet_server.rb', line 4538

def admin_revoke_device(target_user, target_device)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'target_device' expected String, got #{target_device.class}" unless target_device.is_a? String

  submit_params['TargetDevice'] = target_device

  body = perform_request('api/v1/admin/revoke-device', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_self_backup_startComet::CometAPIResponseMessage

AdminSelfBackupStart

Run self-backup on all targets.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.



4563
4564
4565
4566
4567
4568
4569
4570
# File 'lib/comet/comet_server.rb', line 4563

def admin_self_backup_start
  body = perform_request('api/v1/admin/self-backup/start')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_set_protected_item_with_backup_rules(target_user, source_id, require_hash = nil, source = nil, backup_rules = nil) ⇒ Comet::CometAPIResponseMessage

AdminSetProtectedItemWithBackupRules

Add or update a Protected Item with its backup rules.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Selected account username

  • source_id (String)

    Selected Protected Item GUID

  • require_hash (String) (defaults to: nil)

    (Optional) Previous account profile hash

  • source (Comet::SourceConfig) (defaults to: nil)

    (Optional) Optional Protected Item to create or update

  • backup_rules (Hash{String => Comet::BackupRuleConfig}) (defaults to: nil)

    (Optional) Optional backup rules for the Protected Item

Returns:

Raises:

  • (TypeError)


4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
# File 'lib/comet/comet_server.rb', line 4585

def admin_set_protected_item_with_backup_rules(target_user, source_id, require_hash = nil, source = nil, backup_rules = nil)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'source_id' expected String, got #{source_id.class}" unless source_id.is_a? String

  submit_params['SourceID'] = source_id
  unless require_hash.nil?
    raise TypeError, "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String

    submit_params['RequireHash'] = require_hash
  end
  unless source.nil?
    raise TypeError, "'source' expected Comet::SourceConfig, got #{source.class}" unless source.is_a? Comet::SourceConfig

    submit_params['Source'] = source.to_json
  end
  unless backup_rules.nil?
    raise TypeError, "'backup_rules' expected Hash, got #{backup_rules.class}" unless backup_rules.is_a? Hash

    submit_params['BackupRules'] = backup_rules.to_json
  end

  body = perform_request('api/v1/admin/set-protected-item-with-backup-rules', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_set_user_profile(target_user, profile_data) ⇒ Comet::CometAPIResponseMessage

AdminSetUserProfile

Modify user account profile.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

Returns:

Raises:

  • (TypeError)


4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
# File 'lib/comet/comet_server.rb', line 4627

def (target_user, profile_data)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig

  submit_params['ProfileData'] = profile_data.to_json

  body = perform_request('api/v1/admin/set-user-profile', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_set_user_profile_hash(target_user, profile_data, require_hash, admin_options = nil) ⇒ Comet::GetProfileAndHashResponseMessage

AdminSetUserProfileHash

Modify user account profile (atomic). The hash parameter can be determined from the corresponding API, to atomically ensure that no changes occur between get/set operations. The hash format is not publicly documented and may change in a future server version. Use server APIs to retrieve current hash values.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_user (String)

    Selected account username

  • profile_data (Comet::UserProfileConfig)

    Modified user profile

  • require_hash (String)

    Previous hash parameter

  • admin_options (Comet::AdminOptions) (defaults to: nil)

    (Optional) Instructions for modifying user profile

Returns:

Raises:

  • (TypeError)


4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
# File 'lib/comet/comet_server.rb', line 4658

def (target_user, profile_data, require_hash, admin_options = nil)
  submit_params = {}
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String

  submit_params['TargetUser'] = target_user
  raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig

  submit_params['ProfileData'] = profile_data.to_json
  raise TypeError, "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String

  submit_params['RequireHash'] = require_hash
  unless admin_options.nil?
    raise TypeError, "'admin_options' expected Comet::AdminOptions, got #{admin_options.class}" unless admin_options.is_a? Comet::AdminOptions

    submit_params['AdminOptions'] = admin_options.to_json
  end

  body = perform_request('api/v1/admin/set-user-profile-hash', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::GetProfileAndHashResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_storage_bucket_properties(bucket_id, after_timestamp = nil) ⇒ Comet::BucketProperties

AdminStorageBucketProperties

Retrieve properties for a single bucket. This API can also be used to refresh the size measurement for a single bucket by passing a valid AfterTimestamp parameter.

You must supply administrator authentication credentials to use this API. This API requires the Storage Role to be enabled.

Parameters:

  • bucket_id (String)

    Bucket ID

  • after_timestamp (Number) (defaults to: nil)

    (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.

Returns:

Raises:

  • (TypeError)


4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
# File 'lib/comet/comet_server.rb', line 4694

def admin_storage_bucket_properties(bucket_id, after_timestamp = nil)
  submit_params = {}
  raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String

  submit_params['BucketID'] = bucket_id
  unless after_timestamp.nil?
    raise TypeError, "'after_timestamp' expected Numeric, got #{after_timestamp.class}" unless after_timestamp.is_a? Numeric

    submit_params['AfterTimestamp'] = after_timestamp
  end

  body = perform_request('api/v1/admin/storage/bucket-properties', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::BucketProperties.new
  ret.from_hash(json_body)
  ret
end

#admin_storage_delete_bucket(bucket_id) ⇒ Comet::CometAPIResponseMessage

AdminStorageDeleteBucket

Delete a bucket. All data will be removed from the server. Misuse can cause data loss!

You must supply administrator authentication credentials to use this API. This API requires the Storage Role to be enabled.

Parameters:

  • bucket_id (String)

    Selected bucket name

Returns:

Raises:

  • (TypeError)


4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
# File 'lib/comet/comet_server.rb', line 4723

def admin_storage_delete_bucket(bucket_id)
  submit_params = {}
  raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String

  submit_params['BucketID'] = bucket_id

  body = perform_request('api/v1/admin/storage/delete-bucket', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_storage_free_space(bucket_id = nil) ⇒ Comet::StorageFreeSpaceInfo

AdminStorageFreeSpace

Retrieve available space metrics.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis. This API requires the Storage Role to be enabled. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Parameters:

  • bucket_id (String) (defaults to: nil)

    (Optional) (This parameter is not used)

Returns:



4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
# File 'lib/comet/comet_server.rb', line 4748

def admin_storage_free_space(bucket_id = nil)
  submit_params = {}
  unless bucket_id.nil?
    raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String

    submit_params['BucketID'] = bucket_id
  end

  body = perform_request('api/v1/admin/storage/free-space', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::StorageFreeSpaceInfo.new
  ret.from_hash(json_body)
  ret
end

#admin_storage_list_bucketsHash{String => Comet::BucketProperties}

AdminStorageListBuckets

List all buckets.

You must supply administrator authentication credentials to use this API. This API requires the Storage Role to be enabled.

Returns:



4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
# File 'lib/comet/comet_server.rb', line 4772

def admin_storage_list_buckets
  body = perform_request('api/v1/admin/storage/list-buckets')
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      ret[k] = Comet::BucketProperties.new
      ret[k].from_hash(v)
    end
  end
  ret
end

#admin_storage_ping_destination(extra_data) ⇒ Comet::CometAPIResponseMessage

AdminStoragePingDestination

Ping a storage destination.

You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis. This API is only available for top-level administrator accounts, not for Tenant administrator accounts.

Parameters:

Returns:

Raises:

  • (TypeError)


4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
# File 'lib/comet/comet_server.rb', line 4798

def admin_storage_ping_destination(extra_data)
  submit_params = {}
  raise TypeError, "'extra_data' expected Comet::DestinationLocation, got #{extra_data.class}" unless extra_data.is_a? Comet::DestinationLocation

  submit_params['ExtraData'] = extra_data.to_json

  body = perform_request('api/v1/admin/storage/ping-destination', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_storage_register_bucket(set_bucket_value = nil, set_key_hash_format = nil, set_key_hash_value = nil, set_organization_id = nil) ⇒ Comet::AddBucketResponseMessage

AdminStorageRegisterBucket

Create a new bucket. Leave the Set* parameters blank to generate a bucket with random credentials, or, supply a pre-hashed password for zero-knowledge operations. Any auto-generated credentials are returned in the response message.

You must supply administrator authentication credentials to use this API. This API requires the Storage Role to be enabled.

Parameters:

  • set_bucket_value (String) (defaults to: nil)

    (Optional) Bucket ID

  • set_key_hash_format (String) (defaults to: nil)

    (Optional) Bucket key hashing format

  • set_key_hash_value (String) (defaults to: nil)

    (Optional) Bucket key hash

  • set_organization_id (String) (defaults to: nil)

    (Optional) Target organization ID (>= 20.9.0)

Returns:



4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
# File 'lib/comet/comet_server.rb', line 4826

def admin_storage_register_bucket(set_bucket_value = nil, set_key_hash_format = nil, set_key_hash_value = nil, set_organization_id = nil)
  submit_params = {}
  unless set_bucket_value.nil?
    raise TypeError, "'set_bucket_value' expected String, got #{set_bucket_value.class}" unless set_bucket_value.is_a? String

    submit_params['SetBucketValue'] = set_bucket_value
  end
  unless set_key_hash_format.nil?
    raise TypeError, "'set_key_hash_format' expected String, got #{set_key_hash_format.class}" unless set_key_hash_format.is_a? String

    submit_params['SetKeyHashFormat'] = set_key_hash_format
  end
  unless set_key_hash_value.nil?
    raise TypeError, "'set_key_hash_value' expected String, got #{set_key_hash_value.class}" unless set_key_hash_value.is_a? String

    submit_params['SetKeyHashValue'] = set_key_hash_value
  end
  unless set_organization_id.nil?
    raise TypeError, "'set_organization_id' expected String, got #{set_organization_id.class}" unless set_organization_id.is_a? String

    submit_params['SetOrganizationID'] = set_organization_id
  end

  body = perform_request('api/v1/admin/storage/register-bucket', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::AddBucketResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_update_campaign_start(options) ⇒ Comet::CometAPIResponseMessage

AdminUpdateCampaignStart

Start a new software update campaign.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.

Parameters:

Returns:

Raises:

  • (TypeError)


4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
# File 'lib/comet/comet_server.rb', line 4868

def admin_update_campaign_start(options)
  submit_params = {}
  raise TypeError, "'options' expected Comet::UpdateCampaignOptions, got #{options.class}" unless options.is_a? Comet::UpdateCampaignOptions

  submit_params['Options'] = options.to_json

  body = perform_request('api/v1/admin/update-campaign/start', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_update_campaign_statusComet::UpdateCampaignStatus

AdminUpdateCampaignStatus

Get current campaign status.

You must supply administrator authentication credentials to use this API. This API is only available for top-level administrator accounts, not for Tenant administrator accounts. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.



4892
4893
4894
4895
4896
4897
4898
4899
# File 'lib/comet/comet_server.rb', line 4892

def admin_update_campaign_status
  body = perform_request('api/v1/admin/update-campaign/status')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::UpdateCampaignStatus.new
  ret.from_hash(json_body)
  ret
end

#admin_user_groups_delete(group_id) ⇒ Comet::CometAPIResponseMessage

AdminUserGroupsDelete

Delete an existing user group object.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • group_id (String)

    The user group ID to delete

Returns:

Raises:

  • (TypeError)


4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
# File 'lib/comet/comet_server.rb', line 4910

def admin_user_groups_delete(group_id)
  submit_params = {}
  raise TypeError, "'group_id' expected String, got #{group_id.class}" unless group_id.is_a? String

  submit_params['GroupID'] = group_id

  body = perform_request('api/v1/admin/user-groups/delete', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_user_groups_get(group_id, include_users = nil) ⇒ Comet::GetUserGroupWithUsersResponse

AdminUserGroupsGet

Retrieve a single user group object.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • group_id (String)

    The user group ID to retrieve

  • include_users (Boolean) (defaults to: nil)

    (Optional) If present, includes the users array in the response.

Returns:

Raises:

  • (TypeError)


4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
# File 'lib/comet/comet_server.rb', line 4934

def admin_user_groups_get(group_id, include_users = nil)
  submit_params = {}
  raise TypeError, "'group_id' expected String, got #{group_id.class}" unless group_id.is_a? String

  submit_params['GroupID'] = group_id
  unless include_users.nil?
    submit_params['IncludeUsers'] = (include_users ? 1 : 0)
  end

  body = perform_request('api/v1/admin/user-groups/get', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::GetUserGroupWithUsersResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_user_groups_list(target_organization = nil) ⇒ Hash{String => String}

AdminUserGroupsList

List all user group names. For the top-level organization, the API result includes all user groups for all organizations, unless the TargetOrganization parameter is present.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_organization (String) (defaults to: nil)

    (Optional) If present, list the user groups belonging to another organization. Only allowed for administrator accounts in the top-level organization.

Returns:

  • (Hash{String => String})


4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
# File 'lib/comet/comet_server.rb', line 4961

def admin_user_groups_list(target_organization = nil)
  submit_params = {}
  unless target_organization.nil?
    raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String

    submit_params['TargetOrganization'] = target_organization
  end

  body = perform_request('api/v1/admin/user-groups/list', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String

      ret[k] = v
    end
  end
  ret
end

#admin_user_groups_list_full(target_organization = nil) ⇒ Hash{String => Comet::UserGroup}

AdminUserGroupsListFull

Get all user group objects. For the top-level organization, the API result includes all user groups for all organizations, unless the TargetOrganization parameter is present.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • target_organization (String) (defaults to: nil)

    (Optional) If present, list the user groups belonging to the specified organization. Only allowed for administrator accounts in the top-level organization.

Returns:



4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
# File 'lib/comet/comet_server.rb', line 4995

def admin_user_groups_list_full(target_organization = nil)
  submit_params = {}
  unless target_organization.nil?
    raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String

    submit_params['TargetOrganization'] = target_organization
  end

  body = perform_request('api/v1/admin/user-groups/list-full', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = {}
  if json_body.nil?
    ret = {}
  else
    json_body.each do |k, v|
      ret[k] = Comet::UserGroup.new
      ret[k].from_hash(v)
    end
  end
  ret
end

#admin_user_groups_new(name, target_organization = nil) ⇒ Comet::CreateUserGroupResponse

AdminUserGroupsNew

Create a new user group object.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • name (String)

    this is the name of the group.

  • target_organization (String) (defaults to: nil)

    (Optional) If present, list the policies belonging to another organization. Only allowed for administrator accounts in the top-level organization.

Returns:

Raises:

  • (TypeError)


5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
# File 'lib/comet/comet_server.rb', line 5028

def admin_user_groups_new(name, target_organization = nil)
  submit_params = {}
  raise TypeError, "'name' expected String, got #{name.class}" unless name.is_a? String

  submit_params['Name'] = name
  unless target_organization.nil?
    raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String

    submit_params['TargetOrganization'] = target_organization
  end

  body = perform_request('api/v1/admin/user-groups/new', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CreateUserGroupResponse.new
  ret.from_hash(json_body)
  ret
end

#admin_user_groups_set(group_id, group) ⇒ Comet::CometAPIResponseMessage

AdminUserGroupsSet

Update an existing user group or create a new user group.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • group_id (String)

    The user group ID to update or create

  • group (Comet::UserGroup)

    The user group data

Returns:

Raises:

  • (TypeError)


5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
# File 'lib/comet/comet_server.rb', line 5057

def admin_user_groups_set(group_id, group)
  submit_params = {}
  raise TypeError, "'group_id' expected String, got #{group_id.class}" unless group_id.is_a? String

  submit_params['GroupID'] = group_id
  raise TypeError, "'group' expected Comet::UserGroup, got #{group.class}" unless group.is_a? Comet::UserGroup

  submit_params['Group'] = group.to_json

  body = perform_request('api/v1/admin/user-groups/set', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#admin_user_groups_set_users_for_group(group_id, users) ⇒ Comet::CometAPIResponseMessage

AdminUserGroupsSetUsersForGroup

Update the users in the specified group. The provided list of users will be moved into the specified group, and any users already in the group who are not in the list of usernames will be removed.

You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.

Parameters:

  • group_id (String)

    The user group ID to update

  • users (Array<String>)

    An array of usernames.

Returns:

Raises:

  • (TypeError)


5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
# File 'lib/comet/comet_server.rb', line 5086

def admin_user_groups_set_users_for_group(group_id, users)
  submit_params = {}
  raise TypeError, "'group_id' expected String, got #{group_id.class}" unless group_id.is_a? String

  submit_params['GroupID'] = group_id
  raise TypeError, "'users' expected Array, got #{users.class}" unless users.is_a? Array

  submit_params['Users'] = users.to_json

  body = perform_request('api/v1/admin/user-groups/set-users-for-group', submit_params)
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#check_status(obj) ⇒ Object

If the supplied object represents an unsuccessful CometAPIResponseMessage, raise it as an error.

Parameters:

  • obj (Hash)

Raises:



5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
# File 'lib/comet/comet_server.rb', line 5157

def check_status(obj)
  return unless obj.is_a? Hash
  return unless obj.key?('Status')
  return unless obj.key?('Message')
  return unless obj['Status'] != 200 && obj['Status'] != 201

  ret_error = Comet::CometAPIResponseMessage.new
  ret_error.from_hash(obj)
  raise Comet::APIResponseError.new(ret_error)
end

#hybrid_session_startComet::SessionKeyRegeneratedResponse

HybridSessionStart

Generate a session key (log in). This hybrid API allows you to log in to the Comet Server as either an administrator or end-user account. This API behaves like either AdminAccountSessionStart or UserWebSessionStart, depending on what the supplied credentials were valid for.



5110
5111
5112
5113
5114
5115
5116
5117
# File 'lib/comet/comet_server.rb', line 5110

def hybrid_session_start
  body = perform_request('api/v1/hybrid/session/start')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::SessionKeyRegeneratedResponse.new
  ret.from_hash(json_body)
  ret
end

#perform_request(endpoint, params = {}) ⇒ String

Perform a synchronous HTTP request.

Parameters:

  • endpoint (String)

    The URL suffix

  • params (Hash<String,String>) (defaults to: {})

    Form post parameters to submit to the target API

Returns:

  • (String)

    Response body



5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
# File 'lib/comet/comet_server.rb', line 5173

def perform_request(endpoint, params = {})
  full_uri = URI(@server_address + endpoint)
  params['Username'] = @username
  params['AuthType'] = 'Password'
  params['Password'] = @password

  res = Net::HTTP.post_form(full_uri, params)
  unless res.is_a?(Net::HTTPSuccess)
    raise res
  end

  res.body
end

#perform_request_multipart(endpoint, params = {}) ⇒ String

Perform a synchronous HTTP request, using multipart/form-data.

Parameters:

  • endpoint (String)

    The URL suffix

  • params (Hash<String,String>) (defaults to: {})

    Form post parameters to submit to the target API

Returns:

  • (String)

    Response body



5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
# File 'lib/comet/comet_server.rb', line 5192

def perform_request_multipart(endpoint, params = {})
  full_uri = URI(@server_address + endpoint)

  req = Net::HTTP::Post.new(full_uri)
  req['X-Comet-Admin-Username'] = @username
  req['X-Comet-Admin-AuthType'] = 'Password'
  req['X-Comet-Admin-Password'] = @password

  form_params = []
  params.each do |k, v|
    form_params.append [k, v, {:filename => k}]
  end
  req.set_form(form_params, 'multipart/form-data')

  http = Net::HTTP.new(full_uri.hostname, full_uri.port)
  res = http.request(req)

  unless res.is_a?(Net::HTTPSuccess)
    raise res
  end

  res.body
end

#user_web_session_revokeComet::CometAPIResponseMessage

UserWebSessionRevoke

Revoke a session key (log out).

You must supply user authentication credentials to use this API, and the user account must be authorized for web access. This API requires the Auth Role to be enabled.



5127
5128
5129
5130
5131
5132
5133
5134
# File 'lib/comet/comet_server.rb', line 5127

def user_web_session_revoke
  body = perform_request('api/v1/user/web/session/revoke')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::CometAPIResponseMessage.new
  ret.from_hash(json_body)
  ret
end

#user_web_session_startComet::SessionKeyRegeneratedResponse

UserWebSessionStart

Generate a session key (log in).

You must supply user authentication credentials to use this API, and the user account must be authorized for web access. This API requires the Auth Role to be enabled.



5144
5145
5146
5147
5148
5149
5150
5151
# File 'lib/comet/comet_server.rb', line 5144

def user_web_session_start
  body = perform_request('api/v1/user/web/session/start')
  json_body = JSON.parse body
  check_status json_body
  ret = Comet::SessionKeyRegeneratedResponse.new
  ret.from_hash(json_body)
  ret
end