This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Users
Overview
The following operations allow you to work with Users. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with Users, see Sample configuration .
For more details click Users.
Operation | Description |
---|---|
getCurrentUser | Retrieves the details of the current user . |
getAllUsers | Retrieves all Users' public details. |
getAUser | Retrieves the details of specified user id. |
updateAUser | Updates details of a user associated with the specified user id. |
Operation Details
This section provides further details on the operations related to Users.
Get Current User
The getCurrentUser
operation retrieves the information of current user.
<eloquaStandardAPI.getCurrentUser> <depth>Complete</depth> <extensions></extensions> </eloquaStandardAPI.getCurrentUser>
properties
depth
   :extensions
:
Sample request
Following is a sample REST/JSON request that can be handled by the getCurrentUser
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "depth":"Complete" }
Get All Users
The getAllUsers
operation retrieves all users' details.
<eloquaStandardAPI.getAllUsers> <count>2</count> <depth>1</depth> <search></search> <page>1</page> <orderBy></orderBy> <lastUpdatedAt>1426066807</lastUpdatedAt> <extensions></extensions> </eloquaStandardAPI.getAllUsers>
properties
count        :
The number of results in a page to display. This must me in between 1 and 1000.depth
    :search
       :page
         :orderBy
   :lastUpdatedAt
:extensions
   :
Sample Request
Following is a sample REST/JSON request that can be handled by getAllUsers
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "count":2, "page":1, "lastUpdatedAt":1426066807, "depth":"Complete" }
Get A User
The getAUser
operation retrieves the details of a user details associated with the specified user id.
<eloquaStandardAPI.getAUser> <userId>10</userId> <depth>Complete</depth> <extensions></extensions> </eloquaStandardAPI.getAUser>
properties
userId    :
Unique identifier of the user.depth
   :extensions
:
Sample request
Following is a sample REST/JSON request that can be handled by the getAUser
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "userId":"1", "depth":"Complete" }
Update A User
The updateAUser
operation updates the user details associated with the specified user id.
<eloquaStandardAPI.updateAUser> <name>new user</name> <userId>10</userId> <loginName>iamcool</loginName> <company>my company</company> <emailAddress>iamcoolmail@gmail.com</emailAddress> <preferences>{"type": "UserPreferences","isMasterViewDocked": "false","timezoneId": "64"}</preferences> <typePermissions>[{"type": "TypePermission","objectType": "Campaign","permissions": {"type": "TypePermissions","create": "true","read": "true"}},{"type": "TypePermission","objectType": "Email","permissions": {"type": "TypePermissions","create": "true","read": "true"}}]</typePermissions> <capabilities>["manageStrictWebTracking", "mailer.updateContacts"]</capabilities> <betaAccess>["chatter_inside", "sfdc_sso", "sfdcidp"]</betaAccess> <loggedInAt>1297278692</loggedInAt> <defaultContactViewId>1</defaultContactViewId> <defaultAccountViewId>1</defaultAccountViewId> <interfacePermissions>[{"type": "InterfacePermission","interfaceCode": "campaigns","nestedInterfacePermissions":[{"type": "InterfacePermission","interfaceCode": "campaigns","nestedInterfacePermissions":[{"type": "InterfacePermission","interfaceCode": "campaigns"}]}]}]</interfacePermissions> <productPermissions>[{"type": "ProductPermission","productCode": "EngageiPad"},{"type": "ProductPermission","productCode": "EngageWeb"}]</productPermissions> </eloquaStandardAPI.updateAUser>
properties
userId              :
Unique identifier of the user.name                :
The name of the user to update the name as it is.loginName           :
Username of the user to log in.company             :
Company name of the user.emailAddress        :Â
Email address of the user.loggedInAt
          :preferences
         :typePermissions     :
List of type permission objects.capabilities
    :betaAccess
defaultContactViewId :
The default view id of Contacts.defaultAccountViewId :
The default view id of Accounts.interfacePermissions :
List of interfacePermission objects.productPermissions  :
List of productPermission objects.
Sample request
Following is a sample REST/JSON request that can be handled by the updateAUser
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "name":"new user", "userId":"10", "loginName":"iamcool", "company":"my company", "emailAddress":"iamcoolmail@gmail.com", "loggedInAt":1297278692, "preferences":{"type": "UserPreferences","isMasterViewDocked": "false","timezoneId": "64"}, "typePermissions":[{"type": "TypePermission","objectType": "Campaign","permissions": {"type": "TypePermissions","create": "true","read": "true"}},{"type": "TypePermission","objectType": "Email","permissions": {"type": "TypePermissions","create": "true","read": "true"}}], "capabilities":["manageStrictWebTracking", "mailer.updateContacts"], "betaAccess":["chatter_inside", "sfdc_sso", "sfdcidp"], "defaultContactViewId":"1", "defaultAccountViewId":"1", "interfacePermissions":[{"type": "InterfacePermission","interfaceCode": "campaigns","nestedInterfacePermissions":[{"type": "InterfacePermission","interfaceCode": "campaigns","nestedInterfacePermissions":[{"type": "InterfacePermission","interfaceCode": "campaigns"}]}]}], "productPermissions":[{"type": "ProductPermission","productCode": "EngageiPad"},{"type": "ProductPermission","productCode": "EngageWeb"}] }
Sample Configuration
Following is a sample proxy service that illustrates how to connect to Eloqua Standard API with the init
operation to use the getAllUsers
operation. The sample request for this proxy can be found in getAllUsers
sample request . You can use this sample as a template for using other operations in this category.
<proxy xmlns="http://ws.apache.org/ns/synapse" name="eloqua_getAllUsers" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="siteName" expression="json-eval($.siteName)"/> <property name="username" expression="json-eval($.username)"/> <property name="password" expression="json-eval($.password)"/> <property name="count" expression="json-eval($.count)"/> <property name="depth" expression="json-eval($.depth)"/> <property name="search" expression="json-eval($.search)"/> <property name="page" expression="json-eval($.page)"/> <property name="orderBy" expression="json-eval($.orderBy)"/> <property name="lastUpdatedAt" expression="json-eval($.lastUpdatedAt)"/> <property name="extensions" expression="json-eval($.extensions)"/> <eloquaStandardAPI.init> <siteName>{$ctx:siteName}</siteName> <username>{$ctx:username}</username> <password>{$ctx:password}</password> </eloquaStandardAPI.init> <eloquaStandardAPI.getAllUsers> <count>{$ctx:count}</count> <depth>{$ctx:depth}</depth> <search>{$ctx:search}</search> <page>{$ctx:page}</page> <orderBy>{$ctx:orderBy}</orderBy> <lastUpdatedAt>{$ctx:lastUpdatedAt}</lastUpdatedAt> <extensions>{$ctx:extensions}</extensions> </eloquaStandardAPI.getAllUsers> <respond/> </inSequence> <outSequence/> <faultSequence/> </target> <description/> </proxy>