Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:syces:api_hidden:rpcs [2015/08/05 12:14]
bb [setDefaults]
en:syces:api_hidden:rpcs [2016/09/21 12:38] (current)
co
Line 1: Line 1:
 ====== Remote Procedure Calls ====== ====== Remote Procedure Calls ======
-===== authenticate ===== +===== authenticateById ===== 
-creates valid sessionid, if user credentials are valid \\ +creates valid token, if user credentials are valid \\
-password is built with following rule: hash[hash[password]+id]+
  
 === Parameter === === Parameter ===
 == required == == required ==
-  * username +  * api_key (String 32) 
-  * password (see above)+  * client_id (integ)
 == on Success == == on Success ==
  
-returns sessionid+returns token
  
 == on Failure == == on Failure ==
Line 16: Line 15:
 returns error returns error
  
 +===== authenticateByRealm =====
 +creates valid token, if user credentials are valid \\
 +
 +=== Parameter ===
 +== required ==
 +  * api_key (String 32)
 +  * realm (String)
 +== on Success ==
 +
 +returns token
 +
 +== on Failure ==
 +
 +returns error
  
  
Line 23: Line 36:
 === Parameter === === Parameter ===
 == required == == required ==
-sessionid as provided by authenticate-method+  token as provided by authenticate-method
 == optional == == optional ==
 +data {
   * username (String(50))\\   * username (String(50))\\
  
Line 34: Line 48:
     Internally all usernames have '@' plus the client domain added;       Internally all usernames have '@' plus the client domain added;  
  
-  * password (String(25))+  * password (String(25)) (Clear-Text)
   * tariff_id (Integer)   * tariff_id (Integer)
   * valid_from (Date YYYY-MM-DD)   * valid_from (Date YYYY-MM-DD)
Line 47: Line 61:
   * additional_info (String(100))   * additional_info (String(100))
   * allowed_locations (array of location ids)   * allowed_locations (array of location ids)
 +}
 == on Success == == on Success ==
  
-returns username, password+returns username, password, account_id
  
 == on Failure == == on Failure ==
Line 62: Line 76:
 === Parameter === === Parameter ===
 == required ==  == required == 
-  * sessionid as provided by authenticate-method+  * token as provided by authenticate-method
   * username   * username
  
 == on Success == == on Success ==
-returns true+returns deleted: True
 == on Failure == == on Failure ==
 returns error returns error
Line 75: Line 89:
 === Parameter === === Parameter ===
 == required == == required ==
-  * sessionid as provided by authenticate-method+  * session_id as provided by authenticate-method
   * username   * username
  
Line 100: Line 114:
  
 returns error returns error
 +
 +
 +===== getAutoLoginURL ===== 
 +
 +get URL for autologin for the current location configuration\\ 
 +contains one or more of the following variables to be replaced:\\ 
 +%u for username\\ 
 +%p for password\\ 
 +%l for location_id\\ 
 +%t for token\\ 
 +
 +
 +=== Parameter ===
 +== required ==
 +  * token as provided by authenticate-method
 +  * location_id
 +
 +== on Success ==
 +returns url including parameters
 +
 +== on Failure ==
 +returns ''
 +
 +
 +
  
 ===== getDefaults ===== ===== getDefaults =====
  
-get all or specific default values \\ +get all or specific default values
-default values for "tariff_id and" and "valid_days_from_creation" will be created on first usage of the api if not available+
 === Parameter === === Parameter ===
 == required == == required ==
-  * sessionid as provided by authenticate-method+  * token as provided by authenticate-method 
 == optional == == optional ==
-  * tariff_id +  * location_id (0 = all locations) 
-  * valid_days_from_creation+ 
 +== on Success == 
 +returns default values 
 +(
   * realm   * realm
   * password_length   * password_length
   * password_type (number, letters, alphanumeric, mixed)   * password_type (number, letters, alphanumeric, mixed)
 +  * valid_days
 +  * tariff_id
 +  * username_type (default for empty usernames: numeric or dateTime)
 +)
 +== on Failure ==
 +
 +returns error
 +
 +
 +===== getLogo =====
 +get  Logo
 +
 +=== Parameter ===
 +== required ==
 +  * token as provided by authenticate-method
 +  
  
 == on Success == == on Success ==
 +returns logo
  
-returns all or requested default values 
 == on Failure == == on Failure ==
  
 returns error returns error
 +
 +
 +
 +
 +
 +===== getNote =====
 +get note to be printed on ticket before user credentials 
 +
 +=== Parameter ===
 +== required ==
 +  * token as provided by authenticate-method
 +  
 +
 +== on Success ==
 +returns note
 +
 +== on Failure ==
 +
 +returns error
 +
 +
 +
  
 ===== getTariffDetails ===== ===== getTariffDetails =====
  
 get all or specific default values get all or specific default values
 +
 === Parameter === === Parameter ===
 == required == == required ==
-  * sessionid as provided by authenticate-method +  * token as provided by authenticate-method 
-  * tariff_id+  * (TODO: tariff_id or) 
 +  * tariff_name 
  
 == on Success == == on Success ==
 +returns tariff_id
 +TODO: returns tariff properties
  
-returns tariff properties+== on Failure == 
 + 
 +returns error 
 + 
 + 
 +===== logout ===== 
 +logout and delete token 
 + 
 +=== Parameter === 
 +== required == 
 +  * token 
 +== on Success == 
 + 
 +returns logout: True or False
  
 == on Failure == == on Failure ==
Line 138: Line 236:
 returns error returns error
  
-===== setDefaults ===== 
  
-set specific default values+===== isOnline ===== 
 + 
 +shows if a specific user is online or offline
 === Parameter === === Parameter ===
 == required == == required ==
-  * sessionid as provided by authenticate-method+  * token as provided by authenticate-method 
 +  * username
  
-== optional == +== on Success == 
-  * tariff_id  + 
-  * validDaysFromCreation (0 = unlimited, maximum 365)  +returns online: True or False 
-  * location_id+ 
 +== on Failure == 
 + 
 +returns online: False 
 + 
 + 
 + 
 +===== reactivateAccount ===== 
 + 
 +resets status and validity of inactive / deleted account  
 +=== Parameter === 
 +== required == 
 +  * token as provided by authenticate-method 
 +  * username
  
 == on Success == == on Success ==
  
-returns array of default values+returns array of username and password
  
 == on Failure == == on Failure ==
Line 161: Line 274:
  
  
 +===== setDefaults =====
  
 +set specific default values
 +=== Parameter ===
 +== required ==
 +  * token as provided by authenticate-method
  
 +
 +== optional ==
 +  * location_id (0 for all locations)
 +data { 
 +  * tariff_id 
 +  * username_type ('numeric' or 'dateTime'
 +}
 +== on Success ==
 +
 +returns array of default values
 +
 +options array (
 +  * realm
 +  * password_length
 +  * password_type (number, letters, alphanumeric, mixed)
 +  * valid_days
 +  * tariff_id
 +  * username_type (default for empty usernames: numeric or dateTime)
 +
 +)
 +
 +
 +== on Failure ==
 +
 +returns error
  
  
QR Code
QR Code Remote Procedure Calls (generated for current page)