Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_downtime API always returns None for monitors #2262

Open
dkirrane opened this issue Nov 14, 2024 · 1 comment
Open

get_downtime API always returns None for monitors #2262

dkirrane opened this issue Nov 14, 2024 · 1 comment
Labels

Comments

@dkirrane
Copy link

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

@dkirrane
Copy link
Author

dkirrane commented Nov 14, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant