Welcome to the new Box Support website. Check out all the details here on what’s changed.

How to get metadata information of files using search api

New post

Comments

3 comments

  • JohannesMaria

    Hi Vijesh,

     

    as described here you should place your search in a JSON object like so:

     

    ?mdfilters=[{"templateKey":"marketingCollateral", "scope":"enterprise", "filters":{"documentType": "datasheet"}}]

    Hope this helps. 

    0
    Comment actions Permalink
  • vijeeshciber

    Thank you for your reply. This is not helping to solve my issues. My exact requirement like this, with one Box api call i need to get all files with metadata information of each file. Currently i need to make two calls, its making performance issue, the 100 records result displaying with 100 seconds.

    Its not acceptable with any website.

    Do you have any idea about Box api method to search the files and fetch all metadata information's in one api call. Currently getting metadata of each file with individual api call.

     

    0
    Comment actions Permalink
  • BB_Jake

    as described in this other forum post (https://community.box.com/t5/Platform-and-Development-Forum/Search-API-feature-for-fetching-all-files-metadata-information/m-p/63154) you need to specify the metadata template in the `fields` parameter 

     

    example 

    curl -H"Authorization: Bearer ACCESS_TOKEN" https://api.box.com/2.0/search?query=Test&fields=name,metadata..
    0
    Comment actions Permalink

Please sign in to leave a comment.