0

I have an api reference at http://manuals.kerio.com/connect/api/en/reference/interface_users.html#ae91a3b16262c8a873d1c73b53e0e45b4 that contains the following:

void Users::get (out UserList list,
                 out long totalItems,
                 in kerio::web::SearchQuery query,
                 in kerio::web::KId domainId     
)   

I hope to get a return (the outs) by passing this JSON string:

{
    "jsonrpc":"2.0",
    "id":1,
    "method":"Users.get",
    "params": {
        "query":{"fields":["name","walters"]},
        "domainId":"<cfoutput>#request.keriodomainid#</cfoutput>"
    }
} 

I can't find anything in the API that would indicate this would be correct or incorrect.

As this is my first experience with JSON and with this API, I was wondering if anyone would have an idea of proper format, or if anyone could find information in that API that would indicate how the information should appear.

I have posted this on the Kerio Connect forum, but have not received a response after many views. http://forums.kerio.com/t/21132/get-users-with-api/

What would JSON do?

davidj
  • 254
  • 2
  • 9
  • The API documentation doesn't seem to be sufficient to let you know what to pass. This isn't really a JSON problem, they just haven't given enough examples or detailed documentation. I do notice in their example that he domainId they use doesn't look like yours. – djna Jan 05 '12 at 08:18
  • Thanks, djna. The domainid is stored in a coldfusion variable, sorry for the confusion. I believe the API may be in beta, though it is a part of the latest release. I have posted on the Kerio forum in the hope for syntax assistance. – davidj Jan 05 '12 at 14:28
  • check this out. There is [Kerio Developer Zone](http://www.kerio.com/developers) containing a lots of examples and native PHP client library. –  Mar 07 '12 at 07:59

1 Answers1

0

This is the final JSON that worked for me:

{
 "jsonrpc":"2.0",
 "id":1,
 "method":"Users.get",
 "params":
      {
      "domainId":"'& arguments.domainId & '",
      "query":
           {
           "fields":["id","loginName","fullName","description"],
           "conditions":[{"fieldName":"loginName","comparator":"Eq","value":"theLoginName"}]
           }
      }
}
davidj
  • 254
  • 2
  • 9