SematextCloud 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,75 @@
|
|
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 MonitoringAppApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create Monitoring App
|
23
|
+
# @param application_details Details of the application to be created
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [GenericApiResponse]
|
26
|
+
def create_spm_application1(application_details, opts = {})
|
27
|
+
data, _status_code, _headers = create_spm_application1_with_http_info(application_details, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Create Monitoring App
|
32
|
+
# @param application_details Details of the application to be created
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
35
|
+
def create_spm_application1_with_http_info(application_details, opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: MonitoringAppApi.create_spm_application1 ...'
|
38
|
+
end
|
39
|
+
# verify the required parameter 'application_details' is set
|
40
|
+
if @api_client.config.client_side_validation && application_details.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'application_details' when calling MonitoringAppApi.create_spm_application1"
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/spm-reports/api/v3/apps'
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
53
|
+
# HTTP header 'Content-Type'
|
54
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = @api_client.object_to_http_body(application_details)
|
61
|
+
auth_names = ['api_key']
|
62
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
63
|
+
:header_params => header_params,
|
64
|
+
:query_params => query_params,
|
65
|
+
:form_params => form_params,
|
66
|
+
:body => post_body,
|
67
|
+
:auth_names => auth_names,
|
68
|
+
:return_type => 'GenericApiResponse')
|
69
|
+
if @api_client.config.debugging
|
70
|
+
@api_client.config.logger.debug "API called: MonitoringAppApi#create_spm_application1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
71
|
+
end
|
72
|
+
return data, status_code, headers
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,75 @@
|
|
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 ResetPasswordApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Reset Password
|
23
|
+
# @param dto dto
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [GenericApiResponse]
|
26
|
+
def reset_password_using_post(dto, opts = {})
|
27
|
+
data, _status_code, _headers = reset_password_using_post_with_http_info(dto, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Reset Password
|
32
|
+
# @param dto dto
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
35
|
+
def reset_password_using_post_with_http_info(dto, opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: ResetPasswordApi.reset_password_using_post ...'
|
38
|
+
end
|
39
|
+
# verify the required parameter 'dto' is set
|
40
|
+
if @api_client.config.client_side_validation && dto.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'dto' when calling ResetPasswordApi.reset_password_using_post"
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/users-web/api/v3/account/password/reset'
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
53
|
+
# HTTP header 'Content-Type'
|
54
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = @api_client.object_to_http_body(dto)
|
61
|
+
auth_names = ['api_key']
|
62
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
63
|
+
:header_params => header_params,
|
64
|
+
:query_params => query_params,
|
65
|
+
:form_params => form_params,
|
66
|
+
:body => post_body,
|
67
|
+
:auth_names => auth_names,
|
68
|
+
:return_type => 'GenericApiResponse')
|
69
|
+
if @api_client.config.debugging
|
70
|
+
@api_client.config.logger.debug "API called: ResetPasswordApi#reset_password_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
71
|
+
end
|
72
|
+
return data, status_code, headers
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,237 @@
|
|
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 SavedQueriesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete saved query
|
23
|
+
# @param updateable_query_id updateableQueryId
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [GenericApiResponse]
|
26
|
+
def delete_saved_query_using_delete(updateable_query_id, opts = {})
|
27
|
+
data, _status_code, _headers = delete_saved_query_using_delete_with_http_info(updateable_query_id, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Delete saved query
|
32
|
+
# @param updateable_query_id updateableQueryId
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
35
|
+
def delete_saved_query_using_delete_with_http_info(updateable_query_id, opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: SavedQueriesApi.delete_saved_query_using_delete ...'
|
38
|
+
end
|
39
|
+
# verify the required parameter 'updateable_query_id' is set
|
40
|
+
if @api_client.config.client_side_validation && updateable_query_id.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'updateable_query_id' when calling SavedQueriesApi.delete_saved_query_using_delete"
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/users-web/api/v3/savedQueries/{updateableQueryId}'.sub('{' + 'updateableQueryId' + '}', updateable_query_id.to_s)
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
53
|
+
# HTTP header 'Content-Type'
|
54
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = nil
|
61
|
+
auth_names = ['api_key']
|
62
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
63
|
+
:header_params => header_params,
|
64
|
+
:query_params => query_params,
|
65
|
+
:form_params => form_params,
|
66
|
+
:body => post_body,
|
67
|
+
:auth_names => auth_names,
|
68
|
+
:return_type => 'GenericApiResponse')
|
69
|
+
if @api_client.config.debugging
|
70
|
+
@api_client.config.logger.debug "API called: SavedQueriesApi#delete_saved_query_using_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
71
|
+
end
|
72
|
+
return data, status_code, headers
|
73
|
+
end
|
74
|
+
# Get saved queries for an app
|
75
|
+
# @param app_id appId
|
76
|
+
# @param [Hash] opts the optional parameters
|
77
|
+
# @return [GenericApiResponse]
|
78
|
+
def get_saved_queries_for_app_using_get(app_id, opts = {})
|
79
|
+
data, _status_code, _headers = get_saved_queries_for_app_using_get_with_http_info(app_id, opts)
|
80
|
+
data
|
81
|
+
end
|
82
|
+
|
83
|
+
# Get saved queries for an app
|
84
|
+
# @param app_id appId
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
87
|
+
def get_saved_queries_for_app_using_get_with_http_info(app_id, opts = {})
|
88
|
+
if @api_client.config.debugging
|
89
|
+
@api_client.config.logger.debug 'Calling API: SavedQueriesApi.get_saved_queries_for_app_using_get ...'
|
90
|
+
end
|
91
|
+
# verify the required parameter 'app_id' is set
|
92
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
93
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling SavedQueriesApi.get_saved_queries_for_app_using_get"
|
94
|
+
end
|
95
|
+
# resource path
|
96
|
+
local_var_path = '/users-web/api/v3/apps/{appId}/savedQueries'.sub('{' + 'appId' + '}', app_id.to_s)
|
97
|
+
|
98
|
+
# query parameters
|
99
|
+
query_params = {}
|
100
|
+
|
101
|
+
# header parameters
|
102
|
+
header_params = {}
|
103
|
+
# HTTP header 'Accept' (if needed)
|
104
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
105
|
+
# HTTP header 'Content-Type'
|
106
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
107
|
+
|
108
|
+
# form parameters
|
109
|
+
form_params = {}
|
110
|
+
|
111
|
+
# http body (model)
|
112
|
+
post_body = nil
|
113
|
+
auth_names = ['api_key']
|
114
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
115
|
+
:header_params => header_params,
|
116
|
+
:query_params => query_params,
|
117
|
+
:form_params => form_params,
|
118
|
+
:body => post_body,
|
119
|
+
:auth_names => auth_names,
|
120
|
+
:return_type => 'GenericApiResponse')
|
121
|
+
if @api_client.config.debugging
|
122
|
+
@api_client.config.logger.debug "API called: SavedQueriesApi#get_saved_queries_for_app_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
123
|
+
end
|
124
|
+
return data, status_code, headers
|
125
|
+
end
|
126
|
+
# Create saved query
|
127
|
+
# @param saved_query_dto savedQueryDto
|
128
|
+
# @param [Hash] opts the optional parameters
|
129
|
+
# @return [GenericApiResponse]
|
130
|
+
def save_query_using_post(saved_query_dto, opts = {})
|
131
|
+
data, _status_code, _headers = save_query_using_post_with_http_info(saved_query_dto, opts)
|
132
|
+
data
|
133
|
+
end
|
134
|
+
|
135
|
+
# Create saved query
|
136
|
+
# @param saved_query_dto savedQueryDto
|
137
|
+
# @param [Hash] opts the optional parameters
|
138
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
139
|
+
def save_query_using_post_with_http_info(saved_query_dto, opts = {})
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug 'Calling API: SavedQueriesApi.save_query_using_post ...'
|
142
|
+
end
|
143
|
+
# verify the required parameter 'saved_query_dto' is set
|
144
|
+
if @api_client.config.client_side_validation && saved_query_dto.nil?
|
145
|
+
fail ArgumentError, "Missing the required parameter 'saved_query_dto' when calling SavedQueriesApi.save_query_using_post"
|
146
|
+
end
|
147
|
+
# resource path
|
148
|
+
local_var_path = '/users-web/api/v3/savedQueries'
|
149
|
+
|
150
|
+
# query parameters
|
151
|
+
query_params = {}
|
152
|
+
|
153
|
+
# header parameters
|
154
|
+
header_params = {}
|
155
|
+
# HTTP header 'Accept' (if needed)
|
156
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
157
|
+
# HTTP header 'Content-Type'
|
158
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
159
|
+
|
160
|
+
# form parameters
|
161
|
+
form_params = {}
|
162
|
+
|
163
|
+
# http body (model)
|
164
|
+
post_body = @api_client.object_to_http_body(saved_query_dto)
|
165
|
+
auth_names = ['api_key']
|
166
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
167
|
+
:header_params => header_params,
|
168
|
+
:query_params => query_params,
|
169
|
+
:form_params => form_params,
|
170
|
+
:body => post_body,
|
171
|
+
:auth_names => auth_names,
|
172
|
+
:return_type => 'GenericApiResponse')
|
173
|
+
if @api_client.config.debugging
|
174
|
+
@api_client.config.logger.debug "API called: SavedQueriesApi#save_query_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
175
|
+
end
|
176
|
+
return data, status_code, headers
|
177
|
+
end
|
178
|
+
# Update saved query
|
179
|
+
# @param saved_query_dto savedQueryDto
|
180
|
+
# @param updateable_query_id updateableQueryId
|
181
|
+
# @param [Hash] opts the optional parameters
|
182
|
+
# @return [GenericApiResponse]
|
183
|
+
def save_query_using_put(saved_query_dto, updateable_query_id, opts = {})
|
184
|
+
data, _status_code, _headers = save_query_using_put_with_http_info(saved_query_dto, updateable_query_id, opts)
|
185
|
+
data
|
186
|
+
end
|
187
|
+
|
188
|
+
# Update saved query
|
189
|
+
# @param saved_query_dto savedQueryDto
|
190
|
+
# @param updateable_query_id updateableQueryId
|
191
|
+
# @param [Hash] opts the optional parameters
|
192
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
193
|
+
def save_query_using_put_with_http_info(saved_query_dto, updateable_query_id, opts = {})
|
194
|
+
if @api_client.config.debugging
|
195
|
+
@api_client.config.logger.debug 'Calling API: SavedQueriesApi.save_query_using_put ...'
|
196
|
+
end
|
197
|
+
# verify the required parameter 'saved_query_dto' is set
|
198
|
+
if @api_client.config.client_side_validation && saved_query_dto.nil?
|
199
|
+
fail ArgumentError, "Missing the required parameter 'saved_query_dto' when calling SavedQueriesApi.save_query_using_put"
|
200
|
+
end
|
201
|
+
# verify the required parameter 'updateable_query_id' is set
|
202
|
+
if @api_client.config.client_side_validation && updateable_query_id.nil?
|
203
|
+
fail ArgumentError, "Missing the required parameter 'updateable_query_id' when calling SavedQueriesApi.save_query_using_put"
|
204
|
+
end
|
205
|
+
# resource path
|
206
|
+
local_var_path = '/users-web/api/v3/savedQueries/{updateableQueryId}'.sub('{' + 'updateableQueryId' + '}', updateable_query_id.to_s)
|
207
|
+
|
208
|
+
# query parameters
|
209
|
+
query_params = {}
|
210
|
+
|
211
|
+
# header parameters
|
212
|
+
header_params = {}
|
213
|
+
# HTTP header 'Accept' (if needed)
|
214
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
215
|
+
# HTTP header 'Content-Type'
|
216
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
217
|
+
|
218
|
+
# form parameters
|
219
|
+
form_params = {}
|
220
|
+
|
221
|
+
# http body (model)
|
222
|
+
post_body = @api_client.object_to_http_body(saved_query_dto)
|
223
|
+
auth_names = ['api_key']
|
224
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
225
|
+
:header_params => header_params,
|
226
|
+
:query_params => query_params,
|
227
|
+
:form_params => form_params,
|
228
|
+
:body => post_body,
|
229
|
+
:auth_names => auth_names,
|
230
|
+
:return_type => 'GenericApiResponse')
|
231
|
+
if @api_client.config.debugging
|
232
|
+
@api_client.config.logger.debug "API called: SavedQueriesApi#save_query_using_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
233
|
+
end
|
234
|
+
return data, status_code, headers
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
@@ -0,0 +1,133 @@
|
|
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 SubscriptionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get subscriptions for an app
|
23
|
+
# @param app_id appId
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [GenericApiResponse]
|
26
|
+
def list_using_get1(app_id, opts = {})
|
27
|
+
data, _status_code, _headers = list_using_get1_with_http_info(app_id, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Get subscriptions for an app
|
32
|
+
# @param app_id appId
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
35
|
+
def list_using_get1_with_http_info(app_id, opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.list_using_get1 ...'
|
38
|
+
end
|
39
|
+
# verify the required parameter 'app_id' is set
|
40
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling SubscriptionsApi.list_using_get1"
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/users-web/api/v3/apps/{appId}/subscriptions'.sub('{' + 'appId' + '}', app_id.to_s)
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
53
|
+
# HTTP header 'Content-Type'
|
54
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = nil
|
61
|
+
auth_names = ['api_key']
|
62
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
63
|
+
:header_params => header_params,
|
64
|
+
:query_params => query_params,
|
65
|
+
:form_params => form_params,
|
66
|
+
:body => post_body,
|
67
|
+
:auth_names => auth_names,
|
68
|
+
:return_type => 'GenericApiResponse')
|
69
|
+
if @api_client.config.debugging
|
70
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#list_using_get1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
71
|
+
end
|
72
|
+
return data, status_code, headers
|
73
|
+
end
|
74
|
+
# Trigger emailing of report for an app
|
75
|
+
# @param app_id appId
|
76
|
+
# @param email_dto emailDto
|
77
|
+
# @param [Hash] opts the optional parameters
|
78
|
+
# @return [GenericApiResponse]
|
79
|
+
def send_report_using_post(app_id, email_dto, opts = {})
|
80
|
+
data, _status_code, _headers = send_report_using_post_with_http_info(app_id, email_dto, opts)
|
81
|
+
data
|
82
|
+
end
|
83
|
+
|
84
|
+
# Trigger emailing of report for an app
|
85
|
+
# @param app_id appId
|
86
|
+
# @param email_dto emailDto
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
89
|
+
def send_report_using_post_with_http_info(app_id, email_dto, opts = {})
|
90
|
+
if @api_client.config.debugging
|
91
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.send_report_using_post ...'
|
92
|
+
end
|
93
|
+
# verify the required parameter 'app_id' is set
|
94
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
95
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling SubscriptionsApi.send_report_using_post"
|
96
|
+
end
|
97
|
+
# verify the required parameter 'email_dto' is set
|
98
|
+
if @api_client.config.client_side_validation && email_dto.nil?
|
99
|
+
fail ArgumentError, "Missing the required parameter 'email_dto' when calling SubscriptionsApi.send_report_using_post"
|
100
|
+
end
|
101
|
+
# resource path
|
102
|
+
local_var_path = '/users-web/api/v3/apps/{appId}/report/send'.sub('{' + 'appId' + '}', app_id.to_s)
|
103
|
+
|
104
|
+
# query parameters
|
105
|
+
query_params = {}
|
106
|
+
|
107
|
+
# header parameters
|
108
|
+
header_params = {}
|
109
|
+
# HTTP header 'Accept' (if needed)
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
111
|
+
# HTTP header 'Content-Type'
|
112
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
113
|
+
|
114
|
+
# form parameters
|
115
|
+
form_params = {}
|
116
|
+
|
117
|
+
# http body (model)
|
118
|
+
post_body = @api_client.object_to_http_body(email_dto)
|
119
|
+
auth_names = ['api_key']
|
120
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
121
|
+
:header_params => header_params,
|
122
|
+
:query_params => query_params,
|
123
|
+
:form_params => form_params,
|
124
|
+
:body => post_body,
|
125
|
+
:auth_names => auth_names,
|
126
|
+
:return_type => 'GenericApiResponse')
|
127
|
+
if @api_client.config.debugging
|
128
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#send_report_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
129
|
+
end
|
130
|
+
return data, status_code, headers
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|