comet_backup_ruby_sdk 0.2.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +47 -0
- data/Gemfile.lock +43 -0
- data/README.md +20 -4
- data/RELEASING.md +10 -0
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +562 -254
- data/lib/comet/definitions.rb +19 -4
- data/lib/comet/models/add_bucket_response_message.rb +15 -5
- data/lib/comet/models/admin_account_properties_response.rb +17 -2
- data/lib/comet/models/admin_email_options.rb +84 -0
- data/lib/comet/models/admin_resource_response.rb +13 -4
- data/lib/comet/models/admin_security_options.rb +18 -5
- data/lib/comet/models/admin_u2fregistration.rb +11 -3
- data/lib/comet/models/admin_user_permissions.rb +6 -2
- data/lib/comet/models/available_download.rb +10 -4
- data/lib/comet/models/azure_destination_location.rb +16 -7
- data/lib/comet/models/b2destination_location.rb +17 -6
- data/lib/comet/models/b2storage_extra_info.rb +6 -2
- data/lib/comet/models/b2transaction_totals.rb +15 -2
- data/lib/comet/models/b2virtual_storage_role_settings.rb +93 -0
- data/lib/comet/models/backup_job_advanced_options.rb +12 -2
- data/lib/comet/models/backup_job_detail.rb +53 -10
- data/lib/comet/models/backup_job_progress.rb +21 -2
- data/lib/comet/models/backup_rule_config.rb +43 -7
- data/lib/comet/models/backup_rule_event_triggers.rb +6 -2
- data/lib/comet/models/branding_options.rb +59 -25
- data/lib/comet/models/branding_properties.rb +51 -21
- data/lib/comet/models/browse_disk_drives_response.rb +11 -3
- data/lib/comet/models/browse_edbresponse.rb +11 -3
- data/lib/comet/models/browse_hvresponse.rb +11 -3
- data/lib/comet/models/browse_vssresponse.rb +11 -3
- data/lib/comet/models/bucket_properties.rb +24 -3
- data/lib/comet/models/bucket_usage_info.rb +8 -2
- data/lib/comet/models/comet_apiresponse_message.rb +11 -3
- data/lib/comet/models/comet_destination_location.rb +12 -5
- data/lib/comet/models/constellation_check_report.rb +12 -2
- data/lib/comet/models/constellation_stats.rb +18 -2
- data/lib/comet/models/constellation_status_apiresponse.rb +9 -4
- data/lib/comet/models/content_measurement.rb +12 -2
- data/lib/comet/models/content_measurement_component.rb +10 -3
- data/lib/comet/models/create_group_policy_response.rb +13 -4
- data/lib/comet/models/default_email_report_policy.rb +6 -2
- data/lib/comet/models/destination_config.rb +123 -32
- data/lib/comet/models/destination_location.rb +78 -28
- data/lib/comet/models/destination_statistics.rb +16 -3
- data/lib/comet/models/device_config.rb +9 -3
- data/lib/comet/models/disk_drive.rb +34 -7
- data/lib/comet/models/dispatcher_admin_sources_response.rb +12 -4
- data/lib/comet/models/dispatcher_stored_objects_response.rb +11 -3
- data/lib/comet/models/dispatcher_vault_snapshots_response.rb +11 -3
- data/lib/comet/models/edbfile_info.rb +12 -5
- data/lib/comet/models/email_options.rb +21 -8
- data/lib/comet/models/email_report_config.rb +10 -2
- data/lib/comet/models/email_report_generated_preview.rb +17 -6
- data/lib/comet/models/external_ldapauthentication_source_settings.rb +102 -0
- data/lib/comet/models/extra_file_exclusion.rb +11 -3
- data/lib/comet/models/ftpdestination_location.rb +23 -6
- data/lib/comet/models/get_group_policy_response.rb +14 -4
- data/lib/comet/models/get_profile_and_hash_response_message.rb +14 -4
- data/lib/comet/models/get_profile_hash_response_message.rb +13 -4
- data/lib/comet/models/group_policy.rb +18 -3
- data/lib/comet/models/hyper_vmachine_info.rb +10 -4
- data/lib/comet/models/install_creds.rb +99 -0
- data/lib/comet/models/install_token.rb +117 -0
- data/lib/comet/models/install_token_response.rb +92 -0
- data/lib/comet/models/job_entry.rb +93 -0
- data/lib/comet/models/live_user_connection.rb +20 -7
- data/lib/comet/models/local_destination_location.rb +15 -5
- data/lib/comet/models/mac_oscode_sign_properties.rb +21 -6
- data/lib/comet/models/mongo_dbconnection.rb +33 -14
- data/lib/comet/models/new_bucket_detail.rb +10 -4
- data/lib/comet/models/news_entry.rb +20 -3
- data/lib/comet/models/organization.rb +145 -0
- data/lib/comet/models/organization_response.rb +101 -0
- data/lib/comet/models/osinfo.rb +12 -5
- data/lib/comet/models/partition.rb +32 -8
- data/lib/comet/models/private_branding_properties.rb +39 -15
- data/lib/comet/models/protected_item_engine_type_policy.rb +7 -3
- data/lib/comet/models/public_branding_properties.rb +18 -8
- data/lib/comet/models/remote_server_address.rb +19 -7
- data/lib/comet/models/remote_storage_option.rb +28 -7
- data/lib/comet/models/replicator_state_apiresponse.rb +40 -4
- data/lib/comet/models/request_storage_vault_response_message.rb +13 -4
- data/lib/comet/models/restore_job_advanced_options.rb +15 -4
- data/lib/comet/models/retention_policy.rb +9 -2
- data/lib/comet/models/retention_range.rb +30 -2
- data/lib/comet/models/s3destination_location.rb +16 -7
- data/lib/comet/models/schedule_config.rb +15 -2
- data/lib/comet/models/search_clause.rb +14 -6
- data/lib/comet/models/server_config_options_branding_fragment.rb +7 -2
- data/lib/comet/models/server_config_options_software_build_role_fragment.rb +7 -2
- data/lib/comet/models/server_meta_version_info.rb +45 -7
- data/lib/comet/models/session_key_regenerated_response.rb +15 -5
- data/lib/comet/models/sftpdestination_location.rb +21 -8
- data/lib/comet/models/size_measurement.rb +15 -2
- data/lib/comet/models/software_build_role_options.rb +6 -2
- data/lib/comet/models/software_update_news_response.rb +13 -6
- data/lib/comet/models/source_basic_info.rb +11 -3
- data/lib/comet/models/source_config.rb +38 -8
- data/lib/comet/models/source_statistics.rb +7 -2
- data/lib/comet/models/spanned_destination_location.rb +6 -2
- data/lib/comet/models/spanned_storage_extra_info.rb +6 -2
- data/lib/comet/models/sshconnection.rb +19 -7
- data/lib/comet/models/stat_result.rb +18 -2
- data/lib/comet/models/storage_free_space_info.rb +14 -2
- data/lib/comet/models/storage_vault_provider_policy.rb +8 -2
- data/lib/comet/models/stored_object.rb +27 -5
- data/lib/comet/models/streamable_event.rb +18 -2
- data/lib/comet/models/swift_destination_location.rb +32 -15
- data/lib/comet/models/test_response.rb +11 -3
- data/lib/comet/models/totp_regenerated_response.rb +17 -6
- data/lib/comet/models/u2fregister_request.rb +10 -4
- data/lib/comet/models/u2fregistered_key.rb +12 -5
- data/lib/comet/models/u2fregistration_challenge_response.rb +15 -5
- data/lib/comet/models/u2fsign_request.rb +12 -5
- data/lib/comet/models/u2fsign_response.rb +14 -6
- data/lib/comet/models/uninstall_config.rb +6 -2
- data/lib/comet/models/update_campaign_device_status.rb +9 -2
- data/lib/comet/models/update_campaign_options.rb +6 -2
- data/lib/comet/models/update_campaign_properties.rb +11 -3
- data/lib/comet/models/update_campaign_status.rb +11 -3
- data/lib/comet/models/update_campaign_status_device_entry.rb +13 -4
- data/lib/comet/models/user_custom_email_settings.rb +6 -2
- data/lib/comet/models/user_on_server.rb +11 -3
- data/lib/comet/models/user_policy.rb +22 -2
- data/lib/comet/models/user_profile_config.rb +52 -12
- data/lib/comet/models/user_profile_fragment.rb +8 -3
- data/lib/comet/models/vault_snapshot.rb +13 -4
- data/lib/comet/models/vsscomponent.rb +12 -5
- data/lib/comet/models/vsswriter_info.rb +8 -3
- data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +93 -0
- data/lib/comet/models/web_interface_branding_properties.rb +14 -6
- data/lib/comet/models/webhook_option.rb +10 -3
- data/lib/comet/models/win_smbauth.rb +15 -5
- data/lib/comet/models/windows_code_sign_properties.rb +26 -9
- data/lib/comet_backup_ruby_sdk.rb +10 -0
- metadata +15 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4bf74463ba52a1b008b3d743be48d74a2ef042274ddc86bc08f8e952d40064cc
|
|
4
|
+
data.tar.gz: 5296ec9e7ed5ae19711e77cf916ef4e7967d7a0bf3b27bab428a017c45e2d970
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b1271dca242a47f8b6958ed2972449cef6dec337fdd9f41d0b80e65606ec6460acb209cbecf1ee7aa43f7d5d0b98f7fedd1a13593a7c9ed4d01912192dbe4e33
|
|
7
|
+
data.tar.gz: 704803dd4ac0b1b03bf43530f9b60d6fc9ed5ff23b02380085db3c032c6833e817e9056292d189fca9161e796f25ad8ff73f6b659973a283f1301991b9d735f9
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# CHANGELOG
|
|
2
|
+
|
|
3
|
+
## 2020-11-05 v1.2.0
|
|
4
|
+
- Based on Comet 20.9.10
|
|
5
|
+
- Support new `ThawExec` feature
|
|
6
|
+
|
|
7
|
+
## 2020-10-08 v1.1.0
|
|
8
|
+
- Based on Comet 20.9.6
|
|
9
|
+
- Support new `AdminStorageBucketProperties` API
|
|
10
|
+
- Allow passing in nil or no value for `AdminStorageFreeSpace` parameter
|
|
11
|
+
- Fix an issue with automatic SelfAddress parameters not containing a trailing slash
|
|
12
|
+
|
|
13
|
+
## 2020-09-16 v1.0.0
|
|
14
|
+
- Tag a v1.0.0 release as the SDK design has stabilized. Future v1.x.x SDK releases will remain compatible with code written against v1.0.0, according to [Semantic Versioning](https://semver.org/).
|
|
15
|
+
- Support new Organization feature
|
|
16
|
+
- Support new `AdminCreateInstallTokenRequest` API
|
|
17
|
+
- Support new Admin user management APIs
|
|
18
|
+
- Support new `RebrandStorage` property on Storage Vaults and on Requestable destination targets
|
|
19
|
+
- Update descriptions for `SEVT_META_HELLO` and `AdminMetaWebhookOptionsSet`
|
|
20
|
+
|
|
21
|
+
## 2020-08-28 v0.4.0
|
|
22
|
+
- Feature: Add definitions B2 and Wasabi `VirtualStorageRole` classes
|
|
23
|
+
- Feature: Add definitions for remote LDAP authentication data sources
|
|
24
|
+
- Fix an issue with floating point constant initializers
|
|
25
|
+
|
|
26
|
+
## 2020-08-24 v0.3.1
|
|
27
|
+
- Fix an issue with version number in gem packaging
|
|
28
|
+
- Fix an issue with `.clear` initializers for numeric types
|
|
29
|
+
- Fix an issue with extra whitespace affecting the RuboCop linter
|
|
30
|
+
|
|
31
|
+
## 2020-08-24 v0.3.0
|
|
32
|
+
- Based on Comet 20.8.0
|
|
33
|
+
- Feature: Support new `AdminGetJobLogEntries` endpoint
|
|
34
|
+
- Enhancement: Support new `.clear` method to reset a model class to its zero-initialized value
|
|
35
|
+
- Enhancement: Include the parameter name and expected type in all raised `TypeError` exception messages
|
|
36
|
+
- Enhancement: Zero-initialize all model class members on construction
|
|
37
|
+
- Enhancement: Raise `TypeError` for malformed numeric (int/float) type parameters (the Comet Server would already prevent these server-side)
|
|
38
|
+
|
|
39
|
+
## 2020-08-04 v0.2.0
|
|
40
|
+
- Based on Comet 20.6.8-rc
|
|
41
|
+
- Initial public release
|
|
42
|
+
|
|
43
|
+
## 2020-07-31 v0.1.0
|
|
44
|
+
- Gem packaging
|
|
45
|
+
|
|
46
|
+
## 2020-07-31 v0.0.0
|
|
47
|
+
- Initial private release
|
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
comet_backup_ruby_sdk (1.1.0)
|
|
5
|
+
|
|
6
|
+
GEM
|
|
7
|
+
remote: https://rubygems.org/
|
|
8
|
+
specs:
|
|
9
|
+
ast (2.4.1)
|
|
10
|
+
minitest (5.14.1)
|
|
11
|
+
parallel (1.19.2)
|
|
12
|
+
parser (2.7.1.4)
|
|
13
|
+
ast (~> 2.4.1)
|
|
14
|
+
rainbow (3.0.0)
|
|
15
|
+
rake (13.0.1)
|
|
16
|
+
regexp_parser (1.7.1)
|
|
17
|
+
rexml (3.2.4)
|
|
18
|
+
rubocop (0.88.0)
|
|
19
|
+
parallel (~> 1.10)
|
|
20
|
+
parser (>= 2.7.1.1)
|
|
21
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
22
|
+
regexp_parser (>= 1.7)
|
|
23
|
+
rexml
|
|
24
|
+
rubocop-ast (>= 0.1.0, < 1.0)
|
|
25
|
+
ruby-progressbar (~> 1.7)
|
|
26
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
|
27
|
+
rubocop-ast (0.3.0)
|
|
28
|
+
parser (>= 2.7.1.4)
|
|
29
|
+
ruby-progressbar (1.10.1)
|
|
30
|
+
unicode-display_width (1.7.0)
|
|
31
|
+
|
|
32
|
+
PLATFORMS
|
|
33
|
+
ruby
|
|
34
|
+
|
|
35
|
+
DEPENDENCIES
|
|
36
|
+
bundler (~> 1.17)
|
|
37
|
+
comet_backup_ruby_sdk!
|
|
38
|
+
minitest (~> 5.14)
|
|
39
|
+
rake (~> 13.0)
|
|
40
|
+
rubocop (~> 0.88)
|
|
41
|
+
|
|
42
|
+
BUNDLED WITH
|
|
43
|
+
1.17.2
|
data/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Ruby SDK for the Comet Server API
|
|
2
2
|
|
|
3
3
|
[](https://twitter.com/CometBackup)
|
|
4
|
-
](https://badge.fury.io/rb/comet_backup_ruby_sdk)
|
|
5
|
+

|
|
5
6
|
|
|
6
7
|
The Comet Server API allows you to create and manage customer accounts on your Comet Server.
|
|
7
8
|
|
|
@@ -21,7 +22,7 @@ Older API libraries can be safely used with newer versions of Comet Server. Unkn
|
|
|
21
22
|
|
|
22
23
|
## Getting Started
|
|
23
24
|
|
|
24
|
-
This package is provided as a Gem hosted on [rubygems.org](https://rubygems.org/).
|
|
25
|
+
This package is provided as a Gem hosted on [rubygems.org](https://rubygems.org/gems/comet_backup_ruby_sdk).
|
|
25
26
|
|
|
26
27
|
Install using [Bundler](https://bundler.io/):
|
|
27
28
|
|
|
@@ -32,9 +33,11 @@ bundle
|
|
|
32
33
|
|
|
33
34
|
Or install using [Gem](https://rubygems.org/):
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
```bash
|
|
37
|
+
gem install comet_backup_ruby_sdk
|
|
38
|
+
```
|
|
36
39
|
|
|
37
|
-
To compile the
|
|
40
|
+
To compile the Gem from source:
|
|
38
41
|
|
|
39
42
|
```bash
|
|
40
43
|
git clone https://github.com/CometBackup/comet-ruby-sdk.git
|
|
@@ -56,6 +59,8 @@ client.admin_list_users_full.each do |username, profile|
|
|
|
56
59
|
end
|
|
57
60
|
```
|
|
58
61
|
|
|
62
|
+
### Error handling
|
|
63
|
+
|
|
59
64
|
The Comet Server API always returns an HTTP 200 status code, and puts application-level errors in the response message body using the `Comet::CometAPIResponseMessage` structure. This helps to distinguish between network-level errors and proxy-level errors. This SDK converts application-level errors to raise exceptions:
|
|
60
65
|
|
|
61
66
|
```ruby
|
|
@@ -74,6 +79,17 @@ rescue StandardError
|
|
|
74
79
|
end
|
|
75
80
|
```
|
|
76
81
|
|
|
82
|
+
### Running SDK test suite
|
|
83
|
+
|
|
84
|
+
```ruby
|
|
85
|
+
bundle exec rake rubocop
|
|
86
|
+
|
|
87
|
+
COMETSERVER_ADDRESS='http://127.0.0.1:8060' \
|
|
88
|
+
COMETSERVER_ADMINUSER=admin \
|
|
89
|
+
COMETSERVER_ADMINPASS=admin \
|
|
90
|
+
bundle exec rake test
|
|
91
|
+
```
|
|
92
|
+
|
|
77
93
|
## Getting Help
|
|
78
94
|
|
|
79
95
|
Bug reports and pull requests are welcome on GitHub at [https://github.com/CometBackup/comet-ruby-sdk](https://github.com/CometBackup/comet-ruby-sdk).
|
data/RELEASING.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Procedure for releasing gem package updates
|
|
2
|
+
|
|
3
|
+
1. All tests passing
|
|
4
|
+
2. Update changelog in `CHANGELOG.md`
|
|
5
|
+
3. Update version number in `gemspec`
|
|
6
|
+
4. `gem build comet_backup_ruby_sdk`
|
|
7
|
+
- Should be warning-free
|
|
8
|
+
5. Git tag
|
|
9
|
+
- Respect semver
|
|
10
|
+
6. `gem push comet_backup_ruby_sdk-0.x.x.gem`
|
|
@@ -12,7 +12,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
12
12
|
|
|
13
13
|
Gem::Specification.new do |spec|
|
|
14
14
|
spec.name = 'comet_backup_ruby_sdk'
|
|
15
|
-
spec.version = '
|
|
15
|
+
spec.version = '1.2.0'
|
|
16
16
|
spec.authors = ['Comet Licensing Ltd.']
|
|
17
17
|
spec.email = ['hello@cometbackup.com']
|
|
18
18
|
|
data/lib/comet/comet_server.rb
CHANGED
|
@@ -26,13 +26,18 @@ module Comet
|
|
|
26
26
|
|
|
27
27
|
# Initialize a new CometServer class instance.
|
|
28
28
|
def initialize(server_address, username, password)
|
|
29
|
-
raise TypeError 'expected
|
|
30
|
-
|
|
31
|
-
raise TypeError 'expected
|
|
29
|
+
raise TypeError "'server_address' expected String, got #{server_address.class}" unless server_address.is_a? String
|
|
30
|
+
|
|
31
|
+
raise TypeError "'username' expected String, got #{username.class}" unless username.is_a? String
|
|
32
|
+
|
|
33
|
+
raise TypeError "'password' expected String, got #{password.class}" unless password.is_a? String
|
|
32
34
|
|
|
33
35
|
@server_address = server_address
|
|
34
36
|
@username = username
|
|
35
37
|
@password = password
|
|
38
|
+
|
|
39
|
+
# Ensure Comet Server URL has a trailing slash
|
|
40
|
+
@server_address += '/' unless server_address.end_with?('/')
|
|
36
41
|
end
|
|
37
42
|
|
|
38
43
|
# AdminAccountProperties
|
|
@@ -44,7 +49,7 @@ module Comet
|
|
|
44
49
|
#
|
|
45
50
|
# @return [Comet::AdminAccountPropertiesResponse]
|
|
46
51
|
def admin_account_properties
|
|
47
|
-
body = perform_request('
|
|
52
|
+
body = perform_request('api/v1/admin/account/properties')
|
|
48
53
|
json_body = JSON.parse body
|
|
49
54
|
check_status json_body
|
|
50
55
|
ret = Comet::AdminAccountPropertiesResponse.new
|
|
@@ -61,7 +66,7 @@ module Comet
|
|
|
61
66
|
#
|
|
62
67
|
# @return [Comet::TotpRegeneratedResponse]
|
|
63
68
|
def admin_account_regenerate_totp
|
|
64
|
-
body = perform_request('
|
|
69
|
+
body = perform_request('api/v1/admin/account/regenerate-totp')
|
|
65
70
|
json_body = JSON.parse body
|
|
66
71
|
check_status json_body
|
|
67
72
|
ret = Comet::TotpRegeneratedResponse.new
|
|
@@ -77,7 +82,7 @@ module Comet
|
|
|
77
82
|
#
|
|
78
83
|
# @return [Comet::CometAPIResponseMessage]
|
|
79
84
|
def admin_account_session_revoke
|
|
80
|
-
body = perform_request('
|
|
85
|
+
body = perform_request('api/v1/admin/account/session-revoke')
|
|
81
86
|
json_body = JSON.parse body
|
|
82
87
|
check_status json_body
|
|
83
88
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -98,12 +103,12 @@ module Comet
|
|
|
98
103
|
if self_address.nil?
|
|
99
104
|
submit_params['SelfAddress'] = @server_address
|
|
100
105
|
else
|
|
101
|
-
raise TypeError 'expected
|
|
106
|
+
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
|
102
107
|
|
|
103
108
|
submit_params['SelfAddress'] = self_address
|
|
104
109
|
end
|
|
105
110
|
|
|
106
|
-
body = perform_request('
|
|
111
|
+
body = perform_request('api/v1/admin/account/session-start', submit_params)
|
|
107
112
|
json_body = JSON.parse body
|
|
108
113
|
check_status json_body
|
|
109
114
|
ret = Comet::SessionKeyRegeneratedResponse.new
|
|
@@ -121,11 +126,11 @@ module Comet
|
|
|
121
126
|
# @return [Comet::SessionKeyRegeneratedResponse]
|
|
122
127
|
def admin_account_session_start_as_user(target_user)
|
|
123
128
|
submit_params = {}
|
|
124
|
-
raise TypeError 'expected
|
|
129
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
125
130
|
|
|
126
131
|
submit_params['TargetUser'] = target_user
|
|
127
132
|
|
|
128
|
-
body = perform_request('
|
|
133
|
+
body = perform_request('api/v1/admin/account/session-start-as-user', submit_params)
|
|
129
134
|
json_body = JSON.parse body
|
|
130
135
|
check_status json_body
|
|
131
136
|
ret = Comet::SessionKeyRegeneratedResponse.new
|
|
@@ -146,11 +151,11 @@ module Comet
|
|
|
146
151
|
# @return [Comet::CometAPIResponseMessage]
|
|
147
152
|
def admin_account_set_properties(security)
|
|
148
153
|
submit_params = {}
|
|
149
|
-
raise TypeError 'expected Comet::AdminSecurityOptions
|
|
154
|
+
raise TypeError "'security' expected Comet::AdminSecurityOptions, got #{security.class}" unless security.is_a? Comet::AdminSecurityOptions
|
|
150
155
|
|
|
151
156
|
submit_params['Security'] = security.to_json
|
|
152
157
|
|
|
153
|
-
body = perform_request('
|
|
158
|
+
body = perform_request('api/v1/admin/account/set-properties', submit_params)
|
|
154
159
|
json_body = JSON.parse body
|
|
155
160
|
check_status json_body
|
|
156
161
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -168,11 +173,11 @@ module Comet
|
|
|
168
173
|
# @return [Comet::U2FRegistrationChallengeResponse]
|
|
169
174
|
def admin_account_u2f_request_registration_challenge(self_address)
|
|
170
175
|
submit_params = {}
|
|
171
|
-
raise TypeError 'expected
|
|
176
|
+
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
|
172
177
|
|
|
173
178
|
submit_params['SelfAddress'] = self_address
|
|
174
179
|
|
|
175
|
-
body = perform_request('
|
|
180
|
+
body = perform_request('api/v1/admin/account/u2f/request-registration-challenge', submit_params)
|
|
176
181
|
json_body = JSON.parse body
|
|
177
182
|
check_status json_body
|
|
178
183
|
ret = Comet::U2FRegistrationChallengeResponse.new
|
|
@@ -194,23 +199,23 @@ module Comet
|
|
|
194
199
|
# @return [Comet::CometAPIResponseMessage]
|
|
195
200
|
def admin_account_u2f_submit_challenge_response(u2fchallenge_id, u2fclient_data, u2fregistration_data, u2fversion, description)
|
|
196
201
|
submit_params = {}
|
|
197
|
-
raise TypeError 'expected
|
|
202
|
+
raise TypeError "'u2fchallenge_id' expected String, got #{u2fchallenge_id.class}" unless u2fchallenge_id.is_a? String
|
|
198
203
|
|
|
199
204
|
submit_params['U2FChallengeID'] = u2fchallenge_id
|
|
200
|
-
raise TypeError 'expected
|
|
205
|
+
raise TypeError "'u2fclient_data' expected String, got #{u2fclient_data.class}" unless u2fclient_data.is_a? String
|
|
201
206
|
|
|
202
207
|
submit_params['U2FClientData'] = u2fclient_data
|
|
203
|
-
raise TypeError 'expected
|
|
208
|
+
raise TypeError "'u2fregistration_data' expected String, got #{u2fregistration_data.class}" unless u2fregistration_data.is_a? String
|
|
204
209
|
|
|
205
210
|
submit_params['U2FRegistrationData'] = u2fregistration_data
|
|
206
|
-
raise TypeError 'expected
|
|
211
|
+
raise TypeError "'u2fversion' expected String, got #{u2fversion.class}" unless u2fversion.is_a? String
|
|
207
212
|
|
|
208
213
|
submit_params['U2FVersion'] = u2fversion
|
|
209
|
-
raise TypeError 'expected
|
|
214
|
+
raise TypeError "'description' expected String, got #{description.class}" unless description.is_a? String
|
|
210
215
|
|
|
211
216
|
submit_params['Description'] = description
|
|
212
217
|
|
|
213
|
-
body = perform_request('
|
|
218
|
+
body = perform_request('api/v1/admin/account/u2f/submit-challenge-response', submit_params)
|
|
214
219
|
json_body = JSON.parse body
|
|
215
220
|
check_status json_body
|
|
216
221
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -228,11 +233,11 @@ module Comet
|
|
|
228
233
|
# @return [Comet::CometAPIResponseMessage]
|
|
229
234
|
def admin_account_validate_totp(totpcode)
|
|
230
235
|
submit_params = {}
|
|
231
|
-
raise TypeError 'expected
|
|
236
|
+
raise TypeError "'totpcode' expected String, got #{totpcode.class}" unless totpcode.is_a? String
|
|
232
237
|
|
|
233
238
|
submit_params['TOTPCode'] = totpcode
|
|
234
239
|
|
|
235
|
-
body = perform_request('
|
|
240
|
+
body = perform_request('api/v1/admin/account/validate-totp', submit_params)
|
|
236
241
|
json_body = JSON.parse body
|
|
237
242
|
check_status json_body
|
|
238
243
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -254,20 +259,24 @@ module Comet
|
|
|
254
259
|
# @return [Comet::CometAPIResponseMessage]
|
|
255
260
|
def admin_add_user(target_user, target_password, store_recovery_code = nil, require_password_change = nil)
|
|
256
261
|
submit_params = {}
|
|
257
|
-
raise TypeError 'expected
|
|
262
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
258
263
|
|
|
259
264
|
submit_params['TargetUser'] = target_user
|
|
260
|
-
raise TypeError 'expected
|
|
265
|
+
raise TypeError "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
|
|
261
266
|
|
|
262
267
|
submit_params['TargetPassword'] = target_password
|
|
263
268
|
unless store_recovery_code.nil?
|
|
269
|
+
raise TypeError "'store_recovery_code' expected Numeric, got #{store_recovery_code.class}" unless store_recovery_code.is_a? Numeric
|
|
270
|
+
|
|
264
271
|
submit_params['StoreRecoveryCode'] = store_recovery_code
|
|
265
272
|
end
|
|
266
273
|
unless require_password_change.nil?
|
|
274
|
+
raise TypeError "'require_password_change' expected Numeric, got #{require_password_change.class}" unless require_password_change.is_a? Numeric
|
|
275
|
+
|
|
267
276
|
submit_params['RequirePasswordChange'] = require_password_change
|
|
268
277
|
end
|
|
269
278
|
|
|
270
|
-
body = perform_request('
|
|
279
|
+
body = perform_request('api/v1/admin/add-user', submit_params)
|
|
271
280
|
json_body = JSON.parse body
|
|
272
281
|
check_status json_body
|
|
273
282
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -288,14 +297,97 @@ module Comet
|
|
|
288
297
|
# @return [Comet::CometAPIResponseMessage]
|
|
289
298
|
def admin_add_user_from_profile(target_user, profile_data)
|
|
290
299
|
submit_params = {}
|
|
291
|
-
raise TypeError 'expected
|
|
300
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
292
301
|
|
|
293
302
|
submit_params['TargetUser'] = target_user
|
|
294
|
-
raise TypeError 'expected Comet::UserProfileConfig
|
|
303
|
+
raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
|
|
295
304
|
|
|
296
305
|
submit_params['ProfileData'] = profile_data.to_json
|
|
297
306
|
|
|
298
|
-
body = perform_request('
|
|
307
|
+
body = perform_request('api/v1/admin/add-user-from-profile', submit_params)
|
|
308
|
+
json_body = JSON.parse body
|
|
309
|
+
check_status json_body
|
|
310
|
+
ret = Comet::CometAPIResponseMessage.new
|
|
311
|
+
ret.from_hash(json_body)
|
|
312
|
+
ret
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
# AdminAdminUserDelete
|
|
316
|
+
#
|
|
317
|
+
# Delete an administrator.
|
|
318
|
+
#
|
|
319
|
+
# You must supply administrator authentication credentials to use this API.
|
|
320
|
+
# Access to this API may be prevented on a per-administrator basis.
|
|
321
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
322
|
+
#
|
|
323
|
+
# @param [String] target_user the username of the admin to be deleted
|
|
324
|
+
# @return [Comet::CometAPIResponseMessage]
|
|
325
|
+
def admin_admin_user_delete(target_user)
|
|
326
|
+
submit_params = {}
|
|
327
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
328
|
+
|
|
329
|
+
submit_params['TargetUser'] = target_user
|
|
330
|
+
|
|
331
|
+
body = perform_request('api/v1/admin/admin-user/delete', submit_params)
|
|
332
|
+
json_body = JSON.parse body
|
|
333
|
+
check_status json_body
|
|
334
|
+
ret = Comet::CometAPIResponseMessage.new
|
|
335
|
+
ret.from_hash(json_body)
|
|
336
|
+
ret
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
# AdminAdminUserList
|
|
340
|
+
#
|
|
341
|
+
# List administrators.
|
|
342
|
+
#
|
|
343
|
+
# You must supply administrator authentication credentials to use this API.
|
|
344
|
+
# Access to this API may be prevented on a per-administrator basis.
|
|
345
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
346
|
+
#
|
|
347
|
+
# @return [Array<Comet::AllowedAdminUser>]
|
|
348
|
+
def admin_admin_user_list
|
|
349
|
+
body = perform_request('api/v1/admin/admin-user/list')
|
|
350
|
+
json_body = JSON.parse body
|
|
351
|
+
check_status json_body
|
|
352
|
+
if json_body.nil?
|
|
353
|
+
ret = []
|
|
354
|
+
else
|
|
355
|
+
ret = Array.new(json_body.length)
|
|
356
|
+
json_body.each_with_index do |v, i|
|
|
357
|
+
ret[i] = Comet::AllowedAdminUser.new
|
|
358
|
+
ret[i].from_hash(v)
|
|
359
|
+
end
|
|
360
|
+
end
|
|
361
|
+
ret
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
# AdminAdminUserNew
|
|
365
|
+
#
|
|
366
|
+
# Add a new administrator.
|
|
367
|
+
#
|
|
368
|
+
# You must supply administrator authentication credentials to use this API.
|
|
369
|
+
# Access to this API may be prevented on a per-administrator basis.
|
|
370
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
371
|
+
#
|
|
372
|
+
# @param [String] target_user the username for this new admin
|
|
373
|
+
# @param [String] target_password the password for this new admin user
|
|
374
|
+
# @param [String] target_org_id (Optional) provide the organization ID for this user, it will default to the org of the authenticating user otherwise
|
|
375
|
+
# @return [Comet::CometAPIResponseMessage]
|
|
376
|
+
def admin_admin_user_new(target_user, target_password, target_org_id = nil)
|
|
377
|
+
submit_params = {}
|
|
378
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
379
|
+
|
|
380
|
+
submit_params['TargetUser'] = target_user
|
|
381
|
+
raise TypeError "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
|
|
382
|
+
|
|
383
|
+
submit_params['TargetPassword'] = target_password
|
|
384
|
+
unless target_org_id.nil?
|
|
385
|
+
raise TypeError "'target_org_id' expected String, got #{target_org_id.class}" unless target_org_id.is_a? String
|
|
386
|
+
|
|
387
|
+
submit_params['TargetOrgID'] = target_org_id
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
body = perform_request('api/v1/admin/admin-user/new', submit_params)
|
|
299
391
|
json_body = JSON.parse body
|
|
300
392
|
check_status json_body
|
|
301
393
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -313,7 +405,7 @@ module Comet
|
|
|
313
405
|
#
|
|
314
406
|
# @return [Hash{Number => Comet::AvailableDownload}]
|
|
315
407
|
def admin_branding_available_platforms
|
|
316
|
-
body = perform_request('
|
|
408
|
+
body = perform_request('api/v1/admin/branding/available-platforms')
|
|
317
409
|
json_body = JSON.parse body
|
|
318
410
|
check_status json_body
|
|
319
411
|
ret = {}
|
|
@@ -341,16 +433,18 @@ module Comet
|
|
|
341
433
|
# @return [String]
|
|
342
434
|
def admin_branding_generate_client_by_platform(platform, self_address = nil)
|
|
343
435
|
submit_params = {}
|
|
436
|
+
raise TypeError "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
|
|
437
|
+
|
|
344
438
|
submit_params['Platform'] = platform
|
|
345
439
|
if self_address.nil?
|
|
346
440
|
submit_params['SelfAddress'] = @server_address
|
|
347
441
|
else
|
|
348
|
-
raise TypeError 'expected
|
|
442
|
+
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
|
349
443
|
|
|
350
444
|
submit_params['SelfAddress'] = self_address
|
|
351
445
|
end
|
|
352
446
|
|
|
353
|
-
perform_request('
|
|
447
|
+
perform_request('api/v1/admin/branding/generate-client/by-platform', submit_params)
|
|
354
448
|
end
|
|
355
449
|
|
|
356
450
|
# AdminBrandingGenerateClientLinuxgeneric
|
|
@@ -368,12 +462,12 @@ module Comet
|
|
|
368
462
|
if self_address.nil?
|
|
369
463
|
submit_params['SelfAddress'] = @server_address
|
|
370
464
|
else
|
|
371
|
-
raise TypeError 'expected
|
|
465
|
+
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
|
372
466
|
|
|
373
467
|
submit_params['SelfAddress'] = self_address
|
|
374
468
|
end
|
|
375
469
|
|
|
376
|
-
perform_request('
|
|
470
|
+
perform_request('api/v1/admin/branding/generate-client/linuxgeneric', submit_params)
|
|
377
471
|
end
|
|
378
472
|
|
|
379
473
|
# AdminBrandingGenerateClientMacosX8664
|
|
@@ -391,12 +485,12 @@ module Comet
|
|
|
391
485
|
if self_address.nil?
|
|
392
486
|
submit_params['SelfAddress'] = @server_address
|
|
393
487
|
else
|
|
394
|
-
raise TypeError 'expected
|
|
488
|
+
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
|
395
489
|
|
|
396
490
|
submit_params['SelfAddress'] = self_address
|
|
397
491
|
end
|
|
398
492
|
|
|
399
|
-
perform_request('
|
|
493
|
+
perform_request('api/v1/admin/branding/generate-client/macos-x86_64', submit_params)
|
|
400
494
|
end
|
|
401
495
|
|
|
402
496
|
# AdminBrandingGenerateClientTest
|
|
@@ -412,16 +506,18 @@ module Comet
|
|
|
412
506
|
# @return [Comet::CometAPIResponseMessage]
|
|
413
507
|
def admin_branding_generate_client_test(platform, self_address = nil)
|
|
414
508
|
submit_params = {}
|
|
509
|
+
raise TypeError "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
|
|
510
|
+
|
|
415
511
|
submit_params['Platform'] = platform
|
|
416
512
|
if self_address.nil?
|
|
417
513
|
submit_params['SelfAddress'] = @server_address
|
|
418
514
|
else
|
|
419
|
-
raise TypeError 'expected
|
|
515
|
+
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
|
420
516
|
|
|
421
517
|
submit_params['SelfAddress'] = self_address
|
|
422
518
|
end
|
|
423
519
|
|
|
424
|
-
body = perform_request('
|
|
520
|
+
body = perform_request('api/v1/admin/branding/generate-client/test', submit_params)
|
|
425
521
|
json_body = JSON.parse body
|
|
426
522
|
check_status json_body
|
|
427
523
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -445,12 +541,12 @@ module Comet
|
|
|
445
541
|
if self_address.nil?
|
|
446
542
|
submit_params['SelfAddress'] = @server_address
|
|
447
543
|
else
|
|
448
|
-
raise TypeError 'expected
|
|
544
|
+
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
|
449
545
|
|
|
450
546
|
submit_params['SelfAddress'] = self_address
|
|
451
547
|
end
|
|
452
548
|
|
|
453
|
-
perform_request('
|
|
549
|
+
perform_request('api/v1/admin/branding/generate-client/windows-anycpu-exe', submit_params)
|
|
454
550
|
end
|
|
455
551
|
|
|
456
552
|
# AdminBrandingGenerateClientWindowsAnycpuZip
|
|
@@ -469,12 +565,12 @@ module Comet
|
|
|
469
565
|
if self_address.nil?
|
|
470
566
|
submit_params['SelfAddress'] = @server_address
|
|
471
567
|
else
|
|
472
|
-
raise TypeError 'expected
|
|
568
|
+
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
|
473
569
|
|
|
474
570
|
submit_params['SelfAddress'] = self_address
|
|
475
571
|
end
|
|
476
572
|
|
|
477
|
-
perform_request('
|
|
573
|
+
perform_request('api/v1/admin/branding/generate-client/windows-anycpu-zip', submit_params)
|
|
478
574
|
end
|
|
479
575
|
|
|
480
576
|
# AdminBrandingGenerateClientWindowsX8632Exe
|
|
@@ -493,12 +589,12 @@ module Comet
|
|
|
493
589
|
if self_address.nil?
|
|
494
590
|
submit_params['SelfAddress'] = @server_address
|
|
495
591
|
else
|
|
496
|
-
raise TypeError 'expected
|
|
592
|
+
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
|
497
593
|
|
|
498
594
|
submit_params['SelfAddress'] = self_address
|
|
499
595
|
end
|
|
500
596
|
|
|
501
|
-
perform_request('
|
|
597
|
+
perform_request('api/v1/admin/branding/generate-client/windows-x86_32-exe', submit_params)
|
|
502
598
|
end
|
|
503
599
|
|
|
504
600
|
# AdminBrandingGenerateClientWindowsX8632Zip
|
|
@@ -517,12 +613,12 @@ module Comet
|
|
|
517
613
|
if self_address.nil?
|
|
518
614
|
submit_params['SelfAddress'] = @server_address
|
|
519
615
|
else
|
|
520
|
-
raise TypeError 'expected
|
|
616
|
+
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
|
521
617
|
|
|
522
618
|
submit_params['SelfAddress'] = self_address
|
|
523
619
|
end
|
|
524
620
|
|
|
525
|
-
perform_request('
|
|
621
|
+
perform_request('api/v1/admin/branding/generate-client/windows-x86_32-zip', submit_params)
|
|
526
622
|
end
|
|
527
623
|
|
|
528
624
|
# AdminBrandingGenerateClientWindowsX8664Exe
|
|
@@ -541,12 +637,12 @@ module Comet
|
|
|
541
637
|
if self_address.nil?
|
|
542
638
|
submit_params['SelfAddress'] = @server_address
|
|
543
639
|
else
|
|
544
|
-
raise TypeError 'expected
|
|
640
|
+
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
|
545
641
|
|
|
546
642
|
submit_params['SelfAddress'] = self_address
|
|
547
643
|
end
|
|
548
644
|
|
|
549
|
-
perform_request('
|
|
645
|
+
perform_request('api/v1/admin/branding/generate-client/windows-x86_64-exe', submit_params)
|
|
550
646
|
end
|
|
551
647
|
|
|
552
648
|
# AdminBrandingGenerateClientWindowsX8664Zip
|
|
@@ -565,12 +661,12 @@ module Comet
|
|
|
565
661
|
if self_address.nil?
|
|
566
662
|
submit_params['SelfAddress'] = @server_address
|
|
567
663
|
else
|
|
568
|
-
raise TypeError 'expected
|
|
664
|
+
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
|
569
665
|
|
|
570
666
|
submit_params['SelfAddress'] = self_address
|
|
571
667
|
end
|
|
572
668
|
|
|
573
|
-
perform_request('
|
|
669
|
+
perform_request('api/v1/admin/branding/generate-client/windows-x86_64-zip', submit_params)
|
|
574
670
|
end
|
|
575
671
|
|
|
576
672
|
# AdminBulletinSubmit
|
|
@@ -585,14 +681,14 @@ module Comet
|
|
|
585
681
|
# @return [Comet::CometAPIResponseMessage]
|
|
586
682
|
def admin_bulletin_submit(subject, content)
|
|
587
683
|
submit_params = {}
|
|
588
|
-
raise TypeError 'expected
|
|
684
|
+
raise TypeError "'subject' expected String, got #{subject.class}" unless subject.is_a? String
|
|
589
685
|
|
|
590
686
|
submit_params['Subject'] = subject
|
|
591
|
-
raise TypeError 'expected
|
|
687
|
+
raise TypeError "'content' expected String, got #{content.class}" unless content.is_a? String
|
|
592
688
|
|
|
593
689
|
submit_params['Content'] = content
|
|
594
690
|
|
|
595
|
-
body = perform_request('
|
|
691
|
+
body = perform_request('api/v1/admin/bulletin/submit', submit_params)
|
|
596
692
|
json_body = JSON.parse body
|
|
597
693
|
check_status json_body
|
|
598
694
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -605,11 +701,12 @@ module Comet
|
|
|
605
701
|
# Get Constellation bucket usage report (cached).
|
|
606
702
|
#
|
|
607
703
|
# You must supply administrator authentication credentials to use this API.
|
|
704
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
608
705
|
# This API requires the Constellation Role to be enabled.
|
|
609
706
|
#
|
|
610
707
|
# @return [Comet::ConstellationCheckReport]
|
|
611
708
|
def admin_constellation_last_report
|
|
612
|
-
body = perform_request('
|
|
709
|
+
body = perform_request('api/v1/admin/constellation/last-report')
|
|
613
710
|
json_body = JSON.parse body
|
|
614
711
|
check_status json_body
|
|
615
712
|
ret = Comet::ConstellationCheckReport.new
|
|
@@ -622,11 +719,12 @@ module Comet
|
|
|
622
719
|
# Get Constellation bucket usage report (regenerate).
|
|
623
720
|
#
|
|
624
721
|
# You must supply administrator authentication credentials to use this API.
|
|
722
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
625
723
|
# This API requires the Constellation Role to be enabled.
|
|
626
724
|
#
|
|
627
725
|
# @return [Comet::ConstellationCheckReport]
|
|
628
726
|
def admin_constellation_new_report
|
|
629
|
-
body = perform_request('
|
|
727
|
+
body = perform_request('api/v1/admin/constellation/new-report')
|
|
630
728
|
json_body = JSON.parse body
|
|
631
729
|
check_status json_body
|
|
632
730
|
ret = Comet::ConstellationCheckReport.new
|
|
@@ -639,11 +737,12 @@ module Comet
|
|
|
639
737
|
# Prune unused buckets.
|
|
640
738
|
#
|
|
641
739
|
# You must supply administrator authentication credentials to use this API.
|
|
740
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
642
741
|
# This API requires the Constellation Role to be enabled.
|
|
643
742
|
#
|
|
644
743
|
# @return [Comet::CometAPIResponseMessage]
|
|
645
744
|
def admin_constellation_prune_now
|
|
646
|
-
body = perform_request('
|
|
745
|
+
body = perform_request('api/v1/admin/constellation/prune-now')
|
|
647
746
|
json_body = JSON.parse body
|
|
648
747
|
check_status json_body
|
|
649
748
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -656,11 +755,12 @@ module Comet
|
|
|
656
755
|
# Get Constellation status.
|
|
657
756
|
#
|
|
658
757
|
# You must supply administrator authentication credentials to use this API.
|
|
758
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
659
759
|
# This API requires the Constellation Role to be enabled.
|
|
660
760
|
#
|
|
661
761
|
# @return [Comet::ConstellationStatusAPIResponse]
|
|
662
762
|
def admin_constellation_status
|
|
663
|
-
body = perform_request('
|
|
763
|
+
body = perform_request('api/v1/admin/constellation/status')
|
|
664
764
|
json_body = JSON.parse body
|
|
665
765
|
check_status json_body
|
|
666
766
|
ret = Comet::ConstellationStatusAPIResponse.new
|
|
@@ -668,6 +768,40 @@ module Comet
|
|
|
668
768
|
ret
|
|
669
769
|
end
|
|
670
770
|
|
|
771
|
+
# AdminCreateInstallToken
|
|
772
|
+
#
|
|
773
|
+
# Create token for silent installation (Windows only).
|
|
774
|
+
# Provide the installation token to silently install the client on windows `install.exe /TOKEN=<installtoken>`
|
|
775
|
+
#
|
|
776
|
+
# You must supply administrator authentication credentials to use this API.
|
|
777
|
+
# This API requires the Auth Role to be enabled.
|
|
778
|
+
#
|
|
779
|
+
# @param [String] target_user Selected account username
|
|
780
|
+
# @param [String] target_password Selected account password
|
|
781
|
+
# @param [String] server (Optional) External URL of the authentication server that is different from the current server
|
|
782
|
+
# @return [Comet::InstallTokenResponse]
|
|
783
|
+
def admin_create_install_token(target_user, target_password, server = nil)
|
|
784
|
+
submit_params = {}
|
|
785
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
786
|
+
|
|
787
|
+
submit_params['TargetUser'] = target_user
|
|
788
|
+
raise TypeError "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
|
|
789
|
+
|
|
790
|
+
submit_params['TargetPassword'] = target_password
|
|
791
|
+
unless server.nil?
|
|
792
|
+
raise TypeError "'server' expected String, got #{server.class}" unless server.is_a? String
|
|
793
|
+
|
|
794
|
+
submit_params['Server'] = server
|
|
795
|
+
end
|
|
796
|
+
|
|
797
|
+
body = perform_request('api/v1/admin/create-install-token', submit_params)
|
|
798
|
+
json_body = JSON.parse body
|
|
799
|
+
check_status json_body
|
|
800
|
+
ret = Comet::InstallTokenResponse.new
|
|
801
|
+
ret.from_hash(json_body)
|
|
802
|
+
ret
|
|
803
|
+
end
|
|
804
|
+
|
|
671
805
|
# AdminDeleteUser
|
|
672
806
|
#
|
|
673
807
|
# Delete user account.
|
|
@@ -683,16 +817,16 @@ module Comet
|
|
|
683
817
|
# @return [Comet::CometAPIResponseMessage]
|
|
684
818
|
def admin_delete_user(target_user, uninstall_config = nil)
|
|
685
819
|
submit_params = {}
|
|
686
|
-
raise TypeError 'expected
|
|
820
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
687
821
|
|
|
688
822
|
submit_params['TargetUser'] = target_user
|
|
689
823
|
unless uninstall_config.nil?
|
|
690
|
-
raise TypeError 'expected Comet::UninstallConfig
|
|
824
|
+
raise TypeError "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
|
|
691
825
|
|
|
692
826
|
submit_params['UninstallConfig'] = uninstall_config.to_json
|
|
693
827
|
end
|
|
694
828
|
|
|
695
|
-
body = perform_request('
|
|
829
|
+
body = perform_request('api/v1/admin/delete-user', submit_params)
|
|
696
830
|
json_body = JSON.parse body
|
|
697
831
|
check_status json_body
|
|
698
832
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -711,11 +845,11 @@ module Comet
|
|
|
711
845
|
# @return [Comet::CometAPIResponseMessage]
|
|
712
846
|
def admin_disable_user_totp(target_user)
|
|
713
847
|
submit_params = {}
|
|
714
|
-
raise TypeError 'expected
|
|
848
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
715
849
|
|
|
716
850
|
submit_params['TargetUser'] = target_user
|
|
717
851
|
|
|
718
|
-
body = perform_request('
|
|
852
|
+
body = perform_request('api/v1/admin/disable-user-totp', submit_params)
|
|
719
853
|
json_body = JSON.parse body
|
|
720
854
|
check_status json_body
|
|
721
855
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -736,14 +870,14 @@ module Comet
|
|
|
736
870
|
# @return [Comet::CometAPIResponseMessage]
|
|
737
871
|
def admin_dispatcher_apply_retention_rules(target_id, destination)
|
|
738
872
|
submit_params = {}
|
|
739
|
-
raise TypeError 'expected
|
|
873
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
740
874
|
|
|
741
875
|
submit_params['TargetID'] = target_id
|
|
742
|
-
raise TypeError 'expected
|
|
876
|
+
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
|
743
877
|
|
|
744
878
|
submit_params['Destination'] = destination
|
|
745
879
|
|
|
746
|
-
body = perform_request('
|
|
880
|
+
body = perform_request('api/v1/admin/dispatcher/apply-retention-rules', submit_params)
|
|
747
881
|
json_body = JSON.parse body
|
|
748
882
|
check_status json_body
|
|
749
883
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -764,14 +898,14 @@ module Comet
|
|
|
764
898
|
# @return [Comet::CometAPIResponseMessage]
|
|
765
899
|
def admin_dispatcher_deepverify_storage_vault(target_id, destination)
|
|
766
900
|
submit_params = {}
|
|
767
|
-
raise TypeError 'expected
|
|
901
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
768
902
|
|
|
769
903
|
submit_params['TargetID'] = target_id
|
|
770
|
-
raise TypeError 'expected
|
|
904
|
+
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
|
771
905
|
|
|
772
906
|
submit_params['Destination'] = destination
|
|
773
907
|
|
|
774
|
-
body = perform_request('
|
|
908
|
+
body = perform_request('api/v1/admin/dispatcher/deepverify-storage-vault', submit_params)
|
|
775
909
|
json_body = JSON.parse body
|
|
776
910
|
check_status json_body
|
|
777
911
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -792,17 +926,17 @@ module Comet
|
|
|
792
926
|
# @return [Comet::CometAPIResponseMessage]
|
|
793
927
|
def admin_dispatcher_delete_snapshot(target_id, destination_id, snapshot_id)
|
|
794
928
|
submit_params = {}
|
|
795
|
-
raise TypeError 'expected
|
|
929
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
796
930
|
|
|
797
931
|
submit_params['TargetID'] = target_id
|
|
798
|
-
raise TypeError 'expected
|
|
932
|
+
raise TypeError "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String
|
|
799
933
|
|
|
800
934
|
submit_params['DestinationID'] = destination_id
|
|
801
|
-
raise TypeError 'expected
|
|
935
|
+
raise TypeError "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
|
|
802
936
|
|
|
803
937
|
submit_params['SnapshotID'] = snapshot_id
|
|
804
938
|
|
|
805
|
-
body = perform_request('
|
|
939
|
+
body = perform_request('api/v1/admin/dispatcher/delete-snapshot', submit_params)
|
|
806
940
|
json_body = JSON.parse body
|
|
807
941
|
check_status json_body
|
|
808
942
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -822,11 +956,11 @@ module Comet
|
|
|
822
956
|
# @return [Comet::CometAPIResponseMessage]
|
|
823
957
|
def admin_dispatcher_drop_connection(target_id)
|
|
824
958
|
submit_params = {}
|
|
825
|
-
raise TypeError 'expected
|
|
959
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
826
960
|
|
|
827
961
|
submit_params['TargetID'] = target_id
|
|
828
962
|
|
|
829
|
-
body = perform_request('
|
|
963
|
+
body = perform_request('api/v1/admin/dispatcher/drop-connection', submit_params)
|
|
830
964
|
json_body = JSON.parse body
|
|
831
965
|
check_status json_body
|
|
832
966
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -847,14 +981,14 @@ module Comet
|
|
|
847
981
|
# @return [Comet::CometAPIResponseMessage]
|
|
848
982
|
def admin_dispatcher_import_apply(target_id, import_source_id)
|
|
849
983
|
submit_params = {}
|
|
850
|
-
raise TypeError 'expected
|
|
984
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
851
985
|
|
|
852
986
|
submit_params['TargetID'] = target_id
|
|
853
|
-
raise TypeError 'expected
|
|
987
|
+
raise TypeError "'import_source_id' expected String, got #{import_source_id.class}" unless import_source_id.is_a? String
|
|
854
988
|
|
|
855
989
|
submit_params['ImportSourceID'] = import_source_id
|
|
856
990
|
|
|
857
|
-
body = perform_request('
|
|
991
|
+
body = perform_request('api/v1/admin/dispatcher/import-apply', submit_params)
|
|
858
992
|
json_body = JSON.parse body
|
|
859
993
|
check_status json_body
|
|
860
994
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -874,11 +1008,11 @@ module Comet
|
|
|
874
1008
|
# @return [Comet::CometAPIResponseMessage]
|
|
875
1009
|
def admin_dispatcher_kill_process(target_id)
|
|
876
1010
|
submit_params = {}
|
|
877
|
-
raise TypeError 'expected
|
|
1011
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
878
1012
|
|
|
879
1013
|
submit_params['TargetID'] = target_id
|
|
880
1014
|
|
|
881
|
-
body = perform_request('
|
|
1015
|
+
body = perform_request('api/v1/admin/dispatcher/kill-process', submit_params)
|
|
882
1016
|
json_body = JSON.parse body
|
|
883
1017
|
check_status json_body
|
|
884
1018
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -895,7 +1029,7 @@ module Comet
|
|
|
895
1029
|
#
|
|
896
1030
|
# @return [Hash{String => Comet::LiveUserConnection}]
|
|
897
1031
|
def admin_dispatcher_list_active
|
|
898
|
-
body = perform_request('
|
|
1032
|
+
body = perform_request('api/v1/admin/dispatcher/list-active')
|
|
899
1033
|
json_body = JSON.parse body
|
|
900
1034
|
check_status json_body
|
|
901
1035
|
ret = {}
|
|
@@ -922,11 +1056,11 @@ module Comet
|
|
|
922
1056
|
# @return [Comet::CometAPIResponseMessage]
|
|
923
1057
|
def admin_dispatcher_refetch_profile(target_id)
|
|
924
1058
|
submit_params = {}
|
|
925
|
-
raise TypeError 'expected
|
|
1059
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
926
1060
|
|
|
927
1061
|
submit_params['TargetID'] = target_id
|
|
928
1062
|
|
|
929
|
-
body = perform_request('
|
|
1063
|
+
body = perform_request('api/v1/admin/dispatcher/refetch-profile', submit_params)
|
|
930
1064
|
json_body = JSON.parse body
|
|
931
1065
|
check_status json_body
|
|
932
1066
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -947,14 +1081,14 @@ module Comet
|
|
|
947
1081
|
# @return [Comet::CometAPIResponseMessage]
|
|
948
1082
|
def admin_dispatcher_reindex_storage_vault(target_id, destination)
|
|
949
1083
|
submit_params = {}
|
|
950
|
-
raise TypeError 'expected
|
|
1084
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
951
1085
|
|
|
952
1086
|
submit_params['TargetID'] = target_id
|
|
953
|
-
raise TypeError 'expected
|
|
1087
|
+
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
|
954
1088
|
|
|
955
1089
|
submit_params['Destination'] = destination
|
|
956
1090
|
|
|
957
|
-
body = perform_request('
|
|
1091
|
+
body = perform_request('api/v1/admin/dispatcher/reindex-storage-vault', submit_params)
|
|
958
1092
|
json_body = JSON.parse body
|
|
959
1093
|
check_status json_body
|
|
960
1094
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -973,11 +1107,11 @@ module Comet
|
|
|
973
1107
|
# @return [Comet::BrowseDiskDrivesResponse]
|
|
974
1108
|
def admin_dispatcher_request_browse_disk_drives(target_id)
|
|
975
1109
|
submit_params = {}
|
|
976
|
-
raise TypeError 'expected
|
|
1110
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
977
1111
|
|
|
978
1112
|
submit_params['TargetID'] = target_id
|
|
979
1113
|
|
|
980
|
-
body = perform_request('
|
|
1114
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-disk-drives', submit_params)
|
|
981
1115
|
json_body = JSON.parse body
|
|
982
1116
|
check_status json_body
|
|
983
1117
|
ret = Comet::BrowseDiskDrivesResponse.new
|
|
@@ -996,11 +1130,11 @@ module Comet
|
|
|
996
1130
|
# @return [Comet::BrowseEDBResponse]
|
|
997
1131
|
def admin_dispatcher_request_browse_exchange_edb(target_id)
|
|
998
1132
|
submit_params = {}
|
|
999
|
-
raise TypeError 'expected
|
|
1133
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1000
1134
|
|
|
1001
1135
|
submit_params['TargetID'] = target_id
|
|
1002
1136
|
|
|
1003
|
-
body = perform_request('
|
|
1137
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-exchange-edb', submit_params)
|
|
1004
1138
|
json_body = JSON.parse body
|
|
1005
1139
|
check_status json_body
|
|
1006
1140
|
ret = Comet::BrowseEDBResponse.new
|
|
@@ -1019,11 +1153,11 @@ module Comet
|
|
|
1019
1153
|
# @return [Comet::BrowseHVResponse]
|
|
1020
1154
|
def admin_dispatcher_request_browse_hyperv(target_id)
|
|
1021
1155
|
submit_params = {}
|
|
1022
|
-
raise TypeError 'expected
|
|
1156
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1023
1157
|
|
|
1024
1158
|
submit_params['TargetID'] = target_id
|
|
1025
1159
|
|
|
1026
|
-
body = perform_request('
|
|
1160
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-hyperv', submit_params)
|
|
1027
1161
|
json_body = JSON.parse body
|
|
1028
1162
|
check_status json_body
|
|
1029
1163
|
ret = Comet::BrowseHVResponse.new
|
|
@@ -1042,11 +1176,11 @@ module Comet
|
|
|
1042
1176
|
# @return [Comet::BrowseVSSResponse]
|
|
1043
1177
|
def admin_dispatcher_request_browse_vss_aaw(target_id)
|
|
1044
1178
|
submit_params = {}
|
|
1045
|
-
raise TypeError 'expected
|
|
1179
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1046
1180
|
|
|
1047
1181
|
submit_params['TargetID'] = target_id
|
|
1048
1182
|
|
|
1049
|
-
body = perform_request('
|
|
1183
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-vss-aaw', submit_params)
|
|
1050
1184
|
json_body = JSON.parse body
|
|
1051
1185
|
check_status json_body
|
|
1052
1186
|
ret = Comet::BrowseVSSResponse.new
|
|
@@ -1067,16 +1201,16 @@ module Comet
|
|
|
1067
1201
|
# @return [Array<Comet::StoredObject>]
|
|
1068
1202
|
def admin_dispatcher_request_filesystem_objects(target_id, path = nil)
|
|
1069
1203
|
submit_params = {}
|
|
1070
|
-
raise TypeError 'expected
|
|
1204
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1071
1205
|
|
|
1072
1206
|
submit_params['TargetID'] = target_id
|
|
1073
1207
|
unless path.nil?
|
|
1074
|
-
raise TypeError 'expected
|
|
1208
|
+
raise TypeError "'path' expected String, got #{path.class}" unless path.is_a? String
|
|
1075
1209
|
|
|
1076
1210
|
submit_params['Path'] = path
|
|
1077
1211
|
end
|
|
1078
1212
|
|
|
1079
|
-
body = perform_request('
|
|
1213
|
+
body = perform_request('api/v1/admin/dispatcher/request-filesystem-objects', submit_params)
|
|
1080
1214
|
json_body = JSON.parse body
|
|
1081
1215
|
check_status json_body
|
|
1082
1216
|
if json_body.nil?
|
|
@@ -1102,11 +1236,11 @@ module Comet
|
|
|
1102
1236
|
# @return [Comet::DispatcherAdminSourcesResponse]
|
|
1103
1237
|
def admin_dispatcher_request_import_sources(target_id)
|
|
1104
1238
|
submit_params = {}
|
|
1105
|
-
raise TypeError 'expected
|
|
1239
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1106
1240
|
|
|
1107
1241
|
submit_params['TargetID'] = target_id
|
|
1108
1242
|
|
|
1109
|
-
body = perform_request('
|
|
1243
|
+
body = perform_request('api/v1/admin/dispatcher/request-import-sources', submit_params)
|
|
1110
1244
|
json_body = JSON.parse body
|
|
1111
1245
|
check_status json_body
|
|
1112
1246
|
ret = Comet::DispatcherAdminSourcesResponse.new
|
|
@@ -1129,22 +1263,22 @@ module Comet
|
|
|
1129
1263
|
# @return [Comet::DispatcherStoredObjectsResponse]
|
|
1130
1264
|
def admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = nil)
|
|
1131
1265
|
submit_params = {}
|
|
1132
|
-
raise TypeError 'expected
|
|
1266
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1133
1267
|
|
|
1134
1268
|
submit_params['TargetID'] = target_id
|
|
1135
|
-
raise TypeError 'expected
|
|
1269
|
+
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
|
1136
1270
|
|
|
1137
1271
|
submit_params['Destination'] = destination
|
|
1138
|
-
raise TypeError 'expected
|
|
1272
|
+
raise TypeError "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
|
|
1139
1273
|
|
|
1140
1274
|
submit_params['SnapshotID'] = snapshot_id
|
|
1141
1275
|
unless tree_id.nil?
|
|
1142
|
-
raise TypeError 'expected
|
|
1276
|
+
raise TypeError "'tree_id' expected String, got #{tree_id.class}" unless tree_id.is_a? String
|
|
1143
1277
|
|
|
1144
1278
|
submit_params['TreeID'] = tree_id
|
|
1145
1279
|
end
|
|
1146
1280
|
|
|
1147
|
-
body = perform_request('
|
|
1281
|
+
body = perform_request('api/v1/admin/dispatcher/request-stored-objects', submit_params)
|
|
1148
1282
|
json_body = JSON.parse body
|
|
1149
1283
|
check_status json_body
|
|
1150
1284
|
ret = Comet::DispatcherStoredObjectsResponse.new
|
|
@@ -1164,14 +1298,14 @@ module Comet
|
|
|
1164
1298
|
# @return [Comet::DispatcherVaultSnapshotsResponse]
|
|
1165
1299
|
def admin_dispatcher_request_vault_snapshots(target_id, destination)
|
|
1166
1300
|
submit_params = {}
|
|
1167
|
-
raise TypeError 'expected
|
|
1301
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1168
1302
|
|
|
1169
1303
|
submit_params['TargetID'] = target_id
|
|
1170
|
-
raise TypeError 'expected
|
|
1304
|
+
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
|
1171
1305
|
|
|
1172
1306
|
submit_params['Destination'] = destination
|
|
1173
1307
|
|
|
1174
|
-
body = perform_request('
|
|
1308
|
+
body = perform_request('api/v1/admin/dispatcher/request-vault-snapshots', submit_params)
|
|
1175
1309
|
json_body = JSON.parse body
|
|
1176
1310
|
check_status json_body
|
|
1177
1311
|
ret = Comet::DispatcherVaultSnapshotsResponse.new
|
|
@@ -1191,14 +1325,14 @@ module Comet
|
|
|
1191
1325
|
# @return [Comet::CometAPIResponseMessage]
|
|
1192
1326
|
def admin_dispatcher_run_backup(target_id, backup_rule)
|
|
1193
1327
|
submit_params = {}
|
|
1194
|
-
raise TypeError 'expected
|
|
1328
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1195
1329
|
|
|
1196
1330
|
submit_params['TargetID'] = target_id
|
|
1197
|
-
raise TypeError 'expected
|
|
1331
|
+
raise TypeError "'backup_rule' expected String, got #{backup_rule.class}" unless backup_rule.is_a? String
|
|
1198
1332
|
|
|
1199
1333
|
submit_params['BackupRule'] = backup_rule
|
|
1200
1334
|
|
|
1201
|
-
body = perform_request('
|
|
1335
|
+
body = perform_request('api/v1/admin/dispatcher/run-backup', submit_params)
|
|
1202
1336
|
json_body = JSON.parse body
|
|
1203
1337
|
check_status json_body
|
|
1204
1338
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -1220,22 +1354,22 @@ module Comet
|
|
|
1220
1354
|
# @return [Comet::CometAPIResponseMessage]
|
|
1221
1355
|
def admin_dispatcher_run_backup_custom(target_id, source, destination, options = nil)
|
|
1222
1356
|
submit_params = {}
|
|
1223
|
-
raise TypeError 'expected
|
|
1357
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1224
1358
|
|
|
1225
1359
|
submit_params['TargetID'] = target_id
|
|
1226
|
-
raise TypeError 'expected
|
|
1360
|
+
raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
|
|
1227
1361
|
|
|
1228
1362
|
submit_params['Source'] = source
|
|
1229
|
-
raise TypeError 'expected
|
|
1363
|
+
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
|
1230
1364
|
|
|
1231
1365
|
submit_params['Destination'] = destination
|
|
1232
1366
|
unless options.nil?
|
|
1233
|
-
raise TypeError 'expected Comet::BackupJobAdvancedOptions
|
|
1367
|
+
raise TypeError "'options' expected Comet::BackupJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::BackupJobAdvancedOptions
|
|
1234
1368
|
|
|
1235
1369
|
submit_params['Options'] = options.to_json
|
|
1236
1370
|
end
|
|
1237
1371
|
|
|
1238
|
-
body = perform_request('
|
|
1372
|
+
body = perform_request('api/v1/admin/dispatcher/run-backup-custom', submit_params)
|
|
1239
1373
|
json_body = JSON.parse body
|
|
1240
1374
|
check_status json_body
|
|
1241
1375
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -1260,30 +1394,30 @@ module Comet
|
|
|
1260
1394
|
# @return [Comet::CometAPIResponseMessage]
|
|
1261
1395
|
def admin_dispatcher_run_restore(target_id, path, source, destination, snapshot = nil, paths = nil)
|
|
1262
1396
|
submit_params = {}
|
|
1263
|
-
raise TypeError 'expected
|
|
1397
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1264
1398
|
|
|
1265
1399
|
submit_params['TargetID'] = target_id
|
|
1266
|
-
raise TypeError 'expected
|
|
1400
|
+
raise TypeError "'path' expected String, got #{path.class}" unless path.is_a? String
|
|
1267
1401
|
|
|
1268
1402
|
submit_params['Path'] = path
|
|
1269
|
-
raise TypeError 'expected
|
|
1403
|
+
raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
|
|
1270
1404
|
|
|
1271
1405
|
submit_params['Source'] = source
|
|
1272
|
-
raise TypeError 'expected
|
|
1406
|
+
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
|
1273
1407
|
|
|
1274
1408
|
submit_params['Destination'] = destination
|
|
1275
1409
|
unless snapshot.nil?
|
|
1276
|
-
raise TypeError 'expected
|
|
1410
|
+
raise TypeError "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
|
|
1277
1411
|
|
|
1278
1412
|
submit_params['Snapshot'] = snapshot
|
|
1279
1413
|
end
|
|
1280
1414
|
unless paths.nil?
|
|
1281
|
-
raise TypeError 'expected
|
|
1415
|
+
raise TypeError "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
|
|
1282
1416
|
|
|
1283
1417
|
submit_params['Paths'] = paths.to_json
|
|
1284
1418
|
end
|
|
1285
1419
|
|
|
1286
|
-
body = perform_request('
|
|
1420
|
+
body = perform_request('api/v1/admin/dispatcher/run-restore', submit_params)
|
|
1287
1421
|
json_body = JSON.parse body
|
|
1288
1422
|
check_status json_body
|
|
1289
1423
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -1308,30 +1442,30 @@ module Comet
|
|
|
1308
1442
|
# @return [Comet::CometAPIResponseMessage]
|
|
1309
1443
|
def admin_dispatcher_run_restore_custom(target_id, source, destination, options, snapshot = nil, paths = nil)
|
|
1310
1444
|
submit_params = {}
|
|
1311
|
-
raise TypeError 'expected
|
|
1445
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1312
1446
|
|
|
1313
1447
|
submit_params['TargetID'] = target_id
|
|
1314
|
-
raise TypeError 'expected
|
|
1448
|
+
raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
|
|
1315
1449
|
|
|
1316
1450
|
submit_params['Source'] = source
|
|
1317
|
-
raise TypeError 'expected
|
|
1451
|
+
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
|
1318
1452
|
|
|
1319
1453
|
submit_params['Destination'] = destination
|
|
1320
|
-
raise TypeError 'expected Comet::RestoreJobAdvancedOptions
|
|
1454
|
+
raise TypeError "'options' expected Comet::RestoreJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::RestoreJobAdvancedOptions
|
|
1321
1455
|
|
|
1322
1456
|
submit_params['Options'] = options.to_json
|
|
1323
1457
|
unless snapshot.nil?
|
|
1324
|
-
raise TypeError 'expected
|
|
1458
|
+
raise TypeError "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
|
|
1325
1459
|
|
|
1326
1460
|
submit_params['Snapshot'] = snapshot
|
|
1327
1461
|
end
|
|
1328
1462
|
unless paths.nil?
|
|
1329
|
-
raise TypeError 'expected
|
|
1463
|
+
raise TypeError "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
|
|
1330
1464
|
|
|
1331
1465
|
submit_params['Paths'] = paths.to_json
|
|
1332
1466
|
end
|
|
1333
1467
|
|
|
1334
|
-
body = perform_request('
|
|
1468
|
+
body = perform_request('api/v1/admin/dispatcher/run-restore-custom', submit_params)
|
|
1335
1469
|
json_body = JSON.parse body
|
|
1336
1470
|
check_status json_body
|
|
1337
1471
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -1351,12 +1485,12 @@ module Comet
|
|
|
1351
1485
|
# @return [Comet::CometAPIResponseMessage]
|
|
1352
1486
|
def admin_dispatcher_uninstall_software(target_id, remove_config_file)
|
|
1353
1487
|
submit_params = {}
|
|
1354
|
-
raise TypeError 'expected
|
|
1488
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1355
1489
|
|
|
1356
1490
|
submit_params['TargetID'] = target_id
|
|
1357
1491
|
submit_params['RemoveConfigFile'] = (remove_config_file ? 1 : 0)
|
|
1358
1492
|
|
|
1359
|
-
body = perform_request('
|
|
1493
|
+
body = perform_request('api/v1/admin/dispatcher/uninstall-software', submit_params)
|
|
1360
1494
|
json_body = JSON.parse body
|
|
1361
1495
|
check_status json_body
|
|
1362
1496
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -1378,14 +1512,14 @@ module Comet
|
|
|
1378
1512
|
# @return [Comet::CometAPIResponseMessage]
|
|
1379
1513
|
def admin_dispatcher_unlock(target_id, destination)
|
|
1380
1514
|
submit_params = {}
|
|
1381
|
-
raise TypeError 'expected
|
|
1515
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1382
1516
|
|
|
1383
1517
|
submit_params['TargetID'] = target_id
|
|
1384
|
-
raise TypeError 'expected
|
|
1518
|
+
raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
|
1385
1519
|
|
|
1386
1520
|
submit_params['Destination'] = destination
|
|
1387
1521
|
|
|
1388
|
-
body = perform_request('
|
|
1522
|
+
body = perform_request('api/v1/admin/dispatcher/unlock', submit_params)
|
|
1389
1523
|
json_body = JSON.parse body
|
|
1390
1524
|
check_status json_body
|
|
1391
1525
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -1406,14 +1540,14 @@ module Comet
|
|
|
1406
1540
|
# @return [Comet::CometAPIResponseMessage]
|
|
1407
1541
|
def admin_dispatcher_update_login_url(target_id, new_url)
|
|
1408
1542
|
submit_params = {}
|
|
1409
|
-
raise TypeError 'expected
|
|
1543
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1410
1544
|
|
|
1411
1545
|
submit_params['TargetID'] = target_id
|
|
1412
|
-
raise TypeError 'expected
|
|
1546
|
+
raise TypeError "'new_url' expected String, got #{new_url.class}" unless new_url.is_a? String
|
|
1413
1547
|
|
|
1414
1548
|
submit_params['NewURL'] = new_url
|
|
1415
1549
|
|
|
1416
|
-
body = perform_request('
|
|
1550
|
+
body = perform_request('api/v1/admin/dispatcher/update-login-url', submit_params)
|
|
1417
1551
|
json_body = JSON.parse body
|
|
1418
1552
|
check_status json_body
|
|
1419
1553
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -1434,18 +1568,18 @@ module Comet
|
|
|
1434
1568
|
# @return [Comet::CometAPIResponseMessage]
|
|
1435
1569
|
def admin_dispatcher_update_software(target_id, self_address = nil)
|
|
1436
1570
|
submit_params = {}
|
|
1437
|
-
raise TypeError 'expected
|
|
1571
|
+
raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1438
1572
|
|
|
1439
1573
|
submit_params['TargetID'] = target_id
|
|
1440
1574
|
if self_address.nil?
|
|
1441
1575
|
submit_params['SelfAddress'] = @server_address
|
|
1442
1576
|
else
|
|
1443
|
-
raise TypeError 'expected
|
|
1577
|
+
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
|
1444
1578
|
|
|
1445
1579
|
submit_params['SelfAddress'] = self_address
|
|
1446
1580
|
end
|
|
1447
1581
|
|
|
1448
|
-
body = perform_request('
|
|
1582
|
+
body = perform_request('api/v1/admin/dispatcher/update-software', submit_params)
|
|
1449
1583
|
json_body = JSON.parse body
|
|
1450
1584
|
check_status json_body
|
|
1451
1585
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -1455,7 +1589,7 @@ module Comet
|
|
|
1455
1589
|
|
|
1456
1590
|
# AdminGetJobLog
|
|
1457
1591
|
#
|
|
1458
|
-
# Get the report log entries for a single job.
|
|
1592
|
+
# Get the report log entries for a single job, in plaintext format.
|
|
1459
1593
|
#
|
|
1460
1594
|
# You must supply administrator authentication credentials to use this API.
|
|
1461
1595
|
# This API requires the Auth Role to be enabled.
|
|
@@ -1464,11 +1598,41 @@ module Comet
|
|
|
1464
1598
|
# @return [String]
|
|
1465
1599
|
def admin_get_job_log(job_id)
|
|
1466
1600
|
submit_params = {}
|
|
1467
|
-
raise TypeError 'expected
|
|
1601
|
+
raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
|
|
1468
1602
|
|
|
1469
1603
|
submit_params['JobID'] = job_id
|
|
1470
1604
|
|
|
1471
|
-
perform_request('
|
|
1605
|
+
perform_request('api/v1/admin/get-job-log', submit_params)
|
|
1606
|
+
end
|
|
1607
|
+
|
|
1608
|
+
# AdminGetJobLogEntries
|
|
1609
|
+
#
|
|
1610
|
+
# Get the report log entries for a single job.
|
|
1611
|
+
#
|
|
1612
|
+
# You must supply administrator authentication credentials to use this API.
|
|
1613
|
+
# This API requires the Auth Role to be enabled.
|
|
1614
|
+
#
|
|
1615
|
+
# @param [String] job_id Selected job ID
|
|
1616
|
+
# @return [Array<Comet::JobEntry>]
|
|
1617
|
+
def admin_get_job_log_entries(job_id)
|
|
1618
|
+
submit_params = {}
|
|
1619
|
+
raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
|
|
1620
|
+
|
|
1621
|
+
submit_params['JobID'] = job_id
|
|
1622
|
+
|
|
1623
|
+
body = perform_request('api/v1/admin/get-job-log-entries', submit_params)
|
|
1624
|
+
json_body = JSON.parse body
|
|
1625
|
+
check_status json_body
|
|
1626
|
+
if json_body.nil?
|
|
1627
|
+
ret = []
|
|
1628
|
+
else
|
|
1629
|
+
ret = Array.new(json_body.length)
|
|
1630
|
+
json_body.each_with_index do |v, i|
|
|
1631
|
+
ret[i] = Comet::JobEntry.new
|
|
1632
|
+
ret[i].from_hash(v)
|
|
1633
|
+
end
|
|
1634
|
+
end
|
|
1635
|
+
ret
|
|
1472
1636
|
end
|
|
1473
1637
|
|
|
1474
1638
|
# AdminGetJobProperties
|
|
@@ -1482,11 +1646,11 @@ module Comet
|
|
|
1482
1646
|
# @return [Comet::BackupJobDetail]
|
|
1483
1647
|
def admin_get_job_properties(job_id)
|
|
1484
1648
|
submit_params = {}
|
|
1485
|
-
raise TypeError 'expected
|
|
1649
|
+
raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
|
|
1486
1650
|
|
|
1487
1651
|
submit_params['JobID'] = job_id
|
|
1488
1652
|
|
|
1489
|
-
body = perform_request('
|
|
1653
|
+
body = perform_request('api/v1/admin/get-job-properties', submit_params)
|
|
1490
1654
|
json_body = JSON.parse body
|
|
1491
1655
|
check_status json_body
|
|
1492
1656
|
ret = Comet::BackupJobDetail.new
|
|
@@ -1504,7 +1668,7 @@ module Comet
|
|
|
1504
1668
|
#
|
|
1505
1669
|
# @return [Array<Comet::BackupJobDetail>]
|
|
1506
1670
|
def admin_get_jobs_all
|
|
1507
|
-
body = perform_request('
|
|
1671
|
+
body = perform_request('api/v1/admin/get-jobs-all')
|
|
1508
1672
|
json_body = JSON.parse body
|
|
1509
1673
|
check_status json_body
|
|
1510
1674
|
if json_body.nil?
|
|
@@ -1531,11 +1695,11 @@ module Comet
|
|
|
1531
1695
|
# @return [Array<Comet::BackupJobDetail>]
|
|
1532
1696
|
def admin_get_jobs_for_custom_search(query)
|
|
1533
1697
|
submit_params = {}
|
|
1534
|
-
raise TypeError 'expected Comet::SearchClause
|
|
1698
|
+
raise TypeError "'query' expected Comet::SearchClause, got #{query.class}" unless query.is_a? Comet::SearchClause
|
|
1535
1699
|
|
|
1536
1700
|
submit_params['Query'] = query.to_json
|
|
1537
1701
|
|
|
1538
|
-
body = perform_request('
|
|
1702
|
+
body = perform_request('api/v1/admin/get-jobs-for-custom-search', submit_params)
|
|
1539
1703
|
json_body = JSON.parse body
|
|
1540
1704
|
check_status json_body
|
|
1541
1705
|
if json_body.nil?
|
|
@@ -1569,10 +1733,14 @@ module Comet
|
|
|
1569
1733
|
# @return [Array<Comet::BackupJobDetail>]
|
|
1570
1734
|
def admin_get_jobs_for_date_range(start_value, end_value)
|
|
1571
1735
|
submit_params = {}
|
|
1736
|
+
raise TypeError "'start_value' expected Numeric, got #{start_value.class}" unless start_value.is_a? Numeric
|
|
1737
|
+
|
|
1572
1738
|
submit_params['Start'] = start_value
|
|
1739
|
+
raise TypeError "'end_value' expected Numeric, got #{end_value.class}" unless end_value.is_a? Numeric
|
|
1740
|
+
|
|
1573
1741
|
submit_params['End'] = end_value
|
|
1574
1742
|
|
|
1575
|
-
body = perform_request('
|
|
1743
|
+
body = perform_request('api/v1/admin/get-jobs-for-date-range', submit_params)
|
|
1576
1744
|
json_body = JSON.parse body
|
|
1577
1745
|
check_status json_body
|
|
1578
1746
|
if json_body.nil?
|
|
@@ -1599,11 +1767,11 @@ module Comet
|
|
|
1599
1767
|
# @return [Array<Comet::BackupJobDetail>]
|
|
1600
1768
|
def admin_get_jobs_for_user(target_user)
|
|
1601
1769
|
submit_params = {}
|
|
1602
|
-
raise TypeError 'expected
|
|
1770
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
1603
1771
|
|
|
1604
1772
|
submit_params['TargetUser'] = target_user
|
|
1605
1773
|
|
|
1606
|
-
body = perform_request('
|
|
1774
|
+
body = perform_request('api/v1/admin/get-jobs-for-user', submit_params)
|
|
1607
1775
|
json_body = JSON.parse body
|
|
1608
1776
|
check_status json_body
|
|
1609
1777
|
if json_body.nil?
|
|
@@ -1628,7 +1796,7 @@ module Comet
|
|
|
1628
1796
|
#
|
|
1629
1797
|
# @return [Array<Comet::BackupJobDetail>]
|
|
1630
1798
|
def admin_get_jobs_recent
|
|
1631
|
-
body = perform_request('
|
|
1799
|
+
body = perform_request('api/v1/admin/get-jobs-recent')
|
|
1632
1800
|
json_body = JSON.parse body
|
|
1633
1801
|
check_status json_body
|
|
1634
1802
|
if json_body.nil?
|
|
@@ -1654,11 +1822,11 @@ module Comet
|
|
|
1654
1822
|
# @return [Comet::UserProfileConfig]
|
|
1655
1823
|
def admin_get_user_profile(target_user)
|
|
1656
1824
|
submit_params = {}
|
|
1657
|
-
raise TypeError 'expected
|
|
1825
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
1658
1826
|
|
|
1659
1827
|
submit_params['TargetUser'] = target_user
|
|
1660
1828
|
|
|
1661
|
-
body = perform_request('
|
|
1829
|
+
body = perform_request('api/v1/admin/get-user-profile', submit_params)
|
|
1662
1830
|
json_body = JSON.parse body
|
|
1663
1831
|
check_status json_body
|
|
1664
1832
|
ret = Comet::UserProfileConfig.new
|
|
@@ -1679,11 +1847,11 @@ module Comet
|
|
|
1679
1847
|
# @return [Comet::GetProfileAndHashResponseMessage]
|
|
1680
1848
|
def admin_get_user_profile_and_hash(target_user)
|
|
1681
1849
|
submit_params = {}
|
|
1682
|
-
raise TypeError 'expected
|
|
1850
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
1683
1851
|
|
|
1684
1852
|
submit_params['TargetUser'] = target_user
|
|
1685
1853
|
|
|
1686
|
-
body = perform_request('
|
|
1854
|
+
body = perform_request('api/v1/admin/get-user-profile-and-hash', submit_params)
|
|
1687
1855
|
json_body = JSON.parse body
|
|
1688
1856
|
check_status json_body
|
|
1689
1857
|
ret = Comet::GetProfileAndHashResponseMessage.new
|
|
@@ -1704,11 +1872,11 @@ module Comet
|
|
|
1704
1872
|
# @return [Comet::GetProfileHashResponseMessage]
|
|
1705
1873
|
def admin_get_user_profile_hash(target_user)
|
|
1706
1874
|
submit_params = {}
|
|
1707
|
-
raise TypeError 'expected
|
|
1875
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
1708
1876
|
|
|
1709
1877
|
submit_params['TargetUser'] = target_user
|
|
1710
1878
|
|
|
1711
|
-
body = perform_request('
|
|
1879
|
+
body = perform_request('api/v1/admin/get-user-profile-hash', submit_params)
|
|
1712
1880
|
json_body = JSON.parse body
|
|
1713
1881
|
check_status json_body
|
|
1714
1882
|
ret = Comet::GetProfileHashResponseMessage.new
|
|
@@ -1730,14 +1898,14 @@ module Comet
|
|
|
1730
1898
|
# @return [Comet::CometAPIResponseMessage]
|
|
1731
1899
|
def admin_job_cancel(target_user, job_id)
|
|
1732
1900
|
submit_params = {}
|
|
1733
|
-
raise TypeError 'expected
|
|
1901
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
1734
1902
|
|
|
1735
1903
|
submit_params['TargetUser'] = target_user
|
|
1736
|
-
raise TypeError 'expected
|
|
1904
|
+
raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
|
|
1737
1905
|
|
|
1738
1906
|
submit_params['JobID'] = job_id
|
|
1739
1907
|
|
|
1740
|
-
body = perform_request('
|
|
1908
|
+
body = perform_request('api/v1/admin/job/cancel', submit_params)
|
|
1741
1909
|
json_body = JSON.parse body
|
|
1742
1910
|
check_status json_body
|
|
1743
1911
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -1754,7 +1922,7 @@ module Comet
|
|
|
1754
1922
|
#
|
|
1755
1923
|
# @return [Array<String>]
|
|
1756
1924
|
def admin_list_users
|
|
1757
|
-
body = perform_request('
|
|
1925
|
+
body = perform_request('api/v1/admin/list-users')
|
|
1758
1926
|
json_body = JSON.parse body
|
|
1759
1927
|
check_status json_body
|
|
1760
1928
|
if json_body.nil?
|
|
@@ -1762,7 +1930,7 @@ module Comet
|
|
|
1762
1930
|
else
|
|
1763
1931
|
ret = Array.new(json_body.length)
|
|
1764
1932
|
json_body.each_with_index do |v, i|
|
|
1765
|
-
raise TypeError 'expected
|
|
1933
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
1766
1934
|
|
|
1767
1935
|
ret[i] = v
|
|
1768
1936
|
end
|
|
@@ -1779,7 +1947,7 @@ module Comet
|
|
|
1779
1947
|
#
|
|
1780
1948
|
# @return [Hash{String => Comet::UserProfileConfig}]
|
|
1781
1949
|
def admin_list_users_full
|
|
1782
|
-
body = perform_request('
|
|
1950
|
+
body = perform_request('api/v1/admin/list-users-full')
|
|
1783
1951
|
json_body = JSON.parse body
|
|
1784
1952
|
check_status json_body
|
|
1785
1953
|
ret = {}
|
|
@@ -1803,7 +1971,7 @@ module Comet
|
|
|
1803
1971
|
#
|
|
1804
1972
|
# @return [Comet::ServerConfigOptionsBrandingFragment]
|
|
1805
1973
|
def admin_meta_branding_config_get
|
|
1806
|
-
body = perform_request('
|
|
1974
|
+
body = perform_request('api/v1/admin/meta/branding-config/get')
|
|
1807
1975
|
json_body = JSON.parse body
|
|
1808
1976
|
check_status json_body
|
|
1809
1977
|
ret = Comet::ServerConfigOptionsBrandingFragment.new
|
|
@@ -1823,11 +1991,11 @@ module Comet
|
|
|
1823
1991
|
# @return [Comet::CometAPIResponseMessage]
|
|
1824
1992
|
def admin_meta_branding_config_set(branding_config)
|
|
1825
1993
|
submit_params = {}
|
|
1826
|
-
raise TypeError 'expected Comet::BrandingOptions
|
|
1994
|
+
raise TypeError "'branding_config' expected Comet::BrandingOptions, got #{branding_config.class}" unless branding_config.is_a? Comet::BrandingOptions
|
|
1827
1995
|
|
|
1828
1996
|
submit_params['BrandingConfig'] = branding_config.to_json
|
|
1829
1997
|
|
|
1830
|
-
body = perform_request('
|
|
1998
|
+
body = perform_request('api/v1/admin/meta/branding-config/set', submit_params)
|
|
1831
1999
|
json_body = JSON.parse body
|
|
1832
2000
|
check_status json_body
|
|
1833
2001
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -1844,7 +2012,7 @@ module Comet
|
|
|
1844
2012
|
#
|
|
1845
2013
|
# @return [Comet::ServerConfigOptionsSoftwareBuildRoleFragment]
|
|
1846
2014
|
def admin_meta_build_config_get
|
|
1847
|
-
body = perform_request('
|
|
2015
|
+
body = perform_request('api/v1/admin/meta/build-config/get')
|
|
1848
2016
|
json_body = JSON.parse body
|
|
1849
2017
|
check_status json_body
|
|
1850
2018
|
ret = Comet::ServerConfigOptionsSoftwareBuildRoleFragment.new
|
|
@@ -1863,11 +2031,11 @@ module Comet
|
|
|
1863
2031
|
# @return [Comet::CometAPIResponseMessage]
|
|
1864
2032
|
def admin_meta_build_config_set(software_build_role_config)
|
|
1865
2033
|
submit_params = {}
|
|
1866
|
-
raise TypeError 'expected Comet::SoftwareBuildRoleOptions
|
|
2034
|
+
raise TypeError "'software_build_role_config' expected Comet::SoftwareBuildRoleOptions, got #{software_build_role_config.class}" unless software_build_role_config.is_a? Comet::SoftwareBuildRoleOptions
|
|
1867
2035
|
|
|
1868
2036
|
submit_params['SoftwareBuildRoleConfig'] = software_build_role_config.to_json
|
|
1869
2037
|
|
|
1870
|
-
body = perform_request('
|
|
2038
|
+
body = perform_request('api/v1/admin/meta/build-config/set', submit_params)
|
|
1871
2039
|
json_body = JSON.parse body
|
|
1872
2040
|
check_status json_body
|
|
1873
2041
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -1880,10 +2048,11 @@ module Comet
|
|
|
1880
2048
|
# Get log files.
|
|
1881
2049
|
#
|
|
1882
2050
|
# You must supply administrator authentication credentials to use this API.
|
|
2051
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
1883
2052
|
#
|
|
1884
2053
|
# @return [Array<Number>]
|
|
1885
2054
|
def admin_meta_list_available_log_days
|
|
1886
|
-
body = perform_request('
|
|
2055
|
+
body = perform_request('api/v1/admin/meta/list-available-log-days')
|
|
1887
2056
|
json_body = JSON.parse body
|
|
1888
2057
|
check_status json_body
|
|
1889
2058
|
if json_body.nil?
|
|
@@ -1891,6 +2060,8 @@ module Comet
|
|
|
1891
2060
|
else
|
|
1892
2061
|
ret = Array.new(json_body.length)
|
|
1893
2062
|
json_body.each_with_index do |v, i|
|
|
2063
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
2064
|
+
|
|
1894
2065
|
ret[i] = v
|
|
1895
2066
|
end
|
|
1896
2067
|
end
|
|
@@ -1904,14 +2075,17 @@ module Comet
|
|
|
1904
2075
|
# This API does not automatically convert line endings; around the 18.3.2 timeframe, log content may even contain mixed line-endings.
|
|
1905
2076
|
#
|
|
1906
2077
|
# You must supply administrator authentication credentials to use this API.
|
|
2078
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
1907
2079
|
#
|
|
1908
2080
|
# @param [Number] log A log day, selected from the options returned by the Get Log Files API
|
|
1909
2081
|
# @return [String]
|
|
1910
2082
|
def admin_meta_read_logs(log)
|
|
1911
2083
|
submit_params = {}
|
|
2084
|
+
raise TypeError "'log' expected Numeric, got #{log.class}" unless log.is_a? Numeric
|
|
2085
|
+
|
|
1912
2086
|
submit_params['Log'] = log
|
|
1913
2087
|
|
|
1914
|
-
perform_request('
|
|
2088
|
+
perform_request('api/v1/admin/meta/read-logs', submit_params)
|
|
1915
2089
|
end
|
|
1916
2090
|
|
|
1917
2091
|
# AdminMetaRemoteStorageVaultGet
|
|
@@ -1923,7 +2097,7 @@ module Comet
|
|
|
1923
2097
|
#
|
|
1924
2098
|
# @return [Array<Comet::RemoteStorageOption>]
|
|
1925
2099
|
def admin_meta_remote_storage_vault_get
|
|
1926
|
-
body = perform_request('
|
|
2100
|
+
body = perform_request('api/v1/admin/meta/remote-storage-vault/get')
|
|
1927
2101
|
json_body = JSON.parse body
|
|
1928
2102
|
check_status json_body
|
|
1929
2103
|
if json_body.nil?
|
|
@@ -1949,11 +2123,11 @@ module Comet
|
|
|
1949
2123
|
# @return [Comet::CometAPIResponseMessage]
|
|
1950
2124
|
def admin_meta_remote_storage_vault_set(remote_storage_options)
|
|
1951
2125
|
submit_params = {}
|
|
1952
|
-
raise TypeError 'expected
|
|
2126
|
+
raise TypeError "'remote_storage_options' expected Array, got #{remote_storage_options.class}" unless remote_storage_options.is_a? Array
|
|
1953
2127
|
|
|
1954
2128
|
submit_params['RemoteStorageOptions'] = remote_storage_options.to_json
|
|
1955
2129
|
|
|
1956
|
-
body = perform_request('
|
|
2130
|
+
body = perform_request('api/v1/admin/meta/remote-storage-vault/set', submit_params)
|
|
1957
2131
|
json_body = JSON.parse body
|
|
1958
2132
|
check_status json_body
|
|
1959
2133
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -1972,11 +2146,11 @@ module Comet
|
|
|
1972
2146
|
# @return [String]
|
|
1973
2147
|
def admin_meta_resource_get(hash)
|
|
1974
2148
|
submit_params = {}
|
|
1975
|
-
raise TypeError 'expected
|
|
2149
|
+
raise TypeError "'hash' expected String, got #{hash.class}" unless hash.is_a? String
|
|
1976
2150
|
|
|
1977
2151
|
submit_params['Hash'] = hash
|
|
1978
2152
|
|
|
1979
|
-
perform_request('
|
|
2153
|
+
perform_request('api/v1/admin/meta/resource/get', submit_params)
|
|
1980
2154
|
end
|
|
1981
2155
|
|
|
1982
2156
|
# AdminMetaRestartService
|
|
@@ -1987,11 +2161,12 @@ module Comet
|
|
|
1987
2161
|
# 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.
|
|
1988
2162
|
#
|
|
1989
2163
|
# You must supply administrator authentication credentials to use this API.
|
|
2164
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
1990
2165
|
# Access to this API may be prevented on a per-administrator basis.
|
|
1991
2166
|
#
|
|
1992
2167
|
# @return [Comet::CometAPIResponseMessage]
|
|
1993
2168
|
def admin_meta_restart_service
|
|
1994
|
-
body = perform_request('
|
|
2169
|
+
body = perform_request('api/v1/admin/meta/restart-service')
|
|
1995
2170
|
json_body = JSON.parse body
|
|
1996
2171
|
check_status json_body
|
|
1997
2172
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2005,6 +2180,7 @@ module Comet
|
|
|
2005
2180
|
# This allows the Comet Server web interface to support testing different email credentials during setup.
|
|
2006
2181
|
#
|
|
2007
2182
|
# You must supply administrator authentication credentials to use this API.
|
|
2183
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
2008
2184
|
# Access to this API may be prevented on a per-administrator basis.
|
|
2009
2185
|
#
|
|
2010
2186
|
# @param [Comet::EmailOptions] email_options Updated configuration content
|
|
@@ -2012,14 +2188,14 @@ module Comet
|
|
|
2012
2188
|
# @return [Comet::CometAPIResponseMessage]
|
|
2013
2189
|
def admin_meta_send_test_email(email_options, recipient)
|
|
2014
2190
|
submit_params = {}
|
|
2015
|
-
raise TypeError 'expected Comet::EmailOptions
|
|
2191
|
+
raise TypeError "'email_options' expected Comet::EmailOptions, got #{email_options.class}" unless email_options.is_a? Comet::EmailOptions
|
|
2016
2192
|
|
|
2017
2193
|
submit_params['EmailOptions'] = email_options.to_json
|
|
2018
|
-
raise TypeError 'expected
|
|
2194
|
+
raise TypeError "'recipient' expected String, got #{recipient.class}" unless recipient.is_a? String
|
|
2019
2195
|
|
|
2020
2196
|
submit_params['Recipient'] = recipient
|
|
2021
2197
|
|
|
2022
|
-
body = perform_request('
|
|
2198
|
+
body = perform_request('api/v1/admin/meta/send-test-email', submit_params)
|
|
2023
2199
|
json_body = JSON.parse body
|
|
2024
2200
|
check_status json_body
|
|
2025
2201
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2033,10 +2209,11 @@ module Comet
|
|
|
2033
2209
|
#
|
|
2034
2210
|
# You must supply administrator authentication credentials to use this API.
|
|
2035
2211
|
# Access to this API may be prevented on a per-administrator basis.
|
|
2212
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
2036
2213
|
#
|
|
2037
2214
|
# @return [Comet::ServerConfigOptions]
|
|
2038
2215
|
def admin_meta_server_config_get
|
|
2039
|
-
body = perform_request('
|
|
2216
|
+
body = perform_request('api/v1/admin/meta/server-config/get')
|
|
2040
2217
|
json_body = JSON.parse body
|
|
2041
2218
|
check_status json_body
|
|
2042
2219
|
ret = Comet::ServerConfigOptions.new
|
|
@@ -2051,10 +2228,11 @@ module Comet
|
|
|
2051
2228
|
#
|
|
2052
2229
|
# You must supply administrator authentication credentials to use this API.
|
|
2053
2230
|
# Access to this API may be prevented on a per-administrator basis.
|
|
2231
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
2054
2232
|
#
|
|
2055
2233
|
# @return [Array<String>]
|
|
2056
2234
|
def admin_meta_server_config_network_interfaces
|
|
2057
|
-
body = perform_request('
|
|
2235
|
+
body = perform_request('api/v1/admin/meta/server-config/network-interfaces')
|
|
2058
2236
|
json_body = JSON.parse body
|
|
2059
2237
|
check_status json_body
|
|
2060
2238
|
if json_body.nil?
|
|
@@ -2062,7 +2240,7 @@ module Comet
|
|
|
2062
2240
|
else
|
|
2063
2241
|
ret = Array.new(json_body.length)
|
|
2064
2242
|
json_body.each_with_index do |v, i|
|
|
2065
|
-
raise TypeError 'expected
|
|
2243
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
2066
2244
|
|
|
2067
2245
|
ret[i] = v
|
|
2068
2246
|
end
|
|
@@ -2079,16 +2257,17 @@ module Comet
|
|
|
2079
2257
|
#
|
|
2080
2258
|
# You must supply administrator authentication credentials to use this API.
|
|
2081
2259
|
# Access to this API may be prevented on a per-administrator basis.
|
|
2260
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
2082
2261
|
#
|
|
2083
2262
|
# @param [Comet::ServerConfigOptions] config Updated configuration content
|
|
2084
2263
|
# @return [Comet::CometAPIResponseMessage]
|
|
2085
2264
|
def admin_meta_server_config_set(config)
|
|
2086
2265
|
submit_params = {}
|
|
2087
|
-
raise TypeError 'expected Comet::ServerConfigOptions
|
|
2266
|
+
raise TypeError "'config' expected Comet::ServerConfigOptions, got #{config.class}" unless config.is_a? Comet::ServerConfigOptions
|
|
2088
2267
|
|
|
2089
2268
|
submit_params['Config'] = config.to_json
|
|
2090
2269
|
|
|
2091
|
-
body = perform_request('
|
|
2270
|
+
body = perform_request('api/v1/admin/meta/server-config/set', submit_params)
|
|
2092
2271
|
json_body = JSON.parse body
|
|
2093
2272
|
check_status json_body
|
|
2094
2273
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2104,11 +2283,12 @@ module Comet
|
|
|
2104
2283
|
# 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.
|
|
2105
2284
|
#
|
|
2106
2285
|
# You must supply administrator authentication credentials to use this API.
|
|
2286
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
2107
2287
|
# Access to this API may be prevented on a per-administrator basis.
|
|
2108
2288
|
#
|
|
2109
2289
|
# @return [Comet::CometAPIResponseMessage]
|
|
2110
2290
|
def admin_meta_shutdown_service
|
|
2111
|
-
body = perform_request('
|
|
2291
|
+
body = perform_request('api/v1/admin/meta/shutdown-service')
|
|
2112
2292
|
json_body = JSON.parse body
|
|
2113
2293
|
check_status json_body
|
|
2114
2294
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2124,7 +2304,7 @@ module Comet
|
|
|
2124
2304
|
#
|
|
2125
2305
|
# @return [Comet::SoftwareUpdateNewsResponse]
|
|
2126
2306
|
def admin_meta_software_update_news
|
|
2127
|
-
body = perform_request('
|
|
2307
|
+
body = perform_request('api/v1/admin/meta/software-update-news')
|
|
2128
2308
|
json_body = JSON.parse body
|
|
2129
2309
|
check_status json_body
|
|
2130
2310
|
ret = Comet::SoftwareUpdateNewsResponse.new
|
|
@@ -2145,7 +2325,7 @@ module Comet
|
|
|
2145
2325
|
submit_params = {}
|
|
2146
2326
|
submit_params['Simple'] = (simple ? 1 : 0)
|
|
2147
2327
|
|
|
2148
|
-
body = perform_request('
|
|
2328
|
+
body = perform_request('api/v1/admin/meta/stats', submit_params)
|
|
2149
2329
|
json_body = JSON.parse body
|
|
2150
2330
|
check_status json_body
|
|
2151
2331
|
ret = {}
|
|
@@ -2169,7 +2349,7 @@ module Comet
|
|
|
2169
2349
|
#
|
|
2170
2350
|
# @return [Comet::ServerMetaVersionInfo]
|
|
2171
2351
|
def admin_meta_version
|
|
2172
|
-
body = perform_request('
|
|
2352
|
+
body = perform_request('api/v1/admin/meta/version')
|
|
2173
2353
|
json_body = JSON.parse body
|
|
2174
2354
|
check_status json_body
|
|
2175
2355
|
ret = Comet::ServerMetaVersionInfo.new
|
|
@@ -2185,7 +2365,7 @@ module Comet
|
|
|
2185
2365
|
#
|
|
2186
2366
|
# @return [Hash{String => Comet::WebhookOption}]
|
|
2187
2367
|
def admin_meta_webhook_options_get
|
|
2188
|
-
body = perform_request('
|
|
2368
|
+
body = perform_request('api/v1/admin/meta/webhook-options/get')
|
|
2189
2369
|
json_body = JSON.parse body
|
|
2190
2370
|
check_status json_body
|
|
2191
2371
|
ret = {}
|
|
@@ -2207,15 +2387,15 @@ module Comet
|
|
|
2207
2387
|
#
|
|
2208
2388
|
# You must supply administrator authentication credentials to use this API.
|
|
2209
2389
|
#
|
|
2210
|
-
# @param [Hash{String => Comet::WebhookOption}] webhook_options
|
|
2390
|
+
# @param [Hash{String => Comet::WebhookOption}] webhook_options The replacement webhook target options.
|
|
2211
2391
|
# @return [Comet::CometAPIResponseMessage]
|
|
2212
2392
|
def admin_meta_webhook_options_set(webhook_options)
|
|
2213
2393
|
submit_params = {}
|
|
2214
|
-
raise TypeError 'expected
|
|
2394
|
+
raise TypeError "'webhook_options' expected Hash, got #{webhook_options.class}" unless webhook_options.is_a? Hash
|
|
2215
2395
|
|
|
2216
2396
|
submit_params['WebhookOptions'] = webhook_options.to_json
|
|
2217
2397
|
|
|
2218
|
-
body = perform_request('
|
|
2398
|
+
body = perform_request('api/v1/admin/meta/webhook-options/set', submit_params)
|
|
2219
2399
|
json_body = JSON.parse body
|
|
2220
2400
|
check_status json_body
|
|
2221
2401
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2232,7 +2412,7 @@ module Comet
|
|
|
2232
2412
|
#
|
|
2233
2413
|
# @return [Hash{String => Comet::NewsEntry}]
|
|
2234
2414
|
def admin_news_get_all
|
|
2235
|
-
body = perform_request('
|
|
2415
|
+
body = perform_request('api/v1/admin/news/get-all')
|
|
2236
2416
|
json_body = JSON.parse body
|
|
2237
2417
|
check_status json_body
|
|
2238
2418
|
ret = {}
|
|
@@ -2258,11 +2438,11 @@ module Comet
|
|
|
2258
2438
|
# @return [Comet::CometAPIResponseMessage]
|
|
2259
2439
|
def admin_news_remove(news_item)
|
|
2260
2440
|
submit_params = {}
|
|
2261
|
-
raise TypeError 'expected
|
|
2441
|
+
raise TypeError "'news_item' expected String, got #{news_item.class}" unless news_item.is_a? String
|
|
2262
2442
|
|
|
2263
2443
|
submit_params['NewsItem'] = news_item
|
|
2264
2444
|
|
|
2265
|
-
body = perform_request('
|
|
2445
|
+
body = perform_request('api/v1/admin/news/remove', submit_params)
|
|
2266
2446
|
json_body = JSON.parse body
|
|
2267
2447
|
check_status json_body
|
|
2268
2448
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2281,11 +2461,11 @@ module Comet
|
|
|
2281
2461
|
# @return [Comet::CometAPIResponseMessage]
|
|
2282
2462
|
def admin_news_submit(news_content)
|
|
2283
2463
|
submit_params = {}
|
|
2284
|
-
raise TypeError 'expected
|
|
2464
|
+
raise TypeError "'news_content' expected String, got #{news_content.class}" unless news_content.is_a? String
|
|
2285
2465
|
|
|
2286
2466
|
submit_params['NewsContent'] = news_content
|
|
2287
2467
|
|
|
2288
|
-
body = perform_request('
|
|
2468
|
+
body = perform_request('api/v1/admin/news/submit', submit_params)
|
|
2289
2469
|
json_body = JSON.parse body
|
|
2290
2470
|
check_status json_body
|
|
2291
2471
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2293,6 +2473,92 @@ module Comet
|
|
|
2293
2473
|
ret
|
|
2294
2474
|
end
|
|
2295
2475
|
|
|
2476
|
+
# AdminOrganizationDelete
|
|
2477
|
+
#
|
|
2478
|
+
# Delete an organization and all related users.
|
|
2479
|
+
#
|
|
2480
|
+
# You must supply administrator authentication credentials to use this API.
|
|
2481
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
2482
|
+
#
|
|
2483
|
+
# @param [String] organization_id (Optional) (No description available)
|
|
2484
|
+
# @param [Comet::UninstallConfig] uninstall_config (Optional) Uninstall software configuration
|
|
2485
|
+
# @return [Comet::OrganizationResponse]
|
|
2486
|
+
def admin_organization_delete(organization_id = nil, uninstall_config = nil)
|
|
2487
|
+
submit_params = {}
|
|
2488
|
+
unless organization_id.nil?
|
|
2489
|
+
raise TypeError "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
|
|
2490
|
+
|
|
2491
|
+
submit_params['OrganizationID'] = organization_id
|
|
2492
|
+
end
|
|
2493
|
+
unless uninstall_config.nil?
|
|
2494
|
+
raise TypeError "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
|
|
2495
|
+
|
|
2496
|
+
submit_params['UninstallConfig'] = uninstall_config.to_json
|
|
2497
|
+
end
|
|
2498
|
+
|
|
2499
|
+
body = perform_request('api/v1/admin/organization/delete', submit_params)
|
|
2500
|
+
json_body = JSON.parse body
|
|
2501
|
+
check_status json_body
|
|
2502
|
+
ret = Comet::OrganizationResponse.new
|
|
2503
|
+
ret.from_hash(json_body)
|
|
2504
|
+
ret
|
|
2505
|
+
end
|
|
2506
|
+
|
|
2507
|
+
# AdminOrganizationList
|
|
2508
|
+
#
|
|
2509
|
+
# List Organizations.
|
|
2510
|
+
#
|
|
2511
|
+
# You must supply administrator authentication credentials to use this API.
|
|
2512
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
2513
|
+
#
|
|
2514
|
+
# @return [Hash{String => Comet::Organization}]
|
|
2515
|
+
def admin_organization_list
|
|
2516
|
+
body = perform_request('api/v1/admin/organization/list')
|
|
2517
|
+
json_body = JSON.parse body
|
|
2518
|
+
check_status json_body
|
|
2519
|
+
ret = {}
|
|
2520
|
+
if json_body.nil?
|
|
2521
|
+
ret = {}
|
|
2522
|
+
else
|
|
2523
|
+
json_body.each do |k, v|
|
|
2524
|
+
ret[k] = Comet::Organization.new
|
|
2525
|
+
ret[k].from_hash(v)
|
|
2526
|
+
end
|
|
2527
|
+
end
|
|
2528
|
+
ret
|
|
2529
|
+
end
|
|
2530
|
+
|
|
2531
|
+
# AdminOrganizationSet
|
|
2532
|
+
#
|
|
2533
|
+
# Create or Update an Organization.
|
|
2534
|
+
#
|
|
2535
|
+
# You must supply administrator authentication credentials to use this API.
|
|
2536
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
2537
|
+
#
|
|
2538
|
+
# @param [String] organization_id (Optional) (No description available)
|
|
2539
|
+
# @param [Comet::Organization] organization (Optional) (No description available)
|
|
2540
|
+
# @return [Comet::OrganizationResponse]
|
|
2541
|
+
def admin_organization_set(organization_id = nil, organization = nil)
|
|
2542
|
+
submit_params = {}
|
|
2543
|
+
unless organization_id.nil?
|
|
2544
|
+
raise TypeError "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
|
|
2545
|
+
|
|
2546
|
+
submit_params['OrganizationID'] = organization_id
|
|
2547
|
+
end
|
|
2548
|
+
unless organization.nil?
|
|
2549
|
+
raise TypeError "'organization' expected Comet::Organization, got #{organization.class}" unless organization.is_a? Comet::Organization
|
|
2550
|
+
|
|
2551
|
+
submit_params['Organization'] = organization.to_json
|
|
2552
|
+
end
|
|
2553
|
+
|
|
2554
|
+
body = perform_request('api/v1/admin/organization/set', submit_params)
|
|
2555
|
+
json_body = JSON.parse body
|
|
2556
|
+
check_status json_body
|
|
2557
|
+
ret = Comet::OrganizationResponse.new
|
|
2558
|
+
ret.from_hash(json_body)
|
|
2559
|
+
ret
|
|
2560
|
+
end
|
|
2561
|
+
|
|
2296
2562
|
# AdminPoliciesDelete
|
|
2297
2563
|
#
|
|
2298
2564
|
# Delete an existing policy object.
|
|
@@ -2304,11 +2570,11 @@ module Comet
|
|
|
2304
2570
|
# @return [Comet::CometAPIResponseMessage]
|
|
2305
2571
|
def admin_policies_delete(policy_id)
|
|
2306
2572
|
submit_params = {}
|
|
2307
|
-
raise TypeError 'expected
|
|
2573
|
+
raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
|
|
2308
2574
|
|
|
2309
2575
|
submit_params['PolicyID'] = policy_id
|
|
2310
2576
|
|
|
2311
|
-
body = perform_request('
|
|
2577
|
+
body = perform_request('api/v1/admin/policies/delete', submit_params)
|
|
2312
2578
|
json_body = JSON.parse body
|
|
2313
2579
|
check_status json_body
|
|
2314
2580
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2328,11 +2594,11 @@ module Comet
|
|
|
2328
2594
|
# @return [Comet::GetGroupPolicyResponse]
|
|
2329
2595
|
def admin_policies_get(policy_id)
|
|
2330
2596
|
submit_params = {}
|
|
2331
|
-
raise TypeError 'expected
|
|
2597
|
+
raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
|
|
2332
2598
|
|
|
2333
2599
|
submit_params['PolicyID'] = policy_id
|
|
2334
2600
|
|
|
2335
|
-
body = perform_request('
|
|
2601
|
+
body = perform_request('api/v1/admin/policies/get', submit_params)
|
|
2336
2602
|
json_body = JSON.parse body
|
|
2337
2603
|
check_status json_body
|
|
2338
2604
|
ret = Comet::GetGroupPolicyResponse.new
|
|
@@ -2349,7 +2615,7 @@ module Comet
|
|
|
2349
2615
|
#
|
|
2350
2616
|
# @return [Hash{String => String}]
|
|
2351
2617
|
def admin_policies_list
|
|
2352
|
-
body = perform_request('
|
|
2618
|
+
body = perform_request('api/v1/admin/policies/list')
|
|
2353
2619
|
json_body = JSON.parse body
|
|
2354
2620
|
check_status json_body
|
|
2355
2621
|
ret = {}
|
|
@@ -2357,7 +2623,7 @@ module Comet
|
|
|
2357
2623
|
ret = {}
|
|
2358
2624
|
else
|
|
2359
2625
|
json_body.each do |k, v|
|
|
2360
|
-
raise TypeError 'expected
|
|
2626
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
2361
2627
|
|
|
2362
2628
|
ret[k] = v
|
|
2363
2629
|
end
|
|
@@ -2374,7 +2640,7 @@ module Comet
|
|
|
2374
2640
|
#
|
|
2375
2641
|
# @return [Hash{String => Comet::GroupPolicy}]
|
|
2376
2642
|
def admin_policies_list_full
|
|
2377
|
-
body = perform_request('
|
|
2643
|
+
body = perform_request('api/v1/admin/policies/list-full')
|
|
2378
2644
|
json_body = JSON.parse body
|
|
2379
2645
|
check_status json_body
|
|
2380
2646
|
ret = {}
|
|
@@ -2400,11 +2666,11 @@ module Comet
|
|
|
2400
2666
|
# @return [Comet::CreateGroupPolicyResponse]
|
|
2401
2667
|
def admin_policies_new(policy)
|
|
2402
2668
|
submit_params = {}
|
|
2403
|
-
raise TypeError 'expected Comet::GroupPolicy
|
|
2669
|
+
raise TypeError "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
|
|
2404
2670
|
|
|
2405
2671
|
submit_params['Policy'] = policy.to_json
|
|
2406
2672
|
|
|
2407
|
-
body = perform_request('
|
|
2673
|
+
body = perform_request('api/v1/admin/policies/new', submit_params)
|
|
2408
2674
|
json_body = JSON.parse body
|
|
2409
2675
|
check_status json_body
|
|
2410
2676
|
ret = Comet::CreateGroupPolicyResponse.new
|
|
@@ -2427,19 +2693,19 @@ module Comet
|
|
|
2427
2693
|
# @return [Comet::CometAPIResponseMessage]
|
|
2428
2694
|
def admin_policies_set(policy_id, policy, check_policy_hash = nil)
|
|
2429
2695
|
submit_params = {}
|
|
2430
|
-
raise TypeError 'expected
|
|
2696
|
+
raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
|
|
2431
2697
|
|
|
2432
2698
|
submit_params['PolicyID'] = policy_id
|
|
2433
|
-
raise TypeError 'expected Comet::GroupPolicy
|
|
2699
|
+
raise TypeError "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
|
|
2434
2700
|
|
|
2435
2701
|
submit_params['Policy'] = policy.to_json
|
|
2436
2702
|
unless check_policy_hash.nil?
|
|
2437
|
-
raise TypeError 'expected
|
|
2703
|
+
raise TypeError "'check_policy_hash' expected String, got #{check_policy_hash.class}" unless check_policy_hash.is_a? String
|
|
2438
2704
|
|
|
2439
2705
|
submit_params['CheckPolicyHash'] = check_policy_hash
|
|
2440
2706
|
end
|
|
2441
2707
|
|
|
2442
|
-
body = perform_request('
|
|
2708
|
+
body = perform_request('api/v1/admin/policies/set', submit_params)
|
|
2443
2709
|
json_body = JSON.parse body
|
|
2444
2710
|
check_status json_body
|
|
2445
2711
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2460,19 +2726,19 @@ module Comet
|
|
|
2460
2726
|
# @return [Comet::EmailReportGeneratedPreview]
|
|
2461
2727
|
def admin_preview_user_email_report(target_user, email_report_config, email_address = nil)
|
|
2462
2728
|
submit_params = {}
|
|
2463
|
-
raise TypeError 'expected
|
|
2729
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
2464
2730
|
|
|
2465
2731
|
submit_params['TargetUser'] = target_user
|
|
2466
|
-
raise TypeError 'expected Comet::EmailReportConfig
|
|
2732
|
+
raise TypeError "'email_report_config' expected Comet::EmailReportConfig, got #{email_report_config.class}" unless email_report_config.is_a? Comet::EmailReportConfig
|
|
2467
2733
|
|
|
2468
2734
|
submit_params['EmailReportConfig'] = email_report_config.to_json
|
|
2469
2735
|
unless email_address.nil?
|
|
2470
|
-
raise TypeError 'expected
|
|
2736
|
+
raise TypeError "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
|
|
2471
2737
|
|
|
2472
2738
|
submit_params['EmailAddress'] = email_address
|
|
2473
2739
|
end
|
|
2474
2740
|
|
|
2475
|
-
body = perform_request('
|
|
2741
|
+
body = perform_request('api/v1/admin/preview-user-email-report', submit_params)
|
|
2476
2742
|
json_body = JSON.parse body
|
|
2477
2743
|
check_status json_body
|
|
2478
2744
|
ret = Comet::EmailReportGeneratedPreview.new
|
|
@@ -2485,10 +2751,11 @@ module Comet
|
|
|
2485
2751
|
# Get Replication status.
|
|
2486
2752
|
#
|
|
2487
2753
|
# You must supply administrator authentication credentials to use this API.
|
|
2754
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
2488
2755
|
#
|
|
2489
2756
|
# @return [Array<Comet::ReplicatorStateAPIResponse>]
|
|
2490
2757
|
def admin_replication_state
|
|
2491
|
-
body = perform_request('
|
|
2758
|
+
body = perform_request('api/v1/admin/replication/state')
|
|
2492
2759
|
json_body = JSON.parse body
|
|
2493
2760
|
check_status json_body
|
|
2494
2761
|
if json_body.nil?
|
|
@@ -2518,21 +2785,21 @@ module Comet
|
|
|
2518
2785
|
# @return [Comet::RequestStorageVaultResponseMessage]
|
|
2519
2786
|
def admin_request_storage_vault(target_user, storage_provider, self_address = nil)
|
|
2520
2787
|
submit_params = {}
|
|
2521
|
-
raise TypeError 'expected
|
|
2788
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
2522
2789
|
|
|
2523
2790
|
submit_params['TargetUser'] = target_user
|
|
2524
|
-
raise TypeError 'expected
|
|
2791
|
+
raise TypeError "'storage_provider' expected String, got #{storage_provider.class}" unless storage_provider.is_a? String
|
|
2525
2792
|
|
|
2526
2793
|
submit_params['StorageProvider'] = storage_provider
|
|
2527
2794
|
if self_address.nil?
|
|
2528
2795
|
submit_params['SelfAddress'] = @server_address
|
|
2529
2796
|
else
|
|
2530
|
-
raise TypeError 'expected
|
|
2797
|
+
raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
|
2531
2798
|
|
|
2532
2799
|
submit_params['SelfAddress'] = self_address
|
|
2533
2800
|
end
|
|
2534
2801
|
|
|
2535
|
-
body = perform_request('
|
|
2802
|
+
body = perform_request('api/v1/admin/request-storage-vault', submit_params)
|
|
2536
2803
|
json_body = JSON.parse body
|
|
2537
2804
|
check_status json_body
|
|
2538
2805
|
ret = Comet::RequestStorageVaultResponseMessage.new
|
|
@@ -2549,7 +2816,7 @@ module Comet
|
|
|
2549
2816
|
#
|
|
2550
2817
|
# @return [Hash{String => String}]
|
|
2551
2818
|
def admin_request_storage_vault_providers
|
|
2552
|
-
body = perform_request('
|
|
2819
|
+
body = perform_request('api/v1/admin/request-storage-vault-providers')
|
|
2553
2820
|
json_body = JSON.parse body
|
|
2554
2821
|
check_status json_body
|
|
2555
2822
|
ret = {}
|
|
@@ -2557,7 +2824,7 @@ module Comet
|
|
|
2557
2824
|
ret = {}
|
|
2558
2825
|
else
|
|
2559
2826
|
json_body.each do |k, v|
|
|
2560
|
-
raise TypeError 'expected
|
|
2827
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
2561
2828
|
|
|
2562
2829
|
ret[k] = v
|
|
2563
2830
|
end
|
|
@@ -2579,17 +2846,17 @@ module Comet
|
|
|
2579
2846
|
# @return [Comet::CometAPIResponseMessage]
|
|
2580
2847
|
def admin_reset_user_password(target_user, new_password, old_password)
|
|
2581
2848
|
submit_params = {}
|
|
2582
|
-
raise TypeError 'expected
|
|
2849
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
2583
2850
|
|
|
2584
2851
|
submit_params['TargetUser'] = target_user
|
|
2585
|
-
raise TypeError 'expected
|
|
2852
|
+
raise TypeError "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String
|
|
2586
2853
|
|
|
2587
2854
|
submit_params['NewPassword'] = new_password
|
|
2588
|
-
raise TypeError 'expected
|
|
2855
|
+
raise TypeError "'old_password' expected String, got #{old_password.class}" unless old_password.is_a? String
|
|
2589
2856
|
|
|
2590
2857
|
submit_params['OldPassword'] = old_password
|
|
2591
2858
|
|
|
2592
|
-
body = perform_request('
|
|
2859
|
+
body = perform_request('api/v1/admin/reset-user-password', submit_params)
|
|
2593
2860
|
json_body = JSON.parse body
|
|
2594
2861
|
check_status json_body
|
|
2595
2862
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2610,14 +2877,14 @@ module Comet
|
|
|
2610
2877
|
# @return [Comet::CometAPIResponseMessage]
|
|
2611
2878
|
def admin_revoke_device(target_user, target_device)
|
|
2612
2879
|
submit_params = {}
|
|
2613
|
-
raise TypeError 'expected
|
|
2880
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
2614
2881
|
|
|
2615
2882
|
submit_params['TargetUser'] = target_user
|
|
2616
|
-
raise TypeError 'expected
|
|
2883
|
+
raise TypeError "'target_device' expected String, got #{target_device.class}" unless target_device.is_a? String
|
|
2617
2884
|
|
|
2618
2885
|
submit_params['TargetDevice'] = target_device
|
|
2619
2886
|
|
|
2620
|
-
body = perform_request('
|
|
2887
|
+
body = perform_request('api/v1/admin/revoke-device', submit_params)
|
|
2621
2888
|
json_body = JSON.parse body
|
|
2622
2889
|
check_status json_body
|
|
2623
2890
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2637,14 +2904,14 @@ module Comet
|
|
|
2637
2904
|
# @return [Comet::CometAPIResponseMessage]
|
|
2638
2905
|
def admin_set_user_profile(target_user, profile_data)
|
|
2639
2906
|
submit_params = {}
|
|
2640
|
-
raise TypeError 'expected
|
|
2907
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
2641
2908
|
|
|
2642
2909
|
submit_params['TargetUser'] = target_user
|
|
2643
|
-
raise TypeError 'expected Comet::UserProfileConfig
|
|
2910
|
+
raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
|
|
2644
2911
|
|
|
2645
2912
|
submit_params['ProfileData'] = profile_data.to_json
|
|
2646
2913
|
|
|
2647
|
-
body = perform_request('
|
|
2914
|
+
body = perform_request('api/v1/admin/set-user-profile', submit_params)
|
|
2648
2915
|
json_body = JSON.parse body
|
|
2649
2916
|
check_status json_body
|
|
2650
2917
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2667,17 +2934,17 @@ module Comet
|
|
|
2667
2934
|
# @return [Comet::CometAPIResponseMessage]
|
|
2668
2935
|
def admin_set_user_profile_hash(target_user, profile_data, require_hash)
|
|
2669
2936
|
submit_params = {}
|
|
2670
|
-
raise TypeError 'expected
|
|
2937
|
+
raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
2671
2938
|
|
|
2672
2939
|
submit_params['TargetUser'] = target_user
|
|
2673
|
-
raise TypeError 'expected Comet::UserProfileConfig
|
|
2940
|
+
raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
|
|
2674
2941
|
|
|
2675
2942
|
submit_params['ProfileData'] = profile_data.to_json
|
|
2676
|
-
raise TypeError 'expected
|
|
2943
|
+
raise TypeError "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String
|
|
2677
2944
|
|
|
2678
2945
|
submit_params['RequireHash'] = require_hash
|
|
2679
2946
|
|
|
2680
|
-
body = perform_request('
|
|
2947
|
+
body = perform_request('api/v1/admin/set-user-profile-hash', submit_params)
|
|
2681
2948
|
json_body = JSON.parse body
|
|
2682
2949
|
check_status json_body
|
|
2683
2950
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2685,6 +2952,36 @@ module Comet
|
|
|
2685
2952
|
ret
|
|
2686
2953
|
end
|
|
2687
2954
|
|
|
2955
|
+
# AdminStorageBucketProperties
|
|
2956
|
+
#
|
|
2957
|
+
# Retrieve properties for a single bucket.
|
|
2958
|
+
# This API can also be used to refresh the size measurement for a single bucket by passing a valid AfterTimestamp parameter.
|
|
2959
|
+
#
|
|
2960
|
+
# You must supply administrator authentication credentials to use this API.
|
|
2961
|
+
# This API requires the Storage Role to be enabled.
|
|
2962
|
+
#
|
|
2963
|
+
# @param [String] bucket_id Bucket ID
|
|
2964
|
+
# @param [Number] after_timestamp (Optional) Allow a stale size measurement if it is at least as new as the supplied Unix timestamp. Timestamps in the future may produce a result clamped down to the Comet Server's current time. If not present, the size measurement may be arbitrarily stale.
|
|
2965
|
+
# @return [Comet::BucketProperties]
|
|
2966
|
+
def admin_storage_bucket_properties(bucket_id, after_timestamp = nil)
|
|
2967
|
+
submit_params = {}
|
|
2968
|
+
raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
|
|
2969
|
+
|
|
2970
|
+
submit_params['BucketID'] = bucket_id
|
|
2971
|
+
unless after_timestamp.nil?
|
|
2972
|
+
raise TypeError "'after_timestamp' expected Numeric, got #{after_timestamp.class}" unless after_timestamp.is_a? Numeric
|
|
2973
|
+
|
|
2974
|
+
submit_params['AfterTimestamp'] = after_timestamp
|
|
2975
|
+
end
|
|
2976
|
+
|
|
2977
|
+
body = perform_request('api/v1/admin/storage/bucket-properties', submit_params)
|
|
2978
|
+
json_body = JSON.parse body
|
|
2979
|
+
check_status json_body
|
|
2980
|
+
ret = Comet::BucketProperties.new
|
|
2981
|
+
ret.from_hash(json_body)
|
|
2982
|
+
ret
|
|
2983
|
+
end
|
|
2984
|
+
|
|
2688
2985
|
# AdminStorageDeleteBucket
|
|
2689
2986
|
#
|
|
2690
2987
|
# Delete a bucket.
|
|
@@ -2697,11 +2994,11 @@ module Comet
|
|
|
2697
2994
|
# @return [Comet::CometAPIResponseMessage]
|
|
2698
2995
|
def admin_storage_delete_bucket(bucket_id)
|
|
2699
2996
|
submit_params = {}
|
|
2700
|
-
raise TypeError 'expected
|
|
2997
|
+
raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
|
|
2701
2998
|
|
|
2702
2999
|
submit_params['BucketID'] = bucket_id
|
|
2703
3000
|
|
|
2704
|
-
body = perform_request('
|
|
3001
|
+
body = perform_request('api/v1/admin/storage/delete-bucket', submit_params)
|
|
2705
3002
|
json_body = JSON.parse body
|
|
2706
3003
|
check_status json_body
|
|
2707
3004
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2716,16 +3013,19 @@ module Comet
|
|
|
2716
3013
|
# You must supply administrator authentication credentials to use this API.
|
|
2717
3014
|
# Access to this API may be prevented on a per-administrator basis.
|
|
2718
3015
|
# This API requires the Storage Role to be enabled.
|
|
3016
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
2719
3017
|
#
|
|
2720
|
-
# @param [String] bucket_id
|
|
3018
|
+
# @param [String] bucket_id (Optional) (This parameter is not used)
|
|
2721
3019
|
# @return [Comet::StorageFreeSpaceInfo]
|
|
2722
|
-
def admin_storage_free_space(bucket_id)
|
|
3020
|
+
def admin_storage_free_space(bucket_id = nil)
|
|
2723
3021
|
submit_params = {}
|
|
2724
|
-
|
|
3022
|
+
unless bucket_id.nil?
|
|
3023
|
+
raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
|
|
2725
3024
|
|
|
2726
|
-
|
|
3025
|
+
submit_params['BucketID'] = bucket_id
|
|
3026
|
+
end
|
|
2727
3027
|
|
|
2728
|
-
body = perform_request('
|
|
3028
|
+
body = perform_request('api/v1/admin/storage/free-space', submit_params)
|
|
2729
3029
|
json_body = JSON.parse body
|
|
2730
3030
|
check_status json_body
|
|
2731
3031
|
ret = Comet::StorageFreeSpaceInfo.new
|
|
@@ -2742,7 +3042,7 @@ module Comet
|
|
|
2742
3042
|
#
|
|
2743
3043
|
# @return [Hash{String => Comet::BucketProperties}]
|
|
2744
3044
|
def admin_storage_list_buckets
|
|
2745
|
-
body = perform_request('
|
|
3045
|
+
body = perform_request('api/v1/admin/storage/list-buckets')
|
|
2746
3046
|
json_body = JSON.parse body
|
|
2747
3047
|
check_status json_body
|
|
2748
3048
|
ret = {}
|
|
@@ -2769,26 +3069,32 @@ module Comet
|
|
|
2769
3069
|
# @param [String] set_bucket_value (Optional) Bucket ID
|
|
2770
3070
|
# @param [String] set_key_hash_format (Optional) Bucket key hashing format
|
|
2771
3071
|
# @param [String] set_key_hash_value (Optional) Bucket key hash
|
|
3072
|
+
# @param [String] set_organization_id (Optional) Target organization ID (>= 20.9.0)
|
|
2772
3073
|
# @return [Comet::AddBucketResponseMessage]
|
|
2773
|
-
def admin_storage_register_bucket(set_bucket_value = nil, set_key_hash_format = nil, set_key_hash_value = nil)
|
|
3074
|
+
def admin_storage_register_bucket(set_bucket_value = nil, set_key_hash_format = nil, set_key_hash_value = nil, set_organization_id = nil)
|
|
2774
3075
|
submit_params = {}
|
|
2775
3076
|
unless set_bucket_value.nil?
|
|
2776
|
-
raise TypeError 'expected
|
|
3077
|
+
raise TypeError "'set_bucket_value' expected String, got #{set_bucket_value.class}" unless set_bucket_value.is_a? String
|
|
2777
3078
|
|
|
2778
3079
|
submit_params['SetBucketValue'] = set_bucket_value
|
|
2779
3080
|
end
|
|
2780
3081
|
unless set_key_hash_format.nil?
|
|
2781
|
-
raise TypeError 'expected
|
|
3082
|
+
raise TypeError "'set_key_hash_format' expected String, got #{set_key_hash_format.class}" unless set_key_hash_format.is_a? String
|
|
2782
3083
|
|
|
2783
3084
|
submit_params['SetKeyHashFormat'] = set_key_hash_format
|
|
2784
3085
|
end
|
|
2785
3086
|
unless set_key_hash_value.nil?
|
|
2786
|
-
raise TypeError 'expected
|
|
3087
|
+
raise TypeError "'set_key_hash_value' expected String, got #{set_key_hash_value.class}" unless set_key_hash_value.is_a? String
|
|
2787
3088
|
|
|
2788
3089
|
submit_params['SetKeyHashValue'] = set_key_hash_value
|
|
2789
3090
|
end
|
|
3091
|
+
unless set_organization_id.nil?
|
|
3092
|
+
raise TypeError "'set_organization_id' expected String, got #{set_organization_id.class}" unless set_organization_id.is_a? String
|
|
3093
|
+
|
|
3094
|
+
submit_params['SetOrganizationID'] = set_organization_id
|
|
3095
|
+
end
|
|
2790
3096
|
|
|
2791
|
-
body = perform_request('
|
|
3097
|
+
body = perform_request('api/v1/admin/storage/register-bucket', submit_params)
|
|
2792
3098
|
json_body = JSON.parse body
|
|
2793
3099
|
check_status json_body
|
|
2794
3100
|
ret = Comet::AddBucketResponseMessage.new
|
|
@@ -2801,6 +3107,7 @@ module Comet
|
|
|
2801
3107
|
# Start a new software update campaign.
|
|
2802
3108
|
#
|
|
2803
3109
|
# You must supply administrator authentication credentials to use this API.
|
|
3110
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
2804
3111
|
# This API requires the Software Build Role to be enabled.
|
|
2805
3112
|
# This API requires the Auth Role to be enabled.
|
|
2806
3113
|
#
|
|
@@ -2808,11 +3115,11 @@ module Comet
|
|
|
2808
3115
|
# @return [Comet::CometAPIResponseMessage]
|
|
2809
3116
|
def admin_update_campaign_start(options)
|
|
2810
3117
|
submit_params = {}
|
|
2811
|
-
raise TypeError 'expected Comet::UpdateCampaignOptions
|
|
3118
|
+
raise TypeError "'options' expected Comet::UpdateCampaignOptions, got #{options.class}" unless options.is_a? Comet::UpdateCampaignOptions
|
|
2812
3119
|
|
|
2813
3120
|
submit_params['Options'] = options.to_json
|
|
2814
3121
|
|
|
2815
|
-
body = perform_request('
|
|
3122
|
+
body = perform_request('api/v1/admin/update-campaign/start', submit_params)
|
|
2816
3123
|
json_body = JSON.parse body
|
|
2817
3124
|
check_status json_body
|
|
2818
3125
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2825,12 +3132,13 @@ module Comet
|
|
|
2825
3132
|
# Get current campaign status.
|
|
2826
3133
|
#
|
|
2827
3134
|
# You must supply administrator authentication credentials to use this API.
|
|
3135
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
|
2828
3136
|
# This API requires the Software Build Role to be enabled.
|
|
2829
3137
|
# This API requires the Auth Role to be enabled.
|
|
2830
3138
|
#
|
|
2831
3139
|
# @return [Comet::UpdateCampaignStatus]
|
|
2832
3140
|
def admin_update_campaign_status
|
|
2833
|
-
body = perform_request('
|
|
3141
|
+
body = perform_request('api/v1/admin/update-campaign/status')
|
|
2834
3142
|
json_body = JSON.parse body
|
|
2835
3143
|
check_status json_body
|
|
2836
3144
|
ret = Comet::UpdateCampaignStatus.new
|
|
@@ -2846,7 +3154,7 @@ module Comet
|
|
|
2846
3154
|
#
|
|
2847
3155
|
# @return [Comet::SessionKeyRegeneratedResponse]
|
|
2848
3156
|
def hybrid_session_start
|
|
2849
|
-
body = perform_request('
|
|
3157
|
+
body = perform_request('api/v1/hybrid/session/start')
|
|
2850
3158
|
json_body = JSON.parse body
|
|
2851
3159
|
check_status json_body
|
|
2852
3160
|
ret = Comet::SessionKeyRegeneratedResponse.new
|
|
@@ -2863,7 +3171,7 @@ module Comet
|
|
|
2863
3171
|
#
|
|
2864
3172
|
# @return [Comet::CometAPIResponseMessage]
|
|
2865
3173
|
def user_web_session_revoke
|
|
2866
|
-
body = perform_request('
|
|
3174
|
+
body = perform_request('api/v1/user/web/session/revoke')
|
|
2867
3175
|
json_body = JSON.parse body
|
|
2868
3176
|
check_status json_body
|
|
2869
3177
|
ret = Comet::CometAPIResponseMessage.new
|
|
@@ -2880,7 +3188,7 @@ module Comet
|
|
|
2880
3188
|
#
|
|
2881
3189
|
# @return [Comet::SessionKeyRegeneratedResponse]
|
|
2882
3190
|
def user_web_session_start
|
|
2883
|
-
body = perform_request('
|
|
3191
|
+
body = perform_request('api/v1/user/web/session/start')
|
|
2884
3192
|
json_body = JSON.parse body
|
|
2885
3193
|
check_status json_body
|
|
2886
3194
|
ret = Comet::SessionKeyRegeneratedResponse.new
|