User Management API

From Salud
Revision as of 16:41, 30 November 2009 by Eugenem (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

User Account XML Structure

The following XML structure is used to describe a Salud! user account. The id attribute is set to refer to an existing user and if the user is participating in a study, the study_id attribute is set to refer to the study. Each user's email and mobilenumber must be unique.

<user id="" study_id="">
   <name></name>
   <email></email>
   <mobilenumber></mobilenumber>
</user>

findUser

Looks up a user's account information by email address or mobile phone number. Returns a user account structure for that user.

This function is meant to be used only be non-interactive services, such as those for creating entries via email. The app and token parameters must be specified, but the user parameter is not necessary.

Arguments

  • email: The email address by which to match a user. Leave blank to look up by mobile phone number.
  • mobilenumber: The mobile phone number by which to match a user. Provide as 10-digit string (no dashes, no international code). Leave blank to look up by email address.

Request type: GET or POST

Examples

https://salud.cc.gatech.edu/salud/findUser?app=1&token=-1&email=test@salud.cc.gatech.edu&mobilenumber=

<user id="4" study_id="1">
   <name>Salud Test User</name>
   <email>test@salud.cc.gatech.edu</email>
   <mobilenumber>4045551212</mobilenumber>
</user>

https://salud.cc.gatech.edu/salud/findUser?app=1&token=-1&email=&mobilenumber=4045551212

<user id="4" study_id="1">
   <name>Salud Test User</name>
   <email>test@salud.cc.gatech.edu</email>
   <mobilenumber>4045551212</mobilenumber>
</user>

getAccountInfo

Returns a user's own account information.

Arguments None (other than app, user and token).

Request type: GET or POST

Example

https://salud.cc.gatech.edu/salud/getAccountInfo?app=&user=4&token=-1

<user id="4" study_id="1">
   <name>Salud Test User</name>
   <email>test@salud.cc.gatech.edu</email>
   <mobilenumber>404-555-1212</mobilenumber>
</user>
Personal tools