Class: Comet::CometServer
- Inherits:
-
Object
- Object
- Comet::CometServer
- Defined in:
- lib/comet/comet_server.rb
Overview
The CometServer class enables making network requests to the Comet Server API.
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#server_address ⇒ Object
Returns the value of attribute server_address.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#admin_account_properties ⇒ Comet::AdminAccountPropertiesResponse
AdminAccountProperties.
-
#admin_account_regenerate_totp ⇒ Comet::TotpRegeneratedResponse
AdminAccountRegenerateTotp.
-
#admin_account_session_revoke ⇒ Comet::CometAPIResponseMessage
AdminAccountSessionRevoke.
-
#admin_account_session_start(self_address = nil) ⇒ Comet::SessionKeyRegeneratedResponse
AdminAccountSessionStart.
-
#admin_account_session_start_as_user(target_user) ⇒ Comet::SessionKeyRegeneratedResponse
AdminAccountSessionStartAsUser.
-
#admin_account_set_properties(security) ⇒ Comet::CometAPIResponseMessage
AdminAccountSetProperties.
-
#admin_account_u2f_request_registration_challenge(self_address) ⇒ Comet::U2FRegistrationChallengeResponse
AdminAccountU2fRequestRegistrationChallenge.
-
#admin_account_u2f_submit_challenge_response(u2fchallenge_id, u2fclient_data, u2fregistration_data, u2fversion, description) ⇒ Comet::CometAPIResponseMessage
AdminAccountU2fSubmitChallengeResponse.
-
#admin_account_validate_totp(totpcode) ⇒ Comet::CometAPIResponseMessage
AdminAccountValidateTotp.
-
#admin_add_user(target_user, target_password, store_recovery_code = nil, require_password_change = nil) ⇒ Comet::CometAPIResponseMessage
AdminAddUser.
-
#admin_add_user_from_profile(target_user, profile_data) ⇒ Comet::CometAPIResponseMessage
AdminAddUserFromProfile.
-
#admin_admin_user_delete(target_user) ⇒ Comet::CometAPIResponseMessage
AdminAdminUserDelete.
-
#admin_admin_user_list ⇒ Array<Comet::AllowedAdminUser>
AdminAdminUserList.
-
#admin_admin_user_new(target_user, target_password, target_org_id = nil) ⇒ Comet::CometAPIResponseMessage
AdminAdminUserNew.
-
#admin_branding_available_platforms ⇒ Hash{Number => Comet::AvailableDownload}
AdminBrandingAvailablePlatforms.
-
#admin_branding_generate_client_by_platform(platform, self_address = nil) ⇒ String
AdminBrandingGenerateClientByPlatform.
-
#admin_branding_generate_client_linuxgeneric(self_address = nil) ⇒ String
AdminBrandingGenerateClientLinuxgeneric.
-
#admin_branding_generate_client_macos_x8664(self_address = nil) ⇒ String
AdminBrandingGenerateClientMacosX8664.
-
#admin_branding_generate_client_test(platform, self_address = nil) ⇒ Comet::CometAPIResponseMessage
AdminBrandingGenerateClientTest.
-
#admin_branding_generate_client_windows_anycpu_exe(self_address = nil) ⇒ String
AdminBrandingGenerateClientWindowsAnycpuExe.
-
#admin_branding_generate_client_windows_anycpu_zip(self_address = nil) ⇒ String
AdminBrandingGenerateClientWindowsAnycpuZip.
-
#admin_branding_generate_client_windows_x8632exe(self_address = nil) ⇒ String
AdminBrandingGenerateClientWindowsX8632Exe.
-
#admin_branding_generate_client_windows_x8632zip(self_address = nil) ⇒ String
AdminBrandingGenerateClientWindowsX8632Zip.
-
#admin_branding_generate_client_windows_x8664exe(self_address = nil) ⇒ String
AdminBrandingGenerateClientWindowsX8664Exe.
-
#admin_branding_generate_client_windows_x8664zip(self_address = nil) ⇒ String
AdminBrandingGenerateClientWindowsX8664Zip.
-
#admin_bulletin_submit(subject, content) ⇒ Comet::CometAPIResponseMessage
AdminBulletinSubmit.
-
#admin_constellation_last_report ⇒ Comet::ConstellationCheckReport
AdminConstellationLastReport.
-
#admin_constellation_new_report ⇒ Comet::ConstellationCheckReport
AdminConstellationNewReport.
-
#admin_constellation_prune_now ⇒ Comet::CometAPIResponseMessage
AdminConstellationPruneNow.
-
#admin_constellation_status ⇒ Comet::ConstellationStatusAPIResponse
AdminConstellationStatus.
-
#admin_create_install_token(target_user, target_password, server = nil) ⇒ Comet::InstallTokenResponse
AdminCreateInstallToken.
-
#admin_delete_user(target_user, uninstall_config = nil) ⇒ Comet::CometAPIResponseMessage
AdminDeleteUser.
-
#admin_disable_user_totp(target_user) ⇒ Comet::CometAPIResponseMessage
AdminDisableUserTotp.
-
#admin_dispatcher_apply_retention_rules(target_id, destination) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherApplyRetentionRules.
-
#admin_dispatcher_deepverify_storage_vault(target_id, destination) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherDeepverifyStorageVault.
-
#admin_dispatcher_delete_snapshot(target_id, destination_id, snapshot_id) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherDeleteSnapshot.
-
#admin_dispatcher_delete_snapshots(target_id, destination_id, snapshot_ids) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherDeleteSnapshots.
-
#admin_dispatcher_drop_connection(target_id) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherDropConnection.
-
#admin_dispatcher_import_apply(target_id, import_source_id) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherImportApply.
-
#admin_dispatcher_kill_process(target_id) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherKillProcess.
-
#admin_dispatcher_list_active ⇒ Hash{String => Comet::LiveUserConnection}
AdminDispatcherListActive.
-
#admin_dispatcher_refetch_profile(target_id) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherRefetchProfile.
-
#admin_dispatcher_reindex_storage_vault(target_id, destination) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherReindexStorageVault.
-
#admin_dispatcher_request_browse_disk_drives(target_id) ⇒ Comet::BrowseDiskDrivesResponse
AdminDispatcherRequestBrowseDiskDrives.
-
#admin_dispatcher_request_browse_exchange_edb(target_id) ⇒ Comet::BrowseEDBResponse
AdminDispatcherRequestBrowseExchangeEdb.
-
#admin_dispatcher_request_browse_hyperv(target_id) ⇒ Comet::BrowseHVResponse
AdminDispatcherRequestBrowseHyperv.
-
#admin_dispatcher_request_browse_vss_aaw(target_id) ⇒ Comet::BrowseVSSResponse
AdminDispatcherRequestBrowseVssAaw.
-
#admin_dispatcher_request_filesystem_objects(target_id, path = nil) ⇒ Array<Comet::StoredObject>
AdminDispatcherRequestFilesystemObjects.
-
#admin_dispatcher_request_import_sources(target_id) ⇒ Comet::DispatcherAdminSourcesResponse
AdminDispatcherRequestImportSources.
-
#admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = nil) ⇒ Comet::DispatcherStoredObjectsResponse
AdminDispatcherRequestStoredObjects.
-
#admin_dispatcher_request_vault_snapshots(target_id, destination) ⇒ Comet::DispatcherVaultSnapshotsResponse
AdminDispatcherRequestVaultSnapshots.
-
#admin_dispatcher_run_backup(target_id, backup_rule) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherRunBackup.
-
#admin_dispatcher_run_backup_custom(target_id, source, destination, options = nil) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherRunBackupCustom.
-
#admin_dispatcher_run_restore(target_id, path, source, destination, snapshot = nil, paths = nil) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherRunRestore.
-
#admin_dispatcher_run_restore_custom(target_id, source, destination, options, snapshot = nil, paths = nil) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherRunRestoreCustom.
-
#admin_dispatcher_uninstall_software(target_id, remove_config_file) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherUninstallSoftware.
-
#admin_dispatcher_unlock(target_id, destination) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherUnlock.
-
#admin_dispatcher_update_login_url(target_id, new_url) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherUpdateLoginUrl.
-
#admin_dispatcher_update_software(target_id, self_address = nil) ⇒ Comet::CometAPIResponseMessage
AdminDispatcherUpdateSoftware.
-
#admin_get_job_log(job_id) ⇒ String
AdminGetJobLog.
-
#admin_get_job_log_entries(job_id) ⇒ Array<Comet::JobEntry>
AdminGetJobLogEntries.
-
#admin_get_job_properties(job_id) ⇒ Comet::BackupJobDetail
AdminGetJobProperties.
-
#admin_get_jobs_all ⇒ Array<Comet::BackupJobDetail>
AdminGetJobsAll.
-
#admin_get_jobs_for_custom_search(query) ⇒ Array<Comet::BackupJobDetail>
AdminGetJobsForCustomSearch.
-
#admin_get_jobs_for_date_range(start_value, end_value) ⇒ Array<Comet::BackupJobDetail>
AdminGetJobsForDateRange.
-
#admin_get_jobs_for_user(target_user) ⇒ Array<Comet::BackupJobDetail>
AdminGetJobsForUser.
-
#admin_get_jobs_recent ⇒ Array<Comet::BackupJobDetail>
AdminGetJobsRecent.
-
#admin_get_user_profile(target_user) ⇒ Comet::UserProfileConfig
AdminGetUserProfile.
-
#admin_get_user_profile_and_hash(target_user) ⇒ Comet::GetProfileAndHashResponseMessage
AdminGetUserProfileAndHash.
-
#admin_get_user_profile_hash(target_user) ⇒ Comet::GetProfileHashResponseMessage
AdminGetUserProfileHash.
-
#admin_job_cancel(target_user, job_id) ⇒ Comet::CometAPIResponseMessage
AdminJobCancel.
-
#admin_list_users ⇒ Array<String>
AdminListUsers.
-
#admin_list_users_full ⇒ Hash{String => Comet::UserProfileConfig}
AdminListUsersFull.
-
#admin_meta_branding_config_get ⇒ Comet::ServerConfigOptionsBrandingFragment
AdminMetaBrandingConfigGet.
-
#admin_meta_branding_config_set(branding_config) ⇒ Comet::CometAPIResponseMessage
AdminMetaBrandingConfigSet.
-
#admin_meta_build_config_get ⇒ Comet::ServerConfigOptionsSoftwareBuildRoleFragment
AdminMetaBuildConfigGet.
-
#admin_meta_build_config_set(software_build_role_config) ⇒ Comet::CometAPIResponseMessage
AdminMetaBuildConfigSet.
-
#admin_meta_list_available_log_days ⇒ Array<Number>
AdminMetaListAvailableLogDays.
-
#admin_meta_read_logs(log) ⇒ String
AdminMetaReadLogs.
-
#admin_meta_remote_storage_vault_get ⇒ Array<Comet::RemoteStorageOption>
AdminMetaRemoteStorageVaultGet.
-
#admin_meta_remote_storage_vault_set(remote_storage_options) ⇒ Comet::CometAPIResponseMessage
AdminMetaRemoteStorageVaultSet.
-
#admin_meta_resource_get(hash) ⇒ String
AdminMetaResourceGet.
-
#admin_meta_resource_new(upload) ⇒ Comet::AdminResourceResponse
AdminMetaResourceNew.
-
#admin_meta_restart_service ⇒ Comet::CometAPIResponseMessage
AdminMetaRestartService.
-
#admin_meta_send_test_email(email_options, recipient) ⇒ Comet::CometAPIResponseMessage
AdminMetaSendTestEmail.
-
#admin_meta_server_config_get ⇒ Comet::ServerConfigOptions
AdminMetaServerConfigGet.
-
#admin_meta_server_config_network_interfaces ⇒ Array<String>
AdminMetaServerConfigNetworkInterfaces.
-
#admin_meta_server_config_set(config) ⇒ Comet::CometAPIResponseMessage
AdminMetaServerConfigSet.
-
#admin_meta_shutdown_service ⇒ Comet::CometAPIResponseMessage
AdminMetaShutdownService.
-
#admin_meta_software_update_news ⇒ Comet::SoftwareUpdateNewsResponse
AdminMetaSoftwareUpdateNews.
-
#admin_meta_stats(simple) ⇒ Hash{Number => Comet::StatResult}
AdminMetaStats.
-
#admin_meta_version ⇒ Comet::ServerMetaVersionInfo
AdminMetaVersion.
-
#admin_meta_webhook_options_get ⇒ Hash{String => Comet::WebhookOption}
AdminMetaWebhookOptionsGet.
-
#admin_meta_webhook_options_set(webhook_options) ⇒ Comet::CometAPIResponseMessage
AdminMetaWebhookOptionsSet.
-
#admin_news_get_all ⇒ Hash{String => Comet::NewsEntry}
AdminNewsGetAll.
-
#admin_news_remove(news_item) ⇒ Comet::CometAPIResponseMessage
AdminNewsRemove.
-
#admin_news_submit(news_content) ⇒ Comet::CometAPIResponseMessage
AdminNewsSubmit.
-
#admin_organization_delete(organization_id = nil, uninstall_config = nil) ⇒ Comet::OrganizationResponse
AdminOrganizationDelete.
-
#admin_organization_list ⇒ Hash{String => Comet::Organization}
AdminOrganizationList.
-
#admin_organization_set(organization_id = nil, organization = nil) ⇒ Comet::OrganizationResponse
AdminOrganizationSet.
-
#admin_policies_delete(policy_id) ⇒ Comet::CometAPIResponseMessage
AdminPoliciesDelete.
-
#admin_policies_get(policy_id) ⇒ Comet::GetGroupPolicyResponse
AdminPoliciesGet.
-
#admin_policies_list ⇒ Hash{String => String}
AdminPoliciesList.
-
#admin_policies_list_full ⇒ Hash{String => Comet::GroupPolicy}
AdminPoliciesListFull.
-
#admin_policies_new(policy) ⇒ Comet::CreateGroupPolicyResponse
AdminPoliciesNew.
-
#admin_policies_set(policy_id, policy, check_policy_hash = nil) ⇒ Comet::CometAPIResponseMessage
AdminPoliciesSet.
-
#admin_preview_user_email_report(target_user, email_report_config, email_address = nil) ⇒ Comet::EmailReportGeneratedPreview
AdminPreviewUserEmailReport.
-
#admin_replication_state ⇒ Array<Comet::ReplicatorStateAPIResponse>
AdminReplicationState.
-
#admin_request_storage_vault(target_user, storage_provider, self_address = nil) ⇒ Comet::RequestStorageVaultResponseMessage
AdminRequestStorageVault.
-
#admin_request_storage_vault_providers ⇒ Hash{String => String}
AdminRequestStorageVaultProviders.
-
#admin_reset_user_password(target_user, new_password, old_password) ⇒ Comet::CometAPIResponseMessage
AdminResetUserPassword.
-
#admin_revoke_device(target_user, target_device) ⇒ Comet::CometAPIResponseMessage
AdminRevokeDevice.
-
#admin_set_user_profile(target_user, profile_data) ⇒ Comet::CometAPIResponseMessage
AdminSetUserProfile.
-
#admin_set_user_profile_hash(target_user, profile_data, require_hash) ⇒ Comet::CometAPIResponseMessage
AdminSetUserProfileHash.
-
#admin_storage_bucket_properties(bucket_id, after_timestamp = nil) ⇒ Comet::BucketProperties
AdminStorageBucketProperties.
-
#admin_storage_delete_bucket(bucket_id) ⇒ Comet::CometAPIResponseMessage
AdminStorageDeleteBucket.
-
#admin_storage_free_space(bucket_id = nil) ⇒ Comet::StorageFreeSpaceInfo
AdminStorageFreeSpace.
-
#admin_storage_list_buckets ⇒ Hash{String => Comet::BucketProperties}
AdminStorageListBuckets.
-
#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.
-
#admin_update_campaign_start(options) ⇒ Comet::CometAPIResponseMessage
AdminUpdateCampaignStart.
-
#admin_update_campaign_status ⇒ Comet::UpdateCampaignStatus
AdminUpdateCampaignStatus.
-
#check_status(obj) ⇒ Object
If the supplied object represents an unsuccessful CometAPIResponseMessage, raise it as an error.
-
#hybrid_session_start ⇒ Comet::SessionKeyRegeneratedResponse
HybridSessionStart.
-
#initialize(server_address, username, password) ⇒ CometServer
constructor
Initialize a new CometServer class instance.
-
#perform_request(endpoint, params = {}) ⇒ String
Perform a synchronous HTTP request.
-
#perform_request_multipart(endpoint, params = {}) ⇒ String
Perform a synchronous HTTP request, using multipart/form-data.
-
#user_web_session_revoke ⇒ Comet::CometAPIResponseMessage
UserWebSessionRevoke.
-
#user_web_session_start ⇒ Comet::SessionKeyRegeneratedResponse
UserWebSessionStart.
Constructor Details
#initialize(server_address, username, password) ⇒ CometServer
Initialize a new CometServer class instance.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/comet/comet_server.rb', line 28 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
#password ⇒ Object
Returns the value of attribute password.
25 26 27 |
# File 'lib/comet/comet_server.rb', line 25 def password @password end |
#server_address ⇒ Object
Returns the value of attribute server_address.
19 20 21 |
# File 'lib/comet/comet_server.rb', line 19 def server_address @server_address end |
#username ⇒ Object
Returns the value of attribute username.
22 23 24 |
# File 'lib/comet/comet_server.rb', line 22 def username @username end |
Instance Method Details
#admin_account_properties ⇒ Comet::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.
51 52 53 54 55 56 57 58 |
# File 'lib/comet/comet_server.rb', line 51 def admin_account_properties 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_totp ⇒ Comet::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.
68 69 70 71 72 73 74 75 |
# File 'lib/comet/comet_server.rb', line 68 def admin_account_regenerate_totp 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_revoke ⇒ Comet::CometAPIResponseMessage
AdminAccountSessionRevoke
Revoke a session key (log out).
You must supply administrator authentication credentials to use this API.
84 85 86 87 88 89 90 91 |
# File 'lib/comet/comet_server.rb', line 84 def admin_account_session_revoke 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.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/comet/comet_server.rb', line 101 def admin_account_session_start(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.
127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/comet/comet_server.rb', line 127 def admin_account_session_start_as_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/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_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 or IP whitelist.
You must supply administrator authentication credentials to use this API.
152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/comet/comet_server.rb', line 152 def admin_account_set_properties(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.
You must supply administrator authentication credentials to use this API.
174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/comet/comet_server.rb', line 174 def admin_account_u2f_request_registration_challenge(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) ⇒ Comet::CometAPIResponseMessage
AdminAccountU2fSubmitChallengeResponse
Register a new FIDO U2F token.
You must supply administrator authentication credentials to use this API.
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/comet/comet_server.rb', line 200 def admin_account_u2f_submit_challenge_response(u2fchallenge_id, u2fclient_data, u2fregistration_data, u2fversion, description) 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 raise TypeError, "'description' expected String, got #{description.class}" unless description.is_a? String submit_params['Description'] = description 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.
234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/comet/comet_server.rb', line 234 def admin_account_validate_totp(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_add_user(target_user, target_password, store_recovery_code = nil, require_password_change = 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.
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/comet/comet_server.rb', line 260 def admin_add_user(target_user, target_password, store_recovery_code = nil, require_password_change = 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 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) ⇒ 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.
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/comet/comet_server.rb', line 298 def admin_add_user_from_profile(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/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 administrator accounts in the top-level Organization, not in any other Organization.
325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/comet/comet_server.rb', line 325 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_list ⇒ Array<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 administrator accounts in the top-level Organization, not in any other Organization.
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/comet/comet_server.rb', line 348 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 administrator accounts in the top-level Organization, not in any other Organization.
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 376 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_platforms ⇒ Hash{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.
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/comet/comet_server.rb', line 407 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.
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 |
# File 'lib/comet/comet_server.rb', line 434 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_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.
460 461 462 463 464 465 466 467 468 469 470 471 |
# File 'lib/comet/comet_server.rb', line 460 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_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.
483 484 485 486 487 488 489 490 491 492 493 494 |
# File 'lib/comet/comet_server.rb', line 483 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_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.
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 |
# File 'lib/comet/comet_server.rb', line 507 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.
539 540 541 542 543 544 545 546 547 548 549 550 |
# File 'lib/comet/comet_server.rb', line 539 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.
563 564 565 566 567 568 569 570 571 572 573 574 |
# File 'lib/comet/comet_server.rb', line 563 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.
587 588 589 590 591 592 593 594 595 596 597 598 |
# File 'lib/comet/comet_server.rb', line 587 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.
611 612 613 614 615 616 617 618 619 620 621 622 |
# File 'lib/comet/comet_server.rb', line 611 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.
635 636 637 638 639 640 641 642 643 644 645 646 |
# File 'lib/comet/comet_server.rb', line 635 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.
659 660 661 662 663 664 665 666 667 668 669 670 |
# File 'lib/comet/comet_server.rb', line 659 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.
682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 |
# File 'lib/comet/comet_server.rb', line 682 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_report ⇒ Comet::ConstellationCheckReport
AdminConstellationLastReport
Get Constellation bucket usage report (cached).
You must supply administrator authentication credentials to use this API. This API is only available for administrator accounts in the top-level Organization, not in any other Organization. This API requires the Constellation Role to be enabled.
708 709 710 711 712 713 714 715 |
# File 'lib/comet/comet_server.rb', line 708 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_report ⇒ Comet::ConstellationCheckReport
AdminConstellationNewReport
Get Constellation bucket usage report (regenerate).
You must supply administrator authentication credentials to use this API. This API is only available for administrator accounts in the top-level Organization, not in any other Organization. This API requires the Constellation Role to be enabled.
726 727 728 729 730 731 732 733 |
# File 'lib/comet/comet_server.rb', line 726 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_now ⇒ Comet::CometAPIResponseMessage
AdminConstellationPruneNow
Prune unused buckets.
You must supply administrator authentication credentials to use this API. This API is only available for administrator accounts in the top-level Organization, not in any other Organization. This API requires the Constellation Role to be enabled.
744 745 746 747 748 749 750 751 |
# File 'lib/comet/comet_server.rb', line 744 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_status ⇒ Comet::ConstellationStatusAPIResponse
AdminConstellationStatus
Get Constellation status.
You must supply administrator authentication credentials to use this API. This API is only available for administrator accounts in the top-level Organization, not in any other Organization. This API requires the Constellation Role to be enabled.
762 763 764 765 766 767 768 769 |
# File 'lib/comet/comet_server.rb', line 762 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_create_install_token(target_user, target_password, server = nil) ⇒ Comet::InstallTokenResponse
AdminCreateInstallToken
Create token for silent installation (Windows only). Provide the installation token to silently install the client on windows ‘install.exe /TOKEN=<installtoken>`
You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 |
# File 'lib/comet/comet_server.rb', line 783 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_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
You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.
818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 |
# File 'lib/comet/comet_server.rb', line 818 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.
846 847 848 849 850 851 852 853 854 855 856 857 858 |
# File 'lib/comet/comet_server.rb', line 846 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.
871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 |
# File 'lib/comet/comet_server.rb', line 871 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_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.
899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 |
# File 'lib/comet/comet_server.rb', line 899 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.
927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 |
# File 'lib/comet/comet_server.rb', line 927 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.
959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 |
# File 'lib/comet/comet_server.rb', line 959 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.
989 990 991 992 993 994 995 996 997 998 999 1000 1001 |
# File 'lib/comet/comet_server.rb', line 989 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_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.
1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 |
# File 'lib/comet/comet_server.rb', line 1014 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.
1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 |
# File 'lib/comet/comet_server.rb', line 1041 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 ⇒ 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.
1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 |
# File 'lib/comet/comet_server.rb', line 1063 def admin_dispatcher_list_active body = perform_request('api/v1/admin/dispatcher/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::LiveUserConnection.new ret[k].from_hash(v) end end 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.
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 |
# File 'lib/comet/comet_server.rb', line 1089 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_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.
1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 |
# File 'lib/comet/comet_server.rb', line 1114 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.
1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 |
# File 'lib/comet/comet_server.rb', line 1140 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.
1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 |
# File 'lib/comet/comet_server.rb', line 1163 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.
1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 |
# File 'lib/comet/comet_server.rb', line 1186 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_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.
1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 |
# File 'lib/comet/comet_server.rb', line 1209 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) ⇒ Array<Comet::StoredObject>
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.
1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 |
# File 'lib/comet/comet_server.rb', line 1234 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 if json_body.nil? ret = [] else ret = Array.new(json_body.length) json_body.each_with_index do |v, i| ret[i] = Comet::StoredObject.new ret[i].from_hash(v) end end 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.
1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 |
# File 'lib/comet/comet_server.rb', line 1269 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_stored_objects(target_id, destination, snapshot_id, tree_id = 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.
You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.
1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 |
# File 'lib/comet/comet_server.rb', line 1296 def admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = 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 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.
1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 |
# File 'lib/comet/comet_server.rb', line 1331 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_run_backup(target_id, backup_rule) ⇒ Comet::CometAPIResponseMessage
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.
1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 |
# File 'lib/comet/comet_server.rb', line 1358 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::CometAPIResponseMessage.new ret.from_hash(json_body) ret end |
#admin_dispatcher_run_backup_custom(target_id, source, destination, options = nil) ⇒ Comet::CometAPIResponseMessage
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.
1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 |
# File 'lib/comet/comet_server.rb', line 1387 def admin_dispatcher_run_backup_custom(target_id, source, destination, = 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 .nil? raise TypeError, "'options' expected Comet::BackupJobAdvancedOptions, got #{.class}" unless .is_a? Comet::BackupJobAdvancedOptions submit_params['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::CometAPIResponseMessage.new ret.from_hash(json_body) ret end |
#admin_dispatcher_run_restore(target_id, path, source, destination, snapshot = nil, paths = nil) ⇒ Comet::CometAPIResponseMessage
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.
1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 |
# File 'lib/comet/comet_server.rb', line 1427 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::CometAPIResponseMessage.new ret.from_hash(json_body) ret end |
#admin_dispatcher_run_restore_custom(target_id, source, destination, options, snapshot = nil, paths = nil) ⇒ Comet::CometAPIResponseMessage
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.
1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 |
# File 'lib/comet/comet_server.rb', line 1475 def admin_dispatcher_run_restore_custom(target_id, 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, "'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 #{.class}" unless .is_a? Comet::RestoreJobAdvancedOptions submit_params['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 body = perform_request('api/v1/admin/dispatcher/run-restore-custom', 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.
1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 |
# File 'lib/comet/comet_server.rb', line 1518 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) ⇒ 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.
1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 |
# File 'lib/comet/comet_server.rb', line 1545 def admin_dispatcher_unlock(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/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_url(target_id, new_url) ⇒ 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.
1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 |
# File 'lib/comet/comet_server.rb', line 1573 def admin_dispatcher_update_login_url(target_id, new_url) 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 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.
1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 |
# File 'lib/comet/comet_server.rb', line 1601 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_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.
1631 1632 1633 1634 1635 1636 1637 1638 |
# File 'lib/comet/comet_server.rb', line 1631 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) ⇒ 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.
1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 |
# File 'lib/comet/comet_server.rb', line 1649 def admin_get_job_log_entries(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-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.
1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 |
# File 'lib/comet/comet_server.rb', line 1679 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_all ⇒ Array<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.
1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 |
# File 'lib/comet/comet_server.rb', line 1702 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.
1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 |
# File 'lib/comet/comet_server.rb', line 1728 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 incomplete jobs by setting both `Start` and `End` to `0`.
You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.
1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 |
# File 'lib/comet/comet_server.rb', line 1766 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.
1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 |
# File 'lib/comet/comet_server.rb', line 1800 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_recent ⇒ Array<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.
1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 |
# File 'lib/comet/comet_server.rb', line 1830 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_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.
1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 |
# File 'lib/comet/comet_server.rb', line 1855 def admin_get_user_profile(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.
1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 |
# File 'lib/comet/comet_server.rb', line 1880 def admin_get_user_profile_and_hash(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.
1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 |
# File 'lib/comet/comet_server.rb', line 1905 def admin_get_user_profile_hash(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_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.
You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.
1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 |
# File 'lib/comet/comet_server.rb', line 1931 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_users ⇒ Array<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.
1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 |
# File 'lib/comet/comet_server.rb', line 1956 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_full ⇒ Hash{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.
1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 |
# File 'lib/comet/comet_server.rb', line 1981 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_get ⇒ Comet::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.
2005 2006 2007 2008 2009 2010 2011 2012 |
# File 'lib/comet/comet_server.rb', line 2005 def 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.
2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 |
# File 'lib/comet/comet_server.rb', line 2024 def (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_get ⇒ Comet::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.
2046 2047 2048 2049 2050 2051 2052 2053 |
# File 'lib/comet/comet_server.rb', line 2046 def 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.
2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 |
# File 'lib/comet/comet_server.rb', line 2064 def (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_list_available_log_days ⇒ Array<Number>
AdminMetaListAvailableLogDays
Get log files.
You must supply administrator authentication credentials to use this API. This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 |
# File 'lib/comet/comet_server.rb', line 2086 def 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_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 administrator accounts in the top-level Organization, not in any other Organization.
2114 2115 2116 2117 2118 2119 2120 2121 |
# File 'lib/comet/comet_server.rb', line 2114 def (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_remote_storage_vault_get ⇒ Array<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.
2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 |
# File 'lib/comet/comet_server.rb', line 2131 def 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) ⇒ Comet::CometAPIResponseMessage
AdminMetaRemoteStorageVaultSet
Set Requestable Remote Storage Vault options.
You must supply administrator authentication credentials to use this API. Access to this API may be prevented on a per-administrator basis.
2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 |
# File 'lib/comet/comet_server.rb', line 2156 def () submit_params = {} raise TypeError, "'remote_storage_options' expected Array, got #{.class}" unless .is_a? Array submit_params['RemoteStorageOptions'] = .to_json 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_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.
2179 2180 2181 2182 2183 2184 2185 2186 |
# File 'lib/comet/comet_server.rb', line 2179 def (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.
2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 |
# File 'lib/comet/comet_server.rb', line 2199 def (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_service ⇒ Comet::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 administrator accounts in the top-level Organization, not in any other Organization. Access to this API may be prevented on a per-administrator basis.
2225 2226 2227 2228 2229 2230 2231 2232 |
# File 'lib/comet/comet_server.rb', line 2225 def 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. This API is only available for administrator accounts in the top-level Organization, not in any other Organization. Access to this API may be prevented on a per-administrator basis.
2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 |
# File 'lib/comet/comet_server.rb', line 2246 def (, recipient) submit_params = {} raise TypeError, "'email_options' expected Comet::EmailOptions, got #{.class}" unless .is_a? Comet::EmailOptions submit_params['EmailOptions'] = .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_server_config_get ⇒ Comet::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 administrator accounts in the top-level Organization, not in any other Organization.
2272 2273 2274 2275 2276 2277 2278 2279 |
# File 'lib/comet/comet_server.rb', line 2272 def 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_interfaces ⇒ Array<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 administrator accounts in the top-level Organization, not in any other Organization.
2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 |
# File 'lib/comet/comet_server.rb', line 2291 def 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 administrator accounts in the top-level Organization, not in any other Organization.
2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 |
# File 'lib/comet/comet_server.rb', line 2321 def (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_service ⇒ Comet::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 administrator accounts in the top-level Organization, not in any other Organization. Access to this API may be prevented on a per-administrator basis.
2347 2348 2349 2350 2351 2352 2353 2354 |
# File 'lib/comet/comet_server.rb', line 2347 def 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_news ⇒ Comet::SoftwareUpdateNewsResponse
AdminMetaSoftwareUpdateNews
Get software update news from the software provider.
You must supply administrator authentication credentials to use this API.
2363 2364 2365 2366 2367 2368 2369 2370 |
# File 'lib/comet/comet_server.rb', line 2363 def 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.
2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 |
# File 'lib/comet/comet_server.rb', line 2381 def (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_version ⇒ Comet::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.
2408 2409 2410 2411 2412 2413 2414 2415 |
# File 'lib/comet/comet_server.rb', line 2408 def 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_get ⇒ Hash{String => Comet::WebhookOption}
AdminMetaWebhookOptionsGet
Get the server webhook configuration.
You must supply administrator authentication credentials to use this API.
2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 |
# File 'lib/comet/comet_server.rb', line 2424 def 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.
2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 |
# File 'lib/comet/comet_server.rb', line 2449 def () submit_params = {} raise TypeError, "'webhook_options' expected Hash, got #{.class}" unless .is_a? Hash submit_params['WebhookOptions'] = .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_all ⇒ Hash{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.
2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 |
# File 'lib/comet/comet_server.rb', line 2471 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.
2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 |
# File 'lib/comet/comet_server.rb', line 2496 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.
2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 |
# File 'lib/comet/comet_server.rb', line 2519 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::OrganizationResponse
AdminOrganizationDelete
Delete an organization and all related users.
You must supply administrator authentication credentials to use this API. This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 |
# File 'lib/comet/comet_server.rb', line 2543 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::OrganizationResponse.new ret.from_hash(json_body) ret end |
#admin_organization_list ⇒ Hash{String => Comet::Organization}
AdminOrganizationList
List Organizations.
You must supply administrator authentication credentials to use this API. This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 |
# File 'lib/comet/comet_server.rb', line 2572 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.
You must supply administrator authentication credentials to use this API. This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 |
# File 'lib/comet/comet_server.rb', line 2598 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.
2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 |
# File 'lib/comet/comet_server.rb', line 2628 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.
2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 |
# File 'lib/comet/comet_server.rb', line 2652 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 ⇒ Hash{String => String}
AdminPoliciesList
List all policy object names.
You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.
2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 |
# File 'lib/comet/comet_server.rb', line 2674 def admin_policies_list body = perform_request('api/v1/admin/policies/list') 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 ⇒ Hash{String => Comet::GroupPolicy}
AdminPoliciesListFull
Get all policy objects.
You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.
2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 |
# File 'lib/comet/comet_server.rb', line 2699 def admin_policies_list_full body = perform_request('api/v1/admin/policies/list-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::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.
2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 |
# File 'lib/comet/comet_server.rb', line 2724 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) ⇒ 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.
2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 |
# File 'lib/comet/comet_server.rb', line 2751 def admin_policies_set(policy_id, policy, check_policy_hash = 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 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.
2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 |
# File 'lib/comet/comet_server.rb', line 2784 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_state ⇒ Array<Comet::ReplicatorStateAPIResponse>
AdminReplicationState
Get Replication status.
You must supply administrator authentication credentials to use this API. This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 |
# File 'lib/comet/comet_server.rb', line 2814 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) ⇒ 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).
You must supply administrator authentication credentials to use this API. This API requires the Auth Role to be enabled.
2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 |
# File 'lib/comet/comet_server.rb', line 2843 def admin_request_storage_vault(target_user, storage_provider, self_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, "'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 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 ⇒ 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.
2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 |
# File 'lib/comet/comet_server.rb', line 2875 def admin_request_storage_vault_providers body = perform_request('api/v1/admin/request-storage-vault-providers') 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) ⇒ 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.
2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 |
# File 'lib/comet/comet_server.rb', line 2904 def admin_reset_user_password(target_user, new_password, old_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, "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String submit_params['NewPassword'] = new_password raise TypeError, "'old_password' expected String, got #{old_password.class}" unless old_password.is_a? String submit_params['OldPassword'] = old_password 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.
2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 |
# File 'lib/comet/comet_server.rb', line 2935 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_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.
2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 |
# File 'lib/comet/comet_server.rb', line 2962 def admin_set_user_profile(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) ⇒ Comet::CometAPIResponseMessage
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.
2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 |
# File 'lib/comet/comet_server.rb', line 2992 def admin_set_user_profile_hash(target_user, profile_data, require_hash) 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 body = perform_request('api/v1/admin/set-user-profile-hash', submit_params) json_body = JSON.parse body check_status json_body ret = Comet::CometAPIResponseMessage.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.
3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 |
# File 'lib/comet/comet_server.rb', line 3023 def admin_storage_bucket_properties(bucket_id, = 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 .nil? raise TypeError, "'after_timestamp' expected Numeric, got #{.class}" unless .is_a? Numeric submit_params['AfterTimestamp'] = 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.
3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 |
# File 'lib/comet/comet_server.rb', line 3052 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 administrator accounts in the top-level Organization, not in any other Organization.
3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 |
# File 'lib/comet/comet_server.rb', line 3077 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_buckets ⇒ Hash{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.
3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 |
# File 'lib/comet/comet_server.rb', line 3101 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_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.
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 3156 3157 3158 3159 3160 |
# File 'lib/comet/comet_server.rb', line 3131 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 administrator accounts in the top-level Organization, not in any other Organization. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.
3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 |
# File 'lib/comet/comet_server.rb', line 3173 def admin_update_campaign_start() submit_params = {} raise TypeError, "'options' expected Comet::UpdateCampaignOptions, got #{.class}" unless .is_a? Comet::UpdateCampaignOptions submit_params['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_status ⇒ Comet::UpdateCampaignStatus
AdminUpdateCampaignStatus
Get current campaign status.
You must supply administrator authentication credentials to use this API. This API is only available for administrator accounts in the top-level Organization, not in any other Organization. This API requires the Software Build Role to be enabled. This API requires the Auth Role to be enabled.
3197 3198 3199 3200 3201 3202 3203 3204 |
# File 'lib/comet/comet_server.rb', line 3197 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 |
#check_status(obj) ⇒ Object
If the supplied object represents an unsuccessful CometAPIResponseMessage, raise it as an error.
3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 |
# File 'lib/comet/comet_server.rb', line 3260 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_start ⇒ Comet::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.
3213 3214 3215 3216 3217 3218 3219 3220 |
# File 'lib/comet/comet_server.rb', line 3213 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.
3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 |
# File 'lib/comet/comet_server.rb', line 3276 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.
3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 |
# File 'lib/comet/comet_server.rb', line 3295 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_revoke ⇒ Comet::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.
3230 3231 3232 3233 3234 3235 3236 3237 |
# File 'lib/comet/comet_server.rb', line 3230 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_start ⇒ Comet::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.
3247 3248 3249 3250 3251 3252 3253 3254 |
# File 'lib/comet/comet_server.rb', line 3247 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 |