Database API where condition not apply

Hello ,

I am new to bubble, when i try to GET particular user details. using below link. But it was not applied. it will retrieve all employee details. kindly help me someone.

https://pureflow.bubbleapps.io/version-test/api/1.1/obj/User?Email=gowtham@vajraglobal.com

II think you should read this to understand how search constraints work

1 Like

And If I remember, you will need to store the email into another field (text) to be able to search it

1 Like

Hi @Jici thank you for quick response,

Yes i will checked that type also, but no use. I had changed the parameter, user email to user Name and check it, but these also not working. It will retrieve all user details.

https://pureflow.bubbleapps.io/version-test/api/1.1/obj/User?Name=a

Kindly click the above link, you can understand the exact issue.

Thanks

You cannot provide it this way. Did you read the link? You need to use a constraints parameter with a json url encoded

@Jici thank you for your responce, As per your advice. I have checked using constraints, but that also not procedure proper responce. For your referrence i have mentioned the link in below . FYI, In below mentioned link, I have mentioned my application API token.

https://pureflow.bubbleapps.io/version-test/api/1.1/obj/User?api_token=6972a48df4db91c8cdc5ebbdbcaed9f2&constraints=[{"key"%3A"Email"%2C"constraint_type"%3A"text%20equals"%2C%20"value"%3A"gowtham@vajraglobal.com"}]

Kindly find the link and help to resolve it bro @Jici

Thanks

Like I told you, you cannot search email if you didn’t create a new email field to store it. I guess this is also case sensitive and the entire payload need to be url encoded

example using name with pureflo
https://pureflow.bubbleapps.io/version-test/api/1.1/obj/User?api_token=6972a48df4db91c8cdc5ebbdbcaed9f2&constraints=[{ "key"%3A%20"name"%2C "constraint_type"%3A%20"equals"%2C "value"%3A%20"pureflo" }]

Don’t forget to revoke and change your api token :stuck_out_tongue_winking_eye: You should not make it public here :wink: