ASI/people
GET ^top
Finds users based on their real names and usernames.
Parameters
- page
(optional) Used in conjunction with the "per_page" parameter to control paging of results.
- phone_number
(optional) If this is entered (without search), returns only one person who has the exact same phone number stored
(358501234567 will match also +358501234567). This parameter is ignored if "search" parameter is submited.
- per_page
(optional) Number of people that are to be shown per page.
- search
(optional) The search term. Every user whose name matches the regular expression /.*search.*/ will be returned.
However, all characters in the search term are interpreted as literals rather than special regexp characters.
Access
Application
Returns
- 200 - OK
Response example
{
"entry": [
{
"name": {
"unstructured": "Essi Esimerkki",
"family_name": "Esimerkki",
"given_name": "Essi"
},
"address": {
"unstructured": "Yrjö-Koskisenkatu 42, 00170 Helsinki",
"postal_code": "00170",
"street_address": "Yrjö-Koskisenkatu 42",
"locality": "Helsinki"
},
"birthdate": "1940-06-01",
"updated_at": "2011-09-28T11:11:07Z",
"is_association": null,
"username": "kusti15",
"id": "cqHQF46Cir4juJeJfcaj6R",
"avatar": {
"link": {
"href": "/people/cqHQF46Cir4juJeJfcaj6R/@avatar",
"rel": "self"
},
"status": "not_set"
},
"gender": "MALE",
"msn_nick": "maison",
"phone_number": "+358 40 834 7176",
"website": "http://example.com",
"irc_nick": "pelle",
"description": "About me",
"status": {
"changed": "2011-09-28T11:11:07Z",
"message": "Valid person rocks."
}
},
{
"name": {
"unstructured": "Essi Esimerkki",
"family_name": "Esimerkki",
"given_name": "Essi"
},
"address": {
"unstructured": "Yrjö-Koskisenkatu 42, 00170 Helsinki",
"postal_code": "00170",
"street_address": "Yrjö-Koskisenkatu 42",
"locality": "Helsinki"
},
"birthdate": "1940-06-01",
"updated_at": "2011-09-28T11:11:07Z",
"is_association": null,
"username": "kusti16",
"id": "cqIahO6Cir4juJeJfcaj6R",
"avatar": {
"link": {
"href": "/people/cqIahO6Cir4juJeJfcaj6R/@avatar",
"rel": "self"
},
"status": "not_set"
},
"gender": "MALE",
"msn_nick": "maison",
"phone_number": "+358 40 834 7176",
"website": "http://example.com",
"irc_nick": "pelle",
"description": "About me",
"status": {
"changed": "2011-09-28T11:11:07Z",
"message": "Valid person rocks."
}
}
]
}
POST ^top
Creates a new user. If creation is succesful the current app-only session is changed to be associated also to the user that was just created.
Also sends a welcoming email to the users email address.
Parameters
- welcome_email
Optional parameter. If false, no welcome email is sent. Default is true.
- person
- is_association
'true' if this user is an association. Associations may be displayed differently by applications, and they cannot send or receive friend requests.
- username
The desired username. Must be unique in the system. Length 4-20 characters.
- consent
The version of the consent that the user has agreed to. For example: 'FI1'/'EN1.5'/'SE4'
- password
User's password.
User's email address.
Access
Client login
Returns
- 201 - Created
- 400 - Bad request
- 409 - Conflict
Response example
{
"entry": {
"name": {
"unstructured": "Essi Esimerkki",
"family_name": "Esimerkki",
"given_name": "Essi"
},
"address": {
"unstructured": "Yrjö-Koskisenkatu 42, 00170 Helsinki",
"postal_code": "00170",
"street_address": "Yrjö-Koskisenkatu 42",
"locality": "Helsinki"
},
"birthdate": "1940-06-01",
"updated_at": "2011-09-28T11:11:07Z",
"is_association": null,
"username": "kusti17",
"id": "cqJoHW6Cir4juJeJfcaj6R",
"avatar": {
"link": {
"href": "/people/cqJoHW6Cir4juJeJfcaj6R/@avatar",
"rel": "self"
},
"status": "not_set"
},
"gender": "MALE",
"msn_nick": "maison",
"phone_number": "+358 40 834 7176",
"website": "http://example.com",
"irc_nick": "pelle",
"description": "About me",
"status": {
"changed": "2011-09-28T11:11:07Z",
"message": "Valid person rocks."
}
}
}