Search with Metadata not working
I need to implement search api with metadata field search. For this i have passing all required parameters like templateKey, scope, filters to search api, but i am getting bad request response from search api. I am passing the values in json array format to search api. Also this Box account is enterprise account. Following is my search query.
Please guide me someone, how to implement Metadata search with Search api.
-
Hello ,
the URL you've shared, once decoded, is: https://api.box.com/2.0/search?mdfilters=[{"templateKey":"adaptPhase","scope":"enterprise_86433","filters":{"productType":+"case"}}]
If we pretty-print that:
[
{
"templateKey": "adaptPhase",
"scope": "enterprise_86433",
"filters": {
"productType": + "case"
}
}
]I see here two things:
- there is a + there that shouldn't be here. Remove it and try again.
- In case that it is still not working try to add square brackets [] on the filters piece: "filters": [{"productType":"case"}]
Let's see if this works for you 😉
Regards,
Please sign in to leave a comment.
Comments
4 comments