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 Links in Teamwork
Overview
The following operations allow you to work with links. 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.
Operation | Description |
---|---|
updateLink | Modifies a single link. |
deleteLink | Deletes a link. |
getLink | Returns a Link identified by its id. |
getAllLinks | Retrieves all Links. |
getLinksOnProject | Retrieve all the links on a project. |
Operation details
This section provides further details on the operations related to discussions
Updating a link
The updateLink
operation updates a link.
<teamwork.updateLink> <linkId>{$ctx:linkId}</linkId> <name>{$ctx:name}</name> <description>{$ctx:description}</description> <private>{$ctx:private}</private> <code>{$ctx:code}</code> <width>{$ctx:width}</width> <height>{$ctx:height}</height> <categoryId>{$ctx:categoryId}</categoryId> <categoryName>{$ctx:categoryName}</categoryName> <notify>{$ctx:notify}</notify> <openInNewWindow>{$ctx:openInNewWindow}</openInNewWindow> </teamwork.updateLink>
Properties
linkId
: The id of the link.name
: The name of the link.description
: The description of the link.private
: The private status of the link.code
: The valid Embed Code IFrame Code or a URL.width
: The width of the link.height
: The height of the link.categoryId
: The category id of the link.categoryName
: The category name of the link.notify
: The notify ids of the link.openInNewWindow
: Whether open in new window
Sample Request
Following is a sample REST/JSON request that can be handled by the updateLink
operation.
{ "apiUrl":"https://wso2test.teamwork.com/", "apiKey":"clark42ceiling", "linkId":"13236", "name": "teamwork", "description": "The Teamwork website", "private":"0", "code": "http://teamwork.com", "width": "800", "height": "600", "categoryId": "999", "categoryName":"Demo", "notify": "149195", "openInNewWindow": "1" }
Related Teamwork documentation
http://developer.teamwork.com/links#update_a_single_l
Deleting a link
The deleteLink
operation deletes a link.
<teamwork.deleteLink> <linkId>{$ctx:linkId}</linkId> </teamwork.deleteLink>
Properties
linkId
: The id of the link.
Sample Request
Following is a sample REST/JSON request that can be handled by the deleteLink
operation.
{ "apiUrl":"https://wso2test.teamwork.com/", "apiKey":"clark42ceiling", "linkId":"13236" }
Related Teamwork documentation
http://developer.teamwork.com/links#delete_a_single_l
Retrieving a link
The getLink
operation retrieves the link of given id.
<teamwork.getLink> <linkId>{$ctx:linkId}</linkId> </teamwork.getLink>
Properties
linkId
: The id of the link.
Sample Request
Following is a sample REST/JSON request that can be handled by the getLink
operation.
{ "apiUrl":"https://wso2test.teamwork.com/", "apiKey":"clark42ceiling", "linkId":"13236" }
Related Teamwork documentation
http://developer.teamwork.com/links#get_a_single_link
Retrieving all links
The getAllLinks
operation retrieves all the links.
<teamwork.getAllLinks/>
Sample Request
Following is a sample REST/JSON request that can be handled by the getAllLink
s operation.
{ "apiUrl":"https://wso2test.teamwork.com/", "apiKey":"clark42ceiling" }
Related Teamwork documentation
http://developer.teamwork.com/links#list_all_links
Retrieving links on a project
The getLinksOnProject
operation retrieves all the links on a given project id.
<teamwork.getLinksOnProject> <projectId>{$ctx:projectId}</projectId> </teamwork.getLinksOnProject>
Properties
projectId
: The id of the project.
Sample Request
Following is a sample REST/JSON request that can be handled by the getLinksOnProject
operation.
{ "apiUrl":"https://wso2test.teamwork.com/", "apiKey":"clark42ceiling", "projectId":"90538" }
Related Teamwork documentation
http://developer.teamwork.com/links#list_links_on_a_p
Sample configuration
Following is a sample proxy service that illustrates how to connect to Teamwork with the init
operation and use the getLinksOnProject
operation. The sample request for this proxy can be found in getLinksOnProject sample request. You can use this sample as a template for using other operations in this category.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="tw_getLinksOnProject" 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="projectId" expression="json-eval($.projectId)"/> <teamwork.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiKey>{$ctx:apiKey}</apiKey> </teamwork.init> <teamwork.getLinksOnProject> <projectId>{$ctx:projectId}</projectId> </teamwork.getLinksOnProject> <respond/> </inSequence> <outSequence/> <faultSequence/> </target> </proxy>