Member Search - Huddle/huddle-apis GitHub Wiki
Summary
The Member Search API provides a list of Members filtered by a query when a given First name, Last name or email address is provided.
Status
Operation |
---|
Search Members |
Operations
Search Members
When searching for Members, the response will contain a list of Members that match the query across the start of firstname, lastname or email and also depends on the kind of search the Actor has selected. Actor is an abbreviated Member resource. Actor users can also search for themselves.
The API is hosted on its own website 'members'
Search for members across all workspaces that the Actor has access to (Currently in live)
In this type of search, the results are filtered by the Workspaces that the Actor is a Member of.
Request
GET /members/search?q=dom&hits=10
Accept: application/vnd.huddle.data+xml (or+json)
Authorization: OAuth2 frootymcnooty/vonbootycherooty
Response
HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+json
{
"links": [
{ "rel": "self", "href": "..." }
],
"members": [{
"links": [
{"rel": "avatar", "href" : "...", "type" : "..." },
{"rel": "profile", "href": "...", "type":"..."}
],
"name": "Dominic Green",
"email": "[email protected]",
"rel": "member",
"identity": {
"email": "[email protected]"
}
}]
}
Search for single workspace
In this type of search, the results are filtered by a single workspace that the Actor is a Member of.
Request
GET /members/search?q=dom&hits=10&workspaceId=123
Accept: application/vnd.huddle.data+xml (or+json)
Authorization: OAuth2 frootymcnooty/vonbootycherooty
Response
Same as above
Parameters
Name | Description | Methods | Optional |
---|---|---|---|
q | The query to complete on | GET | No |
hits | The number of results to return. Defaults to 10. Max 50. | GET | Yes |
workspaceId | The id of the workspace to search for members. Defaults to null | GET | Yes |
Link relations
Name | Description | Methods |
---|---|---|
self | The URI of the resource | GET |
Other Responses
Case | Response |
---|---|
q is empty or whitespaces | 400 Bad request |
workspaceId is invalid (negative or not an integer) | 400 Bad request |
Actor is not found | 404 Not Found |
No company ids found for that actor | 404 Not Found |
Hits less than 1 | 400 Bad request |
Hits more than 50 | 400 Bad request |
POST, DELETE, PUT used | 405 Method not allowed |
Elastic Search is unavailable | 503 Service unavailable |