You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the Box Developer Forums and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
The query by metadata function is not correct and will always result in a 400 Bad Request if query_parameters are supplied. Specifically, the query_parameters options should be query_params, and order_by should be optional. In addition there are missing options: limit and marker.
Error: Unexpected API Response [400 Bad Request | ...] invalid_query - Parameter id: no value provided
(I actually got this error after removing the order_by field because before that, you don't even get a reason for why the request was bad, you just get a 400)
Expected Behavior
To receive a 200 response and my matching files.
Workaround
Forcibly ignore the type mismatch.
constoptions={fields: ["id","name","sha1"],query: "myMetadataIdField = :id",query_params: {id: "my_special_id"},};returnthis.client.metadata.query("enterprise_scope.metadataTemplateKey","123",// @ts-expect-error: option type definition for metadata query is incorrectoptions,);
Error Message, Including Stack Trace
I'd rather not redact, and this seems pretty straightforward.
Screenshots
n/a
Versions Used
Node SDK: 3.1.1 and 3.5.0
The text was updated successfully, but these errors were encountered:
Description of the Issue
The query by metadata function is not correct and will always result in a 400 Bad Request if
query_parameters
are supplied. Specifically, thequery_parameters
options should bequery_params
, andorder_by
should be optional. In addition there are missing options:limit
andmarker
.API Reference: https://developer.box.com/reference/post-metadata-queries-execute-read/
Steps to Reproduce
An example:
And you receive a:
Error: Unexpected API Response [400 Bad Request | ...] invalid_query - Parameter id: no value provided
(I actually got this error after removing the
order_by
field because before that, you don't even get a reason for why the request was bad, you just get a 400)Expected Behavior
To receive a 200 response and my matching files.
Workaround
Forcibly ignore the type mismatch.
Error Message, Including Stack Trace
I'd rather not redact, and this seems pretty straightforward.
Screenshots
n/a
Versions Used
Node SDK: 3.1.1 and 3.5.0
The text was updated successfully, but these errors were encountered: