ASI/people

GET

Finds users based on their real names and usernames.

Parameters:

search The search term. Every user whose name matches the regular expression /.*search.*/ will be returned. However, all charactersin the search term are interpreted as literals rather than special regexp characters.

Access: Application

Returns:

200 Ok OK

Response example:

{
  "entry": [
    {
      "name": {
        "unstructured": "Essi Esimerkki",
        "family_name": "Esimerkki",
        "given_name": "Essi"
      },
      "address": {
        "unstructured": "Yrj\u00f6-Koskisenkatu 42, 00170 Helsinki",
        "postal_code": "00170",
        "street_address": "Yrj\u00f6-Koskisenkatu 42",
        "locality": "Helsinki"
      },
      "birthdate": "1940-06-01",
      "updated_at": "2010-09-03T10:32:51Z",
      "is_association": null,
      "username": "bx1coskusti",
      "id": "cAAfssT0yr37cHaaWPfx7J",
      "avatar": {
        "link": {
          "href": "/people/cAAfssT0yr37cHaaWPfx7J/@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": "2010-09-03T10:32:51Z",
        "message": "Valid person rocks."
      }
    },
    {
      "name": {
        "unstructured": "Essi Esimerkki",
        "family_name": "Esimerkki",
        "given_name": "Essi"
      },
      "address": {
        "unstructured": "Yrj\u00f6-Koskisenkatu 42, 00170 Helsinki",
        "postal_code": "00170",
        "street_address": "Yrj\u00f6-Koskisenkatu 42",
        "locality": "Helsinki"
      },
      "birthdate": "1940-06-01",
      "updated_at": "2010-09-03T10:32:51Z",
      "is_association": null,
      "username": "0ptte0kusti",
      "id": "cAHc2oT0yr37cHaaWPfx7J",
      "avatar": {
        "link": {
          "href": "/people/cAHc2oT0yr37cHaaWPfx7J/@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": "2010-09-03T10:32:51Z",
        "message": "Valid person rocks."
      }
    }
  ]
}

POST

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:

person
username The desired username. Must be unique in the system. Length 4-20 characters.
password User's password.
email User's email address.
is_association 'true' if this user is an association. Associations may be displayed differently by applications, and they cannot send or receive friend requests.
consent The version of the consent that the user has agreed to. For example: 'FI1'/'EN1.5'/'SE4'
welcome_email Optional parameter. If false, no welcome email is sent. Default is true.

Access: Client login

Returns:

201 Created Created
400 Bad Request Bad request
409 Conflict Conflict

Response example:

{
  "entry": {
    "name": {
      "unstructured": "Essi Esimerkki",
      "family_name": "Esimerkki",
      "given_name": "Essi"
    },
    "address": {
      "unstructured": "Yrj\u00f6-Koskisenkatu 42, 00170 Helsinki",
      "postal_code": "00170",
      "street_address": "Yrj\u00f6-Koskisenkatu 42",
      "locality": "Helsinki"
    },
    "birthdate": "1940-06-01",
    "updated_at": "2010-09-03T10:32:51Z",
    "is_association": null,
    "username": "qt2cpmkusti",
    "id": "cAPlK8T0yr37cHaaWPfx7J",
    "avatar": {
      "link": {
        "href": "/people/cAPlK8T0yr37cHaaWPfx7J/@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": "2010-09-03T10:32:51Z",
      "message": "Valid person rocks."
    }
  }
}

Subresources

 
Leave feedback:



Name (if you want):