datadog_api_client 1.0.0.beta.3 → 1.0.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 +4 -4
- data/.apigentools-info +4 -4
- data/.azure-pipelines/all.yml +0 -1
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +23 -0
- data/Gemfile +1 -1
- data/LICENSE-3rdparty.csv +0 -1
- data/check-examples.sh +7 -2
- data/data/v1/openapi.yaml +1963 -245
- data/data/v2/openapi.yaml +67 -13
- data/docs/v1/DashboardsAPI.md +10 -5
- data/docs/v1/DistributionWidgetDefinition.md +9 -3
- data/docs/v1/DistributionWidgetXAxis.md +24 -0
- data/docs/v1/DistributionWidgetYAxis.md +26 -0
- data/docs/v1/EventsAPI.md +7 -3
- data/docs/v1/GroupWidgetDefinition.md +8 -0
- data/docs/v1/ImageWidgetDefinition.md +11 -1
- data/docs/v1/LogsByRetention.md +22 -0
- data/docs/v1/LogsByRetentionMonthlyUsage.md +20 -0
- data/docs/v1/LogsByRetentionOrgUsage.md +18 -0
- data/docs/v1/LogsByRetentionOrgs.md +18 -0
- data/docs/v1/LogsRetentionAggSumUsage.md +24 -0
- data/docs/v1/LogsRetentionSumUsage.md +24 -0
- data/docs/v1/MonitorsAPI.md +1 -1
- data/docs/v1/NoteWidgetDefinition.md +5 -1
- data/docs/v1/NotebookAbsoluteTime.md +22 -0
- data/docs/v1/NotebookAuthor.md +34 -0
- data/docs/v1/NotebookCellCreateRequest.md +20 -0
- data/docs/v1/NotebookCellCreateRequestAttributes.md +57 -0
- data/docs/v1/NotebookCellResourceType.md +15 -0
- data/docs/v1/NotebookCellResponse.md +22 -0
- data/docs/v1/NotebookCellResponseAttributes.md +57 -0
- data/docs/v1/NotebookCellTime.md +49 -0
- data/docs/v1/NotebookCellUpdateRequest.md +22 -0
- data/docs/v1/NotebookCellUpdateRequestAttributes.md +57 -0
- data/docs/v1/NotebookCreateData.md +20 -0
- data/docs/v1/NotebookCreateDataAttributes.md +24 -0
- data/docs/v1/NotebookCreateRequest.md +18 -0
- data/docs/v1/NotebookDistributionCellAttributes.md +24 -0
- data/docs/v1/NotebookGlobalTime.md +49 -0
- data/docs/v1/NotebookGraphSize.md +15 -0
- data/docs/v1/NotebookHeatMapCellAttributes.md +24 -0
- data/docs/v1/NotebookLogStreamCellAttributes.md +22 -0
- data/docs/v1/NotebookMarkdownCellAttributes.md +18 -0
- data/docs/v1/NotebookMarkdownCellDefinition.md +21 -0
- data/docs/v1/NotebookMarkdownCellDefinitionType.md +15 -0
- data/docs/v1/NotebookRelativeTime.md +18 -0
- data/docs/v1/NotebookResourceType.md +15 -0
- data/docs/v1/NotebookResponse.md +18 -0
- data/docs/v1/NotebookResponseData.md +22 -0
- data/docs/v1/NotebookResponseDataAttributes.md +30 -0
- data/docs/v1/NotebookSplitBy.md +20 -0
- data/docs/v1/NotebookStatus.md +15 -0
- data/docs/v1/NotebookTimeseriesCellAttributes.md +24 -0
- data/docs/v1/NotebookToplistCellAttributes.md +24 -0
- data/docs/v1/NotebookUpdateCell.md +49 -0
- data/docs/v1/NotebookUpdateData.md +20 -0
- data/docs/v1/NotebookUpdateDataAttributes.md +24 -0
- data/docs/v1/NotebookUpdateRequest.md +18 -0
- data/docs/v1/NotebooksAPI.md +339 -0
- data/docs/v1/NotebooksResponse.md +20 -0
- data/docs/v1/NotebooksResponseMeta.md +18 -0
- data/docs/v1/NotebooksResponsePage.md +20 -0
- data/docs/v1/README.md +66 -9
- data/docs/v1/SLOListResponse.md +3 -1
- data/docs/v1/SLOListResponseMetadata.md +18 -0
- data/docs/v1/SLOListResponseMetadataPage.md +20 -0
- data/docs/v1/SLOResponse.md +1 -1
- data/docs/v1/SLOResponseData.md +44 -0
- data/docs/v1/ServiceLevelObjectivesAPI.md +8 -4
- data/docs/v1/SyntheticsAPI.md +28 -156
- data/docs/v1/SyntheticsAPIStep.md +4 -0
- data/docs/v1/SyntheticsBrowserTestConfig.md +2 -0
- data/docs/v1/SyntheticsTestConfig.md +1 -1
- data/docs/v1/SyntheticsTestOptions.md +1 -1
- data/docs/v1/SyntheticsTestRequest.md +6 -0
- data/docs/v1/UsageAttributionSupportedMetrics.md +15 -0
- data/docs/v1/UsageAttributionValues.md +8 -0
- data/docs/v1/UsageHostHour.md +3 -1
- data/docs/v1/UsageIoTHour.md +1 -1
- data/docs/v1/UsageLogsByRetentionHour.md +24 -0
- data/docs/v1/UsageLogsByRetentionResponse.md +18 -0
- data/docs/v1/UsageMeteringAPI.md +69 -2
- data/docs/v1/UsageSummaryDate.md +11 -9
- data/docs/v1/UsageSummaryDateOrg.md +3 -1
- data/docs/v1/UsageSummaryResponse.md +5 -1
- data/docs/v1/WidgetHorizontalAlign.md +15 -0
- data/docs/v1/WidgetLayout.md +2 -0
- data/docs/v1/WidgetMarker.md +1 -1
- data/docs/v1/WidgetVerticalAlign.md +15 -0
- data/docs/v2/IncidentServiceUpdateData.md +1 -1
- data/docs/v2/IncidentServicesAPI.md +1 -1
- data/docs/v2/IncidentTeamUpdateData.md +1 -1
- data/docs/v2/IncidentTeamsAPI.md +1 -1
- data/docs/v2/MetricsAPI.md +1 -11
- data/extract-code-blocks.sh +6 -2
- data/lib/datadog_api_client/v1.rb +54 -0
- data/lib/datadog_api_client/v1/api/dashboards_api.rb +3 -0
- data/lib/datadog_api_client/v1/api/events_api.rb +14 -4
- data/lib/datadog_api_client/v1/api/monitors_api.rb +2 -2
- data/lib/datadog_api_client/v1/api/notebooks_api.rb +418 -0
- data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +3 -0
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +14 -170
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +79 -2
- data/lib/datadog_api_client/v1/models/distribution_widget_definition.rb +36 -6
- data/lib/datadog_api_client/v1/models/distribution_widget_x_axis.rb +259 -0
- data/lib/datadog_api_client/v1/models/distribution_widget_y_axis.rb +269 -0
- data/lib/datadog_api_client/v1/models/group_widget_definition.rb +42 -1
- data/lib/datadog_api_client/v1/models/image_widget_definition.rb +56 -4
- data/lib/datadog_api_client/v1/models/logs_by_retention.rb +243 -0
- data/lib/datadog_api_client/v1/models/logs_by_retention_monthly_usage.rb +235 -0
- data/lib/datadog_api_client/v1/models/logs_by_retention_org_usage.rb +225 -0
- data/lib/datadog_api_client/v1/models/logs_by_retention_orgs.rb +225 -0
- data/lib/datadog_api_client/v1/models/logs_retention_agg_sum_usage.rb +253 -0
- data/lib/datadog_api_client/v1/models/logs_retention_sum_usage.rb +253 -0
- data/lib/datadog_api_client/v1/models/note_widget_definition.rb +25 -4
- data/lib/datadog_api_client/v1/models/notebook_absolute_time.rb +253 -0
- data/lib/datadog_api_client/v1/models/notebook_author.rb +303 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_create_request.rb +243 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_create_request_attributes.rb +113 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_resource_type.rb +39 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_response.rb +258 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_response_attributes.rb +113 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_time.rb +109 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_update_request.rb +258 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_update_request_attributes.rb +113 -0
- data/lib/datadog_api_client/v1/models/notebook_create_data.rb +243 -0
- data/lib/datadog_api_client/v1/models/notebook_create_data_attributes.rb +298 -0
- data/lib/datadog_api_client/v1/models/notebook_create_request.rb +227 -0
- data/lib/datadog_api_client/v1/models/notebook_distribution_cell_attributes.rb +255 -0
- data/lib/datadog_api_client/v1/models/notebook_global_time.rb +109 -0
- data/lib/datadog_api_client/v1/models/notebook_graph_size.rb +43 -0
- data/lib/datadog_api_client/v1/models/notebook_heat_map_cell_attributes.rb +255 -0
- data/lib/datadog_api_client/v1/models/notebook_log_stream_cell_attributes.rb +246 -0
- data/lib/datadog_api_client/v1/models/notebook_markdown_cell_attributes.rb +227 -0
- data/lib/datadog_api_client/v1/models/notebook_markdown_cell_definition.rb +244 -0
- data/lib/datadog_api_client/v1/models/notebook_markdown_cell_definition_type.rb +39 -0
- data/lib/datadog_api_client/v1/models/notebook_relative_time.rb +227 -0
- data/lib/datadog_api_client/v1/models/notebook_resource_type.rb +39 -0
- data/lib/datadog_api_client/v1/models/notebook_response.rb +222 -0
- data/lib/datadog_api_client/v1/models/notebook_response_data.rb +258 -0
- data/lib/datadog_api_client/v1/models/notebook_response_data_attributes.rb +327 -0
- data/lib/datadog_api_client/v1/models/notebook_split_by.rb +247 -0
- data/lib/datadog_api_client/v1/models/notebook_status.rb +39 -0
- data/lib/datadog_api_client/v1/models/notebook_timeseries_cell_attributes.rb +255 -0
- data/lib/datadog_api_client/v1/models/notebook_toplist_cell_attributes.rb +255 -0
- data/lib/datadog_api_client/v1/models/notebook_update_cell.rb +109 -0
- data/lib/datadog_api_client/v1/models/notebook_update_data.rb +243 -0
- data/lib/datadog_api_client/v1/models/notebook_update_data_attributes.rb +298 -0
- data/lib/datadog_api_client/v1/models/notebook_update_request.rb +227 -0
- data/lib/datadog_api_client/v1/models/notebooks_response.rb +234 -0
- data/lib/datadog_api_client/v1/models/notebooks_response_meta.rb +222 -0
- data/lib/datadog_api_client/v1/models/notebooks_response_page.rb +233 -0
- data/lib/datadog_api_client/v1/models/slo_list_response.rb +13 -4
- data/lib/datadog_api_client/v1/models/slo_list_response_metadata.rb +222 -0
- data/lib/datadog_api_client/v1/models/slo_list_response_metadata_page.rb +233 -0
- data/lib/datadog_api_client/v1/models/slo_response.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_response_data.rb +363 -0
- data/lib/datadog_api_client/v1/models/synthetics_api_step.rb +21 -1
- data/lib/datadog_api_client/v1/models/synthetics_assertion_type.rb +4 -0
- data/lib/datadog_api_client/v1/models/synthetics_browser_test_config.rb +11 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_config.rb +0 -5
- data/lib/datadog_api_client/v1/models/synthetics_test_details_sub_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +79 -1
- data/lib/datadog_api_client/v1/models/synthetics_tick_interval.rb +1 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +67 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +41 -1
- data/lib/datadog_api_client/v1/models/usage_host_hour.rb +14 -4
- data/lib/datadog_api_client/v1/models/usage_io_t_hour.rb +1 -1
- data/lib/datadog_api_client/v1/models/usage_logs_by_retention_hour.rb +253 -0
- data/lib/datadog_api_client/v1/models/usage_logs_by_retention_response.rb +225 -0
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +38 -28
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +14 -4
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +23 -4
- data/lib/datadog_api_client/v1/models/widget.rb +1 -1
- data/lib/datadog_api_client/v1/models/widget_horizontal_align.rb +41 -0
- data/lib/datadog_api_client/v1/models/widget_image_sizing.rb +5 -0
- data/lib/datadog_api_client/v1/models/widget_layout.rb +12 -2
- data/lib/datadog_api_client/v1/models/widget_margin.rb +3 -0
- data/lib/datadog_api_client/v1/models/widget_marker.rb +1 -1
- data/lib/datadog_api_client/v1/models/widget_vertical_align.rb +41 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +2 -2
- data/lib/datadog_api_client/v2/configuration.rb +0 -2
- data/lib/datadog_api_client/v2/models/incident_service_update_data.rb +0 -5
- data/lib/datadog_api_client/v2/models/incident_team_update_data.rb +0 -5
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_metric_types.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +1 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/run-tests.sh +0 -6
- data/spec/v1/api/notebooks_api_spec.rb +106 -0
- data/spec/v1/models/distribution_widget_x_axis_spec.rb +55 -0
- data/spec/v1/models/distribution_widget_y_axis_spec.rb +61 -0
- data/spec/v1/models/logs_by_retention_monthly_usage_spec.rb +43 -0
- data/spec/v1/models/logs_by_retention_org_usage_spec.rb +37 -0
- data/spec/v1/models/logs_by_retention_orgs_spec.rb +37 -0
- data/spec/v1/models/logs_by_retention_spec.rb +49 -0
- data/spec/v1/models/logs_retention_agg_sum_usage_spec.rb +55 -0
- data/spec/v1/models/logs_retention_sum_usage_spec.rb +55 -0
- data/spec/v1/models/notebook_absolute_time_spec.rb +49 -0
- data/spec/v1/models/notebook_author_spec.rb +85 -0
- data/spec/v1/models/notebook_cell_create_request_attributes_spec.rb +34 -0
- data/spec/v1/models/notebook_cell_create_request_spec.rb +43 -0
- data/spec/v1/models/notebook_cell_resource_type_spec.rb +31 -0
- data/spec/v1/models/notebook_cell_response_attributes_spec.rb +34 -0
- data/spec/v1/models/notebook_cell_response_spec.rb +49 -0
- data/spec/v1/models/notebook_cell_time_spec.rb +34 -0
- data/spec/v1/models/notebook_cell_update_request_attributes_spec.rb +34 -0
- data/spec/v1/models/notebook_cell_update_request_spec.rb +49 -0
- data/spec/v1/models/notebook_create_data_attributes_spec.rb +55 -0
- data/spec/v1/models/notebook_create_data_spec.rb +43 -0
- data/spec/v1/models/notebook_create_request_spec.rb +37 -0
- data/spec/v1/models/notebook_distribution_cell_attributes_spec.rb +55 -0
- data/spec/v1/models/notebook_global_time_spec.rb +34 -0
- data/spec/v1/models/notebook_graph_size_spec.rb +31 -0
- data/spec/v1/models/notebook_heat_map_cell_attributes_spec.rb +55 -0
- data/spec/v1/models/notebook_log_stream_cell_attributes_spec.rb +49 -0
- data/spec/v1/models/notebook_markdown_cell_attributes_spec.rb +37 -0
- data/spec/v1/models/notebook_markdown_cell_definition_spec.rb +43 -0
- data/spec/v1/models/notebook_markdown_cell_definition_type_spec.rb +31 -0
- data/spec/v1/models/notebook_relative_time_spec.rb +37 -0
- data/spec/v1/models/notebook_resource_type_spec.rb +31 -0
- data/spec/v1/models/notebook_response_data_attributes_spec.rb +73 -0
- data/spec/v1/models/notebook_response_data_spec.rb +49 -0
- data/spec/v1/models/notebook_response_spec.rb +37 -0
- data/spec/v1/models/notebook_split_by_spec.rb +43 -0
- data/spec/v1/models/notebook_status_spec.rb +31 -0
- data/spec/v1/models/notebook_timeseries_cell_attributes_spec.rb +55 -0
- data/spec/v1/models/notebook_toplist_cell_attributes_spec.rb +55 -0
- data/spec/v1/models/notebook_update_cell_spec.rb +34 -0
- data/spec/v1/models/notebook_update_data_attributes_spec.rb +55 -0
- data/spec/v1/models/notebook_update_data_spec.rb +43 -0
- data/spec/v1/models/notebook_update_request_spec.rb +37 -0
- data/spec/v1/models/notebooks_response_meta_spec.rb +37 -0
- data/spec/v1/models/notebooks_response_page_spec.rb +43 -0
- data/spec/v1/models/notebooks_response_spec.rb +43 -0
- data/spec/v1/models/slo_list_response_metadata_page_spec.rb +43 -0
- data/spec/v1/models/slo_list_response_metadata_spec.rb +37 -0
- data/spec/v1/models/slo_response_data_spec.rb +115 -0
- data/spec/v1/models/usage_attribution_supported_metrics_spec.rb +31 -0
- data/spec/v1/models/usage_logs_by_retention_hour_spec.rb +55 -0
- data/spec/v1/models/usage_logs_by_retention_response_spec.rb +37 -0
- data/spec/v1/models/widget_horizontal_align_spec.rb +31 -0
- data/spec/v1/models/widget_vertical_align_spec.rb +31 -0
- metadata +220 -4
data/docs/v1/WidgetMarker.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **display_type** | **String** | Combination of: - A severity error, warning, ok, or info - A line type: dashed, solid, or bold | [optional] |
|
|
7
|
+
| **display_type** | **String** | Combination of: - A severity error, warning, ok, or info - A line type: dashed, solid, or bold In this case of a Distribution widget, this can be set to be `x_axis_percentile`. | [optional] |
|
|
8
8
|
| **label** | **String** | Label to display over the marker. | [optional] |
|
|
9
9
|
| **time** | **String** | Timestamp for the widget. | [optional] |
|
|
10
10
|
| **value** | **String** | Value to apply. Can be a single value y = 15 or a range of values 0 < y < 10. | |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# DatadogAPIClient::V1::WidgetVerticalAlign
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
|
|
8
|
+
## Example
|
|
9
|
+
|
|
10
|
+
```ruby
|
|
11
|
+
require 'datadog_api_client/v1'
|
|
12
|
+
|
|
13
|
+
instance = DatadogAPIClient::V1::WidgetVerticalAlign.new()
|
|
14
|
+
```
|
|
15
|
+
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **attributes** | [**IncidentServiceUpdateAttributes**](IncidentServiceUpdateAttributes.md) | | [optional] |
|
|
8
|
-
| **id** | **String** | The incident service's ID. |
|
|
8
|
+
| **id** | **String** | The incident service's ID. | [optional] |
|
|
9
9
|
| **relationships** | [**IncidentServiceRelationships**](IncidentServiceRelationships.md) | | [optional] |
|
|
10
10
|
| **type** | [**IncidentServiceType**](IncidentServiceType.md) | | [default to 'services'] |
|
|
11
11
|
|
|
@@ -309,7 +309,7 @@ end
|
|
|
309
309
|
|
|
310
310
|
api_instance = DatadogAPIClient::V2::IncidentServicesAPI.new
|
|
311
311
|
service_id = 'service_id_example' # String | The ID of the incident service.
|
|
312
|
-
body = DatadogAPIClient::V2::IncidentServiceUpdateRequest.new({data: DatadogAPIClient::V2::IncidentServiceUpdateData.new({
|
|
312
|
+
body = DatadogAPIClient::V2::IncidentServiceUpdateRequest.new({data: DatadogAPIClient::V2::IncidentServiceUpdateData.new({type: DatadogAPIClient::V2::IncidentServiceType::SERVICES})}) # IncidentServiceUpdateRequest | Incident Service Payload.
|
|
313
313
|
|
|
314
314
|
begin
|
|
315
315
|
# Update an existing incident service
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **attributes** | [**IncidentTeamUpdateAttributes**](IncidentTeamUpdateAttributes.md) | | [optional] |
|
|
8
|
-
| **id** | **String** | The incident team's ID. |
|
|
8
|
+
| **id** | **String** | The incident team's ID. | [optional] |
|
|
9
9
|
| **relationships** | [**IncidentTeamRelationships**](IncidentTeamRelationships.md) | | [optional] |
|
|
10
10
|
| **type** | [**IncidentTeamType**](IncidentTeamType.md) | | [default to 'teams'] |
|
|
11
11
|
|
data/docs/v2/IncidentTeamsAPI.md
CHANGED
|
@@ -309,7 +309,7 @@ end
|
|
|
309
309
|
|
|
310
310
|
api_instance = DatadogAPIClient::V2::IncidentTeamsAPI.new
|
|
311
311
|
team_id = 'team_id_example' # String | The ID of the incident team.
|
|
312
|
-
body = DatadogAPIClient::V2::IncidentTeamUpdateRequest.new({data: DatadogAPIClient::V2::IncidentTeamUpdateData.new({
|
|
312
|
+
body = DatadogAPIClient::V2::IncidentTeamUpdateRequest.new({data: DatadogAPIClient::V2::IncidentTeamUpdateData.new({type: DatadogAPIClient::V2::IncidentTeamType::TEAMS})}) # IncidentTeamUpdateRequest | Incident Team Payload.
|
|
313
313
|
|
|
314
314
|
begin
|
|
315
315
|
# Update an existing incident team
|
data/docs/v2/MetricsAPI.md
CHANGED
|
@@ -19,7 +19,7 @@ All URIs are relative to *https://api.datadoghq.com*
|
|
|
19
19
|
|
|
20
20
|
Create a tag configuration
|
|
21
21
|
|
|
22
|
-
Create and define a list of queryable tag keys for
|
|
22
|
+
Create and define a list of queryable tag keys for an existing count/gauge/rate/distribution metric. Optionally, include percentile aggregations on any distribution metric. Can only be used with application keys of users with the `Manage Tags for Metrics` permission.
|
|
23
23
|
|
|
24
24
|
### Examples
|
|
25
25
|
|
|
@@ -306,11 +306,6 @@ View indexed tag key-value pairs for a given metric name.
|
|
|
306
306
|
|
|
307
307
|
```ruby
|
|
308
308
|
require 'datadog_api_client'
|
|
309
|
-
|
|
310
|
-
DatadogAPIClient::V2.configure do |config|
|
|
311
|
-
config.unstable_operations[:list_tags_by_metric_name] = true
|
|
312
|
-
end
|
|
313
|
-
|
|
314
309
|
api_instance = DatadogAPIClient::V2::MetricsAPI.new
|
|
315
310
|
metric_name = 'dist.http.endpoint.request' # String | The name of the metric.
|
|
316
311
|
|
|
@@ -373,11 +368,6 @@ View distinct metrics volumes for the given metric name. Custom distribution me
|
|
|
373
368
|
|
|
374
369
|
```ruby
|
|
375
370
|
require 'datadog_api_client'
|
|
376
|
-
|
|
377
|
-
DatadogAPIClient::V2.configure do |config|
|
|
378
|
-
config.unstable_operations[:list_volumes_by_metric_name] = true
|
|
379
|
-
end
|
|
380
|
-
|
|
381
371
|
api_instance = DatadogAPIClient::V2::MetricsAPI.new
|
|
382
372
|
metric_name = 'dist.http.endpoint.request' # String | The name of the metric.
|
|
383
373
|
|
data/extract-code-blocks.sh
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
|
|
3
3
|
OUTPUT=${1:-examples}
|
|
4
|
+
VERSIONS=${2:-v1,v2}
|
|
4
5
|
|
|
5
6
|
cd ${0%/*}
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
VERSIONS=(${VERSIONS//,/ })
|
|
9
|
+
|
|
10
|
+
for version in "${VERSIONS[@]}"; do
|
|
11
|
+
ls docs/$version/*API.md | grep -v IPPrefixesAPI.md | xargs -n1 ./extract-code-blocks.awk -v output="${OUTPUT}/$version"
|
|
12
|
+
done
|
|
@@ -81,6 +81,8 @@ require 'datadog_api_client/v1/models/deleted_monitor'
|
|
|
81
81
|
require 'datadog_api_client/v1/models/distribution_widget_definition'
|
|
82
82
|
require 'datadog_api_client/v1/models/distribution_widget_definition_type'
|
|
83
83
|
require 'datadog_api_client/v1/models/distribution_widget_request'
|
|
84
|
+
require 'datadog_api_client/v1/models/distribution_widget_x_axis'
|
|
85
|
+
require 'datadog_api_client/v1/models/distribution_widget_y_axis'
|
|
84
86
|
require 'datadog_api_client/v1/models/downtime'
|
|
85
87
|
require 'datadog_api_client/v1/models/downtime_recurrence'
|
|
86
88
|
require 'datadog_api_client/v1/models/event'
|
|
@@ -168,6 +170,10 @@ require 'datadog_api_client/v1/models/logs_arithmetic_processor'
|
|
|
168
170
|
require 'datadog_api_client/v1/models/logs_arithmetic_processor_type'
|
|
169
171
|
require 'datadog_api_client/v1/models/logs_attribute_remapper'
|
|
170
172
|
require 'datadog_api_client/v1/models/logs_attribute_remapper_type'
|
|
173
|
+
require 'datadog_api_client/v1/models/logs_by_retention'
|
|
174
|
+
require 'datadog_api_client/v1/models/logs_by_retention_monthly_usage'
|
|
175
|
+
require 'datadog_api_client/v1/models/logs_by_retention_org_usage'
|
|
176
|
+
require 'datadog_api_client/v1/models/logs_by_retention_orgs'
|
|
171
177
|
require 'datadog_api_client/v1/models/logs_category_processor'
|
|
172
178
|
require 'datadog_api_client/v1/models/logs_category_processor_category'
|
|
173
179
|
require 'datadog_api_client/v1/models/logs_category_processor_type'
|
|
@@ -198,6 +204,8 @@ require 'datadog_api_client/v1/models/logs_pipeline_processor_type'
|
|
|
198
204
|
require 'datadog_api_client/v1/models/logs_pipelines_order'
|
|
199
205
|
require 'datadog_api_client/v1/models/logs_processor'
|
|
200
206
|
require 'datadog_api_client/v1/models/logs_query_compute'
|
|
207
|
+
require 'datadog_api_client/v1/models/logs_retention_agg_sum_usage'
|
|
208
|
+
require 'datadog_api_client/v1/models/logs_retention_sum_usage'
|
|
201
209
|
require 'datadog_api_client/v1/models/logs_service_remapper'
|
|
202
210
|
require 'datadog_api_client/v1/models/logs_service_remapper_type'
|
|
203
211
|
require 'datadog_api_client/v1/models/logs_sort'
|
|
@@ -234,6 +242,43 @@ require 'datadog_api_client/v1/models/monitor_type'
|
|
|
234
242
|
require 'datadog_api_client/v1/models/monitor_update_request'
|
|
235
243
|
require 'datadog_api_client/v1/models/note_widget_definition'
|
|
236
244
|
require 'datadog_api_client/v1/models/note_widget_definition_type'
|
|
245
|
+
require 'datadog_api_client/v1/models/notebook_absolute_time'
|
|
246
|
+
require 'datadog_api_client/v1/models/notebook_author'
|
|
247
|
+
require 'datadog_api_client/v1/models/notebook_cell_create_request'
|
|
248
|
+
require 'datadog_api_client/v1/models/notebook_cell_create_request_attributes'
|
|
249
|
+
require 'datadog_api_client/v1/models/notebook_cell_resource_type'
|
|
250
|
+
require 'datadog_api_client/v1/models/notebook_cell_response'
|
|
251
|
+
require 'datadog_api_client/v1/models/notebook_cell_response_attributes'
|
|
252
|
+
require 'datadog_api_client/v1/models/notebook_cell_time'
|
|
253
|
+
require 'datadog_api_client/v1/models/notebook_cell_update_request'
|
|
254
|
+
require 'datadog_api_client/v1/models/notebook_cell_update_request_attributes'
|
|
255
|
+
require 'datadog_api_client/v1/models/notebook_create_data'
|
|
256
|
+
require 'datadog_api_client/v1/models/notebook_create_data_attributes'
|
|
257
|
+
require 'datadog_api_client/v1/models/notebook_create_request'
|
|
258
|
+
require 'datadog_api_client/v1/models/notebook_distribution_cell_attributes'
|
|
259
|
+
require 'datadog_api_client/v1/models/notebook_global_time'
|
|
260
|
+
require 'datadog_api_client/v1/models/notebook_graph_size'
|
|
261
|
+
require 'datadog_api_client/v1/models/notebook_heat_map_cell_attributes'
|
|
262
|
+
require 'datadog_api_client/v1/models/notebook_log_stream_cell_attributes'
|
|
263
|
+
require 'datadog_api_client/v1/models/notebook_markdown_cell_attributes'
|
|
264
|
+
require 'datadog_api_client/v1/models/notebook_markdown_cell_definition'
|
|
265
|
+
require 'datadog_api_client/v1/models/notebook_markdown_cell_definition_type'
|
|
266
|
+
require 'datadog_api_client/v1/models/notebook_relative_time'
|
|
267
|
+
require 'datadog_api_client/v1/models/notebook_resource_type'
|
|
268
|
+
require 'datadog_api_client/v1/models/notebook_response'
|
|
269
|
+
require 'datadog_api_client/v1/models/notebook_response_data'
|
|
270
|
+
require 'datadog_api_client/v1/models/notebook_response_data_attributes'
|
|
271
|
+
require 'datadog_api_client/v1/models/notebook_split_by'
|
|
272
|
+
require 'datadog_api_client/v1/models/notebook_status'
|
|
273
|
+
require 'datadog_api_client/v1/models/notebook_timeseries_cell_attributes'
|
|
274
|
+
require 'datadog_api_client/v1/models/notebook_toplist_cell_attributes'
|
|
275
|
+
require 'datadog_api_client/v1/models/notebook_update_cell'
|
|
276
|
+
require 'datadog_api_client/v1/models/notebook_update_data'
|
|
277
|
+
require 'datadog_api_client/v1/models/notebook_update_data_attributes'
|
|
278
|
+
require 'datadog_api_client/v1/models/notebook_update_request'
|
|
279
|
+
require 'datadog_api_client/v1/models/notebooks_response'
|
|
280
|
+
require 'datadog_api_client/v1/models/notebooks_response_meta'
|
|
281
|
+
require 'datadog_api_client/v1/models/notebooks_response_page'
|
|
237
282
|
require 'datadog_api_client/v1/models/organization'
|
|
238
283
|
require 'datadog_api_client/v1/models/organization_billing'
|
|
239
284
|
require 'datadog_api_client/v1/models/organization_create_body'
|
|
@@ -280,7 +325,10 @@ require 'datadog_api_client/v1/models/slo_history_response_data'
|
|
|
280
325
|
require 'datadog_api_client/v1/models/slo_history_response_error'
|
|
281
326
|
require 'datadog_api_client/v1/models/slo_history_sli_data'
|
|
282
327
|
require 'datadog_api_client/v1/models/slo_list_response'
|
|
328
|
+
require 'datadog_api_client/v1/models/slo_list_response_metadata'
|
|
329
|
+
require 'datadog_api_client/v1/models/slo_list_response_metadata_page'
|
|
283
330
|
require 'datadog_api_client/v1/models/slo_response'
|
|
331
|
+
require 'datadog_api_client/v1/models/slo_response_data'
|
|
284
332
|
require 'datadog_api_client/v1/models/slo_threshold'
|
|
285
333
|
require 'datadog_api_client/v1/models/slo_timeframe'
|
|
286
334
|
require 'datadog_api_client/v1/models/slo_type'
|
|
@@ -418,6 +466,7 @@ require 'datadog_api_client/v1/models/usage_attribution_metadata'
|
|
|
418
466
|
require 'datadog_api_client/v1/models/usage_attribution_pagination'
|
|
419
467
|
require 'datadog_api_client/v1/models/usage_attribution_response'
|
|
420
468
|
require 'datadog_api_client/v1/models/usage_attribution_sort'
|
|
469
|
+
require 'datadog_api_client/v1/models/usage_attribution_supported_metrics'
|
|
421
470
|
require 'datadog_api_client/v1/models/usage_attribution_values'
|
|
422
471
|
require 'datadog_api_client/v1/models/usage_billable_summary_body'
|
|
423
472
|
require 'datadog_api_client/v1/models/usage_billable_summary_hour'
|
|
@@ -446,6 +495,8 @@ require 'datadog_api_client/v1/models/usage_lambda_hour'
|
|
|
446
495
|
require 'datadog_api_client/v1/models/usage_lambda_response'
|
|
447
496
|
require 'datadog_api_client/v1/models/usage_logs_by_index_hour'
|
|
448
497
|
require 'datadog_api_client/v1/models/usage_logs_by_index_response'
|
|
498
|
+
require 'datadog_api_client/v1/models/usage_logs_by_retention_hour'
|
|
499
|
+
require 'datadog_api_client/v1/models/usage_logs_by_retention_response'
|
|
449
500
|
require 'datadog_api_client/v1/models/usage_logs_hour'
|
|
450
501
|
require 'datadog_api_client/v1/models/usage_logs_response'
|
|
451
502
|
require 'datadog_api_client/v1/models/usage_metric_category'
|
|
@@ -506,6 +557,7 @@ require 'datadog_api_client/v1/models/widget_field_sort'
|
|
|
506
557
|
require 'datadog_api_client/v1/models/widget_formula'
|
|
507
558
|
require 'datadog_api_client/v1/models/widget_formula_limit'
|
|
508
559
|
require 'datadog_api_client/v1/models/widget_grouping'
|
|
560
|
+
require 'datadog_api_client/v1/models/widget_horizontal_align'
|
|
509
561
|
require 'datadog_api_client/v1/models/widget_image_sizing'
|
|
510
562
|
require 'datadog_api_client/v1/models/widget_layout'
|
|
511
563
|
require 'datadog_api_client/v1/models/widget_layout_type'
|
|
@@ -530,6 +582,7 @@ require 'datadog_api_client/v1/models/widget_text_align'
|
|
|
530
582
|
require 'datadog_api_client/v1/models/widget_tick_edge'
|
|
531
583
|
require 'datadog_api_client/v1/models/widget_time'
|
|
532
584
|
require 'datadog_api_client/v1/models/widget_time_windows'
|
|
585
|
+
require 'datadog_api_client/v1/models/widget_vertical_align'
|
|
533
586
|
require 'datadog_api_client/v1/models/widget_view_mode'
|
|
534
587
|
require 'datadog_api_client/v1/models/widget_viz_type'
|
|
535
588
|
|
|
@@ -551,6 +604,7 @@ require 'datadog_api_client/v1/api/logs_indexes_api'
|
|
|
551
604
|
require 'datadog_api_client/v1/api/logs_pipelines_api'
|
|
552
605
|
require 'datadog_api_client/v1/api/metrics_api'
|
|
553
606
|
require 'datadog_api_client/v1/api/monitors_api'
|
|
607
|
+
require 'datadog_api_client/v1/api/notebooks_api'
|
|
554
608
|
require 'datadog_api_client/v1/api/organizations_api'
|
|
555
609
|
require 'datadog_api_client/v1/api/pager_duty_integration_api'
|
|
556
610
|
require 'datadog_api_client/v1/api/service_checks_api'
|
|
@@ -246,6 +246,7 @@ module DatadogAPIClient::V1
|
|
|
246
246
|
# Get all dashboards
|
|
247
247
|
# Get all dashboards. **Note**: This query will only return custom created or cloned dashboards. This query will not return preset dashboards.
|
|
248
248
|
# @param [Hash] opts the optional parameters
|
|
249
|
+
# @option opts [Boolean] :filter_shared When `true`, this query only returns shared custom created or cloned dashboards.
|
|
249
250
|
# @return [DashboardSummary]
|
|
250
251
|
def list_dashboards(opts = {})
|
|
251
252
|
data, _status_code, _headers = list_dashboards_with_http_info(opts)
|
|
@@ -255,6 +256,7 @@ module DatadogAPIClient::V1
|
|
|
255
256
|
# Get all dashboards
|
|
256
257
|
# Get all dashboards. **Note**: This query will only return custom created or cloned dashboards. This query will not return preset dashboards.
|
|
257
258
|
# @param [Hash] opts the optional parameters
|
|
259
|
+
# @option opts [Boolean] :filter_shared When `true`, this query only returns shared custom created or cloned dashboards.
|
|
258
260
|
# @return [Array<(DashboardSummary, Integer, Hash)>] DashboardSummary data, response status code and response headers
|
|
259
261
|
def list_dashboards_with_http_info(opts = {})
|
|
260
262
|
|
|
@@ -275,6 +277,7 @@ module DatadogAPIClient::V1
|
|
|
275
277
|
|
|
276
278
|
# query parameters
|
|
277
279
|
query_params = opts[:query_params] || {}
|
|
280
|
+
query_params[:'filter[shared]'] = opts[:'filter_shared'] if !opts[:'filter_shared'].nil?
|
|
278
281
|
|
|
279
282
|
# header parameters
|
|
280
283
|
header_params = opts[:header_params] || {}
|
|
@@ -171,14 +171,16 @@ module DatadogAPIClient::V1
|
|
|
171
171
|
end
|
|
172
172
|
|
|
173
173
|
# Query the event stream
|
|
174
|
-
# The event stream can be queried and filtered by time, priority, sources and tags. **Notes**: - If the event you’re querying contains markdown formatting of any kind, you may see characters such as `%`,`\\`,`n` in your output. - This endpoint returns a maximum of `1000` most recent results. To return additional results, identify the last timestamp of the last result and set that as the `end` query time to paginate the results.
|
|
174
|
+
# The event stream can be queried and filtered by time, priority, sources and tags. **Notes**: - If the event you’re querying contains markdown formatting of any kind, you may see characters such as `%`,`\\`,`n` in your output. - This endpoint returns a maximum of `1000` most recent results. To return additional results, identify the last timestamp of the last result and set that as the `end` query time to paginate the results. You can also use the page parameter to specify which set of `1000` results to return.
|
|
175
175
|
# @param start [Integer] POSIX timestamp.
|
|
176
176
|
# @param _end [Integer] POSIX timestamp.
|
|
177
177
|
# @param [Hash] opts the optional parameters
|
|
178
178
|
# @option opts [EventPriority] :priority Priority of your events, either `low` or `normal`.
|
|
179
179
|
# @option opts [String] :sources A comma separated string of sources.
|
|
180
180
|
# @option opts [String] :tags A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope.
|
|
181
|
-
# @option opts [Boolean] :unaggregated Set unaggregated to `true` to return all events within the specified [`start`,`end`] timeframe. Otherwise if an event is aggregated to a parent event with a timestamp outside of the timeframe, it won't be available in the output.
|
|
181
|
+
# @option opts [Boolean] :unaggregated Set unaggregated to `true` to return all events within the specified [`start`,`end`] timeframe. Otherwise if an event is aggregated to a parent event with a timestamp outside of the timeframe, it won't be available in the output. Aggregated events with `is_aggregate=true` in the response will still be returned unless exclude_aggregate is set to `true.`
|
|
182
|
+
# @option opts [Boolean] :exclude_aggregate Set `exclude_aggregate` to `true` to only return unaggregated events where `is_aggregate=false` in the response. If the `exclude_aggregate` parameter is set to `true`, then the unaggregated parameter is ignored and will be `true` by default.
|
|
183
|
+
# @option opts [Integer] :page By default 1000 results are returned per request. Set page to the number of the page to return with `0` being the first page. The page parameter can only be used when either unaggregated or exclude_aggregate is set to `true.`
|
|
182
184
|
# @return [EventListResponse]
|
|
183
185
|
def list_events(start, _end, opts = {})
|
|
184
186
|
data, _status_code, _headers = list_events_with_http_info(start, _end, opts)
|
|
@@ -186,14 +188,16 @@ module DatadogAPIClient::V1
|
|
|
186
188
|
end
|
|
187
189
|
|
|
188
190
|
# Query the event stream
|
|
189
|
-
# The event stream can be queried and filtered by time, priority, sources and tags. **Notes**: - If the event you’re querying contains markdown formatting of any kind, you may see characters such as `%`,`\\`,`n` in your output. - This endpoint returns a maximum of `1000` most recent results. To return additional results, identify the last timestamp of the last result and set that as the `end` query time to paginate the results.
|
|
191
|
+
# The event stream can be queried and filtered by time, priority, sources and tags. **Notes**: - If the event you’re querying contains markdown formatting of any kind, you may see characters such as `%`,`\\`,`n` in your output. - This endpoint returns a maximum of `1000` most recent results. To return additional results, identify the last timestamp of the last result and set that as the `end` query time to paginate the results. You can also use the page parameter to specify which set of `1000` results to return.
|
|
190
192
|
# @param start [Integer] POSIX timestamp.
|
|
191
193
|
# @param _end [Integer] POSIX timestamp.
|
|
192
194
|
# @param [Hash] opts the optional parameters
|
|
193
195
|
# @option opts [EventPriority] :priority Priority of your events, either `low` or `normal`.
|
|
194
196
|
# @option opts [String] :sources A comma separated string of sources.
|
|
195
197
|
# @option opts [String] :tags A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope.
|
|
196
|
-
# @option opts [Boolean] :unaggregated Set unaggregated to `true` to return all events within the specified [`start`,`end`] timeframe. Otherwise if an event is aggregated to a parent event with a timestamp outside of the timeframe, it won't be available in the output.
|
|
198
|
+
# @option opts [Boolean] :unaggregated Set unaggregated to `true` to return all events within the specified [`start`,`end`] timeframe. Otherwise if an event is aggregated to a parent event with a timestamp outside of the timeframe, it won't be available in the output. Aggregated events with `is_aggregate=true` in the response will still be returned unless exclude_aggregate is set to `true.`
|
|
199
|
+
# @option opts [Boolean] :exclude_aggregate Set `exclude_aggregate` to `true` to only return unaggregated events where `is_aggregate=false` in the response. If the `exclude_aggregate` parameter is set to `true`, then the unaggregated parameter is ignored and will be `true` by default.
|
|
200
|
+
# @option opts [Integer] :page By default 1000 results are returned per request. Set page to the number of the page to return with `0` being the first page. The page parameter can only be used when either unaggregated or exclude_aggregate is set to `true.`
|
|
197
201
|
# @return [Array<(EventListResponse, Integer, Hash)>] EventListResponse data, response status code and response headers
|
|
198
202
|
def list_events_with_http_info(start, _end, opts = {})
|
|
199
203
|
|
|
@@ -217,6 +221,10 @@ module DatadogAPIClient::V1
|
|
|
217
221
|
if @api_client.config.client_side_validation && _end.nil?
|
|
218
222
|
fail ArgumentError, "Missing the required parameter '_end' when calling EventsAPI.list_events"
|
|
219
223
|
end
|
|
224
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 2147483647
|
|
225
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EventsAPI.list_events, must be smaller than or equal to 2147483647.'
|
|
226
|
+
end
|
|
227
|
+
|
|
220
228
|
# resource path
|
|
221
229
|
local_var_path = '/api/v1/events'
|
|
222
230
|
|
|
@@ -228,6 +236,8 @@ module DatadogAPIClient::V1
|
|
|
228
236
|
query_params[:'sources'] = opts[:'sources'] if !opts[:'sources'].nil?
|
|
229
237
|
query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
|
|
230
238
|
query_params[:'unaggregated'] = opts[:'unaggregated'] if !opts[:'unaggregated'].nil?
|
|
239
|
+
query_params[:'exclude_aggregate'] = opts[:'exclude_aggregate'] if !opts[:'exclude_aggregate'].nil?
|
|
240
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
231
241
|
|
|
232
242
|
# header parameters
|
|
233
243
|
header_params = opts[:header_params] || {}
|
|
@@ -97,7 +97,7 @@ module DatadogAPIClient::V1
|
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
# Create a monitor
|
|
100
|
-
# Create a monitor using the specified options. #### Monitor Types The type of monitor chosen from: - anomaly: `query alert` - APM: `query alert` or `trace-analytics alert` - composite: `composite` - custom: `service check` - event: `event alert` - forecast: `query alert` - host: `service check` - integration: `query alert` or `service check` - live process: `process alert` - logs: `log alert` - metric: `metric alert` - network: `service check` - outlier: `query alert` - process: `service check` - rum: `rum alert` - watchdog: `event alert` - event-v2: `event-v2 alert` #### Query Types **Metric Alert Query** Example: `time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #` - `time_aggr`: avg, sum, max, min, change, or pct_change - `time_window`: `last_#m` (with `#` between 1 and 2880 depending on the monitor type) or `last_#h`(with `#` between 1 and 48 depending on the monitor type), or `last_1d` - `space_aggr`: avg, sum, min, or max - `tags`: one or more tags (comma-separated), or * - `key`: a 'key' in key:value tag syntax; defines a separate alert for each tag in the group (multi-alert) - `operator`: <, <=, >, >=, ==, or != - `#`: an integer or decimal number used to set the threshold If you are using the `_change_` or `_pct_change_` time aggregator, instead use `change_aggr(time_aggr(time_window), timeshift):space_aggr:metric{tags} [by {key}] operator #` with: - `change_aggr` change, pct_change - `time_aggr` avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/monitor_types/#define-the-conditions) - `time_window` last\\_#m (between 1 and 2880 depending on the monitor type), last\\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2) - `timeshift` #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago Use this to create an outlier monitor using the following query: `avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, 'dbscan', 7) > 0` **Service Check Query** Example: `\"check\".over(tags).last(count).count_by_status()` - **`check`** name of the check, e.g. `datadog.agent.up` - **`tags`** one or more quoted tags (comma-separated), or \"*\". e.g.: `.over(\"env:prod\", \"role:db\")` - **`count`** must be at greater than or equal to your max threshold (defined in the `options`). It is limited to 100. For example, if you've specified to notify on 1 critical, 3 ok, and 2 warn statuses, `count` should be 3. **Event Alert Query** Example: `events('sources:nagios status:error,warning priority:normal tags: \"string query\"').rollup(\"count\").last(\"1h\")\"` - **`event`**, the event query string: - **`string_query`** free text query to match against event title and text. - **`sources`** event sources (comma-separated). - **`status`** event statuses (comma-separated). Valid options: error, warn, and info. - **`priority`** event priorities (comma-separated). Valid options: low, normal, all. - **`host`** event reporting host (comma-separated). - **`tags`** event tags (comma-separated). - **`excluded_tags`** excluded event tags (comma-separated). - **`rollup`** the stats roll-up method. `count` is the only supported method now. - **`last`** the timeframe to roll up the counts. Examples: 45m, 4h. Supported timeframes: m, h and d. This value should not exceed 48 hours. **NOTE** Only available on US1 and EU. **Event V2 Alert Query** Example: `events(query).rollup(rollup_method[, measure]).last(time_window) operator #` - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`. - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. - **`time_window`** #m (5, 10, 15, or 30), #h (1, 2, or 4, 24). - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`. - **`#`** an integer or decimal number used to set the threshold. **NOTE** Only available on US1-FED, US3, and in closed beta on EU and US1. **Process Alert Query** Example: `processes(search).over(tags).rollup('count').last(timeframe) operator #` - **`search`** free text search string for querying processes. Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab=linuxwindows) page. - **`tags`** one or more tags (comma-separated) - **`timeframe`** the timeframe to roll up the counts. Examples: 10m, 4h. Supported timeframes: s, m, h and d - **`operator`** <, <=, >, >=, ==, or != - **`#`** an integer or decimal number used to set the threshold **Logs Alert Query** Example: `logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #` - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`index_name`** For multi-index organizations, the log index in which the request is performed. - **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`. - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. - **`time_window`** #m (between 1 and 2880), #h (between 1 and 48) - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`. - **`#`** an integer or decimal number used to set the threshold. **Composite Query** Example: `12345 && 67890`, where `12345` and `67890` are the IDs of non-composite monitors * **`name`** [*required*, *default* = **dynamic, based on query**]: The name of the alert. * **`message`** [*required*, *default* = **dynamic, based on query**]: A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same '@username' notation as events. * **`tags`** [*optional*, *default* = **empty list**]: A list of tags to associate with your monitor. When getting all monitor details via the API, use the `monitor_tags` argument to filter results by these tags. It is only available via the API and isn't visible or editable in the Datadog UI.
|
|
100
|
+
# Create a monitor using the specified options. #### Monitor Types The type of monitor chosen from: - anomaly: `query alert` - APM: `query alert` or `trace-analytics alert` - composite: `composite` - custom: `service check` - event: `event alert` - forecast: `query alert` - host: `service check` - integration: `query alert` or `service check` - live process: `process alert` - logs: `log alert` - metric: `metric alert` - network: `service check` - outlier: `query alert` - process: `service check` - rum: `rum alert` - SLO: `slo alert` - watchdog: `event alert` - event-v2: `event-v2 alert` #### Query Types **Metric Alert Query** Example: `time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #` - `time_aggr`: avg, sum, max, min, change, or pct_change - `time_window`: `last_#m` (with `#` between 1 and 2880 depending on the monitor type) or `last_#h`(with `#` between 1 and 48 depending on the monitor type), or `last_1d` - `space_aggr`: avg, sum, min, or max - `tags`: one or more tags (comma-separated), or * - `key`: a 'key' in key:value tag syntax; defines a separate alert for each tag in the group (multi-alert) - `operator`: <, <=, >, >=, ==, or != - `#`: an integer or decimal number used to set the threshold If you are using the `_change_` or `_pct_change_` time aggregator, instead use `change_aggr(time_aggr(time_window), timeshift):space_aggr:metric{tags} [by {key}] operator #` with: - `change_aggr` change, pct_change - `time_aggr` avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/monitor_types/#define-the-conditions) - `time_window` last\\_#m (between 1 and 2880 depending on the monitor type), last\\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2) - `timeshift` #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago Use this to create an outlier monitor using the following query: `avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, 'dbscan', 7) > 0` **Service Check Query** Example: `\"check\".over(tags).last(count).count_by_status()` - **`check`** name of the check, e.g. `datadog.agent.up` - **`tags`** one or more quoted tags (comma-separated), or \"*\". e.g.: `.over(\"env:prod\", \"role:db\")` - **`count`** must be at greater than or equal to your max threshold (defined in the `options`). It is limited to 100. For example, if you've specified to notify on 1 critical, 3 ok, and 2 warn statuses, `count` should be 3. **Event Alert Query** Example: `events('sources:nagios status:error,warning priority:normal tags: \"string query\"').rollup(\"count\").last(\"1h\")\"` - **`event`**, the event query string: - **`string_query`** free text query to match against event title and text. - **`sources`** event sources (comma-separated). - **`status`** event statuses (comma-separated). Valid options: error, warn, and info. - **`priority`** event priorities (comma-separated). Valid options: low, normal, all. - **`host`** event reporting host (comma-separated). - **`tags`** event tags (comma-separated). - **`excluded_tags`** excluded event tags (comma-separated). - **`rollup`** the stats roll-up method. `count` is the only supported method now. - **`last`** the timeframe to roll up the counts. Examples: 45m, 4h. Supported timeframes: m, h and d. This value should not exceed 48 hours. **NOTE** Only available on US1 and EU. **Event V2 Alert Query** Example: `events(query).rollup(rollup_method[, measure]).last(time_window) operator #` - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`. - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. - **`time_window`** #m (5, 10, 15, or 30), #h (1, 2, or 4, 24). - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`. - **`#`** an integer or decimal number used to set the threshold. **NOTE** Only available on US1-FED, US3, and in closed beta on EU and US1. **Process Alert Query** Example: `processes(search).over(tags).rollup('count').last(timeframe) operator #` - **`search`** free text search string for querying processes. Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab=linuxwindows) page. - **`tags`** one or more tags (comma-separated) - **`timeframe`** the timeframe to roll up the counts. Examples: 10m, 4h. Supported timeframes: s, m, h and d - **`operator`** <, <=, >, >=, ==, or != - **`#`** an integer or decimal number used to set the threshold **Logs Alert Query** Example: `logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #` - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`index_name`** For multi-index organizations, the log index in which the request is performed. - **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`. - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. - **`time_window`** #m (between 1 and 2880), #h (between 1 and 48) - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`. - **`#`** an integer or decimal number used to set the threshold. **Composite Query** Example: `12345 && 67890`, where `12345` and `67890` are the IDs of non-composite monitors * **`name`** [*required*, *default* = **dynamic, based on query**]: The name of the alert. * **`message`** [*required*, *default* = **dynamic, based on query**]: A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same '@username' notation as events. * **`tags`** [*optional*, *default* = **empty list**]: A list of tags to associate with your monitor. When getting all monitor details via the API, use the `monitor_tags` argument to filter results by these tags. It is only available via the API and isn't visible or editable in the Datadog UI. **SLO Alert Query** Example: `error_budget(\"slo_id\").over(\"time_window\") operator #` - **`slo_id`**: The alphanumeric SLO ID of the SLO you are configuring the alert for. - **`time_window`**: The time window of the SLO target you wish to alert on. Valid options: `7d`, `30d`, `90d`. - **`operator`**: `>=` or `>`
|
|
101
101
|
# @param body [Monitor] Create a monitor request body.
|
|
102
102
|
# @param [Hash] opts the optional parameters
|
|
103
103
|
# @return [Monitor]
|
|
@@ -107,7 +107,7 @@ module DatadogAPIClient::V1
|
|
|
107
107
|
end
|
|
108
108
|
|
|
109
109
|
# Create a monitor
|
|
110
|
-
# Create a monitor using the specified options. #### Monitor Types The type of monitor chosen from: - anomaly: `query alert` - APM: `query alert` or `trace-analytics alert` - composite: `composite` - custom: `service check` - event: `event alert` - forecast: `query alert` - host: `service check` - integration: `query alert` or `service check` - live process: `process alert` - logs: `log alert` - metric: `metric alert` - network: `service check` - outlier: `query alert` - process: `service check` - rum: `rum alert` - watchdog: `event alert` - event-v2: `event-v2 alert` #### Query Types **Metric Alert Query** Example: `time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #` - `time_aggr`: avg, sum, max, min, change, or pct_change - `time_window`: `last_#m` (with `#` between 1 and 2880 depending on the monitor type) or `last_#h`(with `#` between 1 and 48 depending on the monitor type), or `last_1d` - `space_aggr`: avg, sum, min, or max - `tags`: one or more tags (comma-separated), or * - `key`: a 'key' in key:value tag syntax; defines a separate alert for each tag in the group (multi-alert) - `operator`: <, <=, >, >=, ==, or != - `#`: an integer or decimal number used to set the threshold If you are using the `_change_` or `_pct_change_` time aggregator, instead use `change_aggr(time_aggr(time_window), timeshift):space_aggr:metric{tags} [by {key}] operator #` with: - `change_aggr` change, pct_change - `time_aggr` avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/monitor_types/#define-the-conditions) - `time_window` last\\_#m (between 1 and 2880 depending on the monitor type), last\\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2) - `timeshift` #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago Use this to create an outlier monitor using the following query: `avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, 'dbscan', 7) > 0` **Service Check Query** Example: `\"check\".over(tags).last(count).count_by_status()` - **`check`** name of the check, e.g. `datadog.agent.up` - **`tags`** one or more quoted tags (comma-separated), or \"*\". e.g.: `.over(\"env:prod\", \"role:db\")` - **`count`** must be at greater than or equal to your max threshold (defined in the `options`). It is limited to 100. For example, if you've specified to notify on 1 critical, 3 ok, and 2 warn statuses, `count` should be 3. **Event Alert Query** Example: `events('sources:nagios status:error,warning priority:normal tags: \"string query\"').rollup(\"count\").last(\"1h\")\"` - **`event`**, the event query string: - **`string_query`** free text query to match against event title and text. - **`sources`** event sources (comma-separated). - **`status`** event statuses (comma-separated). Valid options: error, warn, and info. - **`priority`** event priorities (comma-separated). Valid options: low, normal, all. - **`host`** event reporting host (comma-separated). - **`tags`** event tags (comma-separated). - **`excluded_tags`** excluded event tags (comma-separated). - **`rollup`** the stats roll-up method. `count` is the only supported method now. - **`last`** the timeframe to roll up the counts. Examples: 45m, 4h. Supported timeframes: m, h and d. This value should not exceed 48 hours. **NOTE** Only available on US1 and EU. **Event V2 Alert Query** Example: `events(query).rollup(rollup_method[, measure]).last(time_window) operator #` - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`. - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. - **`time_window`** #m (5, 10, 15, or 30), #h (1, 2, or 4, 24). - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`. - **`#`** an integer or decimal number used to set the threshold. **NOTE** Only available on US1-FED, US3, and in closed beta on EU and US1. **Process Alert Query** Example: `processes(search).over(tags).rollup('count').last(timeframe) operator #` - **`search`** free text search string for querying processes. Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab=linuxwindows) page. - **`tags`** one or more tags (comma-separated) - **`timeframe`** the timeframe to roll up the counts. Examples: 10m, 4h. Supported timeframes: s, m, h and d - **`operator`** <, <=, >, >=, ==, or != - **`#`** an integer or decimal number used to set the threshold **Logs Alert Query** Example: `logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #` - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`index_name`** For multi-index organizations, the log index in which the request is performed. - **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`. - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. - **`time_window`** #m (between 1 and 2880), #h (between 1 and 48) - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`. - **`#`** an integer or decimal number used to set the threshold. **Composite Query** Example: `12345 && 67890`, where `12345` and `67890` are the IDs of non-composite monitors * **`name`** [*required*, *default* = **dynamic, based on query**]: The name of the alert. * **`message`** [*required*, *default* = **dynamic, based on query**]: A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same '@username' notation as events. * **`tags`** [*optional*, *default* = **empty list**]: A list of tags to associate with your monitor. When getting all monitor details via the API, use the `monitor_tags` argument to filter results by these tags. It is only available via the API and isn't visible or editable in the Datadog UI.
|
|
110
|
+
# Create a monitor using the specified options. #### Monitor Types The type of monitor chosen from: - anomaly: `query alert` - APM: `query alert` or `trace-analytics alert` - composite: `composite` - custom: `service check` - event: `event alert` - forecast: `query alert` - host: `service check` - integration: `query alert` or `service check` - live process: `process alert` - logs: `log alert` - metric: `metric alert` - network: `service check` - outlier: `query alert` - process: `service check` - rum: `rum alert` - SLO: `slo alert` - watchdog: `event alert` - event-v2: `event-v2 alert` #### Query Types **Metric Alert Query** Example: `time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #` - `time_aggr`: avg, sum, max, min, change, or pct_change - `time_window`: `last_#m` (with `#` between 1 and 2880 depending on the monitor type) or `last_#h`(with `#` between 1 and 48 depending on the monitor type), or `last_1d` - `space_aggr`: avg, sum, min, or max - `tags`: one or more tags (comma-separated), or * - `key`: a 'key' in key:value tag syntax; defines a separate alert for each tag in the group (multi-alert) - `operator`: <, <=, >, >=, ==, or != - `#`: an integer or decimal number used to set the threshold If you are using the `_change_` or `_pct_change_` time aggregator, instead use `change_aggr(time_aggr(time_window), timeshift):space_aggr:metric{tags} [by {key}] operator #` with: - `change_aggr` change, pct_change - `time_aggr` avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/monitor_types/#define-the-conditions) - `time_window` last\\_#m (between 1 and 2880 depending on the monitor type), last\\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2) - `timeshift` #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago Use this to create an outlier monitor using the following query: `avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, 'dbscan', 7) > 0` **Service Check Query** Example: `\"check\".over(tags).last(count).count_by_status()` - **`check`** name of the check, e.g. `datadog.agent.up` - **`tags`** one or more quoted tags (comma-separated), or \"*\". e.g.: `.over(\"env:prod\", \"role:db\")` - **`count`** must be at greater than or equal to your max threshold (defined in the `options`). It is limited to 100. For example, if you've specified to notify on 1 critical, 3 ok, and 2 warn statuses, `count` should be 3. **Event Alert Query** Example: `events('sources:nagios status:error,warning priority:normal tags: \"string query\"').rollup(\"count\").last(\"1h\")\"` - **`event`**, the event query string: - **`string_query`** free text query to match against event title and text. - **`sources`** event sources (comma-separated). - **`status`** event statuses (comma-separated). Valid options: error, warn, and info. - **`priority`** event priorities (comma-separated). Valid options: low, normal, all. - **`host`** event reporting host (comma-separated). - **`tags`** event tags (comma-separated). - **`excluded_tags`** excluded event tags (comma-separated). - **`rollup`** the stats roll-up method. `count` is the only supported method now. - **`last`** the timeframe to roll up the counts. Examples: 45m, 4h. Supported timeframes: m, h and d. This value should not exceed 48 hours. **NOTE** Only available on US1 and EU. **Event V2 Alert Query** Example: `events(query).rollup(rollup_method[, measure]).last(time_window) operator #` - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`. - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. - **`time_window`** #m (5, 10, 15, or 30), #h (1, 2, or 4, 24). - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`. - **`#`** an integer or decimal number used to set the threshold. **NOTE** Only available on US1-FED, US3, and in closed beta on EU and US1. **Process Alert Query** Example: `processes(search).over(tags).rollup('count').last(timeframe) operator #` - **`search`** free text search string for querying processes. Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab=linuxwindows) page. - **`tags`** one or more tags (comma-separated) - **`timeframe`** the timeframe to roll up the counts. Examples: 10m, 4h. Supported timeframes: s, m, h and d - **`operator`** <, <=, >, >=, ==, or != - **`#`** an integer or decimal number used to set the threshold **Logs Alert Query** Example: `logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #` - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`index_name`** For multi-index organizations, the log index in which the request is performed. - **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`. - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. - **`time_window`** #m (between 1 and 2880), #h (between 1 and 48) - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`. - **`#`** an integer or decimal number used to set the threshold. **Composite Query** Example: `12345 && 67890`, where `12345` and `67890` are the IDs of non-composite monitors * **`name`** [*required*, *default* = **dynamic, based on query**]: The name of the alert. * **`message`** [*required*, *default* = **dynamic, based on query**]: A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same '@username' notation as events. * **`tags`** [*optional*, *default* = **empty list**]: A list of tags to associate with your monitor. When getting all monitor details via the API, use the `monitor_tags` argument to filter results by these tags. It is only available via the API and isn't visible or editable in the Datadog UI. **SLO Alert Query** Example: `error_budget(\"slo_id\").over(\"time_window\") operator #` - **`slo_id`**: The alphanumeric SLO ID of the SLO you are configuring the alert for. - **`time_window`**: The time window of the SLO target you wish to alert on. Valid options: `7d`, `30d`, `90d`. - **`operator`**: `>=` or `>`
|
|
111
111
|
# @param body [Monitor] Create a monitor request body.
|
|
112
112
|
# @param [Hash] opts the optional parameters
|
|
113
113
|
# @return [Array<(Monitor, Integer, Hash)>] Monitor data, response status code and response headers
|
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V1 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'cgi'
|
|
17
|
+
|
|
18
|
+
module DatadogAPIClient::V1
|
|
19
|
+
class NotebooksAPI
|
|
20
|
+
attr_accessor :api_client
|
|
21
|
+
|
|
22
|
+
def initialize(api_client = APIClient.default)
|
|
23
|
+
@api_client = api_client
|
|
24
|
+
end
|
|
25
|
+
# Create a notebook
|
|
26
|
+
# Create a notebook using the specified options.
|
|
27
|
+
# @param body [NotebookCreateRequest] The JSON description of the notebook you want to create.
|
|
28
|
+
# @param [Hash] opts the optional parameters
|
|
29
|
+
# @return [NotebookResponse]
|
|
30
|
+
def create_notebook(body, opts = {})
|
|
31
|
+
data, _status_code, _headers = create_notebook_with_http_info(body, opts)
|
|
32
|
+
data
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Create a notebook
|
|
36
|
+
# Create a notebook using the specified options.
|
|
37
|
+
# @param body [NotebookCreateRequest] The JSON description of the notebook you want to create.
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [Array<(NotebookResponse, Integer, Hash)>] NotebookResponse data, response status code and response headers
|
|
40
|
+
def create_notebook_with_http_info(body, opts = {})
|
|
41
|
+
|
|
42
|
+
if @api_client.config.unstable_operations.has_key?(:create_notebook)
|
|
43
|
+
unstable_enabled = @api_client.config.unstable_operations[:create_notebook]
|
|
44
|
+
if unstable_enabled
|
|
45
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "create_notebook")
|
|
46
|
+
else
|
|
47
|
+
raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_notebook"))
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
if @api_client.config.debugging
|
|
52
|
+
@api_client.config.logger.debug 'Calling API: NotebooksAPI.create_notebook ...'
|
|
53
|
+
end
|
|
54
|
+
# verify the required parameter 'body' is set
|
|
55
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
56
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling NotebooksAPI.create_notebook"
|
|
57
|
+
end
|
|
58
|
+
# resource path
|
|
59
|
+
local_var_path = '/api/v1/notebooks'
|
|
60
|
+
|
|
61
|
+
# query parameters
|
|
62
|
+
query_params = opts[:query_params] || {}
|
|
63
|
+
|
|
64
|
+
# header parameters
|
|
65
|
+
header_params = opts[:header_params] || {}
|
|
66
|
+
# HTTP header 'Accept' (if needed)
|
|
67
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
68
|
+
# HTTP header 'Content-Type'
|
|
69
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
70
|
+
|
|
71
|
+
# form parameters
|
|
72
|
+
form_params = opts[:form_params] || {}
|
|
73
|
+
|
|
74
|
+
# http body (model)
|
|
75
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
76
|
+
|
|
77
|
+
# return_type
|
|
78
|
+
return_type = opts[:debug_return_type] || 'NotebookResponse'
|
|
79
|
+
|
|
80
|
+
# auth_names
|
|
81
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
82
|
+
|
|
83
|
+
new_options = opts.merge(
|
|
84
|
+
:operation => :create_notebook,
|
|
85
|
+
:header_params => header_params,
|
|
86
|
+
:query_params => query_params,
|
|
87
|
+
:form_params => form_params,
|
|
88
|
+
:body => post_body,
|
|
89
|
+
:auth_names => auth_names,
|
|
90
|
+
:return_type => return_type
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
94
|
+
if @api_client.config.debugging
|
|
95
|
+
@api_client.config.logger.debug "API called: NotebooksAPI#create_notebook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
96
|
+
end
|
|
97
|
+
return data, status_code, headers
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Delete a notebook
|
|
101
|
+
# Delete a notebook using the specified ID.
|
|
102
|
+
# @param notebook_id [Integer] Unique ID, assigned when you create the notebook.
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [nil]
|
|
105
|
+
def delete_notebook(notebook_id, opts = {})
|
|
106
|
+
delete_notebook_with_http_info(notebook_id, opts)
|
|
107
|
+
nil
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Delete a notebook
|
|
111
|
+
# Delete a notebook using the specified ID.
|
|
112
|
+
# @param notebook_id [Integer] Unique ID, assigned when you create the notebook.
|
|
113
|
+
# @param [Hash] opts the optional parameters
|
|
114
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
115
|
+
def delete_notebook_with_http_info(notebook_id, opts = {})
|
|
116
|
+
|
|
117
|
+
if @api_client.config.unstable_operations.has_key?(:delete_notebook)
|
|
118
|
+
unstable_enabled = @api_client.config.unstable_operations[:delete_notebook]
|
|
119
|
+
if unstable_enabled
|
|
120
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "delete_notebook")
|
|
121
|
+
else
|
|
122
|
+
raise APIError.new(message: format("Unstable operation '%s' is disabled", "delete_notebook"))
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if @api_client.config.debugging
|
|
127
|
+
@api_client.config.logger.debug 'Calling API: NotebooksAPI.delete_notebook ...'
|
|
128
|
+
end
|
|
129
|
+
# verify the required parameter 'notebook_id' is set
|
|
130
|
+
if @api_client.config.client_side_validation && notebook_id.nil?
|
|
131
|
+
fail ArgumentError, "Missing the required parameter 'notebook_id' when calling NotebooksAPI.delete_notebook"
|
|
132
|
+
end
|
|
133
|
+
# resource path
|
|
134
|
+
local_var_path = '/api/v1/notebooks/{notebook_id}'.sub('{' + 'notebook_id' + '}', CGI.escape(notebook_id.to_s))
|
|
135
|
+
|
|
136
|
+
# query parameters
|
|
137
|
+
query_params = opts[:query_params] || {}
|
|
138
|
+
|
|
139
|
+
# header parameters
|
|
140
|
+
header_params = opts[:header_params] || {}
|
|
141
|
+
# HTTP header 'Accept' (if needed)
|
|
142
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
143
|
+
|
|
144
|
+
# form parameters
|
|
145
|
+
form_params = opts[:form_params] || {}
|
|
146
|
+
|
|
147
|
+
# http body (model)
|
|
148
|
+
post_body = opts[:debug_body]
|
|
149
|
+
|
|
150
|
+
# return_type
|
|
151
|
+
return_type = opts[:debug_return_type]
|
|
152
|
+
|
|
153
|
+
# auth_names
|
|
154
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
155
|
+
|
|
156
|
+
new_options = opts.merge(
|
|
157
|
+
:operation => :delete_notebook,
|
|
158
|
+
:header_params => header_params,
|
|
159
|
+
:query_params => query_params,
|
|
160
|
+
:form_params => form_params,
|
|
161
|
+
:body => post_body,
|
|
162
|
+
:auth_names => auth_names,
|
|
163
|
+
:return_type => return_type
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
167
|
+
if @api_client.config.debugging
|
|
168
|
+
@api_client.config.logger.debug "API called: NotebooksAPI#delete_notebook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
169
|
+
end
|
|
170
|
+
return data, status_code, headers
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Get a notebook
|
|
174
|
+
# Get a notebook using the specified notebook ID.
|
|
175
|
+
# @param notebook_id [Integer] Unique ID, assigned when you create the notebook.
|
|
176
|
+
# @param [Hash] opts the optional parameters
|
|
177
|
+
# @return [NotebookResponse]
|
|
178
|
+
def get_notebook(notebook_id, opts = {})
|
|
179
|
+
data, _status_code, _headers = get_notebook_with_http_info(notebook_id, opts)
|
|
180
|
+
data
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Get a notebook
|
|
184
|
+
# Get a notebook using the specified notebook ID.
|
|
185
|
+
# @param notebook_id [Integer] Unique ID, assigned when you create the notebook.
|
|
186
|
+
# @param [Hash] opts the optional parameters
|
|
187
|
+
# @return [Array<(NotebookResponse, Integer, Hash)>] NotebookResponse data, response status code and response headers
|
|
188
|
+
def get_notebook_with_http_info(notebook_id, opts = {})
|
|
189
|
+
|
|
190
|
+
if @api_client.config.unstable_operations.has_key?(:get_notebook)
|
|
191
|
+
unstable_enabled = @api_client.config.unstable_operations[:get_notebook]
|
|
192
|
+
if unstable_enabled
|
|
193
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "get_notebook")
|
|
194
|
+
else
|
|
195
|
+
raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_notebook"))
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if @api_client.config.debugging
|
|
200
|
+
@api_client.config.logger.debug 'Calling API: NotebooksAPI.get_notebook ...'
|
|
201
|
+
end
|
|
202
|
+
# verify the required parameter 'notebook_id' is set
|
|
203
|
+
if @api_client.config.client_side_validation && notebook_id.nil?
|
|
204
|
+
fail ArgumentError, "Missing the required parameter 'notebook_id' when calling NotebooksAPI.get_notebook"
|
|
205
|
+
end
|
|
206
|
+
# resource path
|
|
207
|
+
local_var_path = '/api/v1/notebooks/{notebook_id}'.sub('{' + 'notebook_id' + '}', CGI.escape(notebook_id.to_s))
|
|
208
|
+
|
|
209
|
+
# query parameters
|
|
210
|
+
query_params = opts[:query_params] || {}
|
|
211
|
+
|
|
212
|
+
# header parameters
|
|
213
|
+
header_params = opts[:header_params] || {}
|
|
214
|
+
# HTTP header 'Accept' (if needed)
|
|
215
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
216
|
+
|
|
217
|
+
# form parameters
|
|
218
|
+
form_params = opts[:form_params] || {}
|
|
219
|
+
|
|
220
|
+
# http body (model)
|
|
221
|
+
post_body = opts[:debug_body]
|
|
222
|
+
|
|
223
|
+
# return_type
|
|
224
|
+
return_type = opts[:debug_return_type] || 'NotebookResponse'
|
|
225
|
+
|
|
226
|
+
# auth_names
|
|
227
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
228
|
+
|
|
229
|
+
new_options = opts.merge(
|
|
230
|
+
:operation => :get_notebook,
|
|
231
|
+
:header_params => header_params,
|
|
232
|
+
:query_params => query_params,
|
|
233
|
+
:form_params => form_params,
|
|
234
|
+
:body => post_body,
|
|
235
|
+
:auth_names => auth_names,
|
|
236
|
+
:return_type => return_type
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
240
|
+
if @api_client.config.debugging
|
|
241
|
+
@api_client.config.logger.debug "API called: NotebooksAPI#get_notebook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
242
|
+
end
|
|
243
|
+
return data, status_code, headers
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Get all notebooks
|
|
247
|
+
# Get all notebooks. This can also be used to search for notebooks with a particular `query` in the notebook `name` or author `handle`.
|
|
248
|
+
# @param [Hash] opts the optional parameters
|
|
249
|
+
# @option opts [String] :author_handle Return notebooks created by the given `author_handle`.
|
|
250
|
+
# @option opts [String] :exclude_author_handle Return notebooks not created by the given `author_handle`.
|
|
251
|
+
# @option opts [Integer] :start The index of the first notebook you want returned.
|
|
252
|
+
# @option opts [Integer] :count The number of notebooks to be returned.
|
|
253
|
+
# @option opts [String] :sort_field Sort by field `modified` or `name`. (default to 'modified')
|
|
254
|
+
# @option opts [String] :sort_dir Sort by direction `asc` or `desc`. (default to 'desc')
|
|
255
|
+
# @option opts [String] :query Return only notebooks with `query` string in notebook name or author handle.
|
|
256
|
+
# @option opts [Boolean] :include_cells Value of `false` excludes the `cells` and global `time` for each notebook. (default to true)
|
|
257
|
+
# @return [NotebooksResponse]
|
|
258
|
+
def list_notebooks(opts = {})
|
|
259
|
+
data, _status_code, _headers = list_notebooks_with_http_info(opts)
|
|
260
|
+
data
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Get all notebooks
|
|
264
|
+
# Get all notebooks. This can also be used to search for notebooks with a particular `query` in the notebook `name` or author `handle`.
|
|
265
|
+
# @param [Hash] opts the optional parameters
|
|
266
|
+
# @option opts [String] :author_handle Return notebooks created by the given `author_handle`.
|
|
267
|
+
# @option opts [String] :exclude_author_handle Return notebooks not created by the given `author_handle`.
|
|
268
|
+
# @option opts [Integer] :start The index of the first notebook you want returned.
|
|
269
|
+
# @option opts [Integer] :count The number of notebooks to be returned.
|
|
270
|
+
# @option opts [String] :sort_field Sort by field `modified` or `name`.
|
|
271
|
+
# @option opts [String] :sort_dir Sort by direction `asc` or `desc`.
|
|
272
|
+
# @option opts [String] :query Return only notebooks with `query` string in notebook name or author handle.
|
|
273
|
+
# @option opts [Boolean] :include_cells Value of `false` excludes the `cells` and global `time` for each notebook.
|
|
274
|
+
# @return [Array<(NotebooksResponse, Integer, Hash)>] NotebooksResponse data, response status code and response headers
|
|
275
|
+
def list_notebooks_with_http_info(opts = {})
|
|
276
|
+
|
|
277
|
+
if @api_client.config.unstable_operations.has_key?(:list_notebooks)
|
|
278
|
+
unstable_enabled = @api_client.config.unstable_operations[:list_notebooks]
|
|
279
|
+
if unstable_enabled
|
|
280
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "list_notebooks")
|
|
281
|
+
else
|
|
282
|
+
raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_notebooks"))
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
if @api_client.config.debugging
|
|
287
|
+
@api_client.config.logger.debug 'Calling API: NotebooksAPI.list_notebooks ...'
|
|
288
|
+
end
|
|
289
|
+
# resource path
|
|
290
|
+
local_var_path = '/api/v1/notebooks'
|
|
291
|
+
|
|
292
|
+
# query parameters
|
|
293
|
+
query_params = opts[:query_params] || {}
|
|
294
|
+
query_params[:'author_handle'] = opts[:'author_handle'] if !opts[:'author_handle'].nil?
|
|
295
|
+
query_params[:'exclude_author_handle'] = opts[:'exclude_author_handle'] if !opts[:'exclude_author_handle'].nil?
|
|
296
|
+
query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
|
|
297
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
298
|
+
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
|
299
|
+
query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
|
|
300
|
+
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
|
301
|
+
query_params[:'include_cells'] = opts[:'include_cells'] if !opts[:'include_cells'].nil?
|
|
302
|
+
|
|
303
|
+
# header parameters
|
|
304
|
+
header_params = opts[:header_params] || {}
|
|
305
|
+
# HTTP header 'Accept' (if needed)
|
|
306
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
307
|
+
|
|
308
|
+
# form parameters
|
|
309
|
+
form_params = opts[:form_params] || {}
|
|
310
|
+
|
|
311
|
+
# http body (model)
|
|
312
|
+
post_body = opts[:debug_body]
|
|
313
|
+
|
|
314
|
+
# return_type
|
|
315
|
+
return_type = opts[:debug_return_type] || 'NotebooksResponse'
|
|
316
|
+
|
|
317
|
+
# auth_names
|
|
318
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
319
|
+
|
|
320
|
+
new_options = opts.merge(
|
|
321
|
+
:operation => :list_notebooks,
|
|
322
|
+
:header_params => header_params,
|
|
323
|
+
:query_params => query_params,
|
|
324
|
+
:form_params => form_params,
|
|
325
|
+
:body => post_body,
|
|
326
|
+
:auth_names => auth_names,
|
|
327
|
+
:return_type => return_type
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
331
|
+
if @api_client.config.debugging
|
|
332
|
+
@api_client.config.logger.debug "API called: NotebooksAPI#list_notebooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
333
|
+
end
|
|
334
|
+
return data, status_code, headers
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# Update a notebook
|
|
338
|
+
# Update a notebook using the specified ID.
|
|
339
|
+
# @param notebook_id [Integer] Unique ID, assigned when you create the notebook.
|
|
340
|
+
# @param body [NotebookUpdateRequest] Update notebook request body.
|
|
341
|
+
# @param [Hash] opts the optional parameters
|
|
342
|
+
# @return [NotebookResponse]
|
|
343
|
+
def update_notebook(notebook_id, body, opts = {})
|
|
344
|
+
data, _status_code, _headers = update_notebook_with_http_info(notebook_id, body, opts)
|
|
345
|
+
data
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# Update a notebook
|
|
349
|
+
# Update a notebook using the specified ID.
|
|
350
|
+
# @param notebook_id [Integer] Unique ID, assigned when you create the notebook.
|
|
351
|
+
# @param body [NotebookUpdateRequest] Update notebook request body.
|
|
352
|
+
# @param [Hash] opts the optional parameters
|
|
353
|
+
# @return [Array<(NotebookResponse, Integer, Hash)>] NotebookResponse data, response status code and response headers
|
|
354
|
+
def update_notebook_with_http_info(notebook_id, body, opts = {})
|
|
355
|
+
|
|
356
|
+
if @api_client.config.unstable_operations.has_key?(:update_notebook)
|
|
357
|
+
unstable_enabled = @api_client.config.unstable_operations[:update_notebook]
|
|
358
|
+
if unstable_enabled
|
|
359
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "update_notebook")
|
|
360
|
+
else
|
|
361
|
+
raise APIError.new(message: format("Unstable operation '%s' is disabled", "update_notebook"))
|
|
362
|
+
end
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
if @api_client.config.debugging
|
|
366
|
+
@api_client.config.logger.debug 'Calling API: NotebooksAPI.update_notebook ...'
|
|
367
|
+
end
|
|
368
|
+
# verify the required parameter 'notebook_id' is set
|
|
369
|
+
if @api_client.config.client_side_validation && notebook_id.nil?
|
|
370
|
+
fail ArgumentError, "Missing the required parameter 'notebook_id' when calling NotebooksAPI.update_notebook"
|
|
371
|
+
end
|
|
372
|
+
# verify the required parameter 'body' is set
|
|
373
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
374
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling NotebooksAPI.update_notebook"
|
|
375
|
+
end
|
|
376
|
+
# resource path
|
|
377
|
+
local_var_path = '/api/v1/notebooks/{notebook_id}'.sub('{' + 'notebook_id' + '}', CGI.escape(notebook_id.to_s))
|
|
378
|
+
|
|
379
|
+
# query parameters
|
|
380
|
+
query_params = opts[:query_params] || {}
|
|
381
|
+
|
|
382
|
+
# header parameters
|
|
383
|
+
header_params = opts[:header_params] || {}
|
|
384
|
+
# HTTP header 'Accept' (if needed)
|
|
385
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
386
|
+
# HTTP header 'Content-Type'
|
|
387
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
388
|
+
|
|
389
|
+
# form parameters
|
|
390
|
+
form_params = opts[:form_params] || {}
|
|
391
|
+
|
|
392
|
+
# http body (model)
|
|
393
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
394
|
+
|
|
395
|
+
# return_type
|
|
396
|
+
return_type = opts[:debug_return_type] || 'NotebookResponse'
|
|
397
|
+
|
|
398
|
+
# auth_names
|
|
399
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
400
|
+
|
|
401
|
+
new_options = opts.merge(
|
|
402
|
+
:operation => :update_notebook,
|
|
403
|
+
:header_params => header_params,
|
|
404
|
+
:query_params => query_params,
|
|
405
|
+
:form_params => form_params,
|
|
406
|
+
:body => post_body,
|
|
407
|
+
:auth_names => auth_names,
|
|
408
|
+
:return_type => return_type
|
|
409
|
+
)
|
|
410
|
+
|
|
411
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
412
|
+
if @api_client.config.debugging
|
|
413
|
+
@api_client.config.logger.debug "API called: NotebooksAPI#update_notebook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
414
|
+
end
|
|
415
|
+
return data, status_code, headers
|
|
416
|
+
end
|
|
417
|
+
end
|
|
418
|
+
end
|