thingsboard
thingsboard copied to clipboard
Result discrepancy between APIs
Describe the bug
It appears that the Find Alarms by Query API is not returning the correct number of results
I use Thingsboard CE 3.6.2
To Reproduce
- you must have some alarm
- using a tenant administrator
curl -X 'POST' \
'https://localhost:443/api/alarmsQuery/find' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'X-Authorization: Bearer eyJhbGciOiJIUzUxMiJ...' \
-d '{
"entityFilter": {
"type": "entityType",
"resolveMultiple": true,
"entityType": "DEVICE"
},
"keyFilters": [],
"pageLink": {
"page": 0,
"pageSize": 10,
"typeList": [
"Allarme Flusso inverso"
],
"statusList": [
"ACTIVE"
]
},
"alarmFields": [
{
"type": "ALARM_FIELD",
"key": "createdTime"
},
{
"type": "ALARM_FIELD",
"key": "type"
},
{
"type": "ALARM_FIELD",
"key": "severity"
},
{
"type": "ALARM_FIELD",
"key": "status"
}
]
}
'
the API returns only 3 items I would have expected to see 23 items as happens using the search panel or with the API Get All Alarms V2
Screenshots
curl -X 'GET' \
'https://localhost:443/api/v2/alarms?statusList=ACTIVE&severityList=MAJOR&typeList=Allarme%20Flusso%20inverso&pageSize=10&page=0' \
-H 'accept: application/json' \
-H 'X-Authorization: Bearer eyJ...'
Disclaimer
We appreciate your contribution whether it is a bug report, feature request, or pull request with improvement (hopefully). Please comply with the Community ethics policy, and do not expect us to answer your requests immediately. Also, do not treat GitHub issues as a support channel.