-
Notifications
You must be signed in to change notification settings - Fork 3
Users API
richardthombs edited this page Nov 5, 2014
·
23 revisions
The Users API provides access to the User Management functionality of TeamHaven.
Get an existing user
Create a new user
Delete an existing user
Update an existing user
User search
Find users closest to the specified position
GET /api/users/:u[?schema=true]
Gets the specified user. If schema=true is present, then the User's Attribute Schema is included in the response.
PUT /api/users/:u
POST /api/users
DELETE /api/users/:u
GET /api/users
Returns an array of Users that match the specified search criteria.
- role
- Only return Users with the specified Role.
- lowestrole
- Only return Users with the specified Role or a higher one.
- highestrole
- Only return Users with the specified Role or a lower one.
GET /api/users/closest?position=:latlng&radius:r[&incumbent=:u]
Returns an array of up to 5 Collectors who are the closest to the specified position.
- position The latitude and longitude centre of the search area. Must be specified as a pair of floating point numbers using ',' as a separator and '.' as the decimal point. Eg: `12.4323,-23.213`.
- radius
- The search radius, specified in miles.
- incumbent
- The UserID of a User who should always be included in the list of results, even if they do not meet the search criteria.