Forum Discussion

stevendany's avatar
stevendany
Contributor
4 years ago

Search on the API using "first name"

Hello There!

I'm new on Khoros and I'm trying to get users by the first name using the API but it's returning a constraint if I use the first name, do we have a way to do it?

Kind Regards!
Steven G.

  • Hi stevendany ,

    It is not currently possible to find users by first name using REST V2.

    You could use the REST V1 user search endpoint and tell it to only search the name_first field:

    [yourcommunithostbaseurl]/restapi/vc/search/users?q=joe&advanced=true&f=name_first&search_page_size=48&restapi.response_format=json

     

    -Doug

     

     

1 Reply

  • DougS's avatar
    DougS
    Khoros Oracle
    4 years ago

    Hi stevendany ,

    It is not currently possible to find users by first name using REST V2.

    You could use the REST V1 user search endpoint and tell it to only search the name_first field:

    [yourcommunithostbaseurl]/restapi/vc/search/users?q=joe&advanced=true&f=name_first&search_page_size=48&restapi.response_format=json

     

    -Doug