Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 177 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,38 @@ components:
x-enum-varnames:
- CUSTOM_TIMEBOARD
- CUSTOM_SCREENBOARD
DataProjectionQuery:
description: Query configuration for a data projection request.
properties:
data_source:
description: Data source for the query.
example: logs
type: string
indexes:
description: List of indexes to query.
items:
description: Index name.
type: string
type: array
query_string:
description: The query string to filter events.
example: "service:web-store"
type: string
storage:
description: Storage location for the query.
type: string
required:
- query_string
- data_source
type: object
DataProjectionRequestType:
description: Type of a data projection request.
enum:
- data_projection
example: data_projection
type: string
x-enum-varnames:
- DATA_PROJECTION
DeleteSharedDashboardResponse:
description: Response containing token of deleted shared dashboard.
properties:
Expand Down Expand Up @@ -11338,6 +11370,150 @@ components:
maxItems: 2
minItems: 2
type: array
PointPlotDimension:
description: Dimension of the point plot.
enum:
- group
- time
- y
- radius
example: y
type: string
x-enum-varnames:
- GROUP
- TIME
- Y
- RADIUS
PointPlotProjection:
description: Projection configuration for the point plot widget.
properties:
dimensions:
description: List of dimension mappings for the projection.
items:
$ref: "#/components/schemas/PointPlotProjectionDimension"
type: array
extra_columns:
description: Additional columns to include in the projection.
items:
description: Column name.
type: string
type: array
type:
$ref: "#/components/schemas/PointPlotProjectionType"
required:
- type
- dimensions
type: object
PointPlotProjectionDimension:
description: Dimension mapping for the point plot projection.
properties:
alias:
description: Alias for the column.
type: string
column:
description: Source column name from the dataset.
example: duration
type: string
dimension:
$ref: "#/components/schemas/PointPlotDimension"
required:
- column
- dimension
type: object
PointPlotProjectionType:
description: Type of the projection.
enum:
- point_plot
example: point_plot
type: string
x-enum-varnames:
- POINT_PLOT
PointPlotWidgetDefinition:
description: The point plot displays individual data points over time.
properties:
custom_links:
description: List of custom links.
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
legend:
$ref: "#/components/schemas/PointPlotWidgetLegend"
markers:
description: List of markers for the widget.
items:
$ref: "#/components/schemas/WidgetMarker"
type: array
requests:
description: List of request configurations for the widget.
items:
$ref: "#/components/schemas/PointPlotWidgetRequest"
type: array
time:
$ref: "#/components/schemas/WidgetTime"
title:
description: Title of the widget.
type: string
title_align:
$ref: "#/components/schemas/WidgetTextAlign"
title_size:
description: Size of the title.
type: string
type:
$ref: "#/components/schemas/PointPlotWidgetDefinitionType"
yaxis:
$ref: "#/components/schemas/WidgetAxis"
required:
- type
- requests
type: object
PointPlotWidgetDefinitionType:
default: point_plot
description: Type of the point plot widget.
enum:
- point_plot
example: point_plot
type: string
x-enum-varnames:
- POINT_PLOT
PointPlotWidgetLegend:
description: Legend configuration for the point plot widget.
properties:
type:
$ref: "#/components/schemas/PointPlotWidgetLegendType"
required:
- type
type: object
PointPlotWidgetLegendType:
description: Type of legend to show for the point plot widget.
enum:
- automatic
- none
example: automatic
type: string
x-enum-varnames:
- AUTOMATIC
- NONE
PointPlotWidgetRequest:
description: Request configuration for the point plot widget.
properties:
limit:
description: Maximum number of data points to return.
format: int64
type: integer
projection:
$ref: "#/components/schemas/PointPlotProjection"
query:
$ref: "#/components/schemas/DataProjectionQuery"
request_type:
$ref: "#/components/schemas/DataProjectionRequestType"
required:
- request_type
- query
- projection
type: object
PowerpackTemplateVariableContents:
description: Powerpack template variable contents.
properties:
Expand Down Expand Up @@ -25604,6 +25780,7 @@ components:
- $ref: "#/components/schemas/MonitorSummaryWidgetDefinition"
- $ref: "#/components/schemas/NoteWidgetDefinition"
- $ref: "#/components/schemas/PowerpackWidgetDefinition"
- $ref: "#/components/schemas/PointPlotWidgetDefinition"
- $ref: "#/components/schemas/QueryValueWidgetDefinition"
- $ref: "#/components/schemas/RetentionCurveWidgetDefinition"
- $ref: "#/components/schemas/RunWorkflowWidgetDefinition"
Expand Down
77 changes: 77 additions & 0 deletions docs/datadog_api_client.v1.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,20 @@ datadog\_api\_client.v1.model.dashboard\_type module
:members:
:show-inheritance:

datadog\_api\_client.v1.model.data\_projection\_query module
------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.data_projection_query
:members:
:show-inheritance:

datadog\_api\_client.v1.model.data\_projection\_request\_type module
--------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.data_projection_request_type
:members:
:show-inheritance:

datadog\_api\_client.v1.model.delete\_shared\_dashboard\_response module
------------------------------------------------------------------------

Expand Down Expand Up @@ -3441,6 +3455,69 @@ datadog\_api\_client.v1.model.point module
:members:
:show-inheritance:

datadog\_api\_client.v1.model.point\_plot\_dimension module
-----------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.point_plot_dimension
:members:
:show-inheritance:

datadog\_api\_client.v1.model.point\_plot\_projection module
------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.point_plot_projection
:members:
:show-inheritance:

datadog\_api\_client.v1.model.point\_plot\_projection\_dimension module
-----------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.point_plot_projection_dimension
:members:
:show-inheritance:

datadog\_api\_client.v1.model.point\_plot\_projection\_type module
------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.point_plot_projection_type
:members:
:show-inheritance:

datadog\_api\_client.v1.model.point\_plot\_widget\_definition module
--------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.point_plot_widget_definition
:members:
:show-inheritance:

datadog\_api\_client.v1.model.point\_plot\_widget\_definition\_type module
--------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.point_plot_widget_definition_type
:members:
:show-inheritance:

datadog\_api\_client.v1.model.point\_plot\_widget\_legend module
----------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.point_plot_widget_legend
:members:
:show-inheritance:

datadog\_api\_client.v1.model.point\_plot\_widget\_legend\_type module
----------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.point_plot_widget_legend_type
:members:
:show-inheritance:

datadog\_api\_client.v1.model.point\_plot\_widget\_request module
-----------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.point_plot_widget_request
:members:
:show-inheritance:

datadog\_api\_client.v1.model.powerpack\_template\_variable\_contents module
----------------------------------------------------------------------------

Expand Down
63 changes: 63 additions & 0 deletions examples/v1/dashboards/CreateDashboard_2049446128.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
"""
Create a new dashboard with point_plot widget
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.dashboards_api import DashboardsApi
from datadog_api_client.v1.model.dashboard import Dashboard
from datadog_api_client.v1.model.dashboard_layout_type import DashboardLayoutType
from datadog_api_client.v1.model.data_projection_query import DataProjectionQuery
from datadog_api_client.v1.model.data_projection_request_type import DataProjectionRequestType
from datadog_api_client.v1.model.point_plot_dimension import PointPlotDimension
from datadog_api_client.v1.model.point_plot_projection import PointPlotProjection
from datadog_api_client.v1.model.point_plot_projection_dimension import PointPlotProjectionDimension
from datadog_api_client.v1.model.point_plot_projection_type import PointPlotProjectionType
from datadog_api_client.v1.model.point_plot_widget_definition import PointPlotWidgetDefinition
from datadog_api_client.v1.model.point_plot_widget_definition_type import PointPlotWidgetDefinitionType
from datadog_api_client.v1.model.point_plot_widget_request import PointPlotWidgetRequest
from datadog_api_client.v1.model.widget import Widget
from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign

body = Dashboard(
title="Example-Dashboard",
layout_type=DashboardLayoutType.ORDERED,
widgets=[
Widget(
definition=PointPlotWidgetDefinition(
title="",
title_size="16",
title_align=WidgetTextAlign.LEFT,
type=PointPlotWidgetDefinitionType.POINT_PLOT,
requests=[
PointPlotWidgetRequest(
request_type=DataProjectionRequestType.DATA_PROJECTION,
query=DataProjectionQuery(
query_string="service:web-store",
data_source="logs",
),
projection=PointPlotProjection(
type=PointPlotProjectionType.POINT_PLOT,
dimensions=[
PointPlotProjectionDimension(
column="host",
dimension=PointPlotDimension.GROUP,
),
PointPlotProjectionDimension(
column="@duration",
dimension=PointPlotDimension.Y,
),
],
),
),
],
),
),
],
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = DashboardsApi(api_client)
response = api_instance.create_dashboard(body=body)

print(response)
Loading
Loading