seatschart 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +552 -0
- data/lib/seatschart/api/api_keys_api.rb +364 -0
- data/lib/seatschart/api/assets_api.rb +95 -0
- data/lib/seatschart/api/audit_api.rb +88 -0
- data/lib/seatschart/api/auth_api.rb +1187 -0
- data/lib/seatschart/api/billing_api.rb +355 -0
- data/lib/seatschart/api/charts_api.rb +4195 -0
- data/lib/seatschart/api/default_api.rb +763 -0
- data/lib/seatschart/api/embed_api.rb +407 -0
- data/lib/seatschart/api/embed_origins_api.rb +281 -0
- data/lib/seatschart/api/event_log_api.rb +148 -0
- data/lib/seatschart/api/events_api.rb +6608 -0
- data/lib/seatschart/api/health_api.rb +77 -0
- data/lib/seatschart/api/map_designer_api.rb +135 -0
- data/lib/seatschart/api/object_status_api.rb +805 -0
- data/lib/seatschart/api/orders_api.rb +166 -0
- data/lib/seatschart/api/public_api.rb +455 -0
- data/lib/seatschart/api/quotes_api.rb +103 -0
- data/lib/seatschart/api/seasons_api.rb +5543 -0
- data/lib/seatschart/api/seats_api.rb +1103 -0
- data/lib/seatschart/api/sse_api.rb +83 -0
- data/lib/seatschart/api/team_api.rb +428 -0
- data/lib/seatschart/api/usage_api.rb +540 -0
- data/lib/seatschart/api/webhooks_api.rb +771 -0
- data/lib/seatschart/api/workspace_api.rb +1244 -0
- data/lib/seatschart/api_client.rb +394 -0
- data/lib/seatschart/api_error.rb +58 -0
- data/lib/seatschart/configuration.rb +316 -0
- data/lib/seatschart/models/delete_api_workspaces_by_workspace_id200_response.rb +283 -0
- data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response.rb +247 -0
- data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response_items_inner.rb +473 -0
- data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response_items_inner_published_by.rb +280 -0
- data/lib/seatschart/models/get_api_events_by_event_id_map_versions200_response.rb +247 -0
- data/lib/seatschart/models/get_api_events_by_event_id_map_versions200_response_items_inner.rb +444 -0
- data/lib/seatschart/models/get_api_events_by_event_id_seat_views200_response.rb +267 -0
- data/lib/seatschart/models/get_api_events_by_event_id_seat_views200_response_views_value.rb +273 -0
- data/lib/seatschart/models/get_api_events_by_event_id_seat_views404_response.rb +237 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +388 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_lanes.rb +237 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_lanes_sales.rb +256 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +286 -0
- data/lib/seatschart/models/get_api_workspace_integration200_response.rb +287 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response.rb +329 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_bounds.rb +237 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_bounds_hold_period_minutes.rb +237 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_effective.rb +269 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_overrides.rb +241 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_sources.rb +339 -0
- data/lib/seatschart/models/get_api_workspaces200_response.rb +223 -0
- data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +423 -0
- data/lib/seatschart/models/patch_api_charts_by_chart_id_categories_by_category_id_request.rb +304 -0
- data/lib/seatschart/models/patch_api_charts_by_chart_id_request.rb +288 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_inventory_channels_by_channel_key_id_request.rb +272 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +448 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_request_categories_inner.rb +343 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_request_table_booking_config.rb +266 -0
- data/lib/seatschart/models/patch_api_keys_by_id_request.rb +292 -0
- data/lib/seatschart/models/patch_api_seasons_by_season_id_events_by_event_id_request.rb +221 -0
- data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +276 -0
- data/lib/seatschart/models/patch_api_team_members_by_user_id_request.rb +255 -0
- data/lib/seatschart/models/patch_api_webhooks_by_id_request.rb +291 -0
- data/lib/seatschart/models/patch_api_workspace_chart_validation_request.rb +224 -0
- data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +543 -0
- data/lib/seatschart/models/patch_api_workspace_integration_request.rb +257 -0
- data/lib/seatschart/models/patch_api_workspace_request.rb +249 -0
- data/lib/seatschart/models/patch_api_workspace_settings_request.rb +307 -0
- data/lib/seatschart/models/post_api_auth2fa_disable_request.rb +281 -0
- data/lib/seatschart/models/post_api_auth2fa_enable_request.rb +250 -0
- data/lib/seatschart/models/post_api_auth2fa_enroll_confirm_request.rb +295 -0
- data/lib/seatschart/models/post_api_auth2fa_enroll_start_request.rb +250 -0
- data/lib/seatschart/models/post_api_auth2fa_verify_request.rb +326 -0
- data/lib/seatschart/models/post_api_auth_accept_invite_request.rb +293 -0
- data/lib/seatschart/models/post_api_auth_login_request.rb +293 -0
- data/lib/seatschart/models/post_api_auth_logout_request.rb +242 -0
- data/lib/seatschart/models/post_api_auth_refresh_request.rb +292 -0
- data/lib/seatschart/models/post_api_auth_signup_request.rb +321 -0
- data/lib/seatschart/models/post_api_auth_switch_workspace_request.rb +249 -0
- data/lib/seatschart/models/post_api_billing_checkout_session_request.rb +249 -0
- data/lib/seatschart/models/post_api_billing_confirm_checkout_request.rb +249 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_archive200_response.rb +221 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_archive200_response_chart.rb +249 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +287 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +348 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner.rb +555 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner_accessibility.rb +356 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_categories_request.rb +361 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_categories_request_ticket_types_inner.rb +448 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_duplicate_request.rb +233 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response.rb +289 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +402 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +244 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_preview_link_request.rb +243 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_versions_by_version_actions_copy_request.rb +242 -0
- data/lib/seatschart/models/post_api_charts_request.rb +372 -0
- data/lib/seatschart/models/post_api_charts_request_categories_inner.rb +346 -0
- data/lib/seatschart/models/post_api_embed_origins_request.rb +249 -0
- data/lib/seatschart/models/post_api_embed_tokens_request.rb +394 -0
- data/lib/seatschart/models/post_api_events_actions_change_object_status_request.rb +251 -0
- data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner.rb +737 -0
- data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner_objects_inner.rb +104 -0
- data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner_objects_inner_any_of.rb +335 -0
- data/lib/seatschart/models/post_api_events_bulk_request.rb +332 -0
- data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +398 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request.rb +824 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_override_season_status_request.rb +272 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request.rb +260 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request_objects_inner.rb +263 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_use_season_status_request.rb +252 -0
- data/lib/seatschart/models/post_api_events_by_event_id_duplicate_request.rb +261 -0
- data/lib/seatschart/models/post_api_events_by_event_id_inventory_channels_assign_request.rb +321 -0
- data/lib/seatschart/models/post_api_events_by_event_id_inventory_channels_request.rb +323 -0
- data/lib/seatschart/models/post_api_events_by_event_id_inventory_for_sale_apply_request.rb +333 -0
- data/lib/seatschart/models/post_api_events_by_event_id_objects_actions_retrieve_request.rb +252 -0
- data/lib/seatschart/models/post_api_events_request.rb +502 -0
- data/lib/seatschart/models/post_api_events_request_category_overrides_value.rb +276 -0
- data/lib/seatschart/models/post_api_events_request_channels_inner.rb +360 -0
- data/lib/seatschart/models/post_api_events_request_for_sale_config.rb +295 -0
- data/lib/seatschart/models/post_api_events_request_table_booking_config.rb +267 -0
- data/lib/seatschart/models/post_api_extract_seats_request.rb +279 -0
- data/lib/seatschart/models/post_api_ga_confirm409_response.rb +271 -0
- data/lib/seatschart/models/post_api_ga_confirm_request.rb +687 -0
- data/lib/seatschart/models/post_api_ga_release_request.rb +385 -0
- data/lib/seatschart/models/post_api_ga_reserve_request.rb +527 -0
- data/lib/seatschart/models/post_api_hold_tokens_by_token_request.rb +249 -0
- data/lib/seatschart/models/post_api_hold_tokens_request.rb +391 -0
- data/lib/seatschart/models/post_api_keys_request.rb +299 -0
- data/lib/seatschart/models/post_api_orders_by_order_id_cancel_request.rb +249 -0
- data/lib/seatschart/models/post_api_quotes_request.rb +351 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_actions_add_events_request.rb +261 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_actions_create_events_request.rb +322 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_actions_create_events_request_events_inner.rb +289 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_actions_remove_events_request.rb +251 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_events_request.rb +267 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_inventory_sync_request.rb +235 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_partial_seasons_request.rb +279 -0
- data/lib/seatschart/models/post_api_seasons_request.rb +395 -0
- data/lib/seatschart/models/post_api_seats_best_available_request.rb +809 -0
- data/lib/seatschart/models/post_api_seats_confirm409_response.rb +271 -0
- data/lib/seatschart/models/post_api_seats_confirm_request.rb +711 -0
- data/lib/seatschart/models/post_api_seats_holds_renew_request.rb +249 -0
- data/lib/seatschart/models/post_api_seats_release_request.rb +387 -0
- data/lib/seatschart/models/post_api_seats_reserve_request.rb +561 -0
- data/lib/seatschart/models/post_api_team_invitations_request.rb +299 -0
- data/lib/seatschart/models/post_api_ticket_buyers_request.rb +252 -0
- data/lib/seatschart/models/post_api_viewer_tokens_request.rb +292 -0
- data/lib/seatschart/models/post_api_webhooks_request.rb +298 -0
- data/lib/seatschart/models/post_api_workspaces_request.rb +269 -0
- data/lib/seatschart/models/put_api_charts_by_chart_id_tags_request.rb +243 -0
- data/lib/seatschart/models/put_api_charts_by_chart_id_versions_by_version_thumbnail_request.rb +261 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_definitions_request.rb +242 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_definitions_request_channels_inner.rb +405 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_request.rb +242 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_request_assignments_inner.rb +320 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_for_sale_request.rb +333 -0
- data/lib/seatschart/models/put_api_events_by_event_id_pricing_request.rb +297 -0
- data/lib/seatschart/models/put_api_events_by_event_id_pricing_request_categories_inner.rb +295 -0
- data/lib/seatschart/models/put_api_events_by_event_id_pricing_request_categories_inner_ticket_types_inner.rb +425 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request.rb +320 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_buyer_limit.rb +259 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_lot_plans_inner.rb +374 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_lot_plans_inner_lots_inner.rb +364 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_quotas_inner.rb +418 -0
- data/lib/seatschart/retry.rb +118 -0
- data/lib/seatschart/version.rb +15 -0
- data/lib/seatschart.rb +198 -0
- metadata +254 -0
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SeatsChart API
|
|
3
|
+
|
|
4
|
+
#Seat inventory and locking API for B2B2C integrations. Authenticate using `x-api-key` (partners) or `Authorization: Bearer` with an HS256 JWT.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.11.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module SeatsChart
|
|
16
|
+
class UsageApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Request monitoring per rate-limit lane
|
|
23
|
+
# Peak requests per minute and 429 counts per lane for the last 10 minutes, hour, 24 hours or 7 days. The **sales lane** carries the buyer path (seat map reads, manifest/geometry/state, the live stream, holds, renewals, best-available, releases, quotes, confirmations); the **api lane** carries everything else (reports, events, charts, workspaces, webhooks, keys), so reporting bursts never starve sales. Counters are written by the rate limiter in its existing Redis call (no extra round trip); minute data is kept 25 hours, hourly peaks 8 days. 10m/1h: one bucket per minute; 24h: 15-minute buckets (peak minute); 7d: hourly buckets. Dashboard session (any role) or an API key with the `reports` scope.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :range Time range (default `1h`).
|
|
26
|
+
# @return [GetApiMonitoringRequests200Response]
|
|
27
|
+
def get_api_monitoring_requests(opts = {})
|
|
28
|
+
data, _status_code, _headers = get_api_monitoring_requests_with_http_info(opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Request monitoring per rate-limit lane
|
|
33
|
+
# Peak requests per minute and 429 counts per lane for the last 10 minutes, hour, 24 hours or 7 days. The **sales lane** carries the buyer path (seat map reads, manifest/geometry/state, the live stream, holds, renewals, best-available, releases, quotes, confirmations); the **api lane** carries everything else (reports, events, charts, workspaces, webhooks, keys), so reporting bursts never starve sales. Counters are written by the rate limiter in its existing Redis call (no extra round trip); minute data is kept 25 hours, hourly peaks 8 days. 10m/1h: one bucket per minute; 24h: 15-minute buckets (peak minute); 7d: hourly buckets. Dashboard session (any role) or an API key with the `reports` scope.
|
|
34
|
+
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @option opts [String] :range Time range (default `1h`).
|
|
36
|
+
# @return [Array<(GetApiMonitoringRequests200Response, Integer, Hash)>] GetApiMonitoringRequests200Response data, response status code and response headers
|
|
37
|
+
def get_api_monitoring_requests_with_http_info(opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.get_api_monitoring_requests ...'
|
|
40
|
+
end
|
|
41
|
+
allowable_values = ["10m", "1h", "24h", "7d"]
|
|
42
|
+
if @api_client.config.client_side_validation && opts[:'range'] && !allowable_values.include?(opts[:'range'])
|
|
43
|
+
fail ArgumentError, "invalid value for \"range\", must be one of #{allowable_values}"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/api/monitoring/requests'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
query_params[:'range'] = opts[:'range'] if !opts[:'range'].nil?
|
|
51
|
+
|
|
52
|
+
# header parameters
|
|
53
|
+
header_params = opts[:header_params] || {}
|
|
54
|
+
# HTTP header 'Accept' (if needed)
|
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'multipart/form-data', 'text/plain']) unless header_params['Accept']
|
|
56
|
+
|
|
57
|
+
# form parameters
|
|
58
|
+
form_params = opts[:form_params] || {}
|
|
59
|
+
|
|
60
|
+
# http body (model)
|
|
61
|
+
post_body = opts[:debug_body]
|
|
62
|
+
|
|
63
|
+
# return_type
|
|
64
|
+
return_type = opts[:debug_return_type] || 'GetApiMonitoringRequests200Response'
|
|
65
|
+
|
|
66
|
+
# auth_names
|
|
67
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
68
|
+
|
|
69
|
+
new_options = opts.merge(
|
|
70
|
+
:operation => :"UsageApi.get_api_monitoring_requests",
|
|
71
|
+
:header_params => header_params,
|
|
72
|
+
:query_params => query_params,
|
|
73
|
+
:form_params => form_params,
|
|
74
|
+
:body => post_body,
|
|
75
|
+
:auth_names => auth_names,
|
|
76
|
+
:return_type => return_type
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
80
|
+
if @api_client.config.debugging
|
|
81
|
+
@api_client.config.logger.debug "API called: UsageApi#get_api_monitoring_requests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
+
end
|
|
83
|
+
return data, status_code, headers
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Monthly usage: used objects, charts and events
|
|
87
|
+
# Test (sandbox) workspaces (`isTest: true`) are never metered and have no limits (`limit: null`). `usedObjects.count` is the number of distinct objects booked in the UTC calendar month (seats.io-style billing unit): every seat that became booked counts once per month however often it is retried, released and re-booked; each sold general-admission place counts as one. Holds, test events and replays never count. `history` has exactly 12 months ending at `month` (zero-filled); `byEvent` lists the top 100 events of the month. `charts`/`events` are current totals against the plan limits. Dashboard JWT (any role) or an API key with the `reports` scope.
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @option opts [String] :month UTC calendar month `YYYY-MM` (default: current month).
|
|
90
|
+
# @return [nil]
|
|
91
|
+
def get_api_usage(opts = {})
|
|
92
|
+
get_api_usage_with_http_info(opts)
|
|
93
|
+
nil
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Monthly usage: used objects, charts and events
|
|
97
|
+
# Test (sandbox) workspaces (`isTest: true`) are never metered and have no limits (`limit: null`). `usedObjects.count` is the number of distinct objects booked in the UTC calendar month (seats.io-style billing unit): every seat that became booked counts once per month however often it is retried, released and re-booked; each sold general-admission place counts as one. Holds, test events and replays never count. `history` has exactly 12 months ending at `month` (zero-filled); `byEvent` lists the top 100 events of the month. `charts`/`events` are current totals against the plan limits. Dashboard JWT (any role) or an API key with the `reports` scope.
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @option opts [String] :month UTC calendar month `YYYY-MM` (default: current month).
|
|
100
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
101
|
+
def get_api_usage_with_http_info(opts = {})
|
|
102
|
+
if @api_client.config.debugging
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.get_api_usage ...'
|
|
104
|
+
end
|
|
105
|
+
pattern = Regexp.new(/^\d{4}-\d{2}$/)
|
|
106
|
+
if @api_client.config.client_side_validation && !opts[:'month'].nil? && opts[:'month'] !~ pattern
|
|
107
|
+
fail ArgumentError, "invalid value for 'opts[:\"month\"]' when calling UsageApi.get_api_usage, must conform to the pattern #{pattern}."
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# resource path
|
|
111
|
+
local_var_path = '/api/usage'
|
|
112
|
+
|
|
113
|
+
# query parameters
|
|
114
|
+
query_params = opts[:query_params] || {}
|
|
115
|
+
query_params[:'month'] = opts[:'month'] if !opts[:'month'].nil?
|
|
116
|
+
|
|
117
|
+
# header parameters
|
|
118
|
+
header_params = opts[:header_params] || {}
|
|
119
|
+
|
|
120
|
+
# form parameters
|
|
121
|
+
form_params = opts[:form_params] || {}
|
|
122
|
+
|
|
123
|
+
# http body (model)
|
|
124
|
+
post_body = opts[:debug_body]
|
|
125
|
+
|
|
126
|
+
# return_type
|
|
127
|
+
return_type = opts[:debug_return_type]
|
|
128
|
+
|
|
129
|
+
# auth_names
|
|
130
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
131
|
+
|
|
132
|
+
new_options = opts.merge(
|
|
133
|
+
:operation => :"UsageApi.get_api_usage",
|
|
134
|
+
:header_params => header_params,
|
|
135
|
+
:query_params => query_params,
|
|
136
|
+
:form_params => form_params,
|
|
137
|
+
:body => post_body,
|
|
138
|
+
:auth_names => auth_names,
|
|
139
|
+
:return_type => return_type
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
143
|
+
if @api_client.config.debugging
|
|
144
|
+
@api_client.config.logger.debug "API called: UsageApi#get_api_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
145
|
+
end
|
|
146
|
+
return data, status_code, headers
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Monthly used objects per chart and event
|
|
150
|
+
# Breakdown of `usedObjects` (see GET /usage) by chart, each with its events (most used first). Events are grouped under their current chart; deleted events or events without a chart are listed under `chartId: null`. Read from the metering table (no counters on the booking path). Dashboard JWT (any role) or an API key.
|
|
151
|
+
# @param [Hash] opts the optional parameters
|
|
152
|
+
# @option opts [String] :month UTC calendar month `YYYY-MM` (default: current month).
|
|
153
|
+
# @return [nil]
|
|
154
|
+
def get_api_usage_charts(opts = {})
|
|
155
|
+
get_api_usage_charts_with_http_info(opts)
|
|
156
|
+
nil
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Monthly used objects per chart and event
|
|
160
|
+
# Breakdown of `usedObjects` (see GET /usage) by chart, each with its events (most used first). Events are grouped under their current chart; deleted events or events without a chart are listed under `chartId: null`. Read from the metering table (no counters on the booking path). Dashboard JWT (any role) or an API key.
|
|
161
|
+
# @param [Hash] opts the optional parameters
|
|
162
|
+
# @option opts [String] :month UTC calendar month `YYYY-MM` (default: current month).
|
|
163
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
164
|
+
def get_api_usage_charts_with_http_info(opts = {})
|
|
165
|
+
if @api_client.config.debugging
|
|
166
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.get_api_usage_charts ...'
|
|
167
|
+
end
|
|
168
|
+
pattern = Regexp.new(/^\d{4}-\d{2}$/)
|
|
169
|
+
if @api_client.config.client_side_validation && !opts[:'month'].nil? && opts[:'month'] !~ pattern
|
|
170
|
+
fail ArgumentError, "invalid value for 'opts[:\"month\"]' when calling UsageApi.get_api_usage_charts, must conform to the pattern #{pattern}."
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# resource path
|
|
174
|
+
local_var_path = '/api/usage/charts'
|
|
175
|
+
|
|
176
|
+
# query parameters
|
|
177
|
+
query_params = opts[:query_params] || {}
|
|
178
|
+
query_params[:'month'] = opts[:'month'] if !opts[:'month'].nil?
|
|
179
|
+
|
|
180
|
+
# header parameters
|
|
181
|
+
header_params = opts[:header_params] || {}
|
|
182
|
+
|
|
183
|
+
# form parameters
|
|
184
|
+
form_params = opts[:form_params] || {}
|
|
185
|
+
|
|
186
|
+
# http body (model)
|
|
187
|
+
post_body = opts[:debug_body]
|
|
188
|
+
|
|
189
|
+
# return_type
|
|
190
|
+
return_type = opts[:debug_return_type]
|
|
191
|
+
|
|
192
|
+
# auth_names
|
|
193
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
194
|
+
|
|
195
|
+
new_options = opts.merge(
|
|
196
|
+
:operation => :"UsageApi.get_api_usage_charts",
|
|
197
|
+
:header_params => header_params,
|
|
198
|
+
:query_params => query_params,
|
|
199
|
+
:form_params => form_params,
|
|
200
|
+
:body => post_body,
|
|
201
|
+
:auth_names => auth_names,
|
|
202
|
+
:return_type => return_type
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
206
|
+
if @api_client.config.debugging
|
|
207
|
+
@api_client.config.logger.debug "API called: UsageApi#get_api_usage_charts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
208
|
+
end
|
|
209
|
+
return data, status_code, headers
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Monthly used objects per event (paginated)
|
|
213
|
+
# Every event with used objects in the month, most used first (ties by event id): `items: [{ eventId, eventKey, eventName, chartId, usedObjects }]` (`eventName: null` for deleted events), `eventCount` and the month total `usedObjects`. `limit` 1..100 (default 50); pass `nextCursor` as `cursor` for the next page. Unlike `byEvent` of GET /usage (top 100) this lists every event. Closed months are immutable and their per-event totals are cached by the API. Dashboard JWT (any role) or an API key with the `reports` scope.
|
|
214
|
+
# @param [Hash] opts the optional parameters
|
|
215
|
+
# @option opts [String] :month UTC calendar month `YYYY-MM` (default: current month).
|
|
216
|
+
# @option opts [Float] :limit Page size (1..100, default 50).
|
|
217
|
+
# @option opts [String] :cursor Opaque `nextCursor` of the previous page.
|
|
218
|
+
# @return [nil]
|
|
219
|
+
def get_api_usage_events(opts = {})
|
|
220
|
+
get_api_usage_events_with_http_info(opts)
|
|
221
|
+
nil
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Monthly used objects per event (paginated)
|
|
225
|
+
# Every event with used objects in the month, most used first (ties by event id): `items: [{ eventId, eventKey, eventName, chartId, usedObjects }]` (`eventName: null` for deleted events), `eventCount` and the month total `usedObjects`. `limit` 1..100 (default 50); pass `nextCursor` as `cursor` for the next page. Unlike `byEvent` of GET /usage (top 100) this lists every event. Closed months are immutable and their per-event totals are cached by the API. Dashboard JWT (any role) or an API key with the `reports` scope.
|
|
226
|
+
# @param [Hash] opts the optional parameters
|
|
227
|
+
# @option opts [String] :month UTC calendar month `YYYY-MM` (default: current month).
|
|
228
|
+
# @option opts [Float] :limit Page size (1..100, default 50).
|
|
229
|
+
# @option opts [String] :cursor Opaque `nextCursor` of the previous page.
|
|
230
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
231
|
+
def get_api_usage_events_with_http_info(opts = {})
|
|
232
|
+
if @api_client.config.debugging
|
|
233
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.get_api_usage_events ...'
|
|
234
|
+
end
|
|
235
|
+
pattern = Regexp.new(/^\d{4}-\d{2}$/)
|
|
236
|
+
if @api_client.config.client_side_validation && !opts[:'month'].nil? && opts[:'month'] !~ pattern
|
|
237
|
+
fail ArgumentError, "invalid value for 'opts[:\"month\"]' when calling UsageApi.get_api_usage_events, must conform to the pattern #{pattern}."
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
241
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsageApi.get_api_usage_events, must be smaller than or equal to 100.'
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
245
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsageApi.get_api_usage_events, must be greater than or equal to 1.'
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length > 512
|
|
249
|
+
fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling UsageApi.get_api_usage_events, the character length must be smaller than or equal to 512.'
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length < 1
|
|
253
|
+
fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling UsageApi.get_api_usage_events, the character length must be great than or equal to 1.'
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
pattern = Regexp.new(/^[A-Za-z0-9_-]+$/)
|
|
257
|
+
if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'] !~ pattern
|
|
258
|
+
fail ArgumentError, "invalid value for 'opts[:\"cursor\"]' when calling UsageApi.get_api_usage_events, must conform to the pattern #{pattern}."
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# resource path
|
|
262
|
+
local_var_path = '/api/usage/events'
|
|
263
|
+
|
|
264
|
+
# query parameters
|
|
265
|
+
query_params = opts[:query_params] || {}
|
|
266
|
+
query_params[:'month'] = opts[:'month'] if !opts[:'month'].nil?
|
|
267
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
268
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
269
|
+
|
|
270
|
+
# header parameters
|
|
271
|
+
header_params = opts[:header_params] || {}
|
|
272
|
+
|
|
273
|
+
# form parameters
|
|
274
|
+
form_params = opts[:form_params] || {}
|
|
275
|
+
|
|
276
|
+
# http body (model)
|
|
277
|
+
post_body = opts[:debug_body]
|
|
278
|
+
|
|
279
|
+
# return_type
|
|
280
|
+
return_type = opts[:debug_return_type]
|
|
281
|
+
|
|
282
|
+
# auth_names
|
|
283
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
284
|
+
|
|
285
|
+
new_options = opts.merge(
|
|
286
|
+
:operation => :"UsageApi.get_api_usage_events",
|
|
287
|
+
:header_params => header_params,
|
|
288
|
+
:query_params => query_params,
|
|
289
|
+
:form_params => form_params,
|
|
290
|
+
:body => post_body,
|
|
291
|
+
:auth_names => auth_names,
|
|
292
|
+
:return_type => return_type
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
296
|
+
if @api_client.config.debugging
|
|
297
|
+
@api_client.config.logger.debug "API called: UsageApi#get_api_usage_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
298
|
+
end
|
|
299
|
+
return data, status_code, headers
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Monthly used objects of one event (paginated)
|
|
303
|
+
# Total `usedObjects` of the event in the month, `objectCount` (metered objects) and one page of the metered objects (`objectKey`: seat id, or `ga:<receiptId>` with `units` places; `firstUsedAt` with microseconds), newest first. `limit` 1..1000 (default 1000); pass `nextCursor` as `cursor` for the next page (`null` on the last page; `truncated` is true when more pages follow). Keyset pagination over the primary-key range of the event and month. Works for deleted events that were metered. Dashboard JWT (any role) or an API key with the `reports` scope.
|
|
304
|
+
# @param event_id [String]
|
|
305
|
+
# @param [Hash] opts the optional parameters
|
|
306
|
+
# @option opts [String] :month UTC calendar month `YYYY-MM` (default: current month).
|
|
307
|
+
# @option opts [Float] :limit Page size (1..1000, default 1000).
|
|
308
|
+
# @option opts [String] :cursor Opaque `nextCursor` of the previous page.
|
|
309
|
+
# @return [nil]
|
|
310
|
+
def get_api_usage_events_by_event_id(event_id, opts = {})
|
|
311
|
+
get_api_usage_events_by_event_id_with_http_info(event_id, opts)
|
|
312
|
+
nil
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
# Monthly used objects of one event (paginated)
|
|
316
|
+
# Total `usedObjects` of the event in the month, `objectCount` (metered objects) and one page of the metered objects (`objectKey`: seat id, or `ga:<receiptId>` with `units` places; `firstUsedAt` with microseconds), newest first. `limit` 1..1000 (default 1000); pass `nextCursor` as `cursor` for the next page (`null` on the last page; `truncated` is true when more pages follow). Keyset pagination over the primary-key range of the event and month. Works for deleted events that were metered. Dashboard JWT (any role) or an API key with the `reports` scope.
|
|
317
|
+
# @param event_id [String]
|
|
318
|
+
# @param [Hash] opts the optional parameters
|
|
319
|
+
# @option opts [String] :month UTC calendar month `YYYY-MM` (default: current month).
|
|
320
|
+
# @option opts [Float] :limit Page size (1..1000, default 1000).
|
|
321
|
+
# @option opts [String] :cursor Opaque `nextCursor` of the previous page.
|
|
322
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
323
|
+
def get_api_usage_events_by_event_id_with_http_info(event_id, opts = {})
|
|
324
|
+
if @api_client.config.debugging
|
|
325
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.get_api_usage_events_by_event_id ...'
|
|
326
|
+
end
|
|
327
|
+
# verify the required parameter 'event_id' is set
|
|
328
|
+
if @api_client.config.client_side_validation && event_id.nil?
|
|
329
|
+
fail ArgumentError, "Missing the required parameter 'event_id' when calling UsageApi.get_api_usage_events_by_event_id"
|
|
330
|
+
end
|
|
331
|
+
if @api_client.config.client_side_validation && event_id.to_s.length > 36
|
|
332
|
+
fail ArgumentError, 'invalid value for "event_id" when calling UsageApi.get_api_usage_events_by_event_id, the character length must be smaller than or equal to 36.'
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
if @api_client.config.client_side_validation && event_id.to_s.length < 36
|
|
336
|
+
fail ArgumentError, 'invalid value for "event_id" when calling UsageApi.get_api_usage_events_by_event_id, the character length must be great than or equal to 36.'
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
pattern = Regexp.new(/^\d{4}-\d{2}$/)
|
|
340
|
+
if @api_client.config.client_side_validation && !opts[:'month'].nil? && opts[:'month'] !~ pattern
|
|
341
|
+
fail ArgumentError, "invalid value for 'opts[:\"month\"]' when calling UsageApi.get_api_usage_events_by_event_id, must conform to the pattern #{pattern}."
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
|
|
345
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsageApi.get_api_usage_events_by_event_id, must be smaller than or equal to 1000.'
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
349
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsageApi.get_api_usage_events_by_event_id, must be greater than or equal to 1.'
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length > 512
|
|
353
|
+
fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling UsageApi.get_api_usage_events_by_event_id, the character length must be smaller than or equal to 512.'
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length < 1
|
|
357
|
+
fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling UsageApi.get_api_usage_events_by_event_id, the character length must be great than or equal to 1.'
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
pattern = Regexp.new(/^[A-Za-z0-9_-]+$/)
|
|
361
|
+
if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'] !~ pattern
|
|
362
|
+
fail ArgumentError, "invalid value for 'opts[:\"cursor\"]' when calling UsageApi.get_api_usage_events_by_event_id, must conform to the pattern #{pattern}."
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# resource path
|
|
366
|
+
local_var_path = '/api/usage/events/{eventId}'.sub('{' + 'eventId' + '}', CGI.escape(event_id.to_s))
|
|
367
|
+
|
|
368
|
+
# query parameters
|
|
369
|
+
query_params = opts[:query_params] || {}
|
|
370
|
+
query_params[:'month'] = opts[:'month'] if !opts[:'month'].nil?
|
|
371
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
372
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
373
|
+
|
|
374
|
+
# header parameters
|
|
375
|
+
header_params = opts[:header_params] || {}
|
|
376
|
+
|
|
377
|
+
# form parameters
|
|
378
|
+
form_params = opts[:form_params] || {}
|
|
379
|
+
|
|
380
|
+
# http body (model)
|
|
381
|
+
post_body = opts[:debug_body]
|
|
382
|
+
|
|
383
|
+
# return_type
|
|
384
|
+
return_type = opts[:debug_return_type]
|
|
385
|
+
|
|
386
|
+
# auth_names
|
|
387
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
388
|
+
|
|
389
|
+
new_options = opts.merge(
|
|
390
|
+
:operation => :"UsageApi.get_api_usage_events_by_event_id",
|
|
391
|
+
:header_params => header_params,
|
|
392
|
+
:query_params => query_params,
|
|
393
|
+
:form_params => form_params,
|
|
394
|
+
:body => post_body,
|
|
395
|
+
:auth_names => auth_names,
|
|
396
|
+
:return_type => return_type
|
|
397
|
+
)
|
|
398
|
+
|
|
399
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
400
|
+
if @api_client.config.debugging
|
|
401
|
+
@api_client.config.logger.debug "API called: UsageApi#get_api_usage_events_by_event_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
402
|
+
end
|
|
403
|
+
return data, status_code, headers
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
# Used objects per month over a range
|
|
407
|
+
# Monthly used objects from `from` to `to` inclusive (oldest first, zero-filled), at most 120 months (400 otherwise), plus the range total. One grouped read over the primary-key range `(tenant_id, month)`; closed months are immutable and cached by the API. Dashboard JWT (any role) or an API key with the `reports` scope.
|
|
408
|
+
# @param [Hash] opts the optional parameters
|
|
409
|
+
# @option opts [String] :from First month `YYYY-MM` (default: 11 months before `to`).
|
|
410
|
+
# @option opts [String] :to Last month `YYYY-MM` (default: current month; not in the future).
|
|
411
|
+
# @return [nil]
|
|
412
|
+
def get_api_usage_history(opts = {})
|
|
413
|
+
get_api_usage_history_with_http_info(opts)
|
|
414
|
+
nil
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
# Used objects per month over a range
|
|
418
|
+
# Monthly used objects from `from` to `to` inclusive (oldest first, zero-filled), at most 120 months (400 otherwise), plus the range total. One grouped read over the primary-key range `(tenant_id, month)`; closed months are immutable and cached by the API. Dashboard JWT (any role) or an API key with the `reports` scope.
|
|
419
|
+
# @param [Hash] opts the optional parameters
|
|
420
|
+
# @option opts [String] :from First month `YYYY-MM` (default: 11 months before `to`).
|
|
421
|
+
# @option opts [String] :to Last month `YYYY-MM` (default: current month; not in the future).
|
|
422
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
423
|
+
def get_api_usage_history_with_http_info(opts = {})
|
|
424
|
+
if @api_client.config.debugging
|
|
425
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.get_api_usage_history ...'
|
|
426
|
+
end
|
|
427
|
+
pattern = Regexp.new(/^\d{4}-\d{2}$/)
|
|
428
|
+
if @api_client.config.client_side_validation && !opts[:'from'].nil? && opts[:'from'] !~ pattern
|
|
429
|
+
fail ArgumentError, "invalid value for 'opts[:\"from\"]' when calling UsageApi.get_api_usage_history, must conform to the pattern #{pattern}."
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
pattern = Regexp.new(/^\d{4}-\d{2}$/)
|
|
433
|
+
if @api_client.config.client_side_validation && !opts[:'to'].nil? && opts[:'to'] !~ pattern
|
|
434
|
+
fail ArgumentError, "invalid value for 'opts[:\"to\"]' when calling UsageApi.get_api_usage_history, must conform to the pattern #{pattern}."
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
# resource path
|
|
438
|
+
local_var_path = '/api/usage/history'
|
|
439
|
+
|
|
440
|
+
# query parameters
|
|
441
|
+
query_params = opts[:query_params] || {}
|
|
442
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
|
443
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
|
444
|
+
|
|
445
|
+
# header parameters
|
|
446
|
+
header_params = opts[:header_params] || {}
|
|
447
|
+
|
|
448
|
+
# form parameters
|
|
449
|
+
form_params = opts[:form_params] || {}
|
|
450
|
+
|
|
451
|
+
# http body (model)
|
|
452
|
+
post_body = opts[:debug_body]
|
|
453
|
+
|
|
454
|
+
# return_type
|
|
455
|
+
return_type = opts[:debug_return_type]
|
|
456
|
+
|
|
457
|
+
# auth_names
|
|
458
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
459
|
+
|
|
460
|
+
new_options = opts.merge(
|
|
461
|
+
:operation => :"UsageApi.get_api_usage_history",
|
|
462
|
+
:header_params => header_params,
|
|
463
|
+
:query_params => query_params,
|
|
464
|
+
:form_params => form_params,
|
|
465
|
+
:body => post_body,
|
|
466
|
+
:auth_names => auth_names,
|
|
467
|
+
:return_type => return_type
|
|
468
|
+
)
|
|
469
|
+
|
|
470
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
471
|
+
if @api_client.config.debugging
|
|
472
|
+
@api_client.config.logger.debug "API called: UsageApi#get_api_usage_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
473
|
+
end
|
|
474
|
+
return data, status_code, headers
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
# Monthly used objects across my workspaces (admin view)
|
|
478
|
+
# Every workspace the caller administers (role admin), with its plan, status and used objects of the month against the plan limit (`null` for test workspaces, which are never metered), plus the total. Dashboard session, or a **workspace admin API key** (the admin it is bound to); other API keys: 403 `ERR_PARTNER_SCOPE`. One grouped read of the metering table.
|
|
479
|
+
# @param [Hash] opts the optional parameters
|
|
480
|
+
# @option opts [String] :month UTC calendar month `YYYY-MM` (default: current month).
|
|
481
|
+
# @return [nil]
|
|
482
|
+
def get_api_usage_workspaces(opts = {})
|
|
483
|
+
get_api_usage_workspaces_with_http_info(opts)
|
|
484
|
+
nil
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
# Monthly used objects across my workspaces (admin view)
|
|
488
|
+
# Every workspace the caller administers (role admin), with its plan, status and used objects of the month against the plan limit (`null` for test workspaces, which are never metered), plus the total. Dashboard session, or a **workspace admin API key** (the admin it is bound to); other API keys: 403 `ERR_PARTNER_SCOPE`. One grouped read of the metering table.
|
|
489
|
+
# @param [Hash] opts the optional parameters
|
|
490
|
+
# @option opts [String] :month UTC calendar month `YYYY-MM` (default: current month).
|
|
491
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
492
|
+
def get_api_usage_workspaces_with_http_info(opts = {})
|
|
493
|
+
if @api_client.config.debugging
|
|
494
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.get_api_usage_workspaces ...'
|
|
495
|
+
end
|
|
496
|
+
pattern = Regexp.new(/^\d{4}-\d{2}$/)
|
|
497
|
+
if @api_client.config.client_side_validation && !opts[:'month'].nil? && opts[:'month'] !~ pattern
|
|
498
|
+
fail ArgumentError, "invalid value for 'opts[:\"month\"]' when calling UsageApi.get_api_usage_workspaces, must conform to the pattern #{pattern}."
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
# resource path
|
|
502
|
+
local_var_path = '/api/usage/workspaces'
|
|
503
|
+
|
|
504
|
+
# query parameters
|
|
505
|
+
query_params = opts[:query_params] || {}
|
|
506
|
+
query_params[:'month'] = opts[:'month'] if !opts[:'month'].nil?
|
|
507
|
+
|
|
508
|
+
# header parameters
|
|
509
|
+
header_params = opts[:header_params] || {}
|
|
510
|
+
|
|
511
|
+
# form parameters
|
|
512
|
+
form_params = opts[:form_params] || {}
|
|
513
|
+
|
|
514
|
+
# http body (model)
|
|
515
|
+
post_body = opts[:debug_body]
|
|
516
|
+
|
|
517
|
+
# return_type
|
|
518
|
+
return_type = opts[:debug_return_type]
|
|
519
|
+
|
|
520
|
+
# auth_names
|
|
521
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
522
|
+
|
|
523
|
+
new_options = opts.merge(
|
|
524
|
+
:operation => :"UsageApi.get_api_usage_workspaces",
|
|
525
|
+
:header_params => header_params,
|
|
526
|
+
:query_params => query_params,
|
|
527
|
+
:form_params => form_params,
|
|
528
|
+
:body => post_body,
|
|
529
|
+
:auth_names => auth_names,
|
|
530
|
+
:return_type => return_type
|
|
531
|
+
)
|
|
532
|
+
|
|
533
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
534
|
+
if @api_client.config.debugging
|
|
535
|
+
@api_client.config.logger.debug "API called: UsageApi#get_api_usage_workspaces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
536
|
+
end
|
|
537
|
+
return data, status_code, headers
|
|
538
|
+
end
|
|
539
|
+
end
|
|
540
|
+
end
|