Class: OpenObserve::Api::Api
- Inherits:
-
Object
- Object
- OpenObserve::Api::Api
- Defined in:
- lib/openobserve-api/api/api.rb
Defined Under Namespace
Classes: Actions, Alerts, CipherKeys, Dashboards, EnrichmentTables, Folders, Functions, Groups, Kv, Pipelines, Reports, Roles, Savedviews, SearchJobs, ServiceAccounts, Short, Streams, Traces, Users, V1, V2
Instance Method Summary collapse
- #_around(org_id:, stream_name:, key:, size:, type: nil, regions: nil, timeout: nil) ⇒ Object
- #_around_post(org_id:, stream_name:, size:, body:, regions: nil, timeout: nil) ⇒ Object
- #_bulk(org_id:, body:) ⇒ Object
- #_json(org_id:, stream_name:, body:) ⇒ Object
- #_multi(org_id:, stream_name:, body:) ⇒ Object
- #_search(org_id:, search_sql_request:, type: nil, is_ui_histogram: nil, is_multi_stream_search: nil, validate: nil) ⇒ Object
- #_search_history(org_id:, search_history_request:) ⇒ Object
- #_search_partition(org_id:, search_partition_request:, type: nil) ⇒ Object
- #_search_stream(org_id:, is_ui_histogram:, is_multi_stream_search:, body:) ⇒ Object
- #_values(org_id:, stream_name:, fields:, size:, from:, start_time:, end_time:, type: nil, filter: nil, keyword: nil, regions: nil, timeout: nil, no_count: nil) ⇒ Object
- #_values_stream(org_id:, body:) ⇒ Object
- #clusters ⇒ Object
- #ingest_metrics__json(org_id:, body:) ⇒ Object
-
#initialize(connection) ⇒ Api
constructor
A new instance of Api.
- #loki_api_v1_push(org_id:, logs_ingestion_loki_request:) ⇒ Object
- #mcp(org_id:, body:) ⇒ Object
- #organizations ⇒ Object
- #organizations_assume_service_account(org_id:, assume_service_account_request:) ⇒ Object
- #organizations_post(create_organization_request:) ⇒ Object
- #passcode(org_id:) ⇒ Object
- #passcode_put(org_id:) ⇒ Object
- #prometheus_api_v1_format_query(query:, org_id:) ⇒ Object
- #prometheus_api_v1_label_values(org_id:, label_name:, match:, start: nil, end_: nil) ⇒ Object
- #prometheus_api_v1_labels(org_id:, match:, start: nil, end_: nil) ⇒ Object
- #prometheus_api_v1_metadata(org_id:, limit:, metric: nil) ⇒ Object
- #prometheus_api_v1_query(org_id:, query:, time: nil, timeout: nil) ⇒ Object
- #prometheus_api_v1_query_range(org_id:, query:, start:, end_:, step: nil, timeout: nil) ⇒ Object
- #prometheus_api_v1_series(org_id:, match:, start: nil, end_: nil) ⇒ Object
- #prometheus_api_v1_write(org_id:, body:) ⇒ Object
- #ratelimit_module_list(org_id:, org_id2:, interval: nil) ⇒ Object
- #ratelimit_role_list(org_id:, org_id2:, user_role:, interval: nil) ⇒ Object
- #ratelimit_update(org_id:, org_id2:, update_type:, body:, user_role: nil, interval: nil) ⇒ Object
- #rename(org_id:, rename_organization_request:) ⇒ Object
- #rumtoken(org_id:) ⇒ Object
- #rumtoken_post(org_id:) ⇒ Object
- #rumtoken_put(org_id:) ⇒ Object
- #settings(org_id:) ⇒ Object
- #settings_post(org_id:, organization_setting_create_request:) ⇒ Object
- #settings_v2(org_id:, user_id: nil, category: nil) ⇒ Object
- #settings_v2_delete(org_id:, key:) ⇒ Object
- #settings_v2_get(org_id:, key:, user_id: nil) ⇒ Object
- #settings_v2_post(org_id:, system_setting_payload:) ⇒ Object
- #settings_v2_user(org_id:, user_id:, system_setting_payload:) ⇒ Object
- #settings_v2_user_delete(org_id:, user_id:, key:) ⇒ Object
- #summary(org_id:) ⇒ Object
Constructor Details
#initialize(connection) ⇒ Api
Returns a new instance of Api.
5 6 7 |
# File 'lib/openobserve-api/api/api.rb', line 5 def initialize(connection) @connection = connection end |
Instance Method Details
#_around(org_id:, stream_name:, key:, size:, type: nil, regions: nil, timeout: nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/openobserve-api/api/api.rb', line 9 def _around(org_id:, stream_name:, key:, size:, type: nil, regions: nil, timeout: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'stream_name is required' if stream_name.nil? raise ArgumentError, 'key is required' if key.nil? raise ArgumentError, 'size is required' if size.nil? @connection.call( :GET, '/api/{org_id}/{stream_name}/_around' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)) .gsub('{stream_name}', ERB::Util.url_encode(stream_name.to_s)), type: nil, auth: ['Authorization'], query: { 'type' => type, 'key' => key, 'size' => size, 'regions' => regions, 'timeout' => timeout } ) end |
#_around_post(org_id:, stream_name:, size:, body:, regions: nil, timeout: nil) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/openobserve-api/api/api.rb', line 26 def _around_post(org_id:, stream_name:, size:, body:, regions: nil, timeout: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'stream_name is required' if stream_name.nil? raise ArgumentError, 'size is required' if size.nil? raise ArgumentError, 'body is required' if body.nil? @connection.call( :POST, '/api/{org_id}/{stream_name}/_around' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)) .gsub('{stream_name}', ERB::Util.url_encode(stream_name.to_s)), type: nil, auth: ['Authorization'], query: { 'size' => size, 'regions' => regions, 'timeout' => timeout }, body: body ) end |
#_bulk(org_id:, body:) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/openobserve-api/api/api.rb', line 44 def _bulk(org_id:, body:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'body is required' if body.nil? @connection.call( :POST, '/api/{org_id}/_bulk' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], body: body ) end |
#_json(org_id:, stream_name:, body:) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/openobserve-api/api/api.rb', line 58 def _json(org_id:, stream_name:, body:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'stream_name is required' if stream_name.nil? raise ArgumentError, 'body is required' if body.nil? @connection.call( :POST, '/api/{org_id}/{stream_name}/_json' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)) .gsub('{stream_name}', ERB::Util.url_encode(stream_name.to_s)), type: nil, auth: ['Authorization'], body: body ) end |
#_multi(org_id:, stream_name:, body:) ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/openobserve-api/api/api.rb', line 74 def _multi(org_id:, stream_name:, body:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'stream_name is required' if stream_name.nil? raise ArgumentError, 'body is required' if body.nil? @connection.call( :POST, '/api/{org_id}/{stream_name}/_multi' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)) .gsub('{stream_name}', ERB::Util.url_encode(stream_name.to_s)), type: nil, auth: ['Authorization'], body: body ) end |
#_search(org_id:, search_sql_request:, type: nil, is_ui_histogram: nil, is_multi_stream_search: nil, validate: nil) ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/openobserve-api/api/api.rb', line 90 def _search(org_id:, search_sql_request:, type: nil, is_ui_histogram: nil, is_multi_stream_search: nil, validate: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'search_sql_request is required' if search_sql_request.nil? @connection.call( :POST, '/api/{org_id}/_search' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], query: { 'type' => type, 'is_ui_histogram' => is_ui_histogram, 'is_multi_stream_search' => is_multi_stream_search, 'validate' => validate }, body: search_sql_request ) end |
#_search_history(org_id:, search_history_request:) ⇒ Object
105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/openobserve-api/api/api.rb', line 105 def _search_history(org_id:, search_history_request:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'search_history_request is required' if search_history_request.nil? @connection.call( :POST, '/api/{org_id}/_search_history' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], body: search_history_request ) end |
#_search_partition(org_id:, search_partition_request:, type: nil) ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/openobserve-api/api/api.rb', line 119 def _search_partition(org_id:, search_partition_request:, type: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'search_partition_request is required' if search_partition_request.nil? @connection.call( :POST, '/api/{org_id}/_search_partition' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], query: { 'type' => type }, body: search_partition_request ) end |
#_search_stream(org_id:, is_ui_histogram:, is_multi_stream_search:, body:) ⇒ Object
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/openobserve-api/api/api.rb', line 134 def _search_stream(org_id:, is_ui_histogram:, is_multi_stream_search:, body:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'is_ui_histogram is required' if is_ui_histogram.nil? raise ArgumentError, 'is_multi_stream_search is required' if is_multi_stream_search.nil? raise ArgumentError, 'body is required' if body.nil? @connection.call( :POST, '/api/{org_id}/_search_stream' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], query: { 'is_ui_histogram' => is_ui_histogram, 'is_multi_stream_search' => is_multi_stream_search }, body: body ) end |
#_values(org_id:, stream_name:, fields:, size:, from:, start_time:, end_time:, type: nil, filter: nil, keyword: nil, regions: nil, timeout: nil, no_count: nil) ⇒ Object
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/openobserve-api/api/api.rb', line 151 def _values(org_id:, stream_name:, fields:, size:, from:, start_time:, end_time:, type: nil, filter: nil, keyword: nil, regions: nil, timeout: nil, no_count: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'stream_name is required' if stream_name.nil? raise ArgumentError, 'fields is required' if fields.nil? raise ArgumentError, 'size is required' if size.nil? raise ArgumentError, 'from is required' if from.nil? raise ArgumentError, 'start_time is required' if start_time.nil? raise ArgumentError, 'end_time is required' if end_time.nil? @connection.call( :GET, '/api/{org_id}/{stream_name}/_values' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)) .gsub('{stream_name}', ERB::Util.url_encode(stream_name.to_s)), type: nil, auth: ['Authorization'], query: { 'type' => type, 'fields' => fields, 'filter' => filter, 'keyword' => keyword, 'size' => size, 'from' => from, 'start_time' => start_time, 'end_time' => end_time, 'regions' => regions, 'timeout' => timeout, 'no_count' => no_count } ) end |
#_values_stream(org_id:, body:) ⇒ Object
171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/openobserve-api/api/api.rb', line 171 def _values_stream(org_id:, body:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'body is required' if body.nil? @connection.call( :POST, '/api/{org_id}/_values_stream' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], body: body ) end |
#clusters ⇒ Object
185 186 187 188 189 190 191 192 |
# File 'lib/openobserve-api/api/api.rb', line 185 def clusters @connection.call( :GET, '/api/clusters', type: nil, auth: ['Authorization'] ) end |
#ingest_metrics__json(org_id:, body:) ⇒ Object
194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/openobserve-api/api/api.rb', line 194 def ingest_metrics__json(org_id:, body:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'body is required' if body.nil? @connection.call( :POST, '/api/{org_id}/ingest/metrics/_json' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], body: body ) end |
#loki_api_v1_push(org_id:, logs_ingestion_loki_request:) ⇒ Object
208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/openobserve-api/api/api.rb', line 208 def loki_api_v1_push(org_id:, logs_ingestion_loki_request:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'logs_ingestion_loki_request is required' if logs_ingestion_loki_request.nil? @connection.call( :POST, '/api/{org_id}/loki/api/v1/push' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], body: logs_ingestion_loki_request ) end |
#mcp(org_id:, body:) ⇒ Object
222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/openobserve-api/api/api.rb', line 222 def mcp(org_id:, body:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'body is required' if body.nil? @connection.call( :POST, '/api/{org_id}/mcp' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], body: body ) end |
#organizations ⇒ Object
236 237 238 239 240 241 242 243 |
# File 'lib/openobserve-api/api/api.rb', line 236 def organizations @connection.call( :GET, '/api/organizations', type: OpenObserve::Api::Models::GetUserOrganizations200Response, auth: ['Authorization'] ) end |
#organizations_assume_service_account(org_id:, assume_service_account_request:) ⇒ Object
245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/openobserve-api/api/api.rb', line 245 def organizations_assume_service_account(org_id:, assume_service_account_request:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'assume_service_account_request is required' if assume_service_account_request.nil? @connection.call( :POST, '/api/{org_id}/organizations/assume_service_account' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: OpenObserve::Api::Models::AssumeServiceAccountResponse, auth: ['Authorization'], body: assume_service_account_request ) end |
#organizations_post(create_organization_request:) ⇒ Object
259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/openobserve-api/api/api.rb', line 259 def organizations_post(create_organization_request:) raise ArgumentError, 'create_organization_request is required' if create_organization_request.nil? @connection.call( :POST, '/api/organizations', type: OpenObserve::Api::Models::CreateOrganization200Response, auth: ['Authorization'], body: create_organization_request ) end |
#passcode(org_id:) ⇒ Object
271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/openobserve-api/api/api.rb', line 271 def passcode(org_id:) raise ArgumentError, 'org_id is required' if org_id.nil? @connection.call( :GET, '/api/{org_id}/passcode' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: OpenObserve::Api::Models::GetOrganizationUserIngestToken200Response, auth: ['Authorization'] ) end |
#passcode_put(org_id:) ⇒ Object
283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/openobserve-api/api/api.rb', line 283 def passcode_put(org_id:) raise ArgumentError, 'org_id is required' if org_id.nil? @connection.call( :PUT, '/api/{org_id}/passcode' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: OpenObserve::Api::Models::GetOrganizationUserIngestToken200Response, auth: ['Authorization'] ) end |
#prometheus_api_v1_format_query(query:, org_id:) ⇒ Object
295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/openobserve-api/api/api.rb', line 295 def prometheus_api_v1_format_query(query:, org_id:) raise ArgumentError, 'query is required' if query.nil? raise ArgumentError, 'org_id is required' if org_id.nil? @connection.call( :GET, '/api/{org_id}/prometheus/api/v1/format_query' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], query: { 'query' => query } ) end |
#prometheus_api_v1_label_values(org_id:, label_name:, match:, start: nil, end_: nil) ⇒ Object
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/openobserve-api/api/api.rb', line 309 def prometheus_api_v1_label_values(org_id:, label_name:, match:, start: nil, end_: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'label_name is required' if label_name.nil? raise ArgumentError, 'match is required' if match.nil? @connection.call( :GET, '/api/{org_id}/prometheus/api/v1/label/{label_name}/values' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)) .gsub('{label_name}', ERB::Util.url_encode(label_name.to_s)), type: nil, auth: ['Authorization'], query: { 'match[]' => match, 'start' => start, 'end' => end_ } ) end |
#prometheus_api_v1_labels(org_id:, match:, start: nil, end_: nil) ⇒ Object
325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/openobserve-api/api/api.rb', line 325 def prometheus_api_v1_labels(org_id:, match:, start: nil, end_: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'match is required' if match.nil? @connection.call( :GET, '/api/{org_id}/prometheus/api/v1/labels' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], query: { 'match[]' => match, 'start' => start, 'end' => end_ } ) end |
#prometheus_api_v1_metadata(org_id:, limit:, metric: nil) ⇒ Object
339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/openobserve-api/api/api.rb', line 339 def (org_id:, limit:, metric: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'limit is required' if limit.nil? @connection.call( :GET, '/api/{org_id}/prometheus/api/v1/metadata' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], query: { 'limit' => limit, 'metric' => metric } ) end |
#prometheus_api_v1_query(org_id:, query:, time: nil, timeout: nil) ⇒ Object
353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/openobserve-api/api/api.rb', line 353 def prometheus_api_v1_query(org_id:, query:, time: nil, timeout: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'query is required' if query.nil? @connection.call( :GET, '/api/{org_id}/prometheus/api/v1/query' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], query: { 'query' => query, 'time' => time, 'timeout' => timeout } ) end |
#prometheus_api_v1_query_range(org_id:, query:, start:, end_:, step: nil, timeout: nil) ⇒ Object
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 |
# File 'lib/openobserve-api/api/api.rb', line 367 def prometheus_api_v1_query_range(org_id:, query:, start:, end_:, step: nil, timeout: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'query is required' if query.nil? raise ArgumentError, 'start is required' if start.nil? raise ArgumentError, 'end_ is required' if end_.nil? @connection.call( :GET, '/api/{org_id}/prometheus/api/v1/query_range' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], query: { 'query' => query, 'start' => start, 'end' => end_, 'step' => step, 'timeout' => timeout } ) end |
#prometheus_api_v1_series(org_id:, match:, start: nil, end_: nil) ⇒ Object
383 384 385 386 387 388 389 390 391 392 393 394 395 |
# File 'lib/openobserve-api/api/api.rb', line 383 def prometheus_api_v1_series(org_id:, match:, start: nil, end_: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'match is required' if match.nil? @connection.call( :GET, '/api/{org_id}/prometheus/api/v1/series' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], query: { 'match[]' => match, 'start' => start, 'end' => end_ } ) end |
#prometheus_api_v1_write(org_id:, body:) ⇒ Object
397 398 399 400 401 402 403 404 405 406 407 408 409 |
# File 'lib/openobserve-api/api/api.rb', line 397 def prometheus_api_v1_write(org_id:, body:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'body is required' if body.nil? @connection.call( :POST, '/api/{org_id}/prometheus/api/v1/write' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], body: body ) end |
#ratelimit_module_list(org_id:, org_id2:, interval: nil) ⇒ Object
411 412 413 414 415 416 417 418 419 420 421 422 423 |
# File 'lib/openobserve-api/api/api.rb', line 411 def ratelimit_module_list(org_id:, org_id2:, interval: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'org_id2 is required' if org_id2.nil? @connection.call( :GET, '/api/{org_id}/ratelimit/module_list' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], query: { 'org_id' => org_id2, 'interval' => interval } ) end |
#ratelimit_role_list(org_id:, org_id2:, user_role:, interval: nil) ⇒ Object
425 426 427 428 429 430 431 432 433 434 435 436 437 438 |
# File 'lib/openobserve-api/api/api.rb', line 425 def ratelimit_role_list(org_id:, org_id2:, user_role:, interval: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'org_id2 is required' if org_id2.nil? raise ArgumentError, 'user_role is required' if user_role.nil? @connection.call( :GET, '/api/{org_id}/ratelimit/role_list' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], query: { 'org_id' => org_id2, 'user_role' => user_role, 'interval' => interval } ) end |
#ratelimit_update(org_id:, org_id2:, update_type:, body:, user_role: nil, interval: nil) ⇒ Object
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 |
# File 'lib/openobserve-api/api/api.rb', line 440 def ratelimit_update(org_id:, org_id2:, update_type:, body:, user_role: nil, interval: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'org_id2 is required' if org_id2.nil? raise ArgumentError, 'update_type is required' if update_type.nil? raise ArgumentError, 'body is required' if body.nil? @connection.call( :PUT, '/api/{org_id}/ratelimit/update' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], query: { 'org_id' => org_id2, 'update_type' => update_type, 'user_role' => user_role, 'interval' => interval }, body: body ) end |
#rename(org_id:, rename_organization_request:) ⇒ Object
457 458 459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/openobserve-api/api/api.rb', line 457 def rename(org_id:, rename_organization_request:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'rename_organization_request is required' if rename_organization_request.nil? @connection.call( :PUT, '/api/{org_id}/rename' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: OpenObserve::Api::Models::CreateOrganizationRequest, auth: ['Authorization'], body: rename_organization_request ) end |
#rumtoken(org_id:) ⇒ Object
471 472 473 474 475 476 477 478 479 480 481 |
# File 'lib/openobserve-api/api/api.rb', line 471 def rumtoken(org_id:) raise ArgumentError, 'org_id is required' if org_id.nil? @connection.call( :GET, '/api/{org_id}/rumtoken' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: OpenObserve::Api::Models::GetOrganizationUserRumIngestToken200Response, auth: ['Authorization'] ) end |
#rumtoken_post(org_id:) ⇒ Object
483 484 485 486 487 488 489 490 491 492 493 |
# File 'lib/openobserve-api/api/api.rb', line 483 def rumtoken_post(org_id:) raise ArgumentError, 'org_id is required' if org_id.nil? @connection.call( :POST, '/api/{org_id}/rumtoken' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: OpenObserve::Api::Models::GetOrganizationUserRumIngestToken200Response, auth: ['Authorization'] ) end |
#rumtoken_put(org_id:) ⇒ Object
495 496 497 498 499 500 501 502 503 504 505 |
# File 'lib/openobserve-api/api/api.rb', line 495 def rumtoken_put(org_id:) raise ArgumentError, 'org_id is required' if org_id.nil? @connection.call( :PUT, '/api/{org_id}/rumtoken' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: OpenObserve::Api::Models::GetOrganizationUserRumIngestToken200Response, auth: ['Authorization'] ) end |
#settings(org_id:) ⇒ Object
507 508 509 510 511 512 513 514 515 516 517 |
# File 'lib/openobserve-api/api/api.rb', line 507 def settings(org_id:) raise ArgumentError, 'org_id is required' if org_id.nil? @connection.call( :GET, '/api/{org_id}/settings' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'] ) end |
#settings_post(org_id:, organization_setting_create_request:) ⇒ Object
519 520 521 522 523 524 525 526 527 528 529 530 531 |
# File 'lib/openobserve-api/api/api.rb', line 519 def settings_post(org_id:, organization_setting_create_request:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'organization_setting_create_request is required' if organization_setting_create_request.nil? @connection.call( :POST, '/api/{org_id}/settings' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], body: organization_setting_create_request ) end |
#settings_v2(org_id:, user_id: nil, category: nil) ⇒ Object
533 534 535 536 537 538 539 540 541 542 543 544 |
# File 'lib/openobserve-api/api/api.rb', line 533 def settings_v2(org_id:, user_id: nil, category: nil) raise ArgumentError, 'org_id is required' if org_id.nil? @connection.call( :GET, '/api/{org_id}/settings/v2' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], query: { 'user_id' => user_id, 'category' => category } ) end |
#settings_v2_delete(org_id:, key:) ⇒ Object
546 547 548 549 550 551 552 553 554 555 556 557 558 |
# File 'lib/openobserve-api/api/api.rb', line 546 def settings_v2_delete(org_id:, key:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'key is required' if key.nil? @connection.call( :DELETE, '/api/{org_id}/settings/v2/{key}' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)) .gsub('{key}', ERB::Util.url_encode(key.to_s)), type: nil, auth: ['Authorization'] ) end |
#settings_v2_get(org_id:, key:, user_id: nil) ⇒ Object
560 561 562 563 564 565 566 567 568 569 570 571 572 573 |
# File 'lib/openobserve-api/api/api.rb', line 560 def settings_v2_get(org_id:, key:, user_id: nil) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'key is required' if key.nil? @connection.call( :GET, '/api/{org_id}/settings/v2/{key}' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)) .gsub('{key}', ERB::Util.url_encode(key.to_s)), type: OpenObserve::Api::Models::SystemSetting, auth: ['Authorization'], query: { 'user_id' => user_id } ) end |
#settings_v2_post(org_id:, system_setting_payload:) ⇒ Object
575 576 577 578 579 580 581 582 583 584 585 586 587 |
# File 'lib/openobserve-api/api/api.rb', line 575 def settings_v2_post(org_id:, system_setting_payload:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'system_setting_payload is required' if system_setting_payload.nil? @connection.call( :POST, '/api/{org_id}/settings/v2' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: OpenObserve::Api::Models::SystemSetting, auth: ['Authorization'], body: system_setting_payload ) end |
#settings_v2_user(org_id:, user_id:, system_setting_payload:) ⇒ Object
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 |
# File 'lib/openobserve-api/api/api.rb', line 589 def settings_v2_user(org_id:, user_id:, system_setting_payload:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'user_id is required' if user_id.nil? raise ArgumentError, 'system_setting_payload is required' if system_setting_payload.nil? @connection.call( :POST, '/api/{org_id}/settings/v2/user/{user_id}' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)) .gsub('{user_id}', ERB::Util.url_encode(user_id.to_s)), type: OpenObserve::Api::Models::SystemSetting, auth: ['Authorization'], body: system_setting_payload ) end |
#settings_v2_user_delete(org_id:, user_id:, key:) ⇒ Object
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'lib/openobserve-api/api/api.rb', line 605 def settings_v2_user_delete(org_id:, user_id:, key:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'user_id is required' if user_id.nil? raise ArgumentError, 'key is required' if key.nil? @connection.call( :DELETE, '/api/{org_id}/settings/v2/user/{user_id}/{key}' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)) .gsub('{user_id}', ERB::Util.url_encode(user_id.to_s)) .gsub('{key}', ERB::Util.url_encode(key.to_s)), type: nil, auth: ['Authorization'] ) end |
#summary(org_id:) ⇒ Object
621 622 623 624 625 626 627 628 629 630 631 |
# File 'lib/openobserve-api/api/api.rb', line 621 def summary(org_id:) raise ArgumentError, 'org_id is required' if org_id.nil? @connection.call( :GET, '/api/{org_id}/summary' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'] ) end |