Change personal data - nokia-wroclaw/innovativeproject-meetingdataexchange GitHub Wiki

URL:

{serverAddress}/api/account/setdata

Method:

POST

Content-type:

application/json

Method for web application:

public static ObjectNode web_setData(String login, String sid, String email, String name, String password) in controllers.Accounts

Imporant: email, name, password can be NULL if you don't want to change them.

Description:

Changes personal data (name, e-mail, password) of user

Input:

{
  "login": "your login",
  "sid": "id of current session",
  "name": "new name"
}

or

{
  "login": "your login",
  "sid": "id of current session",
  "email": "new e-mail"
}

or

{
  "login": "your login",
  "sid": "id of current session",
  "password": "MD5 hash of your new password"
}

or

{
  "login": "your login",
  "sid": "id of current session",
  "name": "new name",
  "email": "new e-mail"
}

or

{
  "login": "your login",
  "sid": "id of current session",
  "name": "new name",
  "password": "MD5 hash of your new password"
}

or

{
  "login": "your login",
  "sid": "id of current session",
  "email": "new e-mail",
  "password": "MD5 hash of your new password"
}

or

{
  "login": "your login",
  "sid": "id of current session",
  "name": "new name",
  "email": "new e-mail",
  "password": "MD5 hash of your new password"
}

Output OK:

{
  "status": "ok"
}

Output error:

{
  "status": "failed",
  "reason": "reason of error"
}

Types of reasons:

  • json excepted
  • incorrect data - incorrect (blank) value of some field
  • incorrect email - incorrect e-mail address
  • incorrect sid - incorrect session id