-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
Description
Hi all,
This issues is related and close #467. As @skiingyac reported to us, the endpoint GET /agents/name/:agent_name
is case sensitive.
We should add a new parameter to the endpoint (and any other affected endpoint) in order to search using case insensitive.
Before
curl -u foo:bar -k -X GET "https://127.0.0.1:55000/agents/name/NewHost?pretty"
{
"error": 0,
"data": {
"ip": "10.0.0.9",
"id": "009",
"name": "NewHost",
"dateAdd": "2019-08-30 09:31:01",
"status": "Never connected",
"registerIP": "10.0.0.9",
"node_name": "unknown"
}
}
curl -u foo:bar -k -X GET "https://127.0.0.1:55000/agents/name/newhost?pretty"
{
"error": 1701,
"message": "Agent does not exist: newhost"
}
After
curl -u foo:bar -k -X GET "https://127.0.0.1:55000/agents/name/newhost?pretty&insensitive"
{
"error": 0,
"data": {
"ip": "10.0.0.9",
"id": "009",
"name": "NewHost",
"dateAdd": "2019-08-30 09:31:01",
"status": "Never connected",
"registerIP": "10.0.0.9",
"node_name": "unknown"
}
}
Regards.