TheJumpCloud / jcapi-go

Go
18 stars 11 forks source link

Query String Filter #34

Open moserke opened 5 years ago

moserke commented 5 years ago

I have been trying hard to figure out the format for the filter field and can not figure it out. I continue to get improperly formatted filter: name when trying to use https://github.com/TheJumpCloud/jcapi-go/blob/master/v2/docs/UserGroupsApi.md#groupsuserlist. Can you please provide how to actually format the filter? The docs for the API make no reference to filter format except for mongodb post body format, but this is a query string filter.

This is what I am trying as optional params to the call:

filter := map[string]interface{}{
    "filter": []string{"name eq value"},
  }

It would be super helpful to have some better clarification in the docs on this.

kmoorehead-jc commented 5 years ago

Hi moserke,

Sorry to hear that you have been running into some issues getting the formatting of the filter down. We’ve taken note of your request for some clarification in the actual docs but to help you immediately, I believe this is how you will want to format that filter to get the results you are looking for:

filter := map[string]interface{}{
    "filter": []string{"name:eq:value"},
}

Have a good day!