From 04262ea148d1e3854107ff6d436057bbfb140aa1 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 27 Mar 2026 09:42:22 +0000 Subject: [PATCH] Regenerate client from commit f364e4c of spec repo --- .generator/schemas/v2/openapi.yaml | 594 ------------------ docs/datadog_api_client.v2.api.rst | 7 - docs/datadog_api_client.v2.model.rst | 112 ---- examples/v2/teams/CreateTeamConnections.py | 1 - examples/v2/teams/DeleteTeamConnections.py | 6 +- examples/v2/teams/ListTeamConnections.py | 4 +- .../teams/ListTeamConnections_1473516764.py | 1 - examples/v2/widgets/CreateWidget.py | 32 - examples/v2/widgets/DeleteWidget.py | 16 - examples/v2/widgets/GetWidget.py | 18 - examples/v2/widgets/SearchWidgets.py | 16 - examples/v2/widgets/UpdateWidget.py | 35 -- src/datadog_api_client/v2/api/widgets_api.py | 377 ----------- src/datadog_api_client/v2/apis/__init__.py | 2 - .../model/create_or_update_widget_request.py | 40 -- ...ate_or_update_widget_request_attributes.py | 50 -- .../create_or_update_widget_request_data.py | 50 -- .../v2/model/widget_attributes.py | 73 --- .../v2/model/widget_data.py | 70 --- .../v2/model/widget_definition.py | 54 -- .../v2/model/widget_experience_type.py | 44 -- .../v2/model/widget_included_user.py | 57 -- .../model/widget_included_user_attributes.py | 46 -- .../v2/model/widget_list_response.py | 66 -- .../v2/model/widget_relationship_data.py | 39 -- .../v2/model/widget_relationship_item.py | 42 -- .../v2/model/widget_relationships.py | 54 -- .../v2/model/widget_response.py | 51 -- .../v2/model/widget_search_meta.py | 64 -- .../v2/model/widget_type.py | 78 --- src/datadog_api_client/v2/models/__init__.py | 32 - ...ctions_returns_bad_request_response.frozen | 1 + ...nections_returns_bad_request_response.yaml | 21 + ...nnections_returns_conflict_response.frozen | 1 + ...connections_returns_conflict_response.yaml | 71 +++ ...onnections_returns_created_response.frozen | 1 + ..._connections_returns_created_response.yaml | 52 ++ ...ctions_returns_bad_request_response.frozen | 1 + ...nections_returns_bad_request_response.yaml | 21 + ...ections_returns_no_content_response.frozen | 1 + ...nnections_returns_no_content_response.yaml | 68 ++ ...eam_connections_returns_ok_response.frozen | 1 + ..._team_connections_returns_ok_response.yaml | 68 ++ ...ns_with_filters_returns_ok_response.frozen | 1 + ...ions_with_filters_returns_ok_response.yaml | 68 ++ tests/v2/features/given.json | 8 +- tests/v2/features/teams.feature | 57 +- tests/v2/features/undo.json | 44 +- tests/v2/features/widgets.feature | 115 ---- 49 files changed, 423 insertions(+), 2308 deletions(-) delete mode 100644 examples/v2/widgets/CreateWidget.py delete mode 100644 examples/v2/widgets/DeleteWidget.py delete mode 100644 examples/v2/widgets/GetWidget.py delete mode 100644 examples/v2/widgets/SearchWidgets.py delete mode 100644 examples/v2/widgets/UpdateWidget.py delete mode 100644 src/datadog_api_client/v2/api/widgets_api.py delete mode 100644 src/datadog_api_client/v2/model/create_or_update_widget_request.py delete mode 100644 src/datadog_api_client/v2/model/create_or_update_widget_request_attributes.py delete mode 100644 src/datadog_api_client/v2/model/create_or_update_widget_request_data.py delete mode 100644 src/datadog_api_client/v2/model/widget_attributes.py delete mode 100644 src/datadog_api_client/v2/model/widget_data.py delete mode 100644 src/datadog_api_client/v2/model/widget_definition.py delete mode 100644 src/datadog_api_client/v2/model/widget_experience_type.py delete mode 100644 src/datadog_api_client/v2/model/widget_included_user.py delete mode 100644 src/datadog_api_client/v2/model/widget_included_user_attributes.py delete mode 100644 src/datadog_api_client/v2/model/widget_list_response.py delete mode 100644 src/datadog_api_client/v2/model/widget_relationship_data.py delete mode 100644 src/datadog_api_client/v2/model/widget_relationship_item.py delete mode 100644 src/datadog_api_client/v2/model/widget_relationships.py delete mode 100644 src/datadog_api_client/v2/model/widget_response.py delete mode 100644 src/datadog_api_client/v2/model/widget_search_meta.py delete mode 100644 src/datadog_api_client/v2/model/widget_type.py create mode 100644 tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_bad_request_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_bad_request_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_conflict_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_conflict_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_created_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_created_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_bad_request_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_bad_request_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_no_content_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_no_content_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_list_team_connections_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_list_team_connections_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_list_team_connections_with_filters_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_list_team_connections_with_filters_returns_ok_response.yaml delete mode 100644 tests/v2/features/widgets.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 34f94ce65a..e889415714 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -15324,41 +15324,6 @@ components: id: $ref: "#/components/schemas/ApiID" type: object - CreateOrUpdateWidgetRequest: - description: Request body for creating or updating a widget. - properties: - data: - $ref: "#/components/schemas/CreateOrUpdateWidgetRequestData" - required: - - data - type: object - CreateOrUpdateWidgetRequestAttributes: - description: Attributes for creating or updating a widget. - properties: - definition: - $ref: "#/components/schemas/WidgetDefinition" - tags: - description: User-defined tags for organizing the widget. - items: - type: string - nullable: true - type: array - required: - - definition - type: object - CreateOrUpdateWidgetRequestData: - description: Data for creating or updating a widget. - properties: - attributes: - $ref: "#/components/schemas/CreateOrUpdateWidgetRequestAttributes" - type: - description: Widgets resource type. - example: widgets - type: string - required: - - type - - attributes - type: object CreatePageRequest: description: Full request to trigger an On-Call Page. example: @@ -71710,136 +71675,6 @@ components: - FRIDAY - SATURDAY - SUNDAY - WidgetAttributes: - description: Attributes of a widget resource. - properties: - created_at: - description: ISO 8601 timestamp of when the widget was created. - example: "2024-01-15T00:00:00.000Z" - type: string - definition: - $ref: "#/components/schemas/WidgetDefinition" - is_favorited: - description: "Will be implemented soon. Currently always returns false." - example: false - type: boolean - modified_at: - description: ISO 8601 timestamp of when the widget was last modified. - example: "2024-01-15T00:00:00.000Z" - type: string - tags: - description: User-defined tags for organizing widgets. - example: - - "team:my-team" - items: - type: string - nullable: true - type: array - required: - - definition - - tags - - is_favorited - - created_at - - modified_at - type: object - WidgetData: - description: A widget resource object. - properties: - attributes: - $ref: "#/components/schemas/WidgetAttributes" - id: - description: The unique identifier of the widget. - example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" - type: string - relationships: - $ref: "#/components/schemas/WidgetRelationships" - type: - description: Widgets resource type. - example: widgets - type: string - required: - - id - - type - - attributes - type: object - WidgetDefinition: - additionalProperties: {} - description: The definition of a widget, including its type and configuration. - properties: - title: - description: The display title of the widget. - example: My Widget - maxLength: 100 - minLength: 1 - type: string - type: - $ref: "#/components/schemas/WidgetType" - required: - - type - - title - type: object - WidgetExperienceType: - description: Widget experience types that differentiate between the products using the specific widget. - enum: - - ccm_reports - - logs_reports - - csv_reports - - product_analytics - example: ccm_reports - type: string - x-enum-varnames: - - CCM_REPORTS - - LOGS_REPORTS - - CSV_REPORTS - - PRODUCT_ANALYTICS - WidgetIncludedUser: - description: A user resource included in the response. - properties: - attributes: - $ref: "#/components/schemas/WidgetIncludedUserAttributes" - id: - description: The unique identifier of the user. - example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" - type: string - type: - description: Users resource type. - example: users - type: string - required: - - id - - type - type: object - WidgetIncludedUserAttributes: - description: Attributes of an included user resource. - properties: - handle: - description: The email handle of the user. - example: "john.doe@example.com" - type: string - name: - description: The display name of the user. - example: "John Doe" - nullable: true - type: string - type: object - WidgetListResponse: - description: Response containing a list of widgets. - properties: - data: - description: List of widget resources. - items: - $ref: "#/components/schemas/WidgetData" - type: array - included: - description: Array of user resources related to the widgets. - items: - $ref: "#/components/schemas/WidgetIncludedUser" - type: array - meta: - $ref: "#/components/schemas/WidgetSearchMeta" - required: - - data - type: object WidgetLiveSpan: description: The available timeframes depend on the widget you are using. enum: @@ -71876,108 +71711,6 @@ components: - PAST_SIX_MONTHS - PAST_ONE_YEAR - ALERT - WidgetRelationshipData: - description: Relationship data referencing a user resource. - properties: - id: - description: The unique identifier of the user. - example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" - type: string - type: - description: Users resource type. - example: users - type: string - required: - - id - - type - type: object - WidgetRelationshipItem: - description: A JSON:API relationship to a user. - properties: - data: - $ref: "#/components/schemas/WidgetRelationshipData" - type: object - WidgetRelationships: - description: Relationships of the widget resource. - properties: - created_by: - $ref: "#/components/schemas/WidgetRelationshipItem" - description: The user who created the widget. - modified_by: - $ref: "#/components/schemas/WidgetRelationshipItem" - description: The user who last modified the widget. - type: object - WidgetResponse: - description: Response containing a single widget. - properties: - data: - $ref: "#/components/schemas/WidgetData" - included: - description: Array of user resources related to the widget. - items: - $ref: "#/components/schemas/WidgetIncludedUser" - type: array - required: - - data - type: object - WidgetSearchMeta: - description: Metadata about the search results. - properties: - created_by_anyone_total: - description: Total number of widgets created by anyone. - format: int64 - type: integer - created_by_you_total: - description: Total number of widgets created by the current user. - format: int64 - type: integer - favorited_by_you_total: - description: Total number of widgets favorited by the current user. - format: int64 - type: integer - filtered_total: - description: Total number of widgets matching the current filter criteria. - format: int64 - type: integer - type: object - WidgetType: - description: |- - Widget types that are allowed to be stored as individual records. - This is not a complete list of dashboard and notebook widget types. - enum: - - bar_chart - - change - - cloud_cost_summary - - cohort - - funnel - - geomap - - list_stream - - query_table - - query_value - - retention_curve - - sankey - - sunburst - - timeseries - - toplist - - treemap - example: bar_chart - type: string - x-enum-varnames: - - BAR_CHART - - CHANGE - - CLOUD_COST_SUMMARY - - COHORT - - FUNNEL - - GEOMAP - - LIST_STREAM - - QUERY_TABLE - - QUERY_VALUE - - RETENTION_CURVE - - SANKEY - - SUNBURST - - TIMESERIES - - TOPLIST - - TREEMAP WorkflowData: description: Data related to the workflow. properties: @@ -110133,328 +109866,6 @@ paths: operator: OR permissions: - teams_read - /api/v2/widgets/{experience_type}: - get: - description: Search and list widgets for a given experience type. Supports filtering by widget type, creator, title, and tags, as well as sorting and pagination. - operationId: SearchWidgets - parameters: - - description: The experience type for the widget. - in: path - name: experience_type - required: true - schema: - $ref: "#/components/schemas/WidgetExperienceType" - - description: Filter widgets by widget type. - in: query - name: filter[widgetType] - schema: - $ref: "#/components/schemas/WidgetType" - - description: Filter widgets by the email handle of the creator. - in: query - name: filter[creatorHandle] - schema: - example: "john.doe@example.com" - type: string - - description: Filter to only widgets favorited by the current user. - in: query - name: filter[isFavorited] - schema: - type: boolean - - description: Filter widgets by title (substring match). - in: query - name: filter[title] - schema: - type: string - - description: Filter widgets by tags. Format as bracket-delimited CSV, e.g. `[tag1,tag2]`. - in: query - name: filter[tags] - schema: - type: string - - description: |- - Sort field for the results. Prefix with `-` for descending order. - Allowed values: `title`, `created_at`, `modified_at`. - in: query - name: sort - schema: - default: "-modified_at" - example: "-modified_at" - type: string - - description: Page number for pagination (0-indexed). - in: query - name: page[number] - schema: - default: 0 - minimum: 0 - type: integer - - description: Number of widgets per page. - in: query - name: page[size] - schema: - default: 50 - maximum: 100 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/WidgetListResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Search widgets - tags: - - Widgets - x-permission: - operator: OR - permissions: - - cloud_cost_management_read - - generate_log_reports - - manage_log_reports - - product_analytics_saved_widgets_read - post: - description: Create a new widget for a given experience type. - operationId: CreateWidget - parameters: - - description: The experience type for the widget. - in: path - name: experience_type - required: true - schema: - $ref: "#/components/schemas/WidgetExperienceType" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateOrUpdateWidgetRequest" - description: Widget request body. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/WidgetResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Create a widget - tags: - - Widgets - x-codegen-request-body-name: body - x-permission: - operator: OR - permissions: - - cloud_cost_management_write - - generate_log_reports - - manage_log_reports - - product_analytics_saved_widgets_write - /api/v2/widgets/{experience_type}/{uuid}: - delete: - description: Soft-delete a widget by its UUID for a given experience type. - operationId: DeleteWidget - parameters: - - description: The experience type for the widget. - in: path - name: experience_type - required: true - schema: - $ref: "#/components/schemas/WidgetExperienceType" - - description: The UUID of the widget. - in: path - name: uuid - required: true - schema: - format: uuid - type: string - responses: - "204": - description: No Content - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Delete a widget - tags: - - Widgets - x-permission: - operator: OR - permissions: - - cloud_cost_management_write - - generate_log_reports - - manage_log_reports - - product_analytics_saved_widgets_write - get: - description: Retrieve a widget by its UUID for a given experience type. - operationId: GetWidget - parameters: - - description: The experience type for the widget. - in: path - name: experience_type - required: true - schema: - $ref: "#/components/schemas/WidgetExperienceType" - - description: The UUID of the widget. - in: path - name: uuid - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/WidgetResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Get a widget - tags: - - Widgets - x-permission: - operator: OR - permissions: - - cloud_cost_management_read - - generate_log_reports - - manage_log_reports - - product_analytics_saved_widgets_read - put: - description: Update a widget by its UUID for a given experience type. This performs a full replacement of the widget definition. - operationId: UpdateWidget - parameters: - - description: The experience type for the widget. - in: path - name: experience_type - required: true - schema: - $ref: "#/components/schemas/WidgetExperienceType" - - description: The UUID of the widget. - in: path - name: uuid - required: true - schema: - format: uuid - type: string - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateOrUpdateWidgetRequest" - description: Widget request body. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/WidgetResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Update a widget - tags: - - Widgets - x-codegen-request-body-name: body - x-permission: - operator: OR - permissions: - - cloud_cost_management_write - - generate_log_reports - - manage_log_reports - - product_analytics_saved_widgets_write /api/v2/workflows: post: description: Create a new workflow, returning the workflow ID. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). @@ -111305,11 +110716,6 @@ tags: externalDocs: url: https://docs.datadoghq.com/account_management/users name: Users - - description: |- - Create, read, update, and delete saved widgets. Widgets are reusable - visualization components stored independently from any dashboard or notebook, - partitioned by experience type and identified by a UUID. - name: Widgets - description: |- Datadog Workflow Automation allows you to automate your end-to-end processes by connecting Datadog with the rest of your tech stack. Build workflows to auto-remediate your alerts, streamline your incident and security processes, and reduce manual toil. Workflow Automation supports over 1,000+ OOTB actions, including AWS, JIRA, ServiceNow, GitHub, and OpenAI. Learn more in our Workflow Automation docs [here](https://docs.datadoghq.com/service_management/workflows/). externalDocs: diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index c3be7e8838..35a19fc43c 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -725,13 +725,6 @@ datadog\_api\_client.v2.api.users\_api module :members: :show-inheritance: -datadog\_api\_client.v2.api.widgets\_api module ------------------------------------------------ - -.. automodule:: datadog_api_client.v2.api.widgets_api - :members: - :show-inheritance: - datadog\_api\_client.v2.api.workflow\_automation\_api module ------------------------------------------------------------ diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 826de99698..868e840142 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -6444,27 +6444,6 @@ datadog\_api\_client.v2.model.create\_open\_api\_response\_data module :members: :show-inheritance: -datadog\_api\_client.v2.model.create\_or\_update\_widget\_request module ------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.create_or_update_widget_request - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.create\_or\_update\_widget\_request\_attributes module ------------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.create_or_update_widget_request_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.create\_or\_update\_widget\_request\_data module ------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.create_or_update_widget_request_data - :members: - :show-inheritance: - datadog\_api\_client.v2.model.create\_page\_request module ---------------------------------------------------------- @@ -32638,55 +32617,6 @@ datadog\_api\_client.v2.model.weekday module :members: :show-inheritance: -datadog\_api\_client.v2.model.widget\_attributes module -------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.widget_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.widget\_data module -------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.widget_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.widget\_definition module -------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.widget_definition - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.widget\_experience\_type module -------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.widget_experience_type - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.widget\_included\_user module ------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.widget_included_user - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.widget\_included\_user\_attributes module ------------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.widget_included_user_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.widget\_list\_response module ------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.widget_list_response - :members: - :show-inheritance: - datadog\_api\_client.v2.model.widget\_live\_span module ------------------------------------------------------- @@ -32694,48 +32624,6 @@ datadog\_api\_client.v2.model.widget\_live\_span module :members: :show-inheritance: -datadog\_api\_client.v2.model.widget\_relationship\_data module ---------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.widget_relationship_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.widget\_relationship\_item module ---------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.widget_relationship_item - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.widget\_relationships module ----------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.widget_relationships - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.widget\_response module ------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.widget_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.widget\_search\_meta module ---------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.widget_search_meta - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.widget\_type module -------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.widget_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.workflow\_data module --------------------------------------------------- diff --git a/examples/v2/teams/CreateTeamConnections.py b/examples/v2/teams/CreateTeamConnections.py index 2b195bc1bb..d389f75ad2 100644 --- a/examples/v2/teams/CreateTeamConnections.py +++ b/examples/v2/teams/CreateTeamConnections.py @@ -47,7 +47,6 @@ ) configuration = Configuration() -configuration.unstable_operations["create_team_connections"] = True with ApiClient(configuration) as api_client: api_instance = TeamsApi(api_client) response = api_instance.create_team_connections(body=body) diff --git a/examples/v2/teams/DeleteTeamConnections.py b/examples/v2/teams/DeleteTeamConnections.py index a98fac3f6d..a95eb606b5 100644 --- a/examples/v2/teams/DeleteTeamConnections.py +++ b/examples/v2/teams/DeleteTeamConnections.py @@ -2,16 +2,20 @@ Delete team connections returns "No Content" response """ +from os import environ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v2.api.teams_api import TeamsApi from datadog_api_client.v2.model.team_connection_delete_request import TeamConnectionDeleteRequest from datadog_api_client.v2.model.team_connection_delete_request_data_item import TeamConnectionDeleteRequestDataItem from datadog_api_client.v2.model.team_connection_type import TeamConnectionType +# there is a valid "team_connection" in the system +TEAM_CONNECTION_ID = environ["TEAM_CONNECTION_ID"] + body = TeamConnectionDeleteRequest( data=[ TeamConnectionDeleteRequestDataItem( - id="12345678-1234-5678-9abc-123456789012", + id=TEAM_CONNECTION_ID, type=TeamConnectionType.TEAM_CONNECTION, ), ], diff --git a/examples/v2/teams/ListTeamConnections.py b/examples/v2/teams/ListTeamConnections.py index bd94ac7e33..e98761aeb4 100644 --- a/examples/v2/teams/ListTeamConnections.py +++ b/examples/v2/teams/ListTeamConnections.py @@ -8,6 +8,8 @@ configuration = Configuration() with ApiClient(configuration) as api_client: api_instance = TeamsApi(api_client) - response = api_instance.list_team_connections() + response = api_instance.list_team_connections( + page_size=10, + ) print(response) diff --git a/examples/v2/teams/ListTeamConnections_1473516764.py b/examples/v2/teams/ListTeamConnections_1473516764.py index 3c10c2965d..c9d9704830 100644 --- a/examples/v2/teams/ListTeamConnections_1473516764.py +++ b/examples/v2/teams/ListTeamConnections_1473516764.py @@ -6,7 +6,6 @@ from datadog_api_client.v2.api.teams_api import TeamsApi configuration = Configuration() -configuration.unstable_operations["list_team_connections"] = True with ApiClient(configuration) as api_client: api_instance = TeamsApi(api_client) response = api_instance.list_team_connections( diff --git a/examples/v2/widgets/CreateWidget.py b/examples/v2/widgets/CreateWidget.py deleted file mode 100644 index a240c0ca20..0000000000 --- a/examples/v2/widgets/CreateWidget.py +++ /dev/null @@ -1,32 +0,0 @@ -""" -Create a widget returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.widgets_api import WidgetsApi -from datadog_api_client.v2.model.create_or_update_widget_request import CreateOrUpdateWidgetRequest -from datadog_api_client.v2.model.create_or_update_widget_request_attributes import CreateOrUpdateWidgetRequestAttributes -from datadog_api_client.v2.model.create_or_update_widget_request_data import CreateOrUpdateWidgetRequestData -from datadog_api_client.v2.model.widget_definition import WidgetDefinition -from datadog_api_client.v2.model.widget_experience_type import WidgetExperienceType -from datadog_api_client.v2.model.widget_type import WidgetType - -body = CreateOrUpdateWidgetRequest( - data=CreateOrUpdateWidgetRequestData( - attributes=CreateOrUpdateWidgetRequestAttributes( - definition=WidgetDefinition( - title="My Widget", - type=WidgetType.BAR_CHART, - ), - tags=[], - ), - type="widgets", - ), -) - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = WidgetsApi(api_client) - response = api_instance.create_widget(experience_type=WidgetExperienceType.CCM_REPORTS, body=body) - - print(response) diff --git a/examples/v2/widgets/DeleteWidget.py b/examples/v2/widgets/DeleteWidget.py deleted file mode 100644 index b24fb38df6..0000000000 --- a/examples/v2/widgets/DeleteWidget.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Delete a widget returns "No Content" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.widgets_api import WidgetsApi -from datadog_api_client.v2.model.widget_experience_type import WidgetExperienceType -from uuid import UUID - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = WidgetsApi(api_client) - api_instance.delete_widget( - experience_type=WidgetExperienceType.CCM_REPORTS, - uuid=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), - ) diff --git a/examples/v2/widgets/GetWidget.py b/examples/v2/widgets/GetWidget.py deleted file mode 100644 index eefcaadf52..0000000000 --- a/examples/v2/widgets/GetWidget.py +++ /dev/null @@ -1,18 +0,0 @@ -""" -Get a widget returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.widgets_api import WidgetsApi -from datadog_api_client.v2.model.widget_experience_type import WidgetExperienceType -from uuid import UUID - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = WidgetsApi(api_client) - response = api_instance.get_widget( - experience_type=WidgetExperienceType.CCM_REPORTS, - uuid=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), - ) - - print(response) diff --git a/examples/v2/widgets/SearchWidgets.py b/examples/v2/widgets/SearchWidgets.py deleted file mode 100644 index f71b82a3b5..0000000000 --- a/examples/v2/widgets/SearchWidgets.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Search widgets returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.widgets_api import WidgetsApi -from datadog_api_client.v2.model.widget_experience_type import WidgetExperienceType - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = WidgetsApi(api_client) - response = api_instance.search_widgets( - experience_type=WidgetExperienceType.CCM_REPORTS, - ) - - print(response) diff --git a/examples/v2/widgets/UpdateWidget.py b/examples/v2/widgets/UpdateWidget.py deleted file mode 100644 index 26fc139ad2..0000000000 --- a/examples/v2/widgets/UpdateWidget.py +++ /dev/null @@ -1,35 +0,0 @@ -""" -Update a widget returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.widgets_api import WidgetsApi -from datadog_api_client.v2.model.create_or_update_widget_request import CreateOrUpdateWidgetRequest -from datadog_api_client.v2.model.create_or_update_widget_request_attributes import CreateOrUpdateWidgetRequestAttributes -from datadog_api_client.v2.model.create_or_update_widget_request_data import CreateOrUpdateWidgetRequestData -from datadog_api_client.v2.model.widget_definition import WidgetDefinition -from datadog_api_client.v2.model.widget_experience_type import WidgetExperienceType -from datadog_api_client.v2.model.widget_type import WidgetType -from uuid import UUID - -body = CreateOrUpdateWidgetRequest( - data=CreateOrUpdateWidgetRequestData( - attributes=CreateOrUpdateWidgetRequestAttributes( - definition=WidgetDefinition( - title="My Widget", - type=WidgetType.BAR_CHART, - ), - tags=[], - ), - type="widgets", - ), -) - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = WidgetsApi(api_client) - response = api_instance.update_widget( - experience_type=WidgetExperienceType.CCM_REPORTS, uuid=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body - ) - - print(response) diff --git a/src/datadog_api_client/v2/api/widgets_api.py b/src/datadog_api_client/v2/api/widgets_api.py deleted file mode 100644 index 05e80ee428..0000000000 --- a/src/datadog_api_client/v2/api/widgets_api.py +++ /dev/null @@ -1,377 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Any, Dict, Union - -from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint -from datadog_api_client.configuration import Configuration -from datadog_api_client.model_utils import ( - UnsetType, - unset, - UUID, -) -from datadog_api_client.v2.model.widget_list_response import WidgetListResponse -from datadog_api_client.v2.model.widget_experience_type import WidgetExperienceType -from datadog_api_client.v2.model.widget_type import WidgetType -from datadog_api_client.v2.model.widget_response import WidgetResponse -from datadog_api_client.v2.model.create_or_update_widget_request import CreateOrUpdateWidgetRequest - - -class WidgetsApi: - """ - Create, read, update, and delete saved widgets. Widgets are reusable - visualization components stored independently from any dashboard or notebook, - partitioned by experience type and identified by a UUID. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient(Configuration()) - self.api_client = api_client - - self._create_widget_endpoint = _Endpoint( - settings={ - "response_type": (WidgetResponse,), - "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/widgets/{experience_type}", - "operation_id": "create_widget", - "http_method": "POST", - "version": "v2", - }, - params_map={ - "experience_type": { - "required": True, - "openapi_types": (WidgetExperienceType,), - "attribute": "experience_type", - "location": "path", - }, - "body": { - "required": True, - "openapi_types": (CreateOrUpdateWidgetRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - api_client=api_client, - ) - - self._delete_widget_endpoint = _Endpoint( - settings={ - "response_type": None, - "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/widgets/{experience_type}/{uuid}", - "operation_id": "delete_widget", - "http_method": "DELETE", - "version": "v2", - }, - params_map={ - "experience_type": { - "required": True, - "openapi_types": (WidgetExperienceType,), - "attribute": "experience_type", - "location": "path", - }, - "uuid": { - "required": True, - "openapi_types": (UUID,), - "attribute": "uuid", - "location": "path", - }, - }, - headers_map={ - "accept": ["*/*"], - }, - api_client=api_client, - ) - - self._get_widget_endpoint = _Endpoint( - settings={ - "response_type": (WidgetResponse,), - "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/widgets/{experience_type}/{uuid}", - "operation_id": "get_widget", - "http_method": "GET", - "version": "v2", - }, - params_map={ - "experience_type": { - "required": True, - "openapi_types": (WidgetExperienceType,), - "attribute": "experience_type", - "location": "path", - }, - "uuid": { - "required": True, - "openapi_types": (UUID,), - "attribute": "uuid", - "location": "path", - }, - }, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - - self._search_widgets_endpoint = _Endpoint( - settings={ - "response_type": (WidgetListResponse,), - "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/widgets/{experience_type}", - "operation_id": "search_widgets", - "http_method": "GET", - "version": "v2", - }, - params_map={ - "experience_type": { - "required": True, - "openapi_types": (WidgetExperienceType,), - "attribute": "experience_type", - "location": "path", - }, - "filter_widget_type": { - "openapi_types": (WidgetType,), - "attribute": "filter[widgetType]", - "location": "query", - }, - "filter_creator_handle": { - "openapi_types": (str,), - "attribute": "filter[creatorHandle]", - "location": "query", - }, - "filter_is_favorited": { - "openapi_types": (bool,), - "attribute": "filter[isFavorited]", - "location": "query", - }, - "filter_title": { - "openapi_types": (str,), - "attribute": "filter[title]", - "location": "query", - }, - "filter_tags": { - "openapi_types": (str,), - "attribute": "filter[tags]", - "location": "query", - }, - "sort": { - "openapi_types": (str,), - "attribute": "sort", - "location": "query", - }, - "page_number": { - "validation": { - "inclusive_minimum": 0, - }, - "openapi_types": (int,), - "attribute": "page[number]", - "location": "query", - }, - "page_size": { - "validation": { - "inclusive_maximum": 100, - }, - "openapi_types": (int,), - "attribute": "page[size]", - "location": "query", - }, - }, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - - self._update_widget_endpoint = _Endpoint( - settings={ - "response_type": (WidgetResponse,), - "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/widgets/{experience_type}/{uuid}", - "operation_id": "update_widget", - "http_method": "PUT", - "version": "v2", - }, - params_map={ - "experience_type": { - "required": True, - "openapi_types": (WidgetExperienceType,), - "attribute": "experience_type", - "location": "path", - }, - "uuid": { - "required": True, - "openapi_types": (UUID,), - "attribute": "uuid", - "location": "path", - }, - "body": { - "required": True, - "openapi_types": (CreateOrUpdateWidgetRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - api_client=api_client, - ) - - def create_widget( - self, - experience_type: WidgetExperienceType, - body: CreateOrUpdateWidgetRequest, - ) -> WidgetResponse: - """Create a widget. - - Create a new widget for a given experience type. - - :param experience_type: The experience type for the widget. - :type experience_type: WidgetExperienceType - :param body: Widget request body. - :type body: CreateOrUpdateWidgetRequest - :rtype: WidgetResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["experience_type"] = experience_type - - kwargs["body"] = body - - return self._create_widget_endpoint.call_with_http_info(**kwargs) - - def delete_widget( - self, - experience_type: WidgetExperienceType, - uuid: UUID, - ) -> None: - """Delete a widget. - - Soft-delete a widget by its UUID for a given experience type. - - :param experience_type: The experience type for the widget. - :type experience_type: WidgetExperienceType - :param uuid: The UUID of the widget. - :type uuid: UUID - :rtype: None - """ - kwargs: Dict[str, Any] = {} - kwargs["experience_type"] = experience_type - - kwargs["uuid"] = uuid - - return self._delete_widget_endpoint.call_with_http_info(**kwargs) - - def get_widget( - self, - experience_type: WidgetExperienceType, - uuid: UUID, - ) -> WidgetResponse: - """Get a widget. - - Retrieve a widget by its UUID for a given experience type. - - :param experience_type: The experience type for the widget. - :type experience_type: WidgetExperienceType - :param uuid: The UUID of the widget. - :type uuid: UUID - :rtype: WidgetResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["experience_type"] = experience_type - - kwargs["uuid"] = uuid - - return self._get_widget_endpoint.call_with_http_info(**kwargs) - - def search_widgets( - self, - experience_type: WidgetExperienceType, - *, - filter_widget_type: Union[WidgetType, UnsetType] = unset, - filter_creator_handle: Union[str, UnsetType] = unset, - filter_is_favorited: Union[bool, UnsetType] = unset, - filter_title: Union[str, UnsetType] = unset, - filter_tags: Union[str, UnsetType] = unset, - sort: Union[str, UnsetType] = unset, - page_number: Union[int, UnsetType] = unset, - page_size: Union[int, UnsetType] = unset, - ) -> WidgetListResponse: - """Search widgets. - - Search and list widgets for a given experience type. Supports filtering by widget type, creator, title, and tags, as well as sorting and pagination. - - :param experience_type: The experience type for the widget. - :type experience_type: WidgetExperienceType - :param filter_widget_type: Filter widgets by widget type. - :type filter_widget_type: WidgetType, optional - :param filter_creator_handle: Filter widgets by the email handle of the creator. - :type filter_creator_handle: str, optional - :param filter_is_favorited: Filter to only widgets favorited by the current user. - :type filter_is_favorited: bool, optional - :param filter_title: Filter widgets by title (substring match). - :type filter_title: str, optional - :param filter_tags: Filter widgets by tags. Format as bracket-delimited CSV, e.g. ``[tag1,tag2]``. - :type filter_tags: str, optional - :param sort: Sort field for the results. Prefix with ``-`` for descending order. - Allowed values: ``title`` , ``created_at`` , ``modified_at``. - :type sort: str, optional - :param page_number: Page number for pagination (0-indexed). - :type page_number: int, optional - :param page_size: Number of widgets per page. - :type page_size: int, optional - :rtype: WidgetListResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["experience_type"] = experience_type - - if filter_widget_type is not unset: - kwargs["filter_widget_type"] = filter_widget_type - - if filter_creator_handle is not unset: - kwargs["filter_creator_handle"] = filter_creator_handle - - if filter_is_favorited is not unset: - kwargs["filter_is_favorited"] = filter_is_favorited - - if filter_title is not unset: - kwargs["filter_title"] = filter_title - - if filter_tags is not unset: - kwargs["filter_tags"] = filter_tags - - if sort is not unset: - kwargs["sort"] = sort - - if page_number is not unset: - kwargs["page_number"] = page_number - - if page_size is not unset: - kwargs["page_size"] = page_size - - return self._search_widgets_endpoint.call_with_http_info(**kwargs) - - def update_widget( - self, - experience_type: WidgetExperienceType, - uuid: UUID, - body: CreateOrUpdateWidgetRequest, - ) -> WidgetResponse: - """Update a widget. - - Update a widget by its UUID for a given experience type. This performs a full replacement of the widget definition. - - :param experience_type: The experience type for the widget. - :type experience_type: WidgetExperienceType - :param uuid: The UUID of the widget. - :type uuid: UUID - :param body: Widget request body. - :type body: CreateOrUpdateWidgetRequest - :rtype: WidgetResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["experience_type"] = experience_type - - kwargs["uuid"] = uuid - - kwargs["body"] = body - - return self._update_widget_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index db7cdb8ab0..bc1a8f058f 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -101,7 +101,6 @@ from datadog_api_client.v2.api.test_optimization_api import TestOptimizationApi from datadog_api_client.v2.api.usage_metering_api import UsageMeteringApi from datadog_api_client.v2.api.users_api import UsersApi -from datadog_api_client.v2.api.widgets_api import WidgetsApi from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi @@ -209,6 +208,5 @@ "TestOptimizationApi", "UsageMeteringApi", "UsersApi", - "WidgetsApi", "WorkflowAutomationApi", ] diff --git a/src/datadog_api_client/v2/model/create_or_update_widget_request.py b/src/datadog_api_client/v2/model/create_or_update_widget_request.py deleted file mode 100644 index eaea211d9f..0000000000 --- a/src/datadog_api_client/v2/model/create_or_update_widget_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.create_or_update_widget_request_data import CreateOrUpdateWidgetRequestData - - -class CreateOrUpdateWidgetRequest(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.create_or_update_widget_request_data import CreateOrUpdateWidgetRequestData - - return { - "data": (CreateOrUpdateWidgetRequestData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: CreateOrUpdateWidgetRequestData, **kwargs): - """ - Request body for creating or updating a widget. - - :param data: Data for creating or updating a widget. - :type data: CreateOrUpdateWidgetRequestData - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/create_or_update_widget_request_attributes.py b/src/datadog_api_client/v2/model/create_or_update_widget_request_attributes.py deleted file mode 100644 index 97aa37fa49..0000000000 --- a/src/datadog_api_client/v2/model/create_or_update_widget_request_attributes.py +++ /dev/null @@ -1,50 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - none_type, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.widget_definition import WidgetDefinition - - -class CreateOrUpdateWidgetRequestAttributes(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.widget_definition import WidgetDefinition - - return { - "definition": (WidgetDefinition,), - "tags": ([str], none_type), - } - - attribute_map = { - "definition": "definition", - "tags": "tags", - } - - def __init__(self_, definition: WidgetDefinition, tags: Union[List[str], none_type, UnsetType] = unset, **kwargs): - """ - Attributes for creating or updating a widget. - - :param definition: The definition of a widget, including its type and configuration. - :type definition: WidgetDefinition - - :param tags: User-defined tags for organizing the widget. - :type tags: [str], none_type, optional - """ - if tags is not unset: - kwargs["tags"] = tags - super().__init__(kwargs) - - self_.definition = definition diff --git a/src/datadog_api_client/v2/model/create_or_update_widget_request_data.py b/src/datadog_api_client/v2/model/create_or_update_widget_request_data.py deleted file mode 100644 index 38ba6e7166..0000000000 --- a/src/datadog_api_client/v2/model/create_or_update_widget_request_data.py +++ /dev/null @@ -1,50 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.create_or_update_widget_request_attributes import ( - CreateOrUpdateWidgetRequestAttributes, - ) - - -class CreateOrUpdateWidgetRequestData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.create_or_update_widget_request_attributes import ( - CreateOrUpdateWidgetRequestAttributes, - ) - - return { - "attributes": (CreateOrUpdateWidgetRequestAttributes,), - "type": (str,), - } - - attribute_map = { - "attributes": "attributes", - "type": "type", - } - - def __init__(self_, attributes: CreateOrUpdateWidgetRequestAttributes, type: str, **kwargs): - """ - Data for creating or updating a widget. - - :param attributes: Attributes for creating or updating a widget. - :type attributes: CreateOrUpdateWidgetRequestAttributes - - :param type: Widgets resource type. - :type type: str - """ - super().__init__(kwargs) - - self_.attributes = attributes - self_.type = type diff --git a/src/datadog_api_client/v2/model/widget_attributes.py b/src/datadog_api_client/v2/model/widget_attributes.py deleted file mode 100644 index 462a6caf78..0000000000 --- a/src/datadog_api_client/v2/model/widget_attributes.py +++ /dev/null @@ -1,73 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - none_type, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.widget_definition import WidgetDefinition - - -class WidgetAttributes(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.widget_definition import WidgetDefinition - - return { - "created_at": (str,), - "definition": (WidgetDefinition,), - "is_favorited": (bool,), - "modified_at": (str,), - "tags": ([str], none_type), - } - - attribute_map = { - "created_at": "created_at", - "definition": "definition", - "is_favorited": "is_favorited", - "modified_at": "modified_at", - "tags": "tags", - } - - def __init__( - self_, - created_at: str, - definition: WidgetDefinition, - is_favorited: bool, - modified_at: str, - tags: Union[List[str], none_type], - **kwargs, - ): - """ - Attributes of a widget resource. - - :param created_at: ISO 8601 timestamp of when the widget was created. - :type created_at: str - - :param definition: The definition of a widget, including its type and configuration. - :type definition: WidgetDefinition - - :param is_favorited: Will be implemented soon. Currently always returns false. - :type is_favorited: bool - - :param modified_at: ISO 8601 timestamp of when the widget was last modified. - :type modified_at: str - - :param tags: User-defined tags for organizing widgets. - :type tags: [str], none_type - """ - super().__init__(kwargs) - - self_.created_at = created_at - self_.definition = definition - self_.is_favorited = is_favorited - self_.modified_at = modified_at - self_.tags = tags diff --git a/src/datadog_api_client/v2/model/widget_data.py b/src/datadog_api_client/v2/model/widget_data.py deleted file mode 100644 index 576a96ac81..0000000000 --- a/src/datadog_api_client/v2/model/widget_data.py +++ /dev/null @@ -1,70 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.widget_attributes import WidgetAttributes - from datadog_api_client.v2.model.widget_relationships import WidgetRelationships - - -class WidgetData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.widget_attributes import WidgetAttributes - from datadog_api_client.v2.model.widget_relationships import WidgetRelationships - - return { - "attributes": (WidgetAttributes,), - "id": (str,), - "relationships": (WidgetRelationships,), - "type": (str,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "relationships": "relationships", - "type": "type", - } - - def __init__( - self_, - attributes: WidgetAttributes, - id: str, - type: str, - relationships: Union[WidgetRelationships, UnsetType] = unset, - **kwargs, - ): - """ - A widget resource object. - - :param attributes: Attributes of a widget resource. - :type attributes: WidgetAttributes - - :param id: The unique identifier of the widget. - :type id: str - - :param relationships: Relationships of the widget resource. - :type relationships: WidgetRelationships, optional - - :param type: Widgets resource type. - :type type: str - """ - if relationships is not unset: - kwargs["relationships"] = relationships - super().__init__(kwargs) - - self_.attributes = attributes - self_.id = id - self_.type = type diff --git a/src/datadog_api_client/v2/model/widget_definition.py b/src/datadog_api_client/v2/model/widget_definition.py deleted file mode 100644 index 2e18d238e6..0000000000 --- a/src/datadog_api_client/v2/model/widget_definition.py +++ /dev/null @@ -1,54 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.widget_type import WidgetType - - -class WidgetDefinition(ModelNormal): - validations = { - "title": { - "max_length": 100, - "min_length": 1, - }, - } - - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.widget_type import WidgetType - - return { - "title": (str,), - "type": (WidgetType,), - } - - attribute_map = { - "title": "title", - "type": "type", - } - - def __init__(self_, title: str, type: WidgetType, **kwargs): - """ - The definition of a widget, including its type and configuration. - - :param title: The display title of the widget. - :type title: str - - :param type: Widget types that are allowed to be stored as individual records. - This is not a complete list of dashboard and notebook widget types. - :type type: WidgetType - """ - super().__init__(kwargs) - - self_.title = title - self_.type = type diff --git a/src/datadog_api_client/v2/model/widget_experience_type.py b/src/datadog_api_client/v2/model/widget_experience_type.py deleted file mode 100644 index 5da187948e..0000000000 --- a/src/datadog_api_client/v2/model/widget_experience_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class WidgetExperienceType(ModelSimple): - """ - Widget experience types that differentiate between the products using the specific widget. - - :param value: Must be one of ["ccm_reports", "logs_reports", "csv_reports", "product_analytics"]. - :type value: str - """ - - allowed_values = { - "ccm_reports", - "logs_reports", - "csv_reports", - "product_analytics", - } - CCM_REPORTS: ClassVar["WidgetExperienceType"] - LOGS_REPORTS: ClassVar["WidgetExperienceType"] - CSV_REPORTS: ClassVar["WidgetExperienceType"] - PRODUCT_ANALYTICS: ClassVar["WidgetExperienceType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -WidgetExperienceType.CCM_REPORTS = WidgetExperienceType("ccm_reports") -WidgetExperienceType.LOGS_REPORTS = WidgetExperienceType("logs_reports") -WidgetExperienceType.CSV_REPORTS = WidgetExperienceType("csv_reports") -WidgetExperienceType.PRODUCT_ANALYTICS = WidgetExperienceType("product_analytics") diff --git a/src/datadog_api_client/v2/model/widget_included_user.py b/src/datadog_api_client/v2/model/widget_included_user.py deleted file mode 100644 index 4ac82636dc..0000000000 --- a/src/datadog_api_client/v2/model/widget_included_user.py +++ /dev/null @@ -1,57 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.widget_included_user_attributes import WidgetIncludedUserAttributes - - -class WidgetIncludedUser(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.widget_included_user_attributes import WidgetIncludedUserAttributes - - return { - "attributes": (WidgetIncludedUserAttributes,), - "id": (str,), - "type": (str,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "type": "type", - } - - def __init__( - self_, id: str, type: str, attributes: Union[WidgetIncludedUserAttributes, UnsetType] = unset, **kwargs - ): - """ - A user resource included in the response. - - :param attributes: Attributes of an included user resource. - :type attributes: WidgetIncludedUserAttributes, optional - - :param id: The unique identifier of the user. - :type id: str - - :param type: Users resource type. - :type type: str - """ - if attributes is not unset: - kwargs["attributes"] = attributes - super().__init__(kwargs) - - self_.id = id - self_.type = type diff --git a/src/datadog_api_client/v2/model/widget_included_user_attributes.py b/src/datadog_api_client/v2/model/widget_included_user_attributes.py deleted file mode 100644 index 2693d865de..0000000000 --- a/src/datadog_api_client/v2/model/widget_included_user_attributes.py +++ /dev/null @@ -1,46 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - none_type, - unset, - UnsetType, -) - - -class WidgetIncludedUserAttributes(ModelNormal): - @cached_property - def openapi_types(_): - return { - "handle": (str,), - "name": (str, none_type), - } - - attribute_map = { - "handle": "handle", - "name": "name", - } - - def __init__( - self_, handle: Union[str, UnsetType] = unset, name: Union[str, none_type, UnsetType] = unset, **kwargs - ): - """ - Attributes of an included user resource. - - :param handle: The email handle of the user. - :type handle: str, optional - - :param name: The display name of the user. - :type name: str, none_type, optional - """ - if handle is not unset: - kwargs["handle"] = handle - if name is not unset: - kwargs["name"] = name - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/widget_list_response.py b/src/datadog_api_client/v2/model/widget_list_response.py deleted file mode 100644 index 4eac7af892..0000000000 --- a/src/datadog_api_client/v2/model/widget_list_response.py +++ /dev/null @@ -1,66 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.widget_data import WidgetData - from datadog_api_client.v2.model.widget_included_user import WidgetIncludedUser - from datadog_api_client.v2.model.widget_search_meta import WidgetSearchMeta - - -class WidgetListResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.widget_data import WidgetData - from datadog_api_client.v2.model.widget_included_user import WidgetIncludedUser - from datadog_api_client.v2.model.widget_search_meta import WidgetSearchMeta - - return { - "data": ([WidgetData],), - "included": ([WidgetIncludedUser],), - "meta": (WidgetSearchMeta,), - } - - attribute_map = { - "data": "data", - "included": "included", - "meta": "meta", - } - - def __init__( - self_, - data: List[WidgetData], - included: Union[List[WidgetIncludedUser], UnsetType] = unset, - meta: Union[WidgetSearchMeta, UnsetType] = unset, - **kwargs, - ): - """ - Response containing a list of widgets. - - :param data: List of widget resources. - :type data: [WidgetData] - - :param included: Array of user resources related to the widgets. - :type included: [WidgetIncludedUser], optional - - :param meta: Metadata about the search results. - :type meta: WidgetSearchMeta, optional - """ - if included is not unset: - kwargs["included"] = included - if meta is not unset: - kwargs["meta"] = meta - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/widget_relationship_data.py b/src/datadog_api_client/v2/model/widget_relationship_data.py deleted file mode 100644 index f59cbaee87..0000000000 --- a/src/datadog_api_client/v2/model/widget_relationship_data.py +++ /dev/null @@ -1,39 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -class WidgetRelationshipData(ModelNormal): - @cached_property - def openapi_types(_): - return { - "id": (str,), - "type": (str,), - } - - attribute_map = { - "id": "id", - "type": "type", - } - - def __init__(self_, id: str, type: str, **kwargs): - """ - Relationship data referencing a user resource. - - :param id: The unique identifier of the user. - :type id: str - - :param type: Users resource type. - :type type: str - """ - super().__init__(kwargs) - - self_.id = id - self_.type = type diff --git a/src/datadog_api_client/v2/model/widget_relationship_item.py b/src/datadog_api_client/v2/model/widget_relationship_item.py deleted file mode 100644 index aa7099ee0c..0000000000 --- a/src/datadog_api_client/v2/model/widget_relationship_item.py +++ /dev/null @@ -1,42 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.widget_relationship_data import WidgetRelationshipData - - -class WidgetRelationshipItem(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.widget_relationship_data import WidgetRelationshipData - - return { - "data": (WidgetRelationshipData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: Union[WidgetRelationshipData, UnsetType] = unset, **kwargs): - """ - A JSON:API relationship to a user. - - :param data: Relationship data referencing a user resource. - :type data: WidgetRelationshipData, optional - """ - if data is not unset: - kwargs["data"] = data - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/widget_relationships.py b/src/datadog_api_client/v2/model/widget_relationships.py deleted file mode 100644 index 67f2fa876a..0000000000 --- a/src/datadog_api_client/v2/model/widget_relationships.py +++ /dev/null @@ -1,54 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.widget_relationship_item import WidgetRelationshipItem - - -class WidgetRelationships(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.widget_relationship_item import WidgetRelationshipItem - - return { - "created_by": (WidgetRelationshipItem,), - "modified_by": (WidgetRelationshipItem,), - } - - attribute_map = { - "created_by": "created_by", - "modified_by": "modified_by", - } - - def __init__( - self_, - created_by: Union[WidgetRelationshipItem, UnsetType] = unset, - modified_by: Union[WidgetRelationshipItem, UnsetType] = unset, - **kwargs, - ): - """ - Relationships of the widget resource. - - :param created_by: A JSON:API relationship to a user. - :type created_by: WidgetRelationshipItem, optional - - :param modified_by: A JSON:API relationship to a user. - :type modified_by: WidgetRelationshipItem, optional - """ - if created_by is not unset: - kwargs["created_by"] = created_by - if modified_by is not unset: - kwargs["modified_by"] = modified_by - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/widget_response.py b/src/datadog_api_client/v2/model/widget_response.py deleted file mode 100644 index 5323b26475..0000000000 --- a/src/datadog_api_client/v2/model/widget_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.widget_data import WidgetData - from datadog_api_client.v2.model.widget_included_user import WidgetIncludedUser - - -class WidgetResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.widget_data import WidgetData - from datadog_api_client.v2.model.widget_included_user import WidgetIncludedUser - - return { - "data": (WidgetData,), - "included": ([WidgetIncludedUser],), - } - - attribute_map = { - "data": "data", - "included": "included", - } - - def __init__(self_, data: WidgetData, included: Union[List[WidgetIncludedUser], UnsetType] = unset, **kwargs): - """ - Response containing a single widget. - - :param data: A widget resource object. - :type data: WidgetData - - :param included: Array of user resources related to the widget. - :type included: [WidgetIncludedUser], optional - """ - if included is not unset: - kwargs["included"] = included - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/widget_search_meta.py b/src/datadog_api_client/v2/model/widget_search_meta.py deleted file mode 100644 index 2691bde31b..0000000000 --- a/src/datadog_api_client/v2/model/widget_search_meta.py +++ /dev/null @@ -1,64 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -class WidgetSearchMeta(ModelNormal): - @cached_property - def openapi_types(_): - return { - "created_by_anyone_total": (int,), - "created_by_you_total": (int,), - "favorited_by_you_total": (int,), - "filtered_total": (int,), - } - - attribute_map = { - "created_by_anyone_total": "created_by_anyone_total", - "created_by_you_total": "created_by_you_total", - "favorited_by_you_total": "favorited_by_you_total", - "filtered_total": "filtered_total", - } - - def __init__( - self_, - created_by_anyone_total: Union[int, UnsetType] = unset, - created_by_you_total: Union[int, UnsetType] = unset, - favorited_by_you_total: Union[int, UnsetType] = unset, - filtered_total: Union[int, UnsetType] = unset, - **kwargs, - ): - """ - Metadata about the search results. - - :param created_by_anyone_total: Total number of widgets created by anyone. - :type created_by_anyone_total: int, optional - - :param created_by_you_total: Total number of widgets created by the current user. - :type created_by_you_total: int, optional - - :param favorited_by_you_total: Total number of widgets favorited by the current user. - :type favorited_by_you_total: int, optional - - :param filtered_total: Total number of widgets matching the current filter criteria. - :type filtered_total: int, optional - """ - if created_by_anyone_total is not unset: - kwargs["created_by_anyone_total"] = created_by_anyone_total - if created_by_you_total is not unset: - kwargs["created_by_you_total"] = created_by_you_total - if favorited_by_you_total is not unset: - kwargs["favorited_by_you_total"] = favorited_by_you_total - if filtered_total is not unset: - kwargs["filtered_total"] = filtered_total - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/widget_type.py b/src/datadog_api_client/v2/model/widget_type.py deleted file mode 100644 index cb65df92c7..0000000000 --- a/src/datadog_api_client/v2/model/widget_type.py +++ /dev/null @@ -1,78 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class WidgetType(ModelSimple): - """ - Widget types that are allowed to be stored as individual records. - This is not a complete list of dashboard and notebook widget types. - - :param value: Must be one of ["bar_chart", "change", "cloud_cost_summary", "cohort", "funnel", "geomap", "list_stream", "query_table", "query_value", "retention_curve", "sankey", "sunburst", "timeseries", "toplist", "treemap"]. - :type value: str - """ - - allowed_values = { - "bar_chart", - "change", - "cloud_cost_summary", - "cohort", - "funnel", - "geomap", - "list_stream", - "query_table", - "query_value", - "retention_curve", - "sankey", - "sunburst", - "timeseries", - "toplist", - "treemap", - } - BAR_CHART: ClassVar["WidgetType"] - CHANGE: ClassVar["WidgetType"] - CLOUD_COST_SUMMARY: ClassVar["WidgetType"] - COHORT: ClassVar["WidgetType"] - FUNNEL: ClassVar["WidgetType"] - GEOMAP: ClassVar["WidgetType"] - LIST_STREAM: ClassVar["WidgetType"] - QUERY_TABLE: ClassVar["WidgetType"] - QUERY_VALUE: ClassVar["WidgetType"] - RETENTION_CURVE: ClassVar["WidgetType"] - SANKEY: ClassVar["WidgetType"] - SUNBURST: ClassVar["WidgetType"] - TIMESERIES: ClassVar["WidgetType"] - TOPLIST: ClassVar["WidgetType"] - TREEMAP: ClassVar["WidgetType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -WidgetType.BAR_CHART = WidgetType("bar_chart") -WidgetType.CHANGE = WidgetType("change") -WidgetType.CLOUD_COST_SUMMARY = WidgetType("cloud_cost_summary") -WidgetType.COHORT = WidgetType("cohort") -WidgetType.FUNNEL = WidgetType("funnel") -WidgetType.GEOMAP = WidgetType("geomap") -WidgetType.LIST_STREAM = WidgetType("list_stream") -WidgetType.QUERY_TABLE = WidgetType("query_table") -WidgetType.QUERY_VALUE = WidgetType("query_value") -WidgetType.RETENTION_CURVE = WidgetType("retention_curve") -WidgetType.SANKEY = WidgetType("sankey") -WidgetType.SUNBURST = WidgetType("sunburst") -WidgetType.TIMESERIES = WidgetType("timeseries") -WidgetType.TOPLIST = WidgetType("toplist") -WidgetType.TREEMAP = WidgetType("treemap") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 62769661be..5a7ad16d25 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1235,9 +1235,6 @@ from datadog_api_client.v2.model.create_open_api_response import CreateOpenAPIResponse from datadog_api_client.v2.model.create_open_api_response_attributes import CreateOpenAPIResponseAttributes from datadog_api_client.v2.model.create_open_api_response_data import CreateOpenAPIResponseData -from datadog_api_client.v2.model.create_or_update_widget_request import CreateOrUpdateWidgetRequest -from datadog_api_client.v2.model.create_or_update_widget_request_attributes import CreateOrUpdateWidgetRequestAttributes -from datadog_api_client.v2.model.create_or_update_widget_request_data import CreateOrUpdateWidgetRequestData from datadog_api_client.v2.model.create_page_request import CreatePageRequest from datadog_api_client.v2.model.create_page_request_data import CreatePageRequestData from datadog_api_client.v2.model.create_page_request_data_attributes import CreatePageRequestDataAttributes @@ -6607,20 +6604,7 @@ from datadog_api_client.v2.model.watcher_data_attributes import WatcherDataAttributes from datadog_api_client.v2.model.watcher_data_type import WatcherDataType from datadog_api_client.v2.model.weekday import Weekday -from datadog_api_client.v2.model.widget_attributes import WidgetAttributes -from datadog_api_client.v2.model.widget_data import WidgetData -from datadog_api_client.v2.model.widget_definition import WidgetDefinition -from datadog_api_client.v2.model.widget_experience_type import WidgetExperienceType -from datadog_api_client.v2.model.widget_included_user import WidgetIncludedUser -from datadog_api_client.v2.model.widget_included_user_attributes import WidgetIncludedUserAttributes -from datadog_api_client.v2.model.widget_list_response import WidgetListResponse from datadog_api_client.v2.model.widget_live_span import WidgetLiveSpan -from datadog_api_client.v2.model.widget_relationship_data import WidgetRelationshipData -from datadog_api_client.v2.model.widget_relationship_item import WidgetRelationshipItem -from datadog_api_client.v2.model.widget_relationships import WidgetRelationships -from datadog_api_client.v2.model.widget_response import WidgetResponse -from datadog_api_client.v2.model.widget_search_meta import WidgetSearchMeta -from datadog_api_client.v2.model.widget_type import WidgetType from datadog_api_client.v2.model.workflow_data import WorkflowData from datadog_api_client.v2.model.workflow_data_attributes import WorkflowDataAttributes from datadog_api_client.v2.model.workflow_data_relationships import WorkflowDataRelationships @@ -7578,9 +7562,6 @@ "CreateOpenAPIResponse", "CreateOpenAPIResponseAttributes", "CreateOpenAPIResponseData", - "CreateOrUpdateWidgetRequest", - "CreateOrUpdateWidgetRequestAttributes", - "CreateOrUpdateWidgetRequestData", "CreatePageRequest", "CreatePageRequestData", "CreatePageRequestDataAttributes", @@ -11326,20 +11307,7 @@ "WatcherDataAttributes", "WatcherDataType", "Weekday", - "WidgetAttributes", - "WidgetData", - "WidgetDefinition", - "WidgetExperienceType", - "WidgetIncludedUser", - "WidgetIncludedUserAttributes", - "WidgetListResponse", "WidgetLiveSpan", - "WidgetRelationshipData", - "WidgetRelationshipItem", - "WidgetRelationships", - "WidgetResponse", - "WidgetSearchMeta", - "WidgetType", "WorkflowData", "WorkflowDataAttributes", "WorkflowDataRelationships", diff --git a/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_bad_request_response.frozen new file mode 100644 index 0000000000..21ac9fa026 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_bad_request_response.frozen @@ -0,0 +1 @@ +2026-03-27T09:09:04.870Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_bad_request_response.yaml new file mode 100644 index 0000000000..c6ee8d4933 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_bad_request_response.yaml @@ -0,0 +1,21 @@ +interactions: +- request: + body: '{"data":[]}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team/connections + response: + body: + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute + \"data\" at least one team connection must be provided"}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_conflict_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_conflict_response.frozen new file mode 100644 index 0000000000..e7452b6e7b --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_conflict_response.frozen @@ -0,0 +1 @@ +2026-03-27T09:28:24.368Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_conflict_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_conflict_response.yaml new file mode 100644 index 0000000000..e30189ea88 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_conflict_response.yaml @@ -0,0 +1,71 @@ +interactions: +- request: + body: '{"data":{"attributes":{"handle":"test-handle-84ab6777f7201a32","name":"test-name-84ab6777f7201a32"},"type":"team"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team + response: + body: + string: '{"data":{"id":"be93b665-0a69-4573-8ef4-56f6a741c1a1","type":"team","attributes":{"avatar":null,"banner":10,"created_at":"2026-03-27T09:28:24.862516+00:00","description":null,"handle":"test-handle-84ab6777f7201a32","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-03-27T09:28:24.862516+00:00","name":"test-name-84ab6777f7201a32","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/be93b665-0a69-4573-8ef4-56f6a741c1a1/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/be93b665-0a69-4573-8ef4-56f6a741c1a1/permission-settings"}}}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 201 + message: Created +- request: + body: '{"data":[{"attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"be93b665-0a69-4573-8ef4-56f6a741c1a1","type":"team"}}},"type":"team_connection"}]}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team/connections + response: + body: + string: '{"data":[{"id":"4e4b0094-29bf-11f1-aeac-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"be93b665-0a69-4573-8ef4-56f6a741c1a1","type":"team"}}}}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 201 + message: Created +- request: + body: '{"data":[{"attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"be93b665-0a69-4573-8ef4-56f6a741c1a1","type":"team"}}},"type":"team_connection"}]}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team/connections + response: + body: + string: '{"errors":[{"status":"409","title":"Conflict","detail":"failed to add + team connections: one or more team attributes already exist"}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 409 + message: Conflict +- request: + body: null + headers: + accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/be93b665-0a69-4573-8ef4-56f6a741c1a1 + response: + body: + string: '' + headers: {} + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_created_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_created_response.frozen new file mode 100644 index 0000000000..9449f0e0c9 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_created_response.frozen @@ -0,0 +1 @@ +2026-03-27T09:09:22.678Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_created_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_created_response.yaml new file mode 100644 index 0000000000..2fa076715e --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_create_team_connections_returns_created_response.yaml @@ -0,0 +1,52 @@ +interactions: +- request: + body: '{"data":{"attributes":{"handle":"test-handle-8d5b9953d168d107","name":"test-name-8d5b9953d168d107"},"type":"team"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team + response: + body: + string: '{"data":{"id":"726053a9-9b81-4381-bf91-b96b746f28d9","type":"team","attributes":{"avatar":null,"banner":11,"created_at":"2026-03-27T09:09:23.174349+00:00","description":null,"handle":"test-handle-8d5b9953d168d107","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-03-27T09:09:23.174349+00:00","name":"test-name-8d5b9953d168d107","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/726053a9-9b81-4381-bf91-b96b746f28d9/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/726053a9-9b81-4381-bf91-b96b746f28d9/permission-settings"}}}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 201 + message: Created +- request: + body: '{"data":[{"attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"726053a9-9b81-4381-bf91-b96b746f28d9","type":"team"}}},"type":"team_connection"}]}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team/connections + response: + body: + string: '{"data":[{"id":"a5c93d48-29bc-11f1-82fc-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"726053a9-9b81-4381-bf91-b96b746f28d9","type":"team"}}}}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 201 + message: Created +- request: + body: null + headers: + accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/726053a9-9b81-4381-bf91-b96b746f28d9 + response: + body: + string: '' + headers: {} + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_bad_request_response.frozen new file mode 100644 index 0000000000..28842d3616 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_bad_request_response.frozen @@ -0,0 +1 @@ +2026-03-27T09:21:11.529Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_bad_request_response.yaml new file mode 100644 index 0000000000..e144121163 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_bad_request_response.yaml @@ -0,0 +1,21 @@ +interactions: +- request: + body: '{"data":[{"id":"","type":"team_connection"}]}' + headers: + accept: + - '*/*' + content-type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/connections + response: + body: + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute + \"id\" one or more team connection ids are not present"}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_no_content_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_no_content_response.frozen new file mode 100644 index 0000000000..4293cb5276 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_no_content_response.frozen @@ -0,0 +1 @@ +2026-03-27T09:21:19.736Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_no_content_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_no_content_response.yaml new file mode 100644 index 0000000000..78ad1afa13 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_delete_team_connections_returns_no_content_response.yaml @@ -0,0 +1,68 @@ +interactions: +- request: + body: '{"data":{"attributes":{"handle":"test-handle-5e060b20bd1650cf","name":"test-name-5e060b20bd1650cf"},"type":"team"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team + response: + body: + string: '{"data":{"id":"250b46bc-90c5-4464-8a8f-bf261f788495","type":"team","attributes":{"avatar":null,"banner":1,"created_at":"2026-03-27T09:21:20.252382+00:00","description":null,"handle":"test-handle-5e060b20bd1650cf","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-03-27T09:21:20.252382+00:00","name":"test-name-5e060b20bd1650cf","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/250b46bc-90c5-4464-8a8f-bf261f788495/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/250b46bc-90c5-4464-8a8f-bf261f788495/permission-settings"}}}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 201 + message: Created +- request: + body: '{"data":[{"attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"250b46bc-90c5-4464-8a8f-bf261f788495","type":"team"}}},"type":"team_connection"}]}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team/connections + response: + body: + string: '{"data":[{"id":"51323b02-29be-11f1-ad4d-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"250b46bc-90c5-4464-8a8f-bf261f788495","type":"team"}}}}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 201 + message: Created +- request: + body: '{"data":[{"id":"51323b02-29be-11f1-ad4d-da7ad0900002","type":"team_connection"}]}' + headers: + accept: + - '*/*' + content-type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/connections + response: + body: + string: '' + headers: {} + status: + code: 204 + message: No Content +- request: + body: null + headers: + accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/250b46bc-90c5-4464-8a8f-bf261f788495 + response: + body: + string: '' + headers: {} + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_list_team_connections_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_list_team_connections_returns_ok_response.frozen new file mode 100644 index 0000000000..fab573b8b2 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_list_team_connections_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-03-27T09:09:49.513Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_list_team_connections_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_list_team_connections_returns_ok_response.yaml new file mode 100644 index 0000000000..3e8ed1fbc1 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_list_team_connections_returns_ok_response.yaml @@ -0,0 +1,68 @@ +interactions: +- request: + body: '{"data":{"attributes":{"handle":"test-handle-48ce99925c887f33","name":"test-name-48ce99925c887f33"},"type":"team"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team + response: + body: + string: '{"data":{"id":"f520e86b-5137-461d-b054-5b454d7135c4","type":"team","attributes":{"avatar":null,"banner":4,"created_at":"2026-03-27T09:09:50.012362+00:00","description":null,"handle":"test-handle-48ce99925c887f33","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-03-27T09:09:50.012363+00:00","name":"test-name-48ce99925c887f33","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/f520e86b-5137-461d-b054-5b454d7135c4/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/f520e86b-5137-461d-b054-5b454d7135c4/permission-settings"}}}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 201 + message: Created +- request: + body: '{"data":[{"attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"f520e86b-5137-461d-b054-5b454d7135c4","type":"team"}}},"type":"team_connection"}]}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team/connections + response: + body: + string: '{"data":[{"id":"b5c56780-29bc-11f1-b3d1-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"f520e86b-5137-461d-b054-5b454d7135c4","type":"team"}}}}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 201 + message: Created +- request: + body: null + headers: + accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/team/connections?page%5Bsize%5D=10 + response: + body: + string: '{"data":[{"id":"52a55816-291e-11f1-be93-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"0a81a948-5ee2-4790-b855-8817a21ccf1e","type":"team"}}}},{"id":"52df3810-291e-11f1-b8ea-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"a9d786f4-447a-4a3b-9505-882df3f1d7e4","type":"team"}}}},{"id":"53407c2e-291e-11f1-af9c-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"48f1089c-a1ee-4039-8b9d-59a512010d89","type":"team"}}}},{"id":"53722ae4-291e-11f1-be97-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"27c3acd0-4eeb-459c-9dbf-2f61263c8387","type":"team"}}}},{"id":"4f642338-28f8-11f1-8cc3-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"52b98022-50b0-42b5-8d59-f8f8a809027e","type":"team"}}}},{"id":"b5c56780-29bc-11f1-b3d1-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"f520e86b-5137-461d-b054-5b454d7135c4","type":"team"}}}}],"meta":{"page":{"type":"number_size","number":0,"size":10,"total":6,"first_number":0,"prev_number":null,"next_number":null,"last_number":0}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +- request: + body: null + headers: + accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/f520e86b-5137-461d-b054-5b454d7135c4 + response: + body: + string: '' + headers: {} + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_list_team_connections_with_filters_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_list_team_connections_with_filters_returns_ok_response.frozen new file mode 100644 index 0000000000..e6d33b39e8 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_list_team_connections_with_filters_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-03-27T09:09:58.847Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_list_team_connections_with_filters_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_list_team_connections_with_filters_returns_ok_response.yaml new file mode 100644 index 0000000000..fb48436693 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_list_team_connections_with_filters_returns_ok_response.yaml @@ -0,0 +1,68 @@ +interactions: +- request: + body: '{"data":{"attributes":{"handle":"test-handle-fa25cb1eef560458","name":"test-name-fa25cb1eef560458"},"type":"team"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team + response: + body: + string: '{"data":{"id":"d7ee1319-6ac0-45c6-8700-079e58eac9f9","type":"team","attributes":{"avatar":null,"banner":1,"created_at":"2026-03-27T09:09:59.338935+00:00","description":null,"handle":"test-handle-fa25cb1eef560458","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-03-27T09:09:59.338935+00:00","name":"test-name-fa25cb1eef560458","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/d7ee1319-6ac0-45c6-8700-079e58eac9f9/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/d7ee1319-6ac0-45c6-8700-079e58eac9f9/permission-settings"}}}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 201 + message: Created +- request: + body: '{"data":[{"attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"d7ee1319-6ac0-45c6-8700-079e58eac9f9","type":"team"}}},"type":"team_connection"}]}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team/connections + response: + body: + string: '{"data":[{"id":"bb57db2e-29bc-11f1-bcee-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"d7ee1319-6ac0-45c6-8700-079e58eac9f9","type":"team"}}}}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 201 + message: Created +- request: + body: null + headers: + accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/team/connections?filter%5Bsources%5D=github&page%5Bsize%5D=10 + response: + body: + string: '{"data":[{"id":"52a55816-291e-11f1-be93-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"0a81a948-5ee2-4790-b855-8817a21ccf1e","type":"team"}}}},{"id":"52df3810-291e-11f1-b8ea-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"a9d786f4-447a-4a3b-9505-882df3f1d7e4","type":"team"}}}},{"id":"53407c2e-291e-11f1-af9c-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"48f1089c-a1ee-4039-8b9d-59a512010d89","type":"team"}}}},{"id":"53722ae4-291e-11f1-be97-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"27c3acd0-4eeb-459c-9dbf-2f61263c8387","type":"team"}}}},{"id":"4f642338-28f8-11f1-8cc3-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"52b98022-50b0-42b5-8d59-f8f8a809027e","type":"team"}}}},{"id":"bb57db2e-29bc-11f1-bcee-da7ad0900002","type":"team_connection","attributes":{"managed_by":"datadog","source":"github"},"relationships":{"connected_team":{"data":{"id":"@MyGitHubAccount/my-team-name","type":"github_team"}},"team":{"data":{"id":"d7ee1319-6ac0-45c6-8700-079e58eac9f9","type":"team"}}}}],"meta":{"page":{"type":"number_size","number":0,"size":10,"total":6,"first_number":0,"prev_number":null,"next_number":null,"last_number":0}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +- request: + body: null + headers: + accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/d7ee1319-6ac0-45c6-8700-079e58eac9f9 + response: + body: + string: '' + headers: {} + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index 2fee80e2ff..6c42beffa1 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -1388,7 +1388,13 @@ "operationId": "AddTeamHierarchyLink" }, { - "source": "data.data[0]", + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": [{\n \"type\": \"team_connection\",\n \"attributes\": {\n \"source\": \"github\",\n \"managed_by\": \"datadog\"\n },\n \"relationships\": {\n \"team\": {\n \"data\": {\n \"id\": \"{{ dd_team.data.id }}\",\n \"type\": \"team\"\n }\n },\n \"connected_team\": {\n \"data\": {\n \"id\": \"@MyGitHubAccount/my-team-name\",\n \"type\": \"github_team\"\n }\n }\n }\n }]\n}" + } + ], + "source": "data[0]", "step": "there is a valid \"team_connection\" in the system", "key": "team_connection", "tag": "Teams", diff --git a/tests/v2/features/teams.feature b/tests/v2/features/teams.feature index 50f7f31468..c24ced9ffb 100644 --- a/tests/v2/features/teams.feature +++ b/tests/v2/features/teams.feature @@ -118,34 +118,34 @@ Feature: Teams And the response "data.attributes.hidden_modules" has length 1 And the response "data.attributes.hidden_modules" array contains value "m3" - @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: Create team connections returns "Bad Request" response - Given operation "CreateTeamConnections" enabled - And new "CreateTeamConnections" request - And body with value {"data": [{"attributes": {"source": "github"}, "relationships": {"connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}, "team": {"data": {"type": "team"}}}, "type": "team_connection"}]} + Given new "CreateTeamConnections" request + And body with value {"data": []} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: Create team connections returns "Conflict" response Given new "CreateTeamConnections" request - And body with value {"data": [{"attributes": {"managed_by": "github_sync", "source": "github"}, "relationships": {"connected_team": {"data": {"id": "@GitHubOrg/team-handle", "type": "github_team"}}, "team": {"data": {"id": "87654321-4321-8765-dcba-210987654321", "type": "team"}}}, "type": "team_connection"}]} + And there is a valid "dd_team" in the system + And there is a valid "team_connection" in the system + And body with value {"data": [{"attributes": {"source": "github", "managed_by": "datadog"}, "relationships": {"connected_team": {"data": {"id": "{{ team_connection.relationships.connected_team.data.id }}", "type": "github_team"}}, "team": {"data": {"id": "{{ dd_team.data.id }}", "type": "team"}}}, "type": "team_connection"}]} When the request is sent Then the response status is 409 Conflict - @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: Create team connections returns "Created" response - Given operation "CreateTeamConnections" enabled - And new "CreateTeamConnections" request + Given new "CreateTeamConnections" request And there is a valid "dd_team" in the system And body with value {"data": [{"type": "team_connection", "attributes": {"source": "github", "managed_by": "datadog"}, "relationships": {"team": {"data": {"id": "{{ dd_team.data.id }}", "type": "team"}}, "connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}}}]} When the request is sent Then the response status is 201 Created - And the response "data.data[0].attributes.source" is equal to "github" - And the response "data.data[0].attributes.managed_by" is equal to "datadog" - And the response "data.data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}" - And the response "data.data[0].relationships.connected_team.data.id" is equal to "@MyGitHubAccount/my-team-name" - And the response "data.data[0].type" is equal to "team_connection" + And the response "data[0].attributes.source" is equal to "github" + And the response "data[0].attributes.managed_by" is equal to "datadog" + And the response "data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}" + And the response "data[0].relationships.connected_team.data.id" is equal to "@MyGitHubAccount/my-team-name" + And the response "data[0].type" is equal to "team_connection" @team:DataDog/aaa-omg Scenario: Create team notification rule returns "API error response." response @@ -166,25 +166,26 @@ Feature: Teams When the request is sent Then the response status is 201 Created - @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: Delete team connections returns "Bad Request" response - Given operation "DeleteTeamConnections" enabled - And new "DeleteTeamConnections" request - And body with value {"data": [{"type": "team_connection"}]} + Given new "DeleteTeamConnections" request + And body with value {"data": [{"id": "", "type": "team_connection"}]} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: Delete team connections returns "No Content" response Given new "DeleteTeamConnections" request - And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]} + And there is a valid "dd_team" in the system + And there is a valid "team_connection" in the system + And body with value {"data": [{"id": "{{ team_connection.id }}", "type": "team_connection"}]} When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/aaa-omg + @skip @team:DataDog/aaa-omg Scenario: Delete team connections returns "Not Found" response Given new "DeleteTeamConnections" request - And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]} + And body with value {"data": [{"id": "00000000-0000-dead-beef-000000000000", "type": "team_connection"}]} When the request is sent Then the response status is 404 Not Found @@ -474,9 +475,12 @@ Feature: Teams When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: List team connections returns "OK" response Given new "ListTeamConnections" request + And there is a valid "dd_team" in the system + And there is a valid "team_connection" in the system + And request contains "page[size]" parameter with value 10 When the request is sent Then the response status is 200 OK @@ -486,10 +490,11 @@ Feature: Teams When the request with pagination is sent Then the response status is 200 OK - @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: List team connections with filters returns "OK" response - Given operation "ListTeamConnections" enabled - And new "ListTeamConnections" request + Given new "ListTeamConnections" request + And there is a valid "dd_team" in the system + And there is a valid "team_connection" in the system And request contains "filter[sources]" parameter with value ["github"] And request contains "page[size]" parameter with value 10 When the request is sent diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index ed1ec823bd..67596e3589 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -6008,8 +6008,7 @@ "CreateTeamConnections": { "tag": "Teams", "undo": { - "operationId": "DeleteTeamConnections", - "type": "unsafe" + "type": "safe" } }, "GetTeamSync": { @@ -6357,47 +6356,6 @@ "type": "safe" } }, - "SearchWidgets": { - "tag": "Widgets", - "undo": { - "type": "safe" - } - }, - "CreateWidget": { - "tag": "Widgets", - "undo": { - "operationId": "DeleteWidget", - "parameters": [ - { - "name": "experience_type", - "source": "experience_type" - }, - { - "name": "uuid", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteWidget": { - "tag": "Widgets", - "undo": { - "type": "idempotent" - } - }, - "GetWidget": { - "tag": "Widgets", - "undo": { - "type": "safe" - } - }, - "UpdateWidget": { - "tag": "Widgets", - "undo": { - "type": "safe" - } - }, "CreateWorkflow": { "tag": "Workflow Automation", "undo": { diff --git a/tests/v2/features/widgets.feature b/tests/v2/features/widgets.feature deleted file mode 100644 index 54b0157115..0000000000 --- a/tests/v2/features/widgets.feature +++ /dev/null @@ -1,115 +0,0 @@ -@endpoint(widgets) @endpoint(widgets-v2) -Feature: Widgets - Create, read, update, and delete saved widgets. Widgets are reusable - visualization components stored independently from any dashboard or - notebook, partitioned by experience type and identified by a UUID. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "Widgets" API - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Create a widget returns "Bad Request" response - Given new "CreateWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Create a widget returns "OK" response - Given new "CreateWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Delete a widget returns "Bad Request" response - Given new "DeleteWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Delete a widget returns "No Content" response - Given new "DeleteWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Delete a widget returns "Not Found" response - Given new "DeleteWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Get a widget returns "Bad Request" response - Given new "GetWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Get a widget returns "Not Found" response - Given new "GetWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Get a widget returns "OK" response - Given new "GetWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Search widgets returns "Bad Request" response - Given new "SearchWidgets" request - And request contains "experience_type" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Search widgets returns "OK" response - Given new "SearchWidgets" request - And request contains "experience_type" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Update a widget returns "Bad Request" response - Given new "UpdateWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Update a widget returns "Not Found" response - Given new "UpdateWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Update a widget returns "OK" response - Given new "UpdateWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} - When the request is sent - Then the response status is 200 OK