Forum Discussion

mbiel's avatar
mbiel
Expert
5 years ago

Filter messages with APIv2 and exclude multiple boards

Hi, I just try to get the latest messages in the whole community but exclude some specific boards. Is there a way to handle this via API? According to the Docs at https://devdocportal.lithium.com/t...
  • Parshant's avatar
    5 years ago

    mbiel,

    For board.id != operator only support one time in the constraints at the moment and not worked with multiple != for same  constraints.

    To achieve this you need some more coding knowledge.

    I would suggest firstly get all the boards from that category and match the board id which you don't want to include for results and create the collection of these boards with comma separated('wireless', 'routers').

    Pass this collection to query with IN operator for board.id like below:

    SELECT id FROM messages WHERE board.id IN ('wireless', 'routers')