How can I filter an enum via the REST API ?

Sorry for the noobie question but if I want to get all result filtering on an array of enum via the REST API I would naturraly use this: type[in]:[ENTREPRISE] => 400 Bad request Also tried: - type[in]:['ENTREPRISE'] - type[in]:ENTREPRISE - type[in]:'ENTREPRISE' Didn't have more success ! What is the proper way ? (ideally I would like the opposite but I presume once I have the correct way a not(<correct_format>) should do the trick right ?)
8 Replies
ɃØĦɆᵾS
ɃØĦɆᵾS4w ago
Hi @Ferdinand H, just to be sure, this field is select or multi-select type?
Ferdinand H
Ferdinand HOP4w ago
Multi-select You're right I wasn't clear about it
ɃØĦɆᵾS
ɃØĦɆᵾS4w ago
Just checked and I reproduce the issue, query used for fetching values is incorrect so database returns an error, I'll add this issue to other API issues
thomast
thomast4w ago
Hi @bob, could you link your ticket here so I make sure this is fixed soon. Thanks!
ɃØĦɆᵾS
ɃØĦɆᵾS4w ago
GitHub
REST API problems v2 · Issue #7657 · twentyhq/twenty
@charlesBochet @martmull I've found some issues with REST API again, this time with endpoints in Metadata group, like earlier, 1 comment per issue to keep consistency
martmull
martmull3w ago
GitHub
Add containsAny filter comparators in rest api by martmull · Pull R...
add missing containsAny filter comparator to filter multiSelect fields fix app break if object with same name created
martmull
martmull3w ago
@thomast can you review please ?
thomast
thomast3w ago
sure

Did you find this page helpful?