Attask API Username Search Case Sensitive

后端 未结 3 1186
北恋
北恋 2021-01-24 01:46

I\'m currently trying to use Attask API\'s to pull out a list of users based on a string parameter, using the name_Mod \"contains\".

So far so good, I can pull back a li

相关标签:
3条回答
  • 2021-01-24 02:25

    I have encountered a few limitations with the method Jim used.

    Specifically, this query will not work as you expect.

    ..attask/api/project/search?status=CPL&status=CON&status_Mod=contains&$$LIMIT=2000

    Only the first status is returned.

    My preferred solution for searching with a "Contains" filter is this:

    ../attask/api/user/search?filters={firstName:['Chris','Steve','steve','Stephen','Anne']}

    I feel it is easier to assemble an array programmatically as you do not have to prepend the field name.

    If needed you could perform a ToUpper, ToLower and Case the first Char in the string and cover most of the

    The filters verb does not respond to the field Modifier. You cannot use Not Equal, Less Than, Etc.

    Hope that helps!

    0 讨论(0)
  • 2021-01-24 02:39

    You are correct search fields are case sensitive. The only way you can get both results, dan and Dan, is by including both in the rest request. An example would be

    "https://wibble.attask-ondemand.com/attask/api/user/search?sessionID=wibble&$$LIMIT=2000&name=dan&name=Dan&name_Mod=contains&fields=ID,name"

    Let me know if that works for you.

    0 讨论(0)
  • 2021-01-24 02:46

    There is also other MOD named cicontains where ci means case insensitive. You can use it instead.

    0 讨论(0)
提交回复
热议问题