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 Forums in FreshDesk


Overview

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

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

OperationDescription

createForum

Creates a new forum.

getForumRetrieves a particular forum.
updateForumUpdates a particular forum.

Operation details

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

Creates a new forum

The createForum operation creates a new forum.

createForum
<freshdesk.createForum>
    <name>{$ctx:name}</name>
    <categoryId>{$ctx:categoryId}</categoryId>
    <forumType>{$ctx:forumType}</forumType>
    <forumVisibility>{$ctx:forumVisibility}</forumVisibility>
    <companyIds>{$ctx:companyIds}</companyIds>
    <description>{$ctx:description}</description>
</freshdesk.createForum>
Properties
  • name: Name of the forum.
  • categoryId: ID of the category to which this forum belongs.
  • forumType: Denotes the type of forum.
  • forumVisibility: Denotes the visibility level of the forum.
  • companyIds: This property is an array of those company IDs.
  • description: Description of the forum.
  Sample request

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

Sample Request for createForum
{
	"apiUrl": "https://wso2yasho.freshdesk.com",
    "apiKey": "SODsQllHr0NicsiRpRWw",
	"apiVersion": "v2",
	"name": "forumName",
    "forumType": 2,
    "categoryId": "19000010655",
    "forumVisibility": 4,
    "description": "Description of Forum",
    "companyIds": ""
}

 

Retrieving a forum

The getForum operation retrieves details of a specific forum.

getForum
<freshdesk.getForum>
    <forumId>{$ctx:forumId}</forumId>
</freshdesk.getForum>
Properties
  • forumId: The unique identifier of the forum.
  Sample request

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

Sample Request for the getForum
{
	"apiUrl": "https://wso2yasho.freshdesk.com",
    "apiKey": "SODsQllHr0NicsiRpRWw",
	"apiVersion": "v2",
	"forumId":"19000041294"
}

 

Updates a particular forum.

The updateForum operation updates a particular forum.

updateForum
<freshdesk.updateForum>
    <forumId>{$ctx:forumId}</forumId>
    <name>{$ctx:name}</name>
    <forumCategoryId>{$ctx:forumCategoryId}</forumCategoryId>
    <forumType>{$ctx:forumType}</forumType>
    <forumVisibility>{$ctx:forumVisibility}</forumVisibility>
    <companyIds>{$ctx:companyIds}</companyIds>
    <description>{$ctx:description}</description>
</freshdesk.updateForum>
 
Properties
 
  • name: Name of the forum.
  • forumId: ID f the forum.
  • forumCategoryId: ID of the category to which this forum belongs.
  • forumType: Denotes the type of forum.
  • forumVisibility: Denotes the visibility level of the forum.
  • companyIds: This property is an array of those company IDs.
  • description: Description of the forum.

  Sample request

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

Sample Request for updateForum
{
	"apiUrl": "https://wso2yasho.freshdesk.com",
    "apiKey": "SODsQllHr0NicsiRpRWw",
	"apiVersion": "v2",
	"forumId": "19000041294",
    "name": "forumNameUpdate",
    "forumType": 2,
    "forumCategoryId": "19000010655",
    "forumVisibility": 4,
    "description": "Description of Forum Update",
    "companyIds": ""
}

 

Sample configuration

Following is a sample proxy service that illustrates how to connect to FreshDesk with the init operation and use the createForum operation. The sample request for this proxy can be found in the createForum sample request.

Sample Proxy
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="freshdesk_createForum"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence onError="faultHandlerSeq">
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="apiKey" expression="json-eval($.apiKey)"/>
		 <property name="apiVersion" expression="json-eval($.apiVersion)"/>
		 <property name="name" expression="json-eval($.name)"/>
         <property name="description" expression="json-eval($.description)"/>
         <property name="categoryId" expression="json-eval($.categoryId)"/>
		 <property name="forumType" expression="json-eval($.forumType)"/>
		 <property name="forumVisibility" expression="json-eval($.forumVisibility)"/>
		 <property name="companyIds" expression="json-eval($.companyIds)"/>
		 <freshdesk.init>
            <apiKey>{$ctx:apiKey}</apiKey>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
			<apiVersion>{$ctx:apiVersion}</apiVersion>
		 </freshdesk.init>
         <freshdesk.createForum>
    		<name>{$ctx:name}</name>
    		<categoryId>{$ctx:categoryId}</categoryId>
   			<forumType>{$ctx:forumType}</forumType>
    		<forumVisibility>{$ctx:forumVisibility}</forumVisibility>
    		<companyIds>{$ctx:companyIds}</companyIds>
    		<description>{$ctx:description}</description>
		</freshdesk.createForum>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>