Documentation

/customportlets/{templateId} [PATCH]

ThoughtFarmer REST API Method: /customportlets/{templateId} [PATCH]

Update the template data for a custom portlet. This is applied as a partial update (PATCH), as such properties not provided will remain unchanged.
 
URL:
http://yourserver.com/api/customportlets/{templateId}

Response Formats:
JSON, XML

HTTP Method(s):
PATCH
 
Requires Authentication:
true, user making call must pass a valid token parameter

Parameters:

Parameter Type Description 
token string Required. A valid token authentication parameter
templateId int Required. The portlet template id.

Response Status Codes:
200 - Success
401 - Token parameter is invalid
403 - Insufficient permissions to manage custom portlets

Example request
PATCH http://yourserver.com/api/customportlets/641
  Authorization: {token}
Content-Type: application/json
{
    "serverTemplate": "<div>UPDATED_SERVER_TEMPLATE</div>"
}
{
    "portletTemplateId": 1,
    "serverTemplate": "<div>UPDATED_SERVER_TEMPLATE</div>",
    "clientTemplate": "<p>CLIENT_TEMPLATE</p>",
    "styleTemplate": ".my-element { display: 'block'; }",
    "isCurrent": true
}