TwentyT
Twenty7mo ago
3 replies
Alex

Error: 'filter' invalid for ''

Hi all! I am trying to filter my noteTargets by noteId and I keep getting the following error:

400
Failed to fetch notes: 400 - {"statusCode":400,"error":"BadRequestException","messages":["'filter' invalid for ''. eg: price[gte]:10"]}

I'm running the following piece of code:
response = requests.get(
    f"https://twenty.insikt.aux.recfut.com/rest/noteTargets?filter=noteId[like]:{note_id}",
    headers={"Authorization": f"Bearer {TWENTY_TOKEN}"}
)

I've checked my data, and note_id (the actual value) definitely exists in both my notes and in noteTargets.

I'm self-hosting the latest version of Twenty, and this issue occurs whether I use the API tester, or use cURL or Python.

Any help as to why this error is popping up (and how to fix it) would be greatly appreciated!
Was this page helpful?