wiki:UsersApi
Last modified 3 years ago Last modified on 02/22/14 19:14:13

URL: /api/v1/users/add

Add a user to the realm

INPUT:

  • USERNAME -> The username, it automagically appends the realm if not specified
  • NAME -> User's first and middle name
  • SURNAME -> User's last name/surname
  • EMAIL -> User's e-mail address
  • MOBILE -> User's mobile number
  • NIN (optional) -> User's National Identification Number
  • RFID (optiona) -> User's RFID tag (for doors, etc..)
  • TYPE (optional) -> User's type of token (default software, hardware lowercase) -- NOTE ONLY SOFTWARE FOR BETA
  • MANAGER (optional) -> Username of user's manager

OUTPUT:

  • USERNAME -> return the username (if realm has changed)

URL: /api/v1/users/auth

Authenticate a given user

INPUT:

  • USERNAME -> User's id
  • SECRET -> OTP + Password

OUTPUT:

  • authenticated -> !True/!False

URL: /api/v1/users/delete

Delete a user from the userbase

INPUT:

  • USERNAME -> Userid to be deleted

OUTPUT:

  • none

URL: /api/v1/users/info

Show the user's information

INPUT:

  • USERNAME (required) -> Username

OUTPUT:

  • name -> Name
  • surname -> Surname
  • email -> E-Mail address
  • mobile -> Mobile telephone number (notifications)
  • nin -> National identification number
  • type -> Type of OTP
  • pin -> PIN set (!True/!False)
  • enabled -> User is enabled (!True/!False)
  • token -> Token (software/hardware lower case)
  • rfid -> RFID tag associated
  • manager -> Manager username

URL: /api/v1/users/list

Show the list of users in a given realm

INPUT:

  • REALM (optional) -> set alternative realm, if app has *

OUTPUT:

  • username -> array of users

URL: /api/v1/users/token/provision

Provision a token for the given username INPUT:

  • USERNAME -> Userid to be provisioned
  • SWTOKEN -> 'iphone', 'android', 'blackberry', 'software'

OUTPUT:

  • none