SematextCloud 0.1.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 +7 -0
- data/Gemfile +7 -0
- data/LICENSE +13 -0
- data/README.md +149 -0
- data/Rakefile +8 -0
- data/SematextCloud.gemspec +45 -0
- data/docs/AlertNotificationRequest.md +9 -0
- data/docs/AlertNotificationsApi.md +118 -0
- data/docs/AlertRule.md +53 -0
- data/docs/AlertRuleScheduleTimeRangeDto.md +7 -0
- data/docs/AlertRuleScheduleWeekdayDto.md +10 -0
- data/docs/AlertsApi.md +270 -0
- data/docs/App.md +32 -0
- data/docs/AppDescription.md +6 -0
- data/docs/AppMetadata.md +10 -0
- data/docs/AppsApi.md +369 -0
- data/docs/AwsSettingsControllerApi.md +63 -0
- data/docs/BasicAuthMethodDto.md +7 -0
- data/docs/BasicOrganizationDto.md +9 -0
- data/docs/BillingApi.md +176 -0
- data/docs/BillingInfo.md +8 -0
- data/docs/CloudWatchSettings.md +9 -0
- data/docs/CreateAppInfo.md +10 -0
- data/docs/DataSeriesFilter.md +8 -0
- data/docs/DataSeriesRequest.md +12 -0
- data/docs/Error.md +7 -0
- data/docs/FilterValue.md +11 -0
- data/docs/GenericApiResponse.md +9 -0
- data/docs/Invitation.md +15 -0
- data/docs/LogsAppApi.md +58 -0
- data/docs/MetricsApi.md +227 -0
- data/docs/MonitoringAppApi.md +58 -0
- data/docs/NotificationIntegration.md +15 -0
- data/docs/Plan.md +18 -0
- data/docs/ReportInfo.md +13 -0
- data/docs/ResetPasswordApi.md +58 -0
- data/docs/SavedQueriesApi.md +220 -0
- data/docs/SavedQuery.md +18 -0
- data/docs/ServiceIntegration.md +17 -0
- data/docs/SubscriptionsApi.md +114 -0
- data/docs/TagApiControllerApi.md +212 -0
- data/docs/UpdateAppInfo.md +14 -0
- data/docs/UserInfo.md +6 -0
- data/docs/UserPermissions.md +8 -0
- data/docs/UserRole.md +8 -0
- data/lib/SematextCloud.rb +78 -0
- data/lib/SematextCloud/api/alert_notifications_api.rb +137 -0
- data/lib/SematextCloud/api/alerts_api.rb +283 -0
- data/lib/SematextCloud/api/apps_api.rb +381 -0
- data/lib/SematextCloud/api/aws_settings_controller_api.rb +83 -0
- data/lib/SematextCloud/api/billing_api.rb +197 -0
- data/lib/SematextCloud/api/logs_app_api.rb +75 -0
- data/lib/SematextCloud/api/metrics_api.rb +247 -0
- data/lib/SematextCloud/api/monitoring_app_api.rb +75 -0
- data/lib/SematextCloud/api/reset_password_api.rb +75 -0
- data/lib/SematextCloud/api/saved_queries_api.rb +237 -0
- data/lib/SematextCloud/api/subscriptions_api.rb +133 -0
- data/lib/SematextCloud/api/tag_api_controller_api.rb +247 -0
- data/lib/SematextCloud/api_client.rb +389 -0
- data/lib/SematextCloud/api_error.rb +38 -0
- data/lib/SematextCloud/configuration.rb +209 -0
- data/lib/SematextCloud/models/alert_notification_request.rb +212 -0
- data/lib/SematextCloud/models/alert_rule.rb +652 -0
- data/lib/SematextCloud/models/alert_rule_schedule_time_range_dto.rb +192 -0
- data/lib/SematextCloud/models/alert_rule_schedule_weekday_dto.rb +221 -0
- data/lib/SematextCloud/models/app.rb +419 -0
- data/lib/SematextCloud/models/app_description.rb +183 -0
- data/lib/SematextCloud/models/app_metadata.rb +268 -0
- data/lib/SematextCloud/models/basic_auth_method_dto.rb +226 -0
- data/lib/SematextCloud/models/basic_organization_dto.rb +246 -0
- data/lib/SematextCloud/models/billing_info.rb +201 -0
- data/lib/SematextCloud/models/cloud_watch_settings.rb +256 -0
- data/lib/SematextCloud/models/create_app_info.rb +220 -0
- data/lib/SematextCloud/models/data_series_filter.rb +237 -0
- data/lib/SematextCloud/models/data_series_request.rb +283 -0
- data/lib/SematextCloud/models/error.rb +192 -0
- data/lib/SematextCloud/models/filter_value.rb +230 -0
- data/lib/SematextCloud/models/generic_api_response.rb +214 -0
- data/lib/SematextCloud/models/invitation.rb +326 -0
- data/lib/SematextCloud/models/notification_integration.rb +324 -0
- data/lib/SematextCloud/models/plan.rb +337 -0
- data/lib/SematextCloud/models/report_info.rb +247 -0
- data/lib/SematextCloud/models/saved_query.rb +291 -0
- data/lib/SematextCloud/models/service_integration.rb +282 -0
- data/lib/SematextCloud/models/update_app_info.rb +289 -0
- data/lib/SematextCloud/models/user_info.rb +183 -0
- data/lib/SematextCloud/models/user_permissions.rb +201 -0
- data/lib/SematextCloud/models/user_role.rb +247 -0
- data/lib/SematextCloud/version.rb +15 -0
- data/spec/api/alert_notifications_api_spec.rb +60 -0
- data/spec/api/alerts_api_spec.rb +90 -0
- data/spec/api/apps_api_spec.rb +113 -0
- data/spec/api/aws_settings_controller_api_spec.rb +48 -0
- data/spec/api/billing_api_spec.rb +72 -0
- data/spec/api/logs_app_api_spec.rb +46 -0
- data/spec/api/metrics_api_spec.rb +83 -0
- data/spec/api/monitoring_app_api_spec.rb +46 -0
- data/spec/api/reset_password_api_spec.rb +46 -0
- data/spec/api/saved_queries_api_spec.rb +80 -0
- data/spec/api/subscriptions_api_spec.rb +58 -0
- data/spec/api/tag_api_controller_api_spec.rb +88 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/alert_notification_request_spec.rb +59 -0
- data/spec/models/alert_rule_schedule_time_range_dto_spec.rb +47 -0
- data/spec/models/alert_rule_schedule_weekday_dto_spec.rb +65 -0
- data/spec/models/alert_rule_spec.rb +327 -0
- data/spec/models/app_description_spec.rb +41 -0
- data/spec/models/app_metadata_spec.rb +77 -0
- data/spec/models/app_spec.rb +197 -0
- data/spec/models/basic_auth_method_dto_spec.rb +51 -0
- data/spec/models/basic_organization_dto_spec.rb +63 -0
- data/spec/models/billing_info_spec.rb +53 -0
- data/spec/models/cloud_watch_settings_spec.rb +67 -0
- data/spec/models/create_app_info_spec.rb +65 -0
- data/spec/models/data_series_filter_spec.rb +57 -0
- data/spec/models/data_series_request_spec.rb +81 -0
- data/spec/models/error_spec.rb +47 -0
- data/spec/models/filter_value_spec.rb +71 -0
- data/spec/models/generic_api_response_spec.rb +59 -0
- data/spec/models/invitation_spec.rb +107 -0
- data/spec/models/notification_integration_spec.rb +107 -0
- data/spec/models/plan_spec.rb +121 -0
- data/spec/models/report_info_spec.rb +83 -0
- data/spec/models/saved_query_spec.rb +113 -0
- data/spec/models/service_integration_spec.rb +107 -0
- data/spec/models/update_app_info_spec.rb +93 -0
- data/spec/models/user_info_spec.rb +41 -0
- data/spec/models/user_permissions_spec.rb +53 -0
- data/spec/models/user_role_spec.rb +61 -0
- data/spec/spec_helper.rb +111 -0
- metadata +395 -0
@@ -0,0 +1,212 @@
|
|
1
|
+
# SematextCloud::TagApiControllerApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://localhost*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**get_tag_names_using_get**](TagApiControllerApi.md#get_tag_names_using_get) | **GET** /spm-reports/api/v3/apps/{appIds}/tagNames | Gets tag names for the given application identifiers appearing in the given time frame.
|
8
|
+
[**get_using_get1**](TagApiControllerApi.md#get_using_get1) | **GET** /spm-reports/api/v3/apps/{appIds}/tags | Gets values for specified tags for the given application identifiers appearing in the given time frame.
|
9
|
+
[**get_using_get2**](TagApiControllerApi.md#get_using_get2) | **GET** /spm-reports/api/v3/apps/{appIds}/metrics/filters | Gets values for specified tags for the given application identifiers appearing in the given time frame.
|
10
|
+
|
11
|
+
|
12
|
+
# **get_tag_names_using_get**
|
13
|
+
> Object get_tag_names_using_get(app_ids, opts)
|
14
|
+
|
15
|
+
Gets tag names for the given application identifiers appearing in the given time frame.
|
16
|
+
|
17
|
+
### Example
|
18
|
+
```ruby
|
19
|
+
# load the gem
|
20
|
+
require 'SematextCloud'
|
21
|
+
# setup authorization
|
22
|
+
SematextCloud.configure do |config|
|
23
|
+
# Configure API key authorization: api_key
|
24
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
25
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
26
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
27
|
+
end
|
28
|
+
|
29
|
+
api_instance = SematextCloud::TagApiControllerApi.new
|
30
|
+
|
31
|
+
app_ids = 'app_ids_example' # String | appIds
|
32
|
+
|
33
|
+
opts = {
|
34
|
+
from: 789, # Integer | from
|
35
|
+
to: 789, # Integer | to
|
36
|
+
metrics: true, # BOOLEAN | metrics
|
37
|
+
logs: true, # BOOLEAN | logs
|
38
|
+
events: false, # BOOLEAN | events
|
39
|
+
rum: true # BOOLEAN | rum
|
40
|
+
}
|
41
|
+
|
42
|
+
begin
|
43
|
+
#Gets tag names for the given application identifiers appearing in the given time frame.
|
44
|
+
result = api_instance.get_tag_names_using_get(app_ids, opts)
|
45
|
+
p result
|
46
|
+
rescue SematextCloud::ApiError => e
|
47
|
+
puts "Exception when calling TagApiControllerApi->get_tag_names_using_get: #{e}"
|
48
|
+
end
|
49
|
+
```
|
50
|
+
|
51
|
+
### Parameters
|
52
|
+
|
53
|
+
Name | Type | Description | Notes
|
54
|
+
------------- | ------------- | ------------- | -------------
|
55
|
+
**app_ids** | **String**| appIds |
|
56
|
+
**from** | **Integer**| from | [optional]
|
57
|
+
**to** | **Integer**| to | [optional]
|
58
|
+
**metrics** | **BOOLEAN**| metrics | [optional] [default to true]
|
59
|
+
**logs** | **BOOLEAN**| logs | [optional] [default to true]
|
60
|
+
**events** | **BOOLEAN**| events | [optional] [default to false]
|
61
|
+
**rum** | **BOOLEAN**| rum | [optional] [default to true]
|
62
|
+
|
63
|
+
### Return type
|
64
|
+
|
65
|
+
**Object**
|
66
|
+
|
67
|
+
### Authorization
|
68
|
+
|
69
|
+
[api_key](../README.md#api_key)
|
70
|
+
|
71
|
+
### HTTP request headers
|
72
|
+
|
73
|
+
- **Content-Type**: application/json
|
74
|
+
- **Accept**: application/json
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
# **get_using_get1**
|
79
|
+
> Object get_using_get1(app_ids, tag, opts)
|
80
|
+
|
81
|
+
Gets values for specified tags for the given application identifiers appearing in the given time frame.
|
82
|
+
|
83
|
+
### Example
|
84
|
+
```ruby
|
85
|
+
# load the gem
|
86
|
+
require 'SematextCloud'
|
87
|
+
# setup authorization
|
88
|
+
SematextCloud.configure do |config|
|
89
|
+
# Configure API key authorization: api_key
|
90
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
91
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
92
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
93
|
+
end
|
94
|
+
|
95
|
+
api_instance = SematextCloud::TagApiControllerApi.new
|
96
|
+
|
97
|
+
app_ids = 'app_ids_example' # String | appIds
|
98
|
+
|
99
|
+
tag = ['tag_example'] # Array<String> | tag
|
100
|
+
|
101
|
+
opts = {
|
102
|
+
from: 789, # Integer | from
|
103
|
+
to: 789, # Integer | to
|
104
|
+
metrics: true, # BOOLEAN | metrics
|
105
|
+
logs: true, # BOOLEAN | logs
|
106
|
+
events: false, # BOOLEAN | events
|
107
|
+
rum: true # BOOLEAN | rum
|
108
|
+
}
|
109
|
+
|
110
|
+
begin
|
111
|
+
#Gets values for specified tags for the given application identifiers appearing in the given time frame.
|
112
|
+
result = api_instance.get_using_get1(app_ids, tag, opts)
|
113
|
+
p result
|
114
|
+
rescue SematextCloud::ApiError => e
|
115
|
+
puts "Exception when calling TagApiControllerApi->get_using_get1: #{e}"
|
116
|
+
end
|
117
|
+
```
|
118
|
+
|
119
|
+
### Parameters
|
120
|
+
|
121
|
+
Name | Type | Description | Notes
|
122
|
+
------------- | ------------- | ------------- | -------------
|
123
|
+
**app_ids** | **String**| appIds |
|
124
|
+
**tag** | [**Array<String>**](String.md)| tag |
|
125
|
+
**from** | **Integer**| from | [optional]
|
126
|
+
**to** | **Integer**| to | [optional]
|
127
|
+
**metrics** | **BOOLEAN**| metrics | [optional] [default to true]
|
128
|
+
**logs** | **BOOLEAN**| logs | [optional] [default to true]
|
129
|
+
**events** | **BOOLEAN**| events | [optional] [default to false]
|
130
|
+
**rum** | **BOOLEAN**| rum | [optional] [default to true]
|
131
|
+
|
132
|
+
### Return type
|
133
|
+
|
134
|
+
**Object**
|
135
|
+
|
136
|
+
### Authorization
|
137
|
+
|
138
|
+
[api_key](../README.md#api_key)
|
139
|
+
|
140
|
+
### HTTP request headers
|
141
|
+
|
142
|
+
- **Content-Type**: application/json
|
143
|
+
- **Accept**: application/json
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
# **get_using_get2**
|
148
|
+
> Object get_using_get2(app_ids, tag, opts)
|
149
|
+
|
150
|
+
Gets values for specified tags for the given application identifiers appearing in the given time frame.
|
151
|
+
|
152
|
+
### Example
|
153
|
+
```ruby
|
154
|
+
# load the gem
|
155
|
+
require 'SematextCloud'
|
156
|
+
# setup authorization
|
157
|
+
SematextCloud.configure do |config|
|
158
|
+
# Configure API key authorization: api_key
|
159
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
160
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
161
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
162
|
+
end
|
163
|
+
|
164
|
+
api_instance = SematextCloud::TagApiControllerApi.new
|
165
|
+
|
166
|
+
app_ids = 'app_ids_example' # String | appIds
|
167
|
+
|
168
|
+
tag = ['tag_example'] # Array<String> | tag
|
169
|
+
|
170
|
+
opts = {
|
171
|
+
from: 789, # Integer | from
|
172
|
+
to: 789, # Integer | to
|
173
|
+
metrics: true, # BOOLEAN | metrics
|
174
|
+
logs: true, # BOOLEAN | logs
|
175
|
+
events: false, # BOOLEAN | events
|
176
|
+
rum: true # BOOLEAN | rum
|
177
|
+
}
|
178
|
+
|
179
|
+
begin
|
180
|
+
#Gets values for specified tags for the given application identifiers appearing in the given time frame.
|
181
|
+
result = api_instance.get_using_get2(app_ids, tag, opts)
|
182
|
+
p result
|
183
|
+
rescue SematextCloud::ApiError => e
|
184
|
+
puts "Exception when calling TagApiControllerApi->get_using_get2: #{e}"
|
185
|
+
end
|
186
|
+
```
|
187
|
+
|
188
|
+
### Parameters
|
189
|
+
|
190
|
+
Name | Type | Description | Notes
|
191
|
+
------------- | ------------- | ------------- | -------------
|
192
|
+
**app_ids** | **String**| appIds |
|
193
|
+
**tag** | [**Array<String>**](String.md)| tag |
|
194
|
+
**from** | **Integer**| from | [optional]
|
195
|
+
**to** | **Integer**| to | [optional]
|
196
|
+
**metrics** | **BOOLEAN**| metrics | [optional] [default to true]
|
197
|
+
**logs** | **BOOLEAN**| logs | [optional] [default to true]
|
198
|
+
**events** | **BOOLEAN**| events | [optional] [default to false]
|
199
|
+
**rum** | **BOOLEAN**| rum | [optional] [default to true]
|
200
|
+
|
201
|
+
### Return type
|
202
|
+
|
203
|
+
**Object**
|
204
|
+
|
205
|
+
### Authorization
|
206
|
+
|
207
|
+
[api_key](../README.md#api_key)
|
208
|
+
|
209
|
+
### HTTP request headers
|
210
|
+
|
211
|
+
- **Content-Type**: application/json
|
212
|
+
- **Accept**: application/json
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# SematextCloud::UpdateAppInfo
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**description** | **String** | | [optional]
|
7
|
+
**ignore_percentage** | **Integer** | | [optional]
|
8
|
+
**max_events** | **Integer** | | [optional]
|
9
|
+
**max_limit_mb** | **Integer** | | [optional]
|
10
|
+
**name** | **String** | | [optional]
|
11
|
+
**sampling** | **BOOLEAN** | | [optional]
|
12
|
+
**sampling_percentage** | **Integer** | | [optional]
|
13
|
+
**staggering** | **BOOLEAN** | | [optional]
|
14
|
+
**status** | **String** | | [optional]
|
data/docs/UserInfo.md
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
# SematextCloud::UserPermissions
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**can_delete** | **BOOLEAN** | | [optional]
|
7
|
+
**can_edit** | **BOOLEAN** | | [optional]
|
8
|
+
**can_view** | **BOOLEAN** | | [optional]
|
data/docs/UserRole.md
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
# SematextCloud::UserRole
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**role** | **String** | | [optional]
|
7
|
+
**role_status** | **String** | | [optional]
|
8
|
+
**user_email** | **String** | | [optional]
|
@@ -0,0 +1,78 @@
|
|
1
|
+
=begin
|
2
|
+
#Sematext Cloud API
|
3
|
+
|
4
|
+
#API Explorer provides access and documentation for Sematext REST API. The REST API requires the API Key to be sent as part of `Authorization` header. E.g.: `Authorization : apiKey e5f18450-205a-48eb-8589-7d49edaea813`.
|
5
|
+
|
6
|
+
OpenAPI spec version: v3
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
# Common files
|
14
|
+
require 'SematextCloud/api_client'
|
15
|
+
require 'SematextCloud/api_error'
|
16
|
+
require 'SematextCloud/version'
|
17
|
+
require 'SematextCloud/configuration'
|
18
|
+
|
19
|
+
# Models
|
20
|
+
require 'SematextCloud/models/alert_notification_request'
|
21
|
+
require 'SematextCloud/models/alert_rule'
|
22
|
+
require 'SematextCloud/models/alert_rule_schedule_time_range_dto'
|
23
|
+
require 'SematextCloud/models/alert_rule_schedule_weekday_dto'
|
24
|
+
require 'SematextCloud/models/app'
|
25
|
+
require 'SematextCloud/models/app_description'
|
26
|
+
require 'SematextCloud/models/app_metadata'
|
27
|
+
require 'SematextCloud/models/basic_auth_method_dto'
|
28
|
+
require 'SematextCloud/models/basic_organization_dto'
|
29
|
+
require 'SematextCloud/models/billing_info'
|
30
|
+
require 'SematextCloud/models/cloud_watch_settings'
|
31
|
+
require 'SematextCloud/models/create_app_info'
|
32
|
+
require 'SematextCloud/models/data_series_filter'
|
33
|
+
require 'SematextCloud/models/data_series_request'
|
34
|
+
require 'SematextCloud/models/error'
|
35
|
+
require 'SematextCloud/models/filter_value'
|
36
|
+
require 'SematextCloud/models/generic_api_response'
|
37
|
+
require 'SematextCloud/models/invitation'
|
38
|
+
require 'SematextCloud/models/notification_integration'
|
39
|
+
require 'SematextCloud/models/plan'
|
40
|
+
require 'SematextCloud/models/report_info'
|
41
|
+
require 'SematextCloud/models/saved_query'
|
42
|
+
require 'SematextCloud/models/service_integration'
|
43
|
+
require 'SematextCloud/models/update_app_info'
|
44
|
+
require 'SematextCloud/models/user_info'
|
45
|
+
require 'SematextCloud/models/user_permissions'
|
46
|
+
require 'SematextCloud/models/user_role'
|
47
|
+
|
48
|
+
# APIs
|
49
|
+
require 'SematextCloud/api/alert_notifications_api'
|
50
|
+
require 'SematextCloud/api/alerts_api'
|
51
|
+
require 'SematextCloud/api/apps_api'
|
52
|
+
require 'SematextCloud/api/aws_settings_controller_api'
|
53
|
+
require 'SematextCloud/api/billing_api'
|
54
|
+
require 'SematextCloud/api/logs_app_api'
|
55
|
+
require 'SematextCloud/api/metrics_api'
|
56
|
+
require 'SematextCloud/api/monitoring_app_api'
|
57
|
+
require 'SematextCloud/api/reset_password_api'
|
58
|
+
require 'SematextCloud/api/saved_queries_api'
|
59
|
+
require 'SematextCloud/api/subscriptions_api'
|
60
|
+
require 'SematextCloud/api/tag_api_controller_api'
|
61
|
+
|
62
|
+
module SematextCloud
|
63
|
+
class << self
|
64
|
+
# Customize default settings for the SDK using block.
|
65
|
+
# SematextCloud.configure do |config|
|
66
|
+
# config.username = "xxx"
|
67
|
+
# config.password = "xxx"
|
68
|
+
# end
|
69
|
+
# If no block given, return the default Configuration object.
|
70
|
+
def configure
|
71
|
+
if block_given?
|
72
|
+
yield(Configuration.default)
|
73
|
+
else
|
74
|
+
Configuration.default
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,137 @@
|
|
1
|
+
=begin
|
2
|
+
#Sematext Cloud API
|
3
|
+
|
4
|
+
#API Explorer provides access and documentation for Sematext REST API. The REST API requires the API Key to be sent as part of `Authorization` header. E.g.: `Authorization : apiKey e5f18450-205a-48eb-8589-7d49edaea813`.
|
5
|
+
|
6
|
+
OpenAPI spec version: v3
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module SematextCloud
|
16
|
+
class AlertNotificationsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get alert notifications for an app
|
23
|
+
# Default value of interval is 1d
|
24
|
+
# @param app_id appId
|
25
|
+
# @param time_interval Time Interval
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [GenericApiResponse]
|
28
|
+
def get_alert_notifications_for_app_using_post(app_id, time_interval, opts = {})
|
29
|
+
data, _status_code, _headers = get_alert_notifications_for_app_using_post_with_http_info(app_id, time_interval, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Get alert notifications for an app
|
34
|
+
# Default value of interval is 1d
|
35
|
+
# @param app_id appId
|
36
|
+
# @param time_interval Time Interval
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
39
|
+
def get_alert_notifications_for_app_using_post_with_http_info(app_id, time_interval, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: AlertNotificationsApi.get_alert_notifications_for_app_using_post ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'app_id' is set
|
44
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling AlertNotificationsApi.get_alert_notifications_for_app_using_post"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'time_interval' is set
|
48
|
+
if @api_client.config.client_side_validation && time_interval.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'time_interval' when calling AlertNotificationsApi.get_alert_notifications_for_app_using_post"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/users-web/api/v3/apps/{appId}/notifications/alerts'.sub('{' + 'appId' + '}', app_id.to_s)
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = {}
|
56
|
+
|
57
|
+
# header parameters
|
58
|
+
header_params = {}
|
59
|
+
# HTTP header 'Accept' (if needed)
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
61
|
+
# HTTP header 'Content-Type'
|
62
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = @api_client.object_to_http_body(time_interval)
|
69
|
+
auth_names = ['api_key']
|
70
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => 'GenericApiResponse')
|
77
|
+
if @api_client.config.debugging
|
78
|
+
@api_client.config.logger.debug "API called: AlertNotificationsApi#get_alert_notifications_for_app_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
# Get alert notifications for a user
|
83
|
+
# Default value of interval is 1d
|
84
|
+
# @param time_interval Time Interval
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @return [GenericApiResponse]
|
87
|
+
def get_alert_notifications_for_user_using_post(time_interval, opts = {})
|
88
|
+
data, _status_code, _headers = get_alert_notifications_for_user_using_post_with_http_info(time_interval, opts)
|
89
|
+
data
|
90
|
+
end
|
91
|
+
|
92
|
+
# Get alert notifications for a user
|
93
|
+
# Default value of interval is 1d
|
94
|
+
# @param time_interval Time Interval
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
97
|
+
def get_alert_notifications_for_user_using_post_with_http_info(time_interval, opts = {})
|
98
|
+
if @api_client.config.debugging
|
99
|
+
@api_client.config.logger.debug 'Calling API: AlertNotificationsApi.get_alert_notifications_for_user_using_post ...'
|
100
|
+
end
|
101
|
+
# verify the required parameter 'time_interval' is set
|
102
|
+
if @api_client.config.client_side_validation && time_interval.nil?
|
103
|
+
fail ArgumentError, "Missing the required parameter 'time_interval' when calling AlertNotificationsApi.get_alert_notifications_for_user_using_post"
|
104
|
+
end
|
105
|
+
# resource path
|
106
|
+
local_var_path = '/users-web/api/v3/notifications/alerts'
|
107
|
+
|
108
|
+
# query parameters
|
109
|
+
query_params = {}
|
110
|
+
|
111
|
+
# header parameters
|
112
|
+
header_params = {}
|
113
|
+
# HTTP header 'Accept' (if needed)
|
114
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
115
|
+
# HTTP header 'Content-Type'
|
116
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
117
|
+
|
118
|
+
# form parameters
|
119
|
+
form_params = {}
|
120
|
+
|
121
|
+
# http body (model)
|
122
|
+
post_body = @api_client.object_to_http_body(time_interval)
|
123
|
+
auth_names = ['api_key']
|
124
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
125
|
+
:header_params => header_params,
|
126
|
+
:query_params => query_params,
|
127
|
+
:form_params => form_params,
|
128
|
+
:body => post_body,
|
129
|
+
:auth_names => auth_names,
|
130
|
+
:return_type => 'GenericApiResponse')
|
131
|
+
if @api_client.config.debugging
|
132
|
+
@api_client.config.logger.debug "API called: AlertNotificationsApi#get_alert_notifications_for_user_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
133
|
+
end
|
134
|
+
return data, status_code, headers
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|