Difference between revisions of "Server-Side Actions"
imported>Aeric |
imported>Aeric m (Text replace - '’' to ''') |
||
(8 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
!URL | !URL | ||
|- | |- | ||
|[[#Login to the site|Login to the site]]|| | |[[#Login to the site|Login to the site]]|| [[Login]] to the {{enterprisebrand}} as a [[Site User]]|| Base URL + '''''"/login"''''' | ||
|- | |- | ||
|[[#Register a New User|Register a New User]]|| | |[[#Register a New User|Register a New User]]|| Create a new Site User || Base URL + '''''"/register"''''' | ||
|- | |- | ||
|[[#Change Password|Change Password]]|| | |[[#Change Password|Change Password]]|| Change the Site User's password || Base URL + '''''"/change_password"''''' | ||
|- | |- | ||
|[[#Update Profile|Update Profile]]|| | |[[#Update Profile|Update Profile]]|| Update a [[My Information|User Profile]]|| Base URL + '''''"/update_profile"''''' | ||
|- | |- | ||
|[[#Validate the Security Question|Validate the Security Question]]|| | |[[#Validate the Security Question|Validate the Security Question]]|| Validate the security question, as part of the [[Security Question|Forgot my Password]] process|| Base URL + '''''"/validate_security_question"''''' | ||
|- | |- | ||
|[[#Reset Password|Reset Password]]| | |[[#Reset Password|Reset Password]]|| Reset a Site User's password || Base URL + '''''"/reset_password"''''' | ||
|- | |- | ||
|[[#Manage Objects|Manage Objects]]|| | |[[#Manage Objects|Manage Objects]]|| Add/update/delete a record in an [[Object]]|| Base URL + '''''"/service"''''' | ||
|- | |- | ||
|[[#Download File|Download File]]|| | |[[#Download File|Download File]]|| Download a document || Base URL + '''''"/download_file"''''' | ||
|- | |- | ||
|[[#Logout from the Site|Logout from the Site]]|| | |[[#Logout from the Site|Logout from the Site]]|| [[Logout]] from the {{enterprisebrand}}|| Base URL + '''''"/logout"''''' | ||
|} | |} | ||
Line 39: | Line 39: | ||
|<tt>__oe</tt>|| '''Yes''' ||On Error, a relative URL which is executed when an error occurs | |<tt>__oe</tt>|| '''Yes''' ||On Error, a relative URL which is executed when an error occurs | ||
|- | |- | ||
|<tt>__os</tt>|| '''Yes''' ||On Success, a relative URL which is executed when a successful action is executed. Example URL for <tt>__os</tt> and <tt>__oe</tt> will be | |<tt>__os</tt>|| '''Yes''' ||On Success, a relative URL which is executed when a successful action is executed. Example URL for <tt>__os</tt> and <tt>__oe</tt> will be "pages/home.jsp" or "controller/com/platform/{namespace}/{package}/GetRecords" | ||
|- | |- | ||
|<tt>__pc</tt>|| No ||This is the class that is executed before the action is executed. This can be used for validations before a controller or a server side action is executed. This can be used to execute some code before server side action is executed, when the controller is Platform. | |<tt>__pc</tt>|| No ||This is the class that is executed before the action is executed. This can be used for validations before a controller or a server side action is executed. This can be used to execute some code before server side action is executed, when the controller is Platform. | ||
Line 49: | Line 49: | ||
Performs same behavior as [[Login]]. Requires following HTML parameters to be submitted: | Performs same behavior as [[Login]]. Requires following HTML parameters to be submitted: | ||
;URL:Syntax: <tt>Base URL + "/login"</tt> | ;URL:Syntax: <tt>Base URL + "/login"</tt> | ||
:Example: <tt> | :Example: <tt>{{platformURL}}/sites/123456/[MySiteName]/login</tt> | ||
;Parameters: | ;Parameters: | ||
Line 58: | Line 58: | ||
Used for registering a new site user. Requires following HTML parameters to be submitted. | Used for registering a new site user. Requires following HTML parameters to be submitted. | ||
;URL:Syntax: <tt>Base URL + "/register"</tt> | ;URL:Syntax: <tt>Base URL + "/register"</tt> | ||
:Example: <tt> | :Example: <tt>{{platformURL}}/sites/123456/[siteName]/register</tt> | ||
;Parameters: | ;Parameters: | ||
Line 71: | Line 71: | ||
===Change Password=== | ===Change Password=== | ||
Used for changing | Used for changing user's password. The user is required to be logged in for this action to take place. | ||
;URL:Syntax: <tt>Base URL + "/change_password"</tt> | ;URL:Syntax: <tt>Base URL + "/change_password"</tt> | ||
:Example: <tt> | :Example: <tt>{{platformURL}}/sites/123456/[siteName]/change_password</tt> | ||
;Parameters: | ;Parameters: | ||
Line 82: | Line 82: | ||
===Update Profile=== | ===Update Profile=== | ||
Used for updating | Used for updating user's profile. The user is required to be logged in for this action to take place. | ||
;URL:Syntax: <tt>Base URL + "/update_profile"</tt> | ;URL:Syntax: <tt>Base URL + "/update_profile"</tt> | ||
:Example: <tt> | :Example: <tt>{{platformURL}}/sites/123456/[siteName]/update_profile</tt> | ||
;Parameters: | ;Parameters: | ||
Line 91: | Line 91: | ||
:;last_name:Last Name of the user | :;last_name:Last Name of the user | ||
:;email:Email of the user | :;email:Email of the user | ||
:;street:Street part of the | :;street:Street part of the user's address | ||
:;city:City part of the | :;city:City part of the user's address | ||
:;state:State part of the | :;state:State part of the user's address | ||
:;zip:Zip part of the | :;zip:Zip part of the user's address | ||
:;country:Country part of the | :;country:Country part of the user's address | ||
:;company:Company of the user | :;company:Company of the user | ||
:;title:title of the user | :;title:title of the user | ||
Line 109: | Line 109: | ||
;URL:Syntax: <tt>Base URL + "/validate_security_question"</tt> | ;URL:Syntax: <tt>Base URL + "/validate_security_question"</tt> | ||
:Example: <tt> | :Example: <tt>{{platformURL}}/sites/123456/[siteName]/validate_security_question</tt> | ||
;Parameters: | ;Parameters: | ||
Line 117: | Line 117: | ||
===Reset Password=== | ===Reset Password=== | ||
Used for resetting | Used for resetting user's password. This action is particularly used for forgot password use case. | ||
;URL:Syntax: <tt>Base URL + "/reset_password"</tt> | ;URL:Syntax: <tt>Base URL + "/reset_password"</tt> | ||
:Example: <tt> | :Example: <tt>{{platformURL}}/sites/123456/[siteName]/reset_password</tt> | ||
;Parameters: | ;Parameters: | ||
:;password:new password of the user | :;password:new password of the user | ||
; | :;password2:new password of the user for confirmation | ||
===Manage Objects=== | ===Manage Objects=== | ||
Line 130: | Line 130: | ||
;URL:Syntax: <tt>Base URL + "/service"</tt> | ;URL:Syntax: <tt>Base URL + "/service"</tt> | ||
:Example: <tt> | :Example: <tt>{{platformURL}}/sites/123456/[siteName]/service</tt> | ||
;Parameters: | ;Parameters: | ||
Line 141: | Line 141: | ||
;URL:Syntax: <tt>Base URL + "/download_file"</tt> | ;URL:Syntax: <tt>Base URL + "/download_file"</tt> | ||
:Example: <tt> | :Example: <tt>{{platformURL}}/sites/123456/[siteName]/download_file</tt> | ||
;Parameters: | ;Parameters: | ||
Line 151: | Line 151: | ||
;URL:Syntax: <tt>Base URL + "/logout"</tt> | ;URL:Syntax: <tt>Base URL + "/logout"</tt> | ||
:Example: <tt> | :Example: <tt>{{platformURL}}/sites/123456/[siteName]/logout</tt> | ||
;Parameters: | ;Parameters: | ||
:;None | :;None | ||
::Learn more: [[Sites#Tags|Tags]] | ::Learn more: [[Sites#Tags|Tags]] |
Latest revision as of 19:55, 31 July 2013
The AgileApps Cloud platform includes a number of built-in server-side actions. These actions are typically useful for an authenticated site. Common actions for a typical Web Application which supports authentication are listed here, and are used with the Common Parameters.
- Considerations
- Each action is available as a service through a URL and expects certain parameters for a successful execution.
- Both HTTP GET and HTTP POST are supported for these actions.
Action Description URL Login to the site Login to the AgileApps Cloud platform as a Site User Base URL + "/login" Register a New User Create a new Site User Base URL + "/register" Change Password Change the Site User's password Base URL + "/change_password" Update Profile Update a User Profile Base URL + "/update_profile" Validate the Security Question Validate the security question, as part of the Forgot my Password process Base URL + "/validate_security_question" Reset Password Reset a Site User's password Base URL + "/reset_password" Manage Objects Add/update/delete a record in an Object Base URL + "/service" Download File Download a document Base URL + "/download_file" Logout from the Site Logout from the AgileApps Cloud platform Base URL + "/logout"
Common Parameters
The following common parameters are required for all Server-Side Actions:
Parameter Required Description __oe Yes On Error, a relative URL which is executed when an error occurs __os Yes On Success, a relative URL which is executed when a successful action is executed. Example URL for __os and __oe will be "pages/home.jsp" or "controller/com/platform/{namespace}/{package}/GetRecords" __pc No This is the class that is executed before the action is executed. This can be used for validations before a controller or a server side action is executed. This can be used to execute some code before server side action is executed, when the controller is Platform. __pcm No Method of class identified by __pc, that is executed before the action is executed. This can be used for validations before a controller or a server side action is executed. This can be used to execute some code before server side action is executed, when the controller is Platform.
Login to the site
Performs same behavior as Login. Requires following HTML parameters to be submitted:
- URL
- Syntax: Base URL + "/login"
- Example: https://{yourDomain}/networking/sites/123456/[MySiteName]/login
- Parameters
-
- login
- Username of the user logging in to the site
- password
- Password associated with the username
Register a New User
Used for registering a new site user. Requires following HTML parameters to be submitted.
- URL
- Syntax: Base URL + "/register"
- Example: https://{yourDomain}/networking/sites/123456/[siteName]/register
- Parameters
-
- first_name
- First Name of the user
- last_name
- Last Name of the user
- Email of the user
- username
- Username of the user
- password
- Password of the user
- password2
- Password of the user for confirmation
- custom_security_question
- Security question of the user, in case the user forgets the password
- security_answer
- Security answer in case the user forgets the password
Change Password
Used for changing user's password. The user is required to be logged in for this action to take place.
- URL
- Syntax: Base URL + "/change_password"
- Example: https://{yourDomain}/networking/sites/123456/[siteName]/change_password
- Parameters
-
- old_password
- Old password of the user
- password
- New password of the user
- password2
- New password of the user, for confirmation
Update Profile
Used for updating user's profile. The user is required to be logged in for this action to take place.
- URL
- Syntax: Base URL + "/update_profile"
- Example: https://{yourDomain}/networking/sites/123456/[siteName]/update_profile
- Parameters
-
- first_name
- First Name of the user
- last_name
- Last Name of the user
- Email of the user
- street
- Street part of the user's address
- city
- City part of the user's address
- state
- State part of the user's address
- zip
- Zip part of the user's address
- country
- Country part of the user's address
- company
- Company of the user
- title
- title of the user
- division
- Division of the user. Generally used for different departments within a company
- phone
- Phone number of the user
- fax
- Fax number of the user
- mobile
- Mobile number of the user
- custom_security_question
- Security Question in case user forgets the password
- security_answer
- Security Answer in case user forgets the password
Validate the Security Question
Used for validating the Security Question entered by the user. This action is particularly used for the Forgot My Password use case.
- URL
- Syntax: Base URL + "/validate_security_question"
- Example: https://{yourDomain}/networking/sites/123456/[siteName]/validate_security_question
- Parameters
-
- username
- Username of the user
- custom_security_question
- Security Question, in case user forgot the password
- security_answer
- Security Answer, in case user forgot the password
Reset Password
Used for resetting user's password. This action is particularly used for forgot password use case.
- URL
- Syntax: Base URL + "/reset_password"
- Example: https://{yourDomain}/networking/sites/123456/[siteName]/reset_password
- Parameters
-
- password
- new password of the user
- password2
- new password of the user for confirmation
Manage Objects
Used to add/update/delete a record in a Custom Object.
- URL
- Syntax: Base URL + "/service"
- Example: https://{yourDomain}/networking/sites/123456/[siteName]/service
- Parameters
-
- action
- action is one of add/update/delete for a custom object.
- object
- Name/Id of the object user wants to take action upon.
- [fieldName]
- Any field that is part of the object. Field list is same as that is being used for Java APIs. Please refer to the Java API documentation on how to retrieve the field names. For update and delete operation, id is the required attribute.
Download File
Used for downloading a file for an id. It can download any document that is uploaded in the Documents tag.
- URL
- Syntax: Base URL + "/download_file"
- Example: https://{yourDomain}/networking/sites/123456/[siteName]/download_file
- Parameters
-
- id
- id of the file that is to be downloaded
- Learn more: Tags
Logout from the Site
Used for logging out from the Site.
- URL
- Syntax: Base URL + "/logout"
- Example: https://{yourDomain}/networking/sites/123456/[siteName]/logout
- Parameters
-
- None
- Learn more: Tags