skykick 0.2.2 → 0.3.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 +4 -0
- data/README.md +17 -16
- data/lib/skykick/client/alerts.rb +22 -9
- data/lib/skykick/client/backup.rb +83 -36
- data/lib/skykick/version.rb +1 -1
- data/lib/skykick.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a6fddb22533868b7d481dab155eba199d22dc107614b504d7b30b2354a8f125
|
4
|
+
data.tar.gz: 4a91206b72d5ee286aa9bb974e4df2ef82631d26c4c9875c87da0308f82557fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b533bf98a520ca3aff074af183b8889807da2960a319dd4c5cf007491d4f49da0c15190671aeb11ccfc1c55842078453e0498f1d87271c8c28b81ea2cecca5d6
|
7
|
+
data.tar.gz: a1ba2fb65958104c88f603c893695b5d1f0c62081b578ec3a372c0e63da5f20db06b33fd29356c2025ad22e19a0d0f06679f040bc01a09191333ea69876e90f8
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -7,7 +7,8 @@
|
|
7
7
|
This is a wrapper for the Skykick Office365 backup API.
|
8
8
|
You can see the [API endpoints](https://developers.skykick.com/apis)
|
9
9
|
|
10
|
-
Currently only the GET requests to endpoints /Backup and /Alerts
|
10
|
+
Currently only the GET requests to endpoints /Backup and /Alerts
|
11
|
+
are implemented (readonly).
|
11
12
|
|
12
13
|
## Installation
|
13
14
|
|
@@ -31,8 +32,8 @@ Or install it yourself as:
|
|
31
32
|
|
32
33
|
## Usage
|
33
34
|
|
34
|
-
Before you start making the requests to API provide the client id and client secret
|
35
|
-
email/password using the configuration wrapping.
|
35
|
+
Before you start making the requests to API provide the client id and client secret
|
36
|
+
and email/password using the configuration wrapping.
|
36
37
|
|
37
38
|
```ruby
|
38
39
|
require 'skykick'
|
@@ -63,7 +64,7 @@ client.login
|
|
63
64
|
|
64
65
|
|Resource|API endpoint|
|
65
66
|
|:--|:--|
|
66
|
-
|.auth_token or .login|https://apis.
|
67
|
+
|.auth_token or .login|https://apis.cloudservices.connectwise.com/auth/token|
|
67
68
|
|
68
69
|
### Backup
|
69
70
|
|
@@ -75,18 +76,18 @@ subscriptions = client.subscriptions
|
|
75
76
|
|
76
77
|
|Resource|API endpoint|
|
77
78
|
|:--|:--|
|
78
|
-
|autodiscover
|
79
|
-
|datacenters
|
80
|
-
|exchange_mailboxe
|
81
|
-
|exchange_mailboxes
|
82
|
-
|lastsnapshotstats
|
83
|
-
|retention_periods
|
84
|
-
|sharePoint_sites
|
85
|
-
|sku
|
86
|
-
|storage_settings
|
87
|
-
|subscription_settings
|
88
|
-
|subscriptions
|
89
|
-
|partner_subscriptions(partner_id)|https://apis.
|
79
|
+
|autodiscover |https://apis.cloudservices.connectwise.com/Backup/{id}/autodiscover|
|
80
|
+
|datacenters |https://apis.cloudservices.connectwise.com/Backup/datacenters|
|
81
|
+
|exchange_mailboxe |https://apis.cloudservices.connectwise.com/Backup/{id}/mailboxes/{mailboxId}|
|
82
|
+
|exchange_mailboxes |https://apis.cloudservices.connectwise.com/Backup/{id}/mailboxes|
|
83
|
+
|lastsnapshotstats |https://apis.cloudservices.connectwise.com/Backup/{backupServiceId}/lastsnapshotstats|
|
84
|
+
|retention_periods |https://apis.cloudservices.connectwise.com/Backup/{id}/retentionperiod|
|
85
|
+
|sharePoint_sites |https://apis.cloudservices.connectwise.com/Backup/{id}/sites|
|
86
|
+
|sku |https://apis.cloudservices.connectwise.com/Backup/{id}/sku|
|
87
|
+
|storage_settings |https://apis.cloudservices.connectwise.com/Backup/{id}/storagesettings|
|
88
|
+
|subscription_settings |https://apis.cloudservices.connectwise.com/Backup/{id}/subscriptionsettings|
|
89
|
+
|subscriptions |https://apis.cloudservices.connectwise.com/Backup/|
|
90
|
+
|partner_subscriptions(partner_id)|https://apis.cloudservices.connectwise.com/Backup/{partner_id}|
|
90
91
|
|
91
92
|
### Alerts
|
92
93
|
|
@@ -1,19 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Skykick
|
2
4
|
class Client
|
3
|
-
|
4
|
-
#
|
5
|
-
#
|
5
|
+
# Contains all alert-related API calls for managing alerts in Skykick.
|
6
|
+
# This module provides methods to retrieve alerts and mark them as complete.
|
7
|
+
#
|
8
|
+
# @see https://developers.skykick.com/ Skykick Developer Documentation
|
6
9
|
module Alerts
|
7
|
-
|
8
|
-
#
|
10
|
+
# Retrieves the first 500 alerts for a given Email Migration Order ID or Backup Service ID.
|
11
|
+
# This method utilizes OData query parameters like `$top`, which defaults to 25 results
|
12
|
+
# and allows a maximum of 500 results per call.
|
13
|
+
#
|
14
|
+
# @note The `$top` query parameter is not explicitly implemented but can be configured on the endpoint.
|
15
|
+
# @param id [String] The unique identifier for an Email Migration Order or Backup Service.
|
16
|
+
# @return [Array<Hash>] A list of alerts associated with the specified ID.
|
17
|
+
# @example Retrieve alerts for a given order or service
|
18
|
+
# client.alerts('12345') # Returns up to 500 alerts
|
9
19
|
def alerts(id)
|
10
|
-
#
|
11
|
-
# $top - default of 25 and max of 500
|
12
|
-
# this is not implemented
|
20
|
+
# Retrieves paged results for alerts using the "Alerts" API endpoint.
|
13
21
|
get_paged("Alerts/#{id}")
|
14
22
|
end
|
15
23
|
|
16
|
-
#
|
24
|
+
# Marks a specific alert as complete.
|
25
|
+
#
|
26
|
+
# @param id [String] The unique identifier for the alert to be marked as complete.
|
27
|
+
# @return [Hash] The response from the API after marking the alert as complete.
|
28
|
+
# @example Mark an alert as complete
|
29
|
+
# client.mark_as_complete('alert123') # Marks alert with ID 'alert123' as complete
|
17
30
|
def mark_as_complete(id)
|
18
31
|
post("Alerts/#{id}")
|
19
32
|
end
|
@@ -1,76 +1,123 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Skykick
|
2
4
|
class Client
|
3
|
-
|
4
|
-
#
|
5
|
-
#
|
5
|
+
# Contains all backup-related API calls for managing Skykick backup subscriptions and settings.
|
6
|
+
# This module provides methods to interact with backup services, including retrieving subscription
|
7
|
+
# settings, storage settings, and mailbox information.
|
8
|
+
#
|
9
|
+
# @see https://developers.skykick.com/ Skykick Developer Documentation
|
6
10
|
module Backup
|
7
|
-
|
8
|
-
#
|
11
|
+
# Retrieves a list of supported Azure data centers.
|
12
|
+
# @return [Array<Hash>] A list of Azure data centers supported by Skykick.
|
13
|
+
# @example Fetch available data centers
|
14
|
+
# client.datacenters # => Returns a list of supported data centers
|
9
15
|
def datacenters
|
10
|
-
|
16
|
+
get('Backup/datacenters')
|
11
17
|
end
|
12
18
|
|
13
|
-
#
|
14
|
-
|
15
|
-
|
19
|
+
# Retrieves a list of placed Backup subscription orders.
|
20
|
+
# @return [Array<Hash>] A list of backup subscriptions.
|
21
|
+
# @example Get all backup subscriptions
|
22
|
+
# client.subscriptions # => Returns a list of placed backup subscription orders
|
23
|
+
def subscriptions
|
24
|
+
get('Backup')
|
16
25
|
end
|
17
26
|
|
18
|
-
#
|
27
|
+
# Retrieves a list of backup subscription orders for a specific partner.
|
28
|
+
# @param partner_id [String] The unique identifier of the partner.
|
29
|
+
# @return [Array<Hash>] A list of partner-specific backup subscriptions.
|
30
|
+
# @example Get partner backup subscriptions
|
31
|
+
# client.partner_subscriptions('partner123') # => Returns subscriptions for the partner
|
19
32
|
def partner_subscriptions(partner_id)
|
20
|
-
|
33
|
+
get("Backup/#{partner_id}")
|
21
34
|
end
|
22
35
|
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
36
|
+
# Retrieves backup subscription settings, including the state of Exchange and SharePoint Backups,
|
37
|
+
# the number of enabled mailboxes and SharePoint sites, and the subscription state.
|
38
|
+
# @param id [String] The subscription ID.
|
39
|
+
# @return [Hash] Backup subscription settings.
|
40
|
+
# @example Fetch subscription settings
|
41
|
+
# client.subscription_settings('sub123') # => Returns backup subscription settings
|
26
42
|
def subscription_settings(id)
|
27
|
-
|
43
|
+
get("Backup/#{id}/subscriptionsettings")
|
28
44
|
end
|
29
45
|
|
30
|
-
#
|
46
|
+
# Retrieves storage settings for a backup subscription.
|
47
|
+
# @param id [String] The subscription ID.
|
48
|
+
# @return [Hash] Storage settings for the specified subscription.
|
49
|
+
# @example Get storage settings
|
50
|
+
# client.storage_settings('sub123') # => Returns storage settings
|
31
51
|
def storage_settings(id)
|
32
|
-
|
52
|
+
get("Backup/#{id}/storagesettings")
|
33
53
|
end
|
34
54
|
|
35
|
-
#
|
55
|
+
# Retrieves SKU or promotional details for a backup service.
|
56
|
+
# @param id [String] The subscription ID.
|
57
|
+
# @return [Hash] SKU or promotional details.
|
58
|
+
# @example Fetch SKU details
|
59
|
+
# client.sku('sub123') # => Returns SKU or promo details
|
36
60
|
def sku(id)
|
37
|
-
|
61
|
+
get("Backup/#{id}/sku")
|
38
62
|
end
|
39
63
|
|
40
|
-
#
|
41
|
-
#
|
64
|
+
# Retrieves a list of SharePoint site URLs and their statuses (enabled/disabled) for a backup subscription.
|
65
|
+
# @param id [String] The subscription ID.
|
66
|
+
# @return [Array<Hash>] A list of SharePoint site URLs and statuses.
|
67
|
+
# @example Get SharePoint sites
|
68
|
+
# client.sharepoint_sites('sub123') # => Returns a list of SharePoint sites and their statuses
|
42
69
|
def sharepoint_sites(id)
|
43
|
-
|
70
|
+
get("Backup/#{id}/sites")
|
44
71
|
end
|
45
72
|
|
46
|
-
#
|
47
|
-
# retention periods for Exchange and SharePoint
|
73
|
+
# Retrieves the data retention periods for a backup subscription.
|
74
|
+
# Different retention periods apply for Exchange and SharePoint data.
|
48
75
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
76
|
+
# @note There is a known spelling issue in the response field: `ExchangeRentionPeriodInDays`.
|
77
|
+
# This is intentional to avoid breaking existing integrations.
|
78
|
+
# @param id [String] The subscription ID.
|
79
|
+
# @return [Hash] Retention period details.
|
80
|
+
# @example Get retention periods
|
81
|
+
# client.retentionperiod('sub123') # => Returns retention periods for Exchange and SharePoint data
|
52
82
|
def retentionperiod(id)
|
53
|
-
|
83
|
+
get("Backup/#{id}/retentionperiod")
|
54
84
|
end
|
55
85
|
|
56
|
-
#
|
86
|
+
# Retrieves snapshot statistics from SKDataWarehouse for all mailboxes in a given backup subscription.
|
87
|
+
# @param id [String] The subscription ID.
|
88
|
+
# @return [Hash] Snapshot statistics for the mailboxes.
|
89
|
+
# @example Fetch last snapshot stats
|
90
|
+
# client.lastsnapshotstats('sub123') # => Returns snapshot stats for the subscription's mailboxes
|
57
91
|
def lastsnapshotstats(id)
|
58
|
-
|
92
|
+
get("Backup/#{id}/lastsnapshotstats")
|
59
93
|
end
|
60
94
|
|
61
|
-
#
|
95
|
+
# Retrieves a list of Exchange mailboxes and their statuses (enabled/disabled) for a backup subscription.
|
96
|
+
# @param id [String] The subscription ID.
|
97
|
+
# @return [Array<Hash>] A list of Exchange mailboxes and their statuses.
|
98
|
+
# @example Get Exchange mailboxes
|
99
|
+
# client.exchange_mailboxes('sub123') # => Returns a list of Exchange mailboxes and statuses
|
62
100
|
def exchange_mailboxes(id)
|
63
|
-
|
101
|
+
get("Backup/#{id}/mailboxes")
|
64
102
|
end
|
65
103
|
|
66
|
-
#
|
104
|
+
# Retrieves details of a specific Exchange mailbox in a backup subscription.
|
105
|
+
# @param id [String] The subscription ID.
|
106
|
+
# @param mailbox_id [String] The unique identifier of the mailbox.
|
107
|
+
# @return [Hash] Details of the specified Exchange mailbox.
|
108
|
+
# @example Get details of a specific mailbox
|
109
|
+
# client.exchange_mailbox('sub123', 'mailbox123') # => Returns mailbox details
|
67
110
|
def exchange_mailbox(id, mailbox_id)
|
68
|
-
|
111
|
+
get("Backup/#{id}/mailboxes/#{mailbox_id}")
|
69
112
|
end
|
70
113
|
|
71
|
-
#
|
114
|
+
# Retrieves the auto-discover state (enabled/disabled) for Exchange and SharePoint backups in a subscription.
|
115
|
+
# @param id [String] The subscription ID.
|
116
|
+
# @return [Hash] Auto-discover states for Exchange and SharePoint.
|
117
|
+
# @example Check auto-discover state
|
118
|
+
# client.autodiscover('sub123') # => Returns the auto-discover state of the subscription
|
72
119
|
def autodiscover(id)
|
73
|
-
|
120
|
+
get("Backup/#{id}/autodiscover")
|
74
121
|
end
|
75
122
|
end
|
76
123
|
end
|
data/lib/skykick/version.rb
CHANGED
data/lib/skykick.rb
CHANGED
@@ -15,7 +15,7 @@ module Skykick
|
|
15
15
|
extend WrAPI::RespondTo
|
16
16
|
|
17
17
|
# Default API endpoint for the Skykick service.
|
18
|
-
DEFAULT_ENDPOINT = 'https://apis.
|
18
|
+
DEFAULT_ENDPOINT = 'https://apis.cloudservices.connectwise.com'
|
19
19
|
|
20
20
|
# Default User-Agent header sent with API requests, including gem version information.
|
21
21
|
DEFAULT_UA = "Skykick Ruby API wrapper #{Skykick::VERSION}"
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skykick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janco Tanis
|
8
|
+
autorequire:
|
8
9
|
bindir: exe
|
9
10
|
cert_chain: []
|
10
|
-
date: 2025-
|
11
|
+
date: 2025-09-01 00:00:00.000000000 Z
|
11
12
|
dependencies:
|
12
13
|
- !ruby/object:Gem::Dependency
|
13
14
|
name: faraday
|
@@ -93,6 +94,7 @@ dependencies:
|
|
93
94
|
- - ">="
|
94
95
|
- !ruby/object:Gem::Version
|
95
96
|
version: '0'
|
97
|
+
description:
|
96
98
|
email: gems@jancology.com
|
97
99
|
executables: []
|
98
100
|
extensions: []
|
@@ -122,6 +124,7 @@ licenses:
|
|
122
124
|
metadata:
|
123
125
|
homepage_uri: https://rubygems.org/gems/skykick
|
124
126
|
source_code_uri: https://github.com/jancotanis/skykick
|
127
|
+
post_install_message:
|
125
128
|
rdoc_options: []
|
126
129
|
require_paths:
|
127
130
|
- lib
|
@@ -136,7 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
139
|
- !ruby/object:Gem::Version
|
137
140
|
version: '0'
|
138
141
|
requirements: []
|
139
|
-
rubygems_version: 3.6
|
142
|
+
rubygems_version: 3.1.6
|
143
|
+
signing_key:
|
140
144
|
specification_version: 4
|
141
145
|
summary: A Ruby wrapper for the Skykick backup Portal REST APIs (readonly)
|
142
146
|
test_files: []
|