Skip to content

get_downtime API always returns None for monitors #2262

Description

@dkirrane

Describe the bug
get_downtime API does not return the list Impacted Monitors. It always return None

        from datadog_api_client.v2.api.downtimes_api import DowntimesApi

        api_response = datadog_downtimes_api.get_downtime(
            downtime_id=downtime_id,
            include='monitor'
            # include='created_by,monitor'
        )
        print(api_response)

Actual
Response always has

'relationships': {'monitor': {'data': None}}, 'type': 'downtime'},

Expected
List of monitors impacted by the Downtime.

Using
datadog-api-client==2.29.0

Activity

  1. dkirrane commented on Nov 14, 2024

    @dkirrane
    Author

    Update: Just checked with curl and the issues is the same

    curl -X GET "https://api.datadoghq.com/api/v2/downtime/${DOWNTIME_ID}?include=monitor" \
         -H "Content-Type: application/json" \
         -H "DD-API-KEY: ${DD_API_KEY}" \
         -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

    response is same.

    "relationships":{"monitor":{"data":null}}

    I can confirm from the DataDog UI that it shows a list Impacted Monitors for same downtime.

    This looks like an API issue. Not sure where to raise that?

  2. github-actions commented on Dec 15, 2024

    @github-actions

    Thanks for your contribution!

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.

    If you would like this issue to remain open:

    1. Verify that you can still reproduce the issue in the latest version of this project.

    2. Comment that the issue is still reproducible and include updated details requested in the issue template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions