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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32332,7 +32332,10 @@ paths:
permissions:
- events_read
post:
deprecated: true
description: |-
This endpoint is deprecated and is available only to organizations that have previously used it. Use the V2 endpoint instead.

This endpoint allows you to post events to the stream.
Tag them, set priority and event aggregate them with other events.
operationId: CreateEvent
Expand Down
4 changes: 1 addition & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167370,9 +167370,7 @@ paths:

**Important:** Upgrade to the latest client library version to use the updated endpoint at `https://event-management-intake.{site}/api/v2/events`. Older client library versions of the Post an event (v2) API send requests to a deprecated endpoint (`https://api.{site}/api/v2/events`).

✅ **Only events with the `change` or `alert` category** are in General Availability. For change events, see [Change Tracking](https://docs.datadoghq.com/change_tracking) for more details.

❌ For use cases involving other event categories, use the V1 endpoint or reach out to [support](https://www.datadoghq.com/support/).
Supported event categories are `change` and `alert`. For more information about change events, see [Change Tracking](https://docs.datadoghq.com/change_tracking).
operationId: CreateEvent
requestBody:
content:
Expand Down
6 changes: 5 additions & 1 deletion src/datadog_api_client/v1/api/events_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from __future__ import annotations

from typing import Any, Dict, Union
import warnings

from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
from datadog_api_client.configuration import Configuration
Expand Down Expand Up @@ -139,7 +140,9 @@ def create_event(
self,
body: EventCreateRequest,
) -> EventCreateResponse:
"""Post an event.
"""Post an event. **Deprecated**.

This endpoint is deprecated and is available only to organizations that have previously used it. Use the V2 endpoint instead.

This endpoint allows you to post events to the stream.
Tag them, set priority and event aggregate them with other events.
Expand All @@ -151,6 +154,7 @@ def create_event(
kwargs: Dict[str, Any] = {}
kwargs["body"] = body

warnings.warn("create_event is deprecated", DeprecationWarning, stacklevel=2)
return self._create_event_endpoint.call_with_http_info(**kwargs)

def get_event(
Expand Down
4 changes: 1 addition & 3 deletions src/datadog_api_client/v2/api/events_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ def create_event(

**Important:** Upgrade to the latest client library version to use the updated endpoint at ``https://event-management-intake.{site}/api/v2/events``. Older client library versions of the Post an event (v2) API send requests to a deprecated endpoint ( ``https://api.{site}/api/v2/events`` ).

✅ **Only events with the change or alert category** are in General Availability. For change events, see `Change Tracking <https://docs.datadoghq.com/change_tracking>`_ for more details.

❌ For use cases involving other event categories, use the V1 endpoint or reach out to `support <https://www.datadoghq.com/support/>`_.
Supported event categories are ``change`` and ``alert``. For more information about change events, see `Change Tracking <https://docs.datadoghq.com/change_tracking>`_.

:param body: Event creation request payload.
:type body: EventCreateRequestPayload
Expand Down
Loading