Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » Get users with API (Checking if an email exists)
  •  
davidj

Messages: 8
Karma: 0
Send a private message to this user
I am successfully logging in and request server information through the JSON API.

I would like to check for the existence of an email address on the system.

I am currently working with 'Users.get' but am receiving 'Failed to list users, internal database error.'

This is my JSON:

{
"jsonrpc":"2.0",
"id":1,
"method":"Users.get",
"params": {
"query":{"fields":["name","walters"]},
"domainId":"<?=keriodomainid;?>"
}
}

Is there a better method to determine if an email address is in use? Is there something wrong with my JSON?

Thanks in advance,

David Johnson

[Updated on: Wed, 04 January 2012 16:35]

  •  
davidj

Messages: 8
Karma: 0
Send a private message to this user
This is my latest JSON:

{
	"jsonrpc":"2.0",
	"id":1,
	"method":"Users.get",
	"params": 
        {
		"domainId":"<cfoutput>#request.keriodomainid#</cfoutput>",
		"query":
                {
                    "conditions": [
                    {
                        "fieldname":"role","comparator":"Eq","value":"FullAdmin"}],
                        "fields":["loginName","fullName","description"]
                    }
	}
}


I am not happy with the results, although I do get the list back. Is there documentation on allowable fieldnames?
  •  
  •  
davidj

Messages: 8
Karma: 0
Send a private message to this user
I have successfully received the proper response with the following json:

{"jsonrpc":"2.0","id":1,"method":"Users.get","params":{"domainId":"<cfoutput>#request.keriodomainid#</cfoutput>","query":{"fields":["id","loginName","fullName","description"],"conditions":[{"fieldName":"description","comparator":"Eq","value":"Walter"}]}}}


I just applied for the betatesting program.

I am moving on to the Resource List portion of creating a user.
  •  
Miroslav Osladil (Kerio)

Messages: 188

Karma: 27
Send a private message to this user
Hello,

in case you are still interested in our Administration API for Kerio Connect, I would recommend to check out Kerio Developer Zone which contains some examples and sample applications using the Kerio APIs Client Library for PHP.

Best regards,

Miroslav Osladil
Senior Developer
Kerio Technologies

The views I express are my own and do not necessarily reflect the views of Kerio Technologies.
Previous Topic: simple hosted exchange to kerio strategy?
Next Topic: API login doesn't work
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Thu Nov 23 19:36:12 CET 2017

Total time taken to generate the page: 0.00387 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.