/
Working with People in ActiveCollab

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 People in ActiveCollab

Overview

The following operations allow you to work with people. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with people, see Sample configuration.

OperationDescription
getUserRetrieves details of an existing user.
createUserCreates a new user.
listUsersRetrieves details of all user.
getAllUsers

Retrieves details of users including archived and trashed.

deleteUserDeletes an existing user.
reactivateUserReactivates an user.

Operation details

This section provides further details on the operations related to people.

 Retrieving an user details

The getUser operation retrieves details of an particular user.

getUser
<activecollab.getUser>
    <userId>{$ctx:userId}</userId>
</activecollab.getUser> 
Properties
  • userId: Required- The ID of the user to get details.
Sample request

Following is a sample REST/JSON request that can be handled by the getUser operation.

Sample Request for getUser
{
	"email":"emailId@gmail.com",
	"password":"1234",
	"apiVersion":"v1",
    "clientVendor":"XYZ",
    "clientName":"ABC",
    "blocking":"false",
    "userId":"10"
} 

Creating a new user

The createUser operation creates new user in ActiveCollab.

createUser
<activecollab.createUser>
    <type>{$ctx:type}</type>
    <userEmail>{$ctx:userEmail}</userEmail>
    <userPassword>{$ctx:userPassword}</userPassword>
    <companyId>{$ctx:companyId}</companyId>
    <customPermissions>{$ctx:customPermissions}</customPermissions>
</activecollab.createUser>
Properties
  • type: Required- The user type (E.g. Member).
  • userEmail: Required- The email address of the user.
  • userPassword: The password for the user.
  • companyId: The ID of the company.
  • customPermissions: The list of the permissions for the user (E.g. can_manage_projects).

Sample request

Following is a sample REST/JSON request that can be handled by the createUser operation.

Sample Request for createUser
{
	"email":"emailId@gmail.com",
	"password":"1234",
	"apiVersion":"v1",
    "clientVendor":"XYZ",
    "clientName":"ABC",
    "blocking":"false",
    "type":"Member",
    "userEmail":"userEmail@gmail.com",
    "userPassword":"1234",
    "companyId":"2",
    "customPermissions":[
        "can_manage_projects"
    ]
} 

 Retrieving all users details

The listUsers operation retrieves details of all users in ActiveCollab.

listUsers
<activecollab.listUsers/>

Sample request

Following is a sample REST/JSON request that can be handled by the  listUsers  operation.

Sample Request for listUsers
{
	"email":"emailId@gmail.com",
	"password":"1234",
	"apiVersion":"v1",
    "clientVendor":"XYZ",
    "clientName":"ABC",
    "blocking":"false"
} 

 Retrieving all users details including archived and trashed

The  getAllUsers  operation retrieves details including archived and trashed of all users in ActiveCollab.

getAllUsers
<activecollab.getAllUsers/>

Sample request

Following is a sample REST/JSON request that can be handled by the  getAllUsers  operation.

Sample Request for getAllUsers
{
	"email":"emailId@gmail.com",
	"password":"1234",
	"apiVersion":"v1",
    "clientVendor":"XYZ",
    "clientName":"ABC",
    "blocking":"false"
} 

 Deleting an user

The  deleteUser  operation deletes an existing user.

deleteUser
<activecollab.deleteUser>
    <userId>{$ctx:userId}</userId>
</activecollab.deleteUser>
Properties
  • userId: Required- The ID of the user to delete.

Sample request

Following is a sample REST/JSON request that can be handled by the  deleteUser  operation.

Sample Request for deleteUser
{
	"email":"emailId@gmail.com",
	"password":"1234",
	"apiVersion":"v1",
    "clientVendor":"XYZ",
    "clientName":"ABC",
    "blocking":"false",
    "userId":"10"
} 

 Reactivating an user

The reactivateUser operation reactivates a deleted user.

reactivateUser
<activecollab.reactivateUser>
    <userId>{$ctx:userId}</userId>
</activecollab.reactivateUser>
Properties
  • userId: Required- The ID of the deleted user to reactivate.

Sample request

Following is a sample REST/JSON request that can be handled by the  reactivateUser  operation.

Sample request for reactivateUser
{
	"email":"emailId@gmail.com",
	"password":"1234",
	"apiVersion":"v1",
    "clientVendor":"XYZ",
    "clientName":"ABC",
    "blocking":"false",
    "userId":"10"
} 

Sample configuration

Following is a sample proxy service that illustrates how to connect to ActiveCollab with the init operation and use the createUser operation. The sample request for this proxy can be found in createUser  sample request. You can use this sample as a template for using other operations in this category.

Sample Proxy
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="activecollab_createUser"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence>
         <property name="email" expression="json-eval($.email)"/>
         <property name="password" expression="json-eval($.password)"/>
         <property name="apiVersion" expression="json-eval($.apiVersion)"/>
         <property name="clientVendor" expression="json-eval($.clientVendor)"/>
         <property name="clientName" expression="json-eval($.clientName)"/>
         <property name="type" expression="json-eval($.type)"/>
         <property name="userEmail" expression="json-eval($.userEmail)"/>
         <property name="userPassword" expression="json-eval($.userPassword)"/>
         <property name="customPermissions" expression="json-eval($.customPermissions)"/>
         <property name="companyId" expression="json-eval($.companyId)"/>
         <activecollab.init>    
            <email>{$ctx:email}</email>    
            <password>{$ctx:password}</password>
            <apiVersion>{$ctx:apiVersion}</apiVersion>
            <clientVendor>{$ctx:clientVendor}</clientVendor>
            <clientName>{$ctx:clientName}</clientName>
            <blocking>{$ctx:blocking}</blocking>
         </activecollab.init>
         <activecollab.createUser>
            <type>{$ctx:type}</type>
            <userEmail>{$ctx:userEmail}</userEmail>
            <userPassword>{$ctx:userPassword}</userPassword>
            <companyId>{$ctx:companyId}</companyId>
            <customPermissions>{$ctx:customPermissions}</customPermissions>
         </activecollab.createUser>
         <respond/>
      </inSequence>
   </target>
   <description/>
</proxy>

 


Related content