Bug
TangoClient.list_entities() accepts a search keyword argument, and the docstring says it "maps to 'q' parameter." However, the implementation sends search as the literal query parameter name instead of q:
# In tango/client.py, list_entities():
# Map 'search' parameter to 'q' (query parameter)
if search:
params["search"] = search # Bug: should be params["q"] = search
This causes the Tango API to return 400 Bad Request since it doesn't recognize search as a valid query parameter on /api/entities/.
Steps to reproduce
from tango import TangoClient
client = TangoClient()
# This sends GET /api/entities/?search=booz+allen+hamilton → 400 Bad Request
response = client.list_entities(search="booz allen hamilton")
Expected behavior
The SDK should send q=booz+allen+hamilton in the query string, matching the API's expected parameter name and the docstring's documented behavior.
Workaround
Pass q directly as a filter kwarg:
# This works — sends GET /api/entities/?q=booz+allen+hamilton → 200 OK
response = client.list_entities(q="booz allen hamilton")
Fix
In list_entities, change:
params["search"] = search
to:
Bug
TangoClient.list_entities()accepts asearchkeyword argument, and the docstring says it "maps to 'q' parameter." However, the implementation sendssearchas the literal query parameter name instead ofq:This causes the Tango API to return 400 Bad Request since it doesn't recognize
searchas a valid query parameter on/api/entities/.Steps to reproduce
Expected behavior
The SDK should send
q=booz+allen+hamiltonin the query string, matching the API's expected parameter name and the docstring's documented behavior.Workaround
Pass
qdirectly as a filter kwarg:Fix
In
list_entities, change:to: