Hi,
iam trying to collect data from an API
If you just request the API without filters you get every data, but i need to filter it
I have set it up in postman and it is working with and without the filtering.
In node red i get it to work to request all data, but i cant get the "filtering" to work
The request returns all data and not the filtered data
To do the filtering In postman i add Content-Type : application/json in Headers and in Body i have this
{
"operator": "and",
"filters": [
{
"key": "survey",
"values": ["mI7Utyd5igBVyLfR_E2F2P6dL0bPMfA9juUHyiPUgq7"],
"comparison": "is"
}
]
}
And in Node red i inject the same into msg.body and add Content-Type : application/json as a header in http-request
When looking at the debug i see this result under Body
body: object
operator: "and"
filters: array[1]
0: object
key: "survey"
values: array[1]
0: "mI7Utyd5igBVyLfR_E2F2P6dL0bPMfA9juUHyiPUgq7"
comparison: "is"
statusCode: 200
And the payload should return 5 counts but return 110
payload: object
next: "https://api.simplesat.io/api/v1/answers/search?page=2"
previous: null
count: 110
answers: array[100]
This is probably something simple but iam realy new to this and any help is apreshiated
Here are some info about the API
Thanx