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 Status in Teamwork



Overview

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

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

OperationDescription
createUserStatusCreate a status for a user.
createCurrentUserStatusCreate a status for current user.
updateUserStatusModifies the status of user.
updateCurrentUserStatusModifies the status of current user.
updatePeopleStatusModifies the status of people.
deleteUserStatusDelete a status of user.
deleteCurrentUserStatusDelete a status of  current user.
deletePeopleStatusDelete a status of people.
getUserStatusReturns a single user status.
getCurrentUserStatusRetrieve the status of current user.
getEverybodyStatusRetrieves  the status of everybody.

Operation details

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

Creating a user status

The createUserStatus operation creates a new status of the user.

createUserStatus
<teamwork.createUserStatus>
    <userId>{$ctx:userId}</userId>
    <status>{$ctx:status}</status>
	<notify>{$ctx:notify}</notify>
</teamwork.createUserStatus>
Properties
  • userId: The id of the user.
  • status: The new status of user.
  • notify: Whether notify(yes/no).
Sample Request

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

Sample request for createUserStatus
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "userId":"149195",
  "status": "Status message",
  "notify": "no"
}
Related Teamwork documentation

http://developer.teamwork.com/people-status#create_status

Creating current user status

The createCurrentUserStatus operation creates a new status of the current user.

createCurrentUserStatus
<teamwork.createCurrentUserStatus>
    <status>{$ctx:status}</status>
	<notify>{$ctx:notify}</notify>
</teamwork.createCurrentUserStatus>
Properties
  • status: The new status of user.
  • notify: Whether notify(yes/no).
Sample Request

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

Sample request for createCurrentUserStatus
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "status": "Status message",
  "notify": "no"
}
Related Teamwork documentation

http://developer.teamwork.com/people-status#create_statu

Updating a user status

The updateUserStatus operation updates the status of the user.

updateUserStatus
<teamwork.updateUserStatus>
    <userId>{$ctx:userId}</userId>
    <statusId>{$ctx:statusId}</statusId>
    <status>{$ctx:status}</status>
	<notify>{$ctx:notify}</notify>
</teamwork.updateUserStatus>
Properties
  • userId: The id of the user.
  • statusId: The id of the user status.

  • status: The new status of user.
  • notify: Whether notify(yes/no).
Sample Request

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

Sample request for updateUserStatus
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "userId":"149195",
  "statusId":"29901", 
  "status": "Status message",
  "notify": "no"
}
Related Teamwork documentation

http://developer.teamwork.com/people-status#update_status

Updating current user status

The updateCurrentUserStatus operation updates the status of the current user.

updateCurrentUserStatus
<teamwork.updateCurrentUserStatus>
    <statusId>{$ctx:statusId}</statusId>
    <status>{$ctx:status}</status>
	<notify>{$ctx:notify}</notify>
</teamwork.updateCurrentUserStatus>
Properties
  • statusId: The id of the user status.

  • status: The new status of user.
  • notify: Whether notify(yes/no).
Sample Request

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

Sample request for updateCurrentUserStatus
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "statusId":"29901", 
  "status": "Status message",
  "notify": "no"
}
Related Teamwork documentation

http://developer.teamwork.com/people-status#update_status

Updating the people status

The updatePeopleStatus operation updates the status of the all users.

updatePeopleStatus
<teamwork.updateCurrentUserStatus>
    <statusId>{$ctx:statusId}</statusId>
    <status>{$ctx:status}</status>
	<notify>{$ctx:notify}</notify>
</teamwork.updateCurrentUserStatus>
Properties
  • statusId: The id of the user status.

  • status: The new status of user.
  • notify: Whether notify(yes/no).
Sample Request

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

Sample request for updatePeopleStatus
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "statusId":"29901", 
  "status": "Status message",
  "notify": "no"
}
Related Teamwork documentation

http://developer.teamwork.com/people-status#update_status

Deleting a user status

The deleteUserStatus operation deletes the status of the user.

deleteUserStatus
<teamwork.deleteUserStatus>
    <userId>{$ctx:userId}</userId>
    <statusId>{$ctx:statusId}</statusId>
</teamwork.deleteUserStatus>
Properties
  • userd: The id of the user.

  • statusId: The id of the user status.
Sample Request

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

Sample request for deleteUserStatus
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "userId":"149195", 
  "statusId": "29901"
}
Related Teamwork documentation

http://developer.teamwork.com/people-status#delete_status

Deleting the current user status

The deleteCurrentUserStatus operation deletes the status of the current  user.

deleteCurrentUserStatus
<teamwork.deleteCurrentUserStatus>
    <statusId>{$ctx:statusId}</statusId>
</teamwork.deleteCurrentUserStatus>
Properties
  • statusId: The id of the user status.
Sample Request

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

Sample request for deleteCurrentUserStatus
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "statusId": "29901"
}
Related Teamwork documentation

http://developer.teamwork.com/people-status#delete_status

Deleting the people status

The deletePeopleStatus operation deletes the status of the users.

deletePeopleStatus
<teamwork.deletePeopleStatus>
    <statusId>{$ctx:statusId}</statusId>
</teamwork.deletePeopleStatus>
Properties
  • statusId: The id of the user status.
Sample Request

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

Sample request for deletePeopleStatus
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "statusId": "29901"
}
Related Teamwork documentation

http://developer.teamwork.com/people-status#delete_status

Retrieving  a user status

The getUserStatus operation retrieves the status of a user.

getUserStatus
<teamwork.getUserStatus>
    <statusId>{$ctx:statusId}</statusId>
</teamwork.getUserStatus>
Properties
  • userId: The id of the user.
Sample Request

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

Sample request for getUserStatus
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "userId": "149195"
}
Related Teamwork documentation

http://developer.teamwork.com/people-status#retrieve_a_person

Retrieving  current user status

The getCurrentUserStatus operation retrieves the status of the current user.

getCurrentUserStatus
<teamwork.getCurrentUserStatus/>
Sample Request

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

Sample request for getCurrentUserStatus
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling"
}
Related Teamwork documentation

http://developer.teamwork.com/people-status#retrieve_a_person

Retrieving people status

The getPeopleStatus operation retrieves the status of the all users.

getEverybodyStatus
<teamwork.getEverybodyStatus/>
Sample Request

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

Sample request for getEverybodyStatus
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling"
}
Related Teamwork documentation

http://developer.teamwork.com/people-status#retrieve_everybod

Sample configuration

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

Sample proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="tw_createUserStatus"
       transports="https http"
       startOnLoad="true"
       trace="disable">
   <description/>
   <target>
      <inSequence>
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="apiKey" expression="json-eval($.apiKey)"/>
         <property name="userId" expression="json-eval($.userId)"/>
         <property name="status" expression="json-eval($.status)"/>
         <property name="notify" expression="json-eval($.notify)"/>
         <teamwork.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiKey>{$ctx:apiKey}</apiKey>
         </teamwork.init>
         <teamwork.createUserStatus>
            <userId>{$ctx:userId}</userId>
            <status>{$ctx:status}</status>
            <notify>{$ctx:notify}</notify>
         </teamwork.createUserStatus>
         <respond/>
      </inSequence>
      <outSequence/>
      <faultSequence/>
   </target>
</proxy>