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

How to search for Metadata multi-value through api?

Answered
New post

Comments

6 comments

  • mwiller

    Hi  — unfortunately, multi-select metadata is not currently searchable via the Search API.  This is a known issue, and is on the backlog of our engineering team to resolve!

    0
    Comment actions Permalink
  • kienpham2000

    Thanks Matt!

     

    I'm trying to find a work around, potentially creating new fields. 

    0
    Comment actions Permalink
  • kienpham2000

     hey Matt is Single drop down search through API does not support as well? I just tried to split my fields into 3 single drop down filed, but I'm having the same 400 error when I try to search through API. For Single drop down, I can search through UI fine, but not API. 

     

    My example query: 

    const searchParams = {
          mdfilters: [
            {
              templateKey: 'myTemplate',
              scope: 'enterprise',
              filters: { seriesA: 'true' }
            }
    ]
    }
    
    client.search.query('', searchParams);

     

    I always get this error from box-node-sdk: 

    Unexpected API Response [400 Bad Request | 81i3alftvc0h4iwy] bad_request - Bad Request

     

    0
    Comment actions Permalink
  • kienpham2000

    I just found out internally, Box renamed camel case field!

     

    In my case, it renamed `seriesA` => `seriesa`

     

    After I update my code to search for lower case field instead of the field name assigned at UI, it works ok now. I hope this gets documented somewhere, super weird behavior, shouldn't do this at all. 

    0
    Comment actions Permalink
  • TeamTrim

     Is multi-select metadata still not searchable via the Box API?

    0
    Comment actions Permalink
  • ramato1

    Hi, multi-select metadata is now searchable via the Box API. Link: https://developer.box.com/reference/resources/metadata-field-filter-multi-select/

    0
    Comment actions Permalink

Please sign in to leave a comment.