-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Describe the bug
If a monitor has a tag whose key has spaces in it, then list_monitors() cannot find it by tag.
To Reproduce
- Go to 'Monitors'
- Click on 'Edit' (pencil icon) for any monitor
- Scroll down to 'tags'
- Add a new tag "Tag With Spaces"
- click 'Save'
run following python script:
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
from datadog_api_client.v1.api import downtimes_api, monitors_api
from datadog_api_client.v1.models import *
import os
configuration = Configuration()
api_client = ApiClient(configuration)
monitor_api = monitors_api.MonitorsApi(api_client)
rv = monitor_api.list_monitors(with_downtimes=True, monitor_tags="Tag With Spaces")
print(len(rv))
Expected behavior
list_monitors() returns least one monitor that matches the tag
Environment and Versions (please complete the following information):
Python 3.11.4
datadog-api-client==2.17.0
There is nothing in API documentation or UI to suggest that tags with spaces are not supported.