SematextCloud 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/LICENSE +13 -0
  4. data/README.md +149 -0
  5. data/Rakefile +8 -0
  6. data/SematextCloud.gemspec +45 -0
  7. data/docs/AlertNotificationRequest.md +9 -0
  8. data/docs/AlertNotificationsApi.md +118 -0
  9. data/docs/AlertRule.md +53 -0
  10. data/docs/AlertRuleScheduleTimeRangeDto.md +7 -0
  11. data/docs/AlertRuleScheduleWeekdayDto.md +10 -0
  12. data/docs/AlertsApi.md +270 -0
  13. data/docs/App.md +32 -0
  14. data/docs/AppDescription.md +6 -0
  15. data/docs/AppMetadata.md +10 -0
  16. data/docs/AppsApi.md +369 -0
  17. data/docs/AwsSettingsControllerApi.md +63 -0
  18. data/docs/BasicAuthMethodDto.md +7 -0
  19. data/docs/BasicOrganizationDto.md +9 -0
  20. data/docs/BillingApi.md +176 -0
  21. data/docs/BillingInfo.md +8 -0
  22. data/docs/CloudWatchSettings.md +9 -0
  23. data/docs/CreateAppInfo.md +10 -0
  24. data/docs/DataSeriesFilter.md +8 -0
  25. data/docs/DataSeriesRequest.md +12 -0
  26. data/docs/Error.md +7 -0
  27. data/docs/FilterValue.md +11 -0
  28. data/docs/GenericApiResponse.md +9 -0
  29. data/docs/Invitation.md +15 -0
  30. data/docs/LogsAppApi.md +58 -0
  31. data/docs/MetricsApi.md +227 -0
  32. data/docs/MonitoringAppApi.md +58 -0
  33. data/docs/NotificationIntegration.md +15 -0
  34. data/docs/Plan.md +18 -0
  35. data/docs/ReportInfo.md +13 -0
  36. data/docs/ResetPasswordApi.md +58 -0
  37. data/docs/SavedQueriesApi.md +220 -0
  38. data/docs/SavedQuery.md +18 -0
  39. data/docs/ServiceIntegration.md +17 -0
  40. data/docs/SubscriptionsApi.md +114 -0
  41. data/docs/TagApiControllerApi.md +212 -0
  42. data/docs/UpdateAppInfo.md +14 -0
  43. data/docs/UserInfo.md +6 -0
  44. data/docs/UserPermissions.md +8 -0
  45. data/docs/UserRole.md +8 -0
  46. data/lib/SematextCloud.rb +78 -0
  47. data/lib/SematextCloud/api/alert_notifications_api.rb +137 -0
  48. data/lib/SematextCloud/api/alerts_api.rb +283 -0
  49. data/lib/SematextCloud/api/apps_api.rb +381 -0
  50. data/lib/SematextCloud/api/aws_settings_controller_api.rb +83 -0
  51. data/lib/SematextCloud/api/billing_api.rb +197 -0
  52. data/lib/SematextCloud/api/logs_app_api.rb +75 -0
  53. data/lib/SematextCloud/api/metrics_api.rb +247 -0
  54. data/lib/SematextCloud/api/monitoring_app_api.rb +75 -0
  55. data/lib/SematextCloud/api/reset_password_api.rb +75 -0
  56. data/lib/SematextCloud/api/saved_queries_api.rb +237 -0
  57. data/lib/SematextCloud/api/subscriptions_api.rb +133 -0
  58. data/lib/SematextCloud/api/tag_api_controller_api.rb +247 -0
  59. data/lib/SematextCloud/api_client.rb +389 -0
  60. data/lib/SematextCloud/api_error.rb +38 -0
  61. data/lib/SematextCloud/configuration.rb +209 -0
  62. data/lib/SematextCloud/models/alert_notification_request.rb +212 -0
  63. data/lib/SematextCloud/models/alert_rule.rb +652 -0
  64. data/lib/SematextCloud/models/alert_rule_schedule_time_range_dto.rb +192 -0
  65. data/lib/SematextCloud/models/alert_rule_schedule_weekday_dto.rb +221 -0
  66. data/lib/SematextCloud/models/app.rb +419 -0
  67. data/lib/SematextCloud/models/app_description.rb +183 -0
  68. data/lib/SematextCloud/models/app_metadata.rb +268 -0
  69. data/lib/SematextCloud/models/basic_auth_method_dto.rb +226 -0
  70. data/lib/SematextCloud/models/basic_organization_dto.rb +246 -0
  71. data/lib/SematextCloud/models/billing_info.rb +201 -0
  72. data/lib/SematextCloud/models/cloud_watch_settings.rb +256 -0
  73. data/lib/SematextCloud/models/create_app_info.rb +220 -0
  74. data/lib/SematextCloud/models/data_series_filter.rb +237 -0
  75. data/lib/SematextCloud/models/data_series_request.rb +283 -0
  76. data/lib/SematextCloud/models/error.rb +192 -0
  77. data/lib/SematextCloud/models/filter_value.rb +230 -0
  78. data/lib/SematextCloud/models/generic_api_response.rb +214 -0
  79. data/lib/SematextCloud/models/invitation.rb +326 -0
  80. data/lib/SematextCloud/models/notification_integration.rb +324 -0
  81. data/lib/SematextCloud/models/plan.rb +337 -0
  82. data/lib/SematextCloud/models/report_info.rb +247 -0
  83. data/lib/SematextCloud/models/saved_query.rb +291 -0
  84. data/lib/SematextCloud/models/service_integration.rb +282 -0
  85. data/lib/SematextCloud/models/update_app_info.rb +289 -0
  86. data/lib/SematextCloud/models/user_info.rb +183 -0
  87. data/lib/SematextCloud/models/user_permissions.rb +201 -0
  88. data/lib/SematextCloud/models/user_role.rb +247 -0
  89. data/lib/SematextCloud/version.rb +15 -0
  90. data/spec/api/alert_notifications_api_spec.rb +60 -0
  91. data/spec/api/alerts_api_spec.rb +90 -0
  92. data/spec/api/apps_api_spec.rb +113 -0
  93. data/spec/api/aws_settings_controller_api_spec.rb +48 -0
  94. data/spec/api/billing_api_spec.rb +72 -0
  95. data/spec/api/logs_app_api_spec.rb +46 -0
  96. data/spec/api/metrics_api_spec.rb +83 -0
  97. data/spec/api/monitoring_app_api_spec.rb +46 -0
  98. data/spec/api/reset_password_api_spec.rb +46 -0
  99. data/spec/api/saved_queries_api_spec.rb +80 -0
  100. data/spec/api/subscriptions_api_spec.rb +58 -0
  101. data/spec/api/tag_api_controller_api_spec.rb +88 -0
  102. data/spec/api_client_spec.rb +226 -0
  103. data/spec/configuration_spec.rb +42 -0
  104. data/spec/models/alert_notification_request_spec.rb +59 -0
  105. data/spec/models/alert_rule_schedule_time_range_dto_spec.rb +47 -0
  106. data/spec/models/alert_rule_schedule_weekday_dto_spec.rb +65 -0
  107. data/spec/models/alert_rule_spec.rb +327 -0
  108. data/spec/models/app_description_spec.rb +41 -0
  109. data/spec/models/app_metadata_spec.rb +77 -0
  110. data/spec/models/app_spec.rb +197 -0
  111. data/spec/models/basic_auth_method_dto_spec.rb +51 -0
  112. data/spec/models/basic_organization_dto_spec.rb +63 -0
  113. data/spec/models/billing_info_spec.rb +53 -0
  114. data/spec/models/cloud_watch_settings_spec.rb +67 -0
  115. data/spec/models/create_app_info_spec.rb +65 -0
  116. data/spec/models/data_series_filter_spec.rb +57 -0
  117. data/spec/models/data_series_request_spec.rb +81 -0
  118. data/spec/models/error_spec.rb +47 -0
  119. data/spec/models/filter_value_spec.rb +71 -0
  120. data/spec/models/generic_api_response_spec.rb +59 -0
  121. data/spec/models/invitation_spec.rb +107 -0
  122. data/spec/models/notification_integration_spec.rb +107 -0
  123. data/spec/models/plan_spec.rb +121 -0
  124. data/spec/models/report_info_spec.rb +83 -0
  125. data/spec/models/saved_query_spec.rb +113 -0
  126. data/spec/models/service_integration_spec.rb +107 -0
  127. data/spec/models/update_app_info_spec.rb +93 -0
  128. data/spec/models/user_info_spec.rb +41 -0
  129. data/spec/models/user_permissions_spec.rb +53 -0
  130. data/spec/models/user_role_spec.rb +61 -0
  131. data/spec/spec_helper.rb +111 -0
  132. metadata +395 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 725cb4d891d56d4bbd80dce9968b1eb0212f44e826d553886b443c29bbfdf544
4
+ data.tar.gz: d4df7643a97b03195014754049cc717ea3a6c7aae64e612a4a959f40dd4e76e8
5
+ SHA512:
6
+ metadata.gz: 11843a61e80689be1ed2c50dc2c5fbccb9f9830086517abedb0a1fdee22f9df42ff747b03aeba9dcebbba0417477e37bceb4a01c2bc8aeebf7868e4f4a5fe35c
7
+ data.tar.gz: 8d5fb8af47cc27c3a8f87edff35ed2b280a242185a54ce54382241208459e8bc75417cde7272dbb502b4cbb6410318a8c06ea29383c43b3422caff37d22694d1
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+ end
data/LICENSE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2020 Sematext Inc.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
@@ -0,0 +1,149 @@
1
+ # Sematext Cloud - API Client - sematext-api-ruby
2
+
3
+ This Ruby gem contains client code talks to [Sematext Cloud API](https://sematext.com/cloud/) providing a way to automate setup of solution monitoring.<br>
4
+ It's primary purpose is as a client module supporting [Sematext Terraform Provider](https://github.com/sematext/terraform-provider-sematext)
5
+ <br><br>
6
+
7
+ Further information and API browsing refer to the [Sematext Cloud API web page](https://sematext.com/docs/api/)
8
+
9
+
10
+ ## Installation
11
+
12
+ ### Build a gem
13
+
14
+ To build the Ruby code into a gem:
15
+
16
+ ```shell
17
+ gem build SematextCloud.gemspec
18
+ ```
19
+
20
+ Then either install the gem locally:
21
+
22
+ ```shell
23
+ gem install ./SematextCloud-0.1.0.gem
24
+ ```
25
+ (for development, run `gem install --dev ./SematextCloud-0.1.0.gem` to install the development dependencies)
26
+
27
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
28
+
29
+ Finally add this to the Gemfile:
30
+
31
+ gem 'SematextCloud', '~> 0.1.0'
32
+
33
+ ### Install from Git
34
+
35
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
36
+
37
+ gem 'SematextCloud', :git => 'https://github.com/sematext/sematext-api-client-ruby.git'
38
+
39
+ ### Include the Ruby code directly
40
+
41
+ Include the Ruby code directly using `-I` as follows:
42
+
43
+ ```shell
44
+ ruby -Ilib script.rb
45
+ ```
46
+
47
+ ## Getting Started
48
+
49
+ Please follow the [installation](#installation) procedure and then run the following code:
50
+ ```ruby
51
+ # Load the gem
52
+ require 'SematextCloud'
53
+
54
+ # Setup authorization
55
+ SematextCloud.configure do |config|
56
+ # Configure API key authorization: api_key
57
+ config.api_key['Authorization'] = 'YOUR API KEY'
58
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
59
+ #config.api_key_prefix['Authorization'] = 'Bearer'
60
+ end
61
+
62
+ api_instance = SematextCloud::AlertNotificationsApi.new
63
+
64
+ app_id = 789 # Integer | appId
65
+
66
+ time_interval = SematextCloud::AlertNotificationRequest.new # AlertNotificationRequest | Time Interval
67
+
68
+
69
+ begin
70
+ #Get alert notifications for an app
71
+ result = api_instance.get_alert_notifications_for_app_using_post(app_id, time_interval)
72
+ p result
73
+ rescue SematextCloud::ApiError => e
74
+ puts "Exception when calling AlertNotificationsApi->get_alert_notifications_for_app_using_post: #{e}"
75
+ end
76
+
77
+ ```
78
+
79
+ ## Documentation for API Endpoints
80
+
81
+ All URIs are relative to *https://localhost*
82
+
83
+ Class | Method | HTTP request | Description
84
+ ------------ | ------------- | ------------- | -------------
85
+ *SematextCloud::AlertNotificationsApi* | [**get_alert_notifications_for_app_using_post**](docs/AlertNotificationsApi.md#get_alert_notifications_for_app_using_post) | **POST** /users-web/api/v3/apps/{appId}/notifications/alerts | Get alert notifications for an app
86
+ *SematextCloud::AlertNotificationsApi* | [**get_alert_notifications_for_user_using_post**](docs/AlertNotificationsApi.md#get_alert_notifications_for_user_using_post) | **POST** /users-web/api/v3/notifications/alerts | Get alert notifications for a user
87
+ *SematextCloud::AlertsApi* | [**create_alert_using_post**](docs/AlertsApi.md#create_alert_using_post) | **POST** /users-web/api/v3/alerts | Create alert rule
88
+ *SematextCloud::AlertsApi* | [**delete_alert_rule_using_delete**](docs/AlertsApi.md#delete_alert_rule_using_delete) | **DELETE** /users-web/api/v3/alerts/{updateableAlertId} | Delete alert rule
89
+ *SematextCloud::AlertsApi* | [**disable_alert_rule_using_put**](docs/AlertsApi.md#disable_alert_rule_using_put) | **PUT** /users-web/api/v3/alerts/{updateableAlertId}/disable | Disable alert rule
90
+ *SematextCloud::AlertsApi* | [**enable_alert_rule_using_put**](docs/AlertsApi.md#enable_alert_rule_using_put) | **PUT** /users-web/api/v3/alerts/{updateableAlertId}/enable | Enable alert rule
91
+ *SematextCloud::AlertsApi* | [**get_alert_rules_for_app_using_get**](docs/AlertsApi.md#get_alert_rules_for_app_using_get) | **GET** /users-web/api/v3/apps/{appId}/alerts | Get alert rules for an app
92
+ *SematextCloud::AppsApi* | [**get_app_types_using_get**](docs/AppsApi.md#get_app_types_using_get) | **GET** /users-web/api/v3/apps/types | Get all App types supported for the account identified with apiKey
93
+ *SematextCloud::AppsApi* | [**get_using_get**](docs/AppsApi.md#get_using_get) | **GET** /users-web/api/v3/apps/{anyStateAppId} | Gets defails for one particular App
94
+ *SematextCloud::AppsApi* | [**invite_app_guests_using_post**](docs/AppsApi.md#invite_app_guests_using_post) | **POST** /users-web/api/v3/apps/guests | Invite guests to an app
95
+ *SematextCloud::AppsApi* | [**list_apps_users_using_get**](docs/AppsApi.md#list_apps_users_using_get) | **GET** /users-web/api/v3/apps/users | Get all users of apps accessible to this account
96
+ *SematextCloud::AppsApi* | [**list_using_get**](docs/AppsApi.md#list_using_get) | **GET** /users-web/api/v3/apps | Get all apps accessible by account identified with apiKey
97
+ *SematextCloud::AppsApi* | [**update_description_using_put**](docs/AppsApi.md#update_description_using_put) | **PUT** /users-web/api/v3/apps/{anyStateAppId}/description | Update description of the app
98
+ *SematextCloud::AppsApi* | [**update_using_put1**](docs/AppsApi.md#update_using_put1) | **PUT** /users-web/api/v3/apps/{anyStateAppId} | Update app
99
+ *SematextCloud::AwsSettingsControllerApi* | [**update_using_put**](docs/AwsSettingsControllerApi.md#update_using_put) | **PUT** /users-web/api/v3/apps/{appId}/aws | Update App's AWS CloudWatch settings
100
+ *SematextCloud::BillingApi* | [**get_detailed_invoice_using_get**](docs/BillingApi.md#get_detailed_invoice_using_get) | **GET** /users-web/api/v3/billing/invoice/{service}/{year}/{month} | Get invoice details
101
+ *SematextCloud::BillingApi* | [**list_available_plans_using_get**](docs/BillingApi.md#list_available_plans_using_get) | **GET** /users-web/api/v3/billing/availablePlans | Get available plans
102
+ *SematextCloud::BillingApi* | [**update_plan_using_put**](docs/BillingApi.md#update_plan_using_put) | **PUT** /users-web/api/v3/billing/info/{appId} | Update plan for an app
103
+ *SematextCloud::LogsAppApi* | [**create_logsene_application**](docs/LogsAppApi.md#create_logsene_application) | **POST** /logsene-reports/api/v3/apps | Create Logs App
104
+ *SematextCloud::MetricsApi* | [**list_data_series_using_post**](docs/MetricsApi.md#list_data_series_using_post) | **POST** /spm-reports/api/v3/apps/{appId}/metrics/data | Get metrics data points for an app
105
+ *SematextCloud::MetricsApi* | [**list_filters_using_post**](docs/MetricsApi.md#list_filters_using_post) | **POST** /spm-reports/api/v3/apps/{appId}/metrics/filters | Get metrics filters and their values for an app
106
+ *SematextCloud::MetricsApi* | [**list_metrics_keys_using_get**](docs/MetricsApi.md#list_metrics_keys_using_get) | **GET** /spm-reports/api/v3/apps/{appId}/metrics/keys | Get metrics keys for an app
107
+ *SematextCloud::MetricsApi* | [**list_metrics_using_get**](docs/MetricsApi.md#list_metrics_using_get) | **GET** /spm-reports/api/v3/apps/{appId}/metrics | Get metrics info for an app
108
+ *SematextCloud::MonitoringAppApi* | [**create_spm_application1**](docs/MonitoringAppApi.md#create_spm_application1) | **POST** /spm-reports/api/v3/apps | Create Monitoring App
109
+ *SematextCloud::ResetPasswordApi* | [**reset_password_using_post**](docs/ResetPasswordApi.md#reset_password_using_post) | **POST** /users-web/api/v3/account/password/reset | Reset Password
110
+ *SematextCloud::SavedQueriesApi* | [**delete_saved_query_using_delete**](docs/SavedQueriesApi.md#delete_saved_query_using_delete) | **DELETE** /users-web/api/v3/savedQueries/{updateableQueryId} | Delete saved query
111
+ *SematextCloud::SavedQueriesApi* | [**get_saved_queries_for_app_using_get**](docs/SavedQueriesApi.md#get_saved_queries_for_app_using_get) | **GET** /users-web/api/v3/apps/{appId}/savedQueries | Get saved queries for an app
112
+ *SematextCloud::SavedQueriesApi* | [**save_query_using_post**](docs/SavedQueriesApi.md#save_query_using_post) | **POST** /users-web/api/v3/savedQueries | Create saved query
113
+ *SematextCloud::SavedQueriesApi* | [**save_query_using_put**](docs/SavedQueriesApi.md#save_query_using_put) | **PUT** /users-web/api/v3/savedQueries/{updateableQueryId} | Update saved query
114
+ *SematextCloud::SubscriptionsApi* | [**list_using_get1**](docs/SubscriptionsApi.md#list_using_get1) | **GET** /users-web/api/v3/apps/{appId}/subscriptions | Get subscriptions for an app
115
+ *SematextCloud::SubscriptionsApi* | [**send_report_using_post**](docs/SubscriptionsApi.md#send_report_using_post) | **POST** /users-web/api/v3/apps/{appId}/report/send | Trigger emailing of report for an app
116
+ *SematextCloud::TagApiControllerApi* | [**get_tag_names_using_get**](docs/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.
117
+ *SematextCloud::TagApiControllerApi* | [**get_using_get1**](docs/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.
118
+ *SematextCloud::TagApiControllerApi* | [**get_using_get2**](docs/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.
119
+
120
+
121
+ ## Documentation for Models
122
+
123
+ - [SematextCloud::AlertNotificationRequest](docs/AlertNotificationRequest.md)
124
+ - [SematextCloud::AlertRule](docs/AlertRule.md)
125
+ - [SematextCloud::AlertRuleScheduleTimeRangeDto](docs/AlertRuleScheduleTimeRangeDto.md)
126
+ - [SematextCloud::AlertRuleScheduleWeekdayDto](docs/AlertRuleScheduleWeekdayDto.md)
127
+ - [SematextCloud::App](docs/App.md)
128
+ - [SematextCloud::AppDescription](docs/AppDescription.md)
129
+ - [SematextCloud::AppMetadata](docs/AppMetadata.md)
130
+ - [SematextCloud::BasicAuthMethodDto](docs/BasicAuthMethodDto.md)
131
+ - [SematextCloud::BasicOrganizationDto](docs/BasicOrganizationDto.md)
132
+ - [SematextCloud::BillingInfo](docs/BillingInfo.md)
133
+ - [SematextCloud::CloudWatchSettings](docs/CloudWatchSettings.md)
134
+ - [SematextCloud::CreateAppInfo](docs/CreateAppInfo.md)
135
+ - [SematextCloud::DataSeriesFilter](docs/DataSeriesFilter.md)
136
+ - [SematextCloud::DataSeriesRequest](docs/DataSeriesRequest.md)
137
+ - [SematextCloud::Error](docs/Error.md)
138
+ - [SematextCloud::FilterValue](docs/FilterValue.md)
139
+ - [SematextCloud::GenericApiResponse](docs/GenericApiResponse.md)
140
+ - [SematextCloud::Invitation](docs/Invitation.md)
141
+ - [SematextCloud::NotificationIntegration](docs/NotificationIntegration.md)
142
+ - [SematextCloud::Plan](docs/Plan.md)
143
+ - [SematextCloud::ReportInfo](docs/ReportInfo.md)
144
+ - [SematextCloud::SavedQuery](docs/SavedQuery.md)
145
+ - [SematextCloud::ServiceIntegration](docs/ServiceIntegration.md)
146
+ - [SematextCloud::UpdateAppInfo](docs/UpdateAppInfo.md)
147
+ - [SematextCloud::UserInfo](docs/UserInfo.md)
148
+ - [SematextCloud::UserPermissions](docs/UserPermissions.md)
149
+ - [SematextCloud::UserRole](docs/UserRole.md)
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,45 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #Sematext Cloud API
5
+
6
+ #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`.
7
+
8
+ OpenAPI spec version: v3
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 2.4.12
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "SematextCloud/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "SematextCloud"
20
+ s.version = SematextCloud::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["sematext.com"]
23
+ s.email = ["support@sematext.com"]
24
+ s.homepage = "https://github.com/sematext/sematext-api-client-ruby"
25
+ s.summary = "Sematext Cloud API Client for talking to https://sematext.com/docs/api/"
26
+ s.description = "Sematext Cloud API Client for talking to https://sematext.com/docs/api/"
27
+ s.license = 'Apache-2.0'
28
+ s.required_ruby_version = ">= 1.9"
29
+
30
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
+
33
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
35
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
36
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
37
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
38
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
39
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
40
+
41
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
42
+ s.test_files = `find spec/*`.split("\n")
43
+ s.executables = []
44
+ s.require_paths = ["lib"]
45
+ end
@@ -0,0 +1,9 @@
1
+ # SematextCloud::AlertNotificationRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **default_interval** | **Integer** | | [optional]
7
+ **_end** | **String** | End time of interval. Can be expressed as timestamp in milliseconds or UTC date in yyyy-MM-dd HH:mm:ss format | [optional]
8
+ **interval** | **String** | | [optional]
9
+ **start** | **String** | Start time of interval. Can be expressed as timestamp in milliseconds or UTC date in yyyy-MM-dd HH:mm:ss format | [optional]
@@ -0,0 +1,118 @@
1
+ # SematextCloud::AlertNotificationsApi
2
+
3
+ All URIs are relative to *https://localhost*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_alert_notifications_for_app_using_post**](AlertNotificationsApi.md#get_alert_notifications_for_app_using_post) | **POST** /users-web/api/v3/apps/{appId}/notifications/alerts | Get alert notifications for an app
8
+ [**get_alert_notifications_for_user_using_post**](AlertNotificationsApi.md#get_alert_notifications_for_user_using_post) | **POST** /users-web/api/v3/notifications/alerts | Get alert notifications for a user
9
+
10
+
11
+ # **get_alert_notifications_for_app_using_post**
12
+ > GenericApiResponse get_alert_notifications_for_app_using_post(app_id, time_interval)
13
+
14
+ Get alert notifications for an app
15
+
16
+ Default value of interval is 1d
17
+
18
+ ### Example
19
+ ```ruby
20
+ # load the gem
21
+ require 'SematextCloud'
22
+ # setup authorization
23
+ SematextCloud.configure do |config|
24
+ # Configure API key authorization: api_key
25
+ config.api_key['Authorization'] = 'YOUR API KEY'
26
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
27
+ #config.api_key_prefix['Authorization'] = 'Bearer'
28
+ end
29
+
30
+ api_instance = SematextCloud::AlertNotificationsApi.new
31
+
32
+ app_id = 789 # Integer | appId
33
+
34
+ time_interval = SematextCloud::AlertNotificationRequest.new # AlertNotificationRequest | Time Interval
35
+
36
+
37
+ begin
38
+ #Get alert notifications for an app
39
+ result = api_instance.get_alert_notifications_for_app_using_post(app_id, time_interval)
40
+ p result
41
+ rescue SematextCloud::ApiError => e
42
+ puts "Exception when calling AlertNotificationsApi->get_alert_notifications_for_app_using_post: #{e}"
43
+ end
44
+ ```
45
+
46
+ ### Parameters
47
+
48
+ Name | Type | Description | Notes
49
+ ------------- | ------------- | ------------- | -------------
50
+ **app_id** | **Integer**| appId |
51
+ **time_interval** | [**AlertNotificationRequest**](AlertNotificationRequest.md)| Time Interval |
52
+
53
+ ### Return type
54
+
55
+ [**GenericApiResponse**](GenericApiResponse.md)
56
+
57
+ ### Authorization
58
+
59
+ [api_key](../README.md#api_key)
60
+
61
+ ### HTTP request headers
62
+
63
+ - **Content-Type**: application/json
64
+ - **Accept**: application/json
65
+
66
+
67
+
68
+ # **get_alert_notifications_for_user_using_post**
69
+ > GenericApiResponse get_alert_notifications_for_user_using_post(time_interval)
70
+
71
+ Get alert notifications for a user
72
+
73
+ Default value of interval is 1d
74
+
75
+ ### Example
76
+ ```ruby
77
+ # load the gem
78
+ require 'SematextCloud'
79
+ # setup authorization
80
+ SematextCloud.configure do |config|
81
+ # Configure API key authorization: api_key
82
+ config.api_key['Authorization'] = 'YOUR API KEY'
83
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
84
+ #config.api_key_prefix['Authorization'] = 'Bearer'
85
+ end
86
+
87
+ api_instance = SematextCloud::AlertNotificationsApi.new
88
+
89
+ time_interval = SematextCloud::AlertNotificationRequest.new # AlertNotificationRequest | Time Interval
90
+
91
+
92
+ begin
93
+ #Get alert notifications for a user
94
+ result = api_instance.get_alert_notifications_for_user_using_post(time_interval)
95
+ p result
96
+ rescue SematextCloud::ApiError => e
97
+ puts "Exception when calling AlertNotificationsApi->get_alert_notifications_for_user_using_post: #{e}"
98
+ end
99
+ ```
100
+
101
+ ### Parameters
102
+
103
+ Name | Type | Description | Notes
104
+ ------------- | ------------- | ------------- | -------------
105
+ **time_interval** | [**AlertNotificationRequest**](AlertNotificationRequest.md)| Time Interval |
106
+
107
+ ### Return type
108
+
109
+ [**GenericApiResponse**](GenericApiResponse.md)
110
+
111
+ ### Authorization
112
+
113
+ [api_key](../README.md#api_key)
114
+
115
+ ### HTTP request headers
116
+
117
+ - **Content-Type**: application/json
118
+ - **Accept**: application/json
@@ -0,0 +1,53 @@
1
+ # SematextCloud::AlertRule
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **account_email** | **String** | | [optional]
7
+ **allowed_app_types** | **Array&lt;Integer&gt;** | | [optional]
8
+ **analyzing_time** | **String** | | [optional]
9
+ **app_display_state** | **String** | | [optional]
10
+ **app_id** | **Integer** | | [optional]
11
+ **app_name** | **String** | | [optional]
12
+ **app_state** | **String** | | [optional]
13
+ **app_token** | **String** | | [optional]
14
+ **app_type** | **String** | | [optional]
15
+ **back_to_normal_needed** | **BOOLEAN** | | [optional]
16
+ **chart_key** | **String** | | [optional]
17
+ **color** | **String** | | [optional]
18
+ **creator_email** | **String** | | [optional]
19
+ **default_agg_type** | **String** | | [optional]
20
+ **description** | **String** | | [optional]
21
+ **disallowed_app_types** | **Array&lt;Integer&gt;** | | [optional]
22
+ **enabled** | **BOOLEAN** | | [optional]
23
+ **estimate_operation** | **String** | | [optional]
24
+ **estimate_value** | **Float** | | [optional]
25
+ **filter_values** | **String** | | [optional]
26
+ **filter_values_obj** | [**Array&lt;FilterValue&gt;**](FilterValue.md) | | [optional]
27
+ **ignore_regular_events_enabled** | **BOOLEAN** | | [optional]
28
+ **integrations** | **String** | | [optional]
29
+ **last_data_received_date** | **Integer** | | [optional]
30
+ **last_sent** | **Integer** | | [optional]
31
+ **last_triggered** | **Integer** | | [optional]
32
+ **metadata** | **Object** | | [optional]
33
+ **metric_key** | **String** | | [optional]
34
+ **metric_label** | **String** | | [optional]
35
+ **min_delay_between_notifications_in_minutes** | **String** | | [optional]
36
+ **name** | **String** | | [optional]
37
+ **notification_emails** | **Array&lt;String&gt;** | | [optional]
38
+ **notification_integrations** | [**Array&lt;NotificationIntegration&gt;**](NotificationIntegration.md) | | [optional]
39
+ **notifications_enabled** | **BOOLEAN** | | [optional]
40
+ **query** | **String** | | [optional]
41
+ **report_name** | **String** | | [optional]
42
+ **rule_key** | **Integer** | | [optional]
43
+ **rule_type** | **String** | | [optional]
44
+ **runbook** | **String** | | [optional]
45
+ **saved_query_id** | **Integer** | | [optional]
46
+ **schedule** | [**Array&lt;AlertRuleScheduleWeekdayDto&gt;**](AlertRuleScheduleWeekdayDto.md) | | [optional]
47
+ **sematext_service** | **String** | | [optional]
48
+ **send_to_email** | **String** | | [optional]
49
+ **timezone** | **String** | | [optional]
50
+ **use_only_alert_rule_integrations** | **BOOLEAN** | | [optional]
51
+ **user_permissions** | [**UserPermissions**](UserPermissions.md) | | [optional]
52
+ **value_column_name** | **String** | | [optional]
53
+ **value_name** | **String** | | [optional]
@@ -0,0 +1,7 @@
1
+ # SematextCloud::AlertRuleScheduleTimeRangeDto
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **_end** | **String** | | [optional]
7
+ **start** | **String** | | [optional]
@@ -0,0 +1,10 @@
1
+ # SematextCloud::AlertRuleScheduleWeekdayDto
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **day** | **String** | | [optional]
7
+ **index** | **Integer** | | [optional]
8
+ **intervals** | [**Array&lt;AlertRuleScheduleTimeRangeDto&gt;**](AlertRuleScheduleTimeRangeDto.md) | | [optional]
9
+ **label** | **String** | | [optional]
10
+ **type** | **String** | | [optional]
@@ -0,0 +1,270 @@
1
+ # SematextCloud::AlertsApi
2
+
3
+ All URIs are relative to *https://localhost*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create_alert_using_post**](AlertsApi.md#create_alert_using_post) | **POST** /users-web/api/v3/alerts | Create alert rule
8
+ [**delete_alert_rule_using_delete**](AlertsApi.md#delete_alert_rule_using_delete) | **DELETE** /users-web/api/v3/alerts/{updateableAlertId} | Delete alert rule
9
+ [**disable_alert_rule_using_put**](AlertsApi.md#disable_alert_rule_using_put) | **PUT** /users-web/api/v3/alerts/{updateableAlertId}/disable | Disable alert rule
10
+ [**enable_alert_rule_using_put**](AlertsApi.md#enable_alert_rule_using_put) | **PUT** /users-web/api/v3/alerts/{updateableAlertId}/enable | Enable alert rule
11
+ [**get_alert_rules_for_app_using_get**](AlertsApi.md#get_alert_rules_for_app_using_get) | **GET** /users-web/api/v3/apps/{appId}/alerts | Get alert rules for an app
12
+
13
+
14
+ # **create_alert_using_post**
15
+ > GenericApiResponse create_alert_using_post(dto)
16
+
17
+ Create alert rule
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'SematextCloud'
23
+ # setup authorization
24
+ SematextCloud.configure do |config|
25
+ # Configure API key authorization: api_key
26
+ config.api_key['Authorization'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ #config.api_key_prefix['Authorization'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = SematextCloud::AlertsApi.new
32
+
33
+ dto = SematextCloud::AlertRule.new # AlertRule | dto
34
+
35
+
36
+ begin
37
+ #Create alert rule
38
+ result = api_instance.create_alert_using_post(dto)
39
+ p result
40
+ rescue SematextCloud::ApiError => e
41
+ puts "Exception when calling AlertsApi->create_alert_using_post: #{e}"
42
+ end
43
+ ```
44
+
45
+ ### Parameters
46
+
47
+ Name | Type | Description | Notes
48
+ ------------- | ------------- | ------------- | -------------
49
+ **dto** | [**AlertRule**](AlertRule.md)| dto |
50
+
51
+ ### Return type
52
+
53
+ [**GenericApiResponse**](GenericApiResponse.md)
54
+
55
+ ### Authorization
56
+
57
+ [api_key](../README.md#api_key)
58
+
59
+ ### HTTP request headers
60
+
61
+ - **Content-Type**: application/json
62
+ - **Accept**: application/json
63
+
64
+
65
+
66
+ # **delete_alert_rule_using_delete**
67
+ > GenericApiResponse delete_alert_rule_using_delete(updateable_alert_id)
68
+
69
+ Delete alert rule
70
+
71
+ ### Example
72
+ ```ruby
73
+ # load the gem
74
+ require 'SematextCloud'
75
+ # setup authorization
76
+ SematextCloud.configure do |config|
77
+ # Configure API key authorization: api_key
78
+ config.api_key['Authorization'] = 'YOUR API KEY'
79
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
80
+ #config.api_key_prefix['Authorization'] = 'Bearer'
81
+ end
82
+
83
+ api_instance = SematextCloud::AlertsApi.new
84
+
85
+ updateable_alert_id = 789 # Integer | updateableAlertId
86
+
87
+
88
+ begin
89
+ #Delete alert rule
90
+ result = api_instance.delete_alert_rule_using_delete(updateable_alert_id)
91
+ p result
92
+ rescue SematextCloud::ApiError => e
93
+ puts "Exception when calling AlertsApi->delete_alert_rule_using_delete: #{e}"
94
+ end
95
+ ```
96
+
97
+ ### Parameters
98
+
99
+ Name | Type | Description | Notes
100
+ ------------- | ------------- | ------------- | -------------
101
+ **updateable_alert_id** | **Integer**| updateableAlertId |
102
+
103
+ ### Return type
104
+
105
+ [**GenericApiResponse**](GenericApiResponse.md)
106
+
107
+ ### Authorization
108
+
109
+ [api_key](../README.md#api_key)
110
+
111
+ ### HTTP request headers
112
+
113
+ - **Content-Type**: application/json
114
+ - **Accept**: application/json
115
+
116
+
117
+
118
+ # **disable_alert_rule_using_put**
119
+ > GenericApiResponse disable_alert_rule_using_put(updateable_alert_id)
120
+
121
+ Disable alert rule
122
+
123
+ ### Example
124
+ ```ruby
125
+ # load the gem
126
+ require 'SematextCloud'
127
+ # setup authorization
128
+ SematextCloud.configure do |config|
129
+ # Configure API key authorization: api_key
130
+ config.api_key['Authorization'] = 'YOUR API KEY'
131
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
132
+ #config.api_key_prefix['Authorization'] = 'Bearer'
133
+ end
134
+
135
+ api_instance = SematextCloud::AlertsApi.new
136
+
137
+ updateable_alert_id = 789 # Integer | updateableAlertId
138
+
139
+
140
+ begin
141
+ #Disable alert rule
142
+ result = api_instance.disable_alert_rule_using_put(updateable_alert_id)
143
+ p result
144
+ rescue SematextCloud::ApiError => e
145
+ puts "Exception when calling AlertsApi->disable_alert_rule_using_put: #{e}"
146
+ end
147
+ ```
148
+
149
+ ### Parameters
150
+
151
+ Name | Type | Description | Notes
152
+ ------------- | ------------- | ------------- | -------------
153
+ **updateable_alert_id** | **Integer**| updateableAlertId |
154
+
155
+ ### Return type
156
+
157
+ [**GenericApiResponse**](GenericApiResponse.md)
158
+
159
+ ### Authorization
160
+
161
+ [api_key](../README.md#api_key)
162
+
163
+ ### HTTP request headers
164
+
165
+ - **Content-Type**: application/json
166
+ - **Accept**: application/json
167
+
168
+
169
+
170
+ # **enable_alert_rule_using_put**
171
+ > GenericApiResponse enable_alert_rule_using_put(updateable_alert_id)
172
+
173
+ Enable alert rule
174
+
175
+ ### Example
176
+ ```ruby
177
+ # load the gem
178
+ require 'SematextCloud'
179
+ # setup authorization
180
+ SematextCloud.configure do |config|
181
+ # Configure API key authorization: api_key
182
+ config.api_key['Authorization'] = 'YOUR API KEY'
183
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
184
+ #config.api_key_prefix['Authorization'] = 'Bearer'
185
+ end
186
+
187
+ api_instance = SematextCloud::AlertsApi.new
188
+
189
+ updateable_alert_id = 789 # Integer | updateableAlertId
190
+
191
+
192
+ begin
193
+ #Enable alert rule
194
+ result = api_instance.enable_alert_rule_using_put(updateable_alert_id)
195
+ p result
196
+ rescue SematextCloud::ApiError => e
197
+ puts "Exception when calling AlertsApi->enable_alert_rule_using_put: #{e}"
198
+ end
199
+ ```
200
+
201
+ ### Parameters
202
+
203
+ Name | Type | Description | Notes
204
+ ------------- | ------------- | ------------- | -------------
205
+ **updateable_alert_id** | **Integer**| updateableAlertId |
206
+
207
+ ### Return type
208
+
209
+ [**GenericApiResponse**](GenericApiResponse.md)
210
+
211
+ ### Authorization
212
+
213
+ [api_key](../README.md#api_key)
214
+
215
+ ### HTTP request headers
216
+
217
+ - **Content-Type**: application/json
218
+ - **Accept**: application/json
219
+
220
+
221
+
222
+ # **get_alert_rules_for_app_using_get**
223
+ > GenericApiResponse get_alert_rules_for_app_using_get(app_id)
224
+
225
+ Get alert rules for an app
226
+
227
+ ### Example
228
+ ```ruby
229
+ # load the gem
230
+ require 'SematextCloud'
231
+ # setup authorization
232
+ SematextCloud.configure do |config|
233
+ # Configure API key authorization: api_key
234
+ config.api_key['Authorization'] = 'YOUR API KEY'
235
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
236
+ #config.api_key_prefix['Authorization'] = 'Bearer'
237
+ end
238
+
239
+ api_instance = SematextCloud::AlertsApi.new
240
+
241
+ app_id = 789 # Integer | appId
242
+
243
+
244
+ begin
245
+ #Get alert rules for an app
246
+ result = api_instance.get_alert_rules_for_app_using_get(app_id)
247
+ p result
248
+ rescue SematextCloud::ApiError => e
249
+ puts "Exception when calling AlertsApi->get_alert_rules_for_app_using_get: #{e}"
250
+ end
251
+ ```
252
+
253
+ ### Parameters
254
+
255
+ Name | Type | Description | Notes
256
+ ------------- | ------------- | ------------- | -------------
257
+ **app_id** | **Integer**| appId |
258
+
259
+ ### Return type
260
+
261
+ [**GenericApiResponse**](GenericApiResponse.md)
262
+
263
+ ### Authorization
264
+
265
+ [api_key](../README.md#api_key)
266
+
267
+ ### HTTP request headers
268
+
269
+ - **Content-Type**: application/json
270
+ - **Accept**: application/json