Hi,
Lately we began encountering following error:
The API returned an error code
{"type":"error","status":400,"code":"bad_request",
"context_info":{"errors":[{"reason":"missing_parameter","name":"path","message":"'path' is required"}]},"help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Bad Request","request_id":"l04abhfy9y9s3fs9"}this happens in a for-each iteration over folder`s children.
the code fragment looks like this (in JAVA code 😞
..
private static String[] FOLDER_INFO_PROPERTIES_RETRIEVE = {"type", "id", "sequence_id", "etag", "name", "created_at", "modified_at","size", "path_collection", "created_by", "modified_by",
"content_created_at", "content_modified_at", "owned_by", "shared_link", "parent",
"item_status", "item_collection", "permissions"};
...
public void crawl(){
BoxFolder folder = new BoxFolder(getApi(), folderId);
Iterable folderChildren = folder.getChildren(FOLDER_INFO_PROPERTIES_RETRIEVE));
for (BoxItem.Info itemInfo : folderChildren) {
logger.trace("discovered item: "+ itemInfo.getName());
if(itemInfo instanceof BoxFile.Info){
...
}This code worked perfectly and still works for other folders, but this particular ends with an error.
I debugged into the BOX API code and found the REST GET request generated:
https://api.box.com/2.0/folders/#5***phone number removed for privacy***/items/?fields=type%2Cid%2Csequence_id%2Cetag%2Cname%2Ccreated_at%2Cmodified_at%2Csize%2Cpath_collection%2Ccreated_by%2Cmodified_by%2Ccontent_created_at%2Ccontent_modified_at%2Cowned_by%2Cshared_link%2Cparent%2Citem_status%2Citem_collection%2Cpermissions?limit=1000&offset=0It has a weird structure by having two "?" query separators :
https://api.box.com/2.0/folders/#5***phone number removed for privacy***/items/?..some params...?..some more params..Not sure what is going on.
Any help will be appreciated.
thanks
