Web hook¶
Description¶
The web hook gs-search-people.json
, in the site context,
allows external systems to search for a person.
Required arguments¶
-
user
=<emailOrId>
¶ Either
- An email address belonging to the person, or
- The user-identifier for the person.
-
search
¶
The “form” action (no value needs to be set, but the argument must be present).
Note
Unlike the page (see Page) the web hook searches all people that have a profile, regardless of their site membership. This can disclose a lot of information, so the data should be used cautiously.
Return value¶
If no profile was found then an empty JSON object is returned
({}
) . Otherwise a JSON object is returned with the standard
user-property values set (see the core web-hook
documentation).
Example¶
Using wget to retrieve the profile information for
someone with the email address a.person@home.example.com
from
the web-hook at groups.example.com
:
$ wget --post-data='token=fake&user=a.person@home.example.com&search' \
http://groups.example.com/gs-search-people.json
The returned JSON object:
{
"id": "qK7SgjsTHcLNrJ2ClevcJ0",
"name": "A. Person",
"url": "https:/groups.example.com//p/qK7SgjsTHcLNrJ2ClevcJ0",
"email": {
"all": [
"a.person@home.example.com",
"a.person@work.example.com"
],
"other": [
"a.person@work.example.com"
],
"preferred": [
"a.person@home.example.com"
],
"unverified": []
}
"groups": [
"example",
"test"
],
}
[1] | See gs.auth.token for more information
<https://github.com/groupserver/gs.auth.token> |