Invalid parameter on metadata queries execute read endpoint
I am facing a similar challenge with metadata queries
I want to search for a custom metadata field in this case "issueType" and get a listing for all documents. The use case is to handle file belonging to a certain case while allowing users to organise them i subfolders.
I am using this endpoint:
https://{{api.box.com}}/2.0/metadata_queries/execute_read
{
"from": "enterprise_3727xxxxx.contentperspectivemvp0",
"query": "issueType = :issueType",
"query_params": {
"issueType": "\"Racial Injustice\""
},
"fields": [
"created_at",
"metadata.enterprise_3727xxxxx.contentperspectivemvp0.issueType",
"metadata.enterprise_3727xxxxx.contentperspectivemvp0.movementType"
],
"ancestor_folder_id": "121493081635",
"order_by": [
{
"field_key": "created_at",
"direction": "asc"
}
],
"limit": 50,
}
I am getting errors like this when running it through Postman with a developer token:
{
"type": "error",
"status": 400,
"code": "bad_request",
"context_info": {
"errors": [
{
"reason": "invalid_parameter",
"name": "entity-body",
"message": "Invalid value '{\n \"from\": \"enterprise_3727xxxxx.contentperspectivemvp0\",\n \"query\": \"issueType = :issueType\",\n \"query_params\": {\n \"issueType\": \"\\\"Racial Injustice\\\"\"\n },\n \"fields\": [\n \"created_at\",\n \"metadata.enterprise_3727xxxxx.contentperspectivemvp0.issueType\",\n \"metadata.enterprise_3727xxxxx.contentperspectivemvp0.movementType\"\n ],\n \"ancestor_folder_id\": \"121493081635\",\n \"order_by\": [\n {\n \"field_key\": \"created_at\",\n \"direction\": \"asc\"\n }\n ],\n \"limit\": 50,\n}'. Entity body should be a correctly nested resource attribute name/value pair"
}
]
},
"help_url": "http://developers.box.com/docs/#errors",
"message": "Bad Request",
"request_id": "43wjdbgijvw41yd2"
}
Anyone know what to do?
サインインしてコメントを残してください。
コメント
0件のコメント