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

Search ALL files API

New post

Comments

7 comments

  • Bibek

    Hi ,

    I assume you are asking to get the search result for the whole enterprise. If that is the case you can do something like 

    https://api.box.com/2.0/search?query=test&type=file&scope=enterprise_content&limit=100

    Note: you do need to contact Box for enabling "enterprise_content" scope if it's not already enabled.

     

    The above request will get any files that contains text "test" or starts with "test" or has "test" anywhere in file. The search API by default returns all the results. Full or partial search doesn't matter. 

     

    Please check this out for detail: https://docs.box.com/reference#searching-for-content

     

     

    Hope this helps.

    Thanks,

    Bibek

    0
    Comment actions Permalink
  • Box Product Support

    Thank you, Bibek.  That's really helpful.

    0
    Comment actions Permalink
  • zacharya

    That will only get you files that contain the word test, or are named test, etc.  Is there any way to get ALL files no matter the naming?  Any type of wildcarding?  Thanks!

    0
    Comment actions Permalink
  • Murtza

     We currently don't have any type of wildcarding for search.

    0
    Comment actions Permalink
  • mmickelson

    Is it possible to get all files AND folders that match the search query. It appears that they "type" parameter allows only one type, file OR folder but not both. In case my question isn't clear, imagine I have a file named logo.jpg and a folder named logos. I search for logo and want to get results that include both the image and the folder. Is that possible?

    0
    Comment actions Permalink
  • aweber

    I have a similar question...it appears that using the default search in the box (web) app searches files AND web_links.  I would like to include web_link results in my search...analogous to what the previous post wants to do with files and folders.

     

    How do we include multiple types in the search call???

     

    Thanks,

    AJ

    0
    Comment actions Permalink
  • mmickelson

    Leaving out the type attribute seems to include everything. Maybe you realized that too but it wasn't clear to me in the beginning. The problem (for me) is still being able to specify just files and folder but not web_links. If you're trying to get files AND web_links but not folders, the question remains of how to specify multiple types.

    0
    Comment actions Permalink

Please sign in to leave a comment.