Endpoint: /experimental/server/templates/{templateName}
Returns and updates the contents of the specified server template.
-
GET
Method & URL
GET HTTPS://{{host}}/admin/experimental/server/templates/{templateName}
GET Body Sample
#GET Server Templates -- ##
GET https://{{host}}/admin/experimental/server/templates/WorkspacesAdminAddedParticipantMsg.html HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
###
GET Response Body Sample
HTTP/1.1 200 OK Date: Mon, 08 Aug 2022 13:17:16 GMT Content-Type: application/vnd.api+json
Content-Length: 370 Cache-Control: no-cache, no-store, must-revalidate Expires: -1
X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block Content-Security-Policy:
default-src 'self' 'unsafe-inline' 'unsafe-eval' data:; Referrer-Policy: no-referrer { "data":
"<html>\r\n<body>\r\n <p>Hello %USER.LOGIN%,</p>\r\n <p>The following <b>Enhanced File Transfer</b>
Workspace has been shared with you: %FOLDER_NAME% (owner: %WS_OWNER_NAME%).</p>\r\n
<p>Please use the following URL to access this Workspace:</p>\r\n <a href=\"%LINK%\">%LINK%</a>
<br/><br/>\r\n \r\n %WS_MESSAGE%<br/><br/>\r\n <hr/>\r\n</body>\r\n</html>" }
GET PowerShell Sample
#####################################
#GET Server Templates -- ##
Write-Output "GET Server Templates Detail"
Write-Output "-------------------------------"
#$siteID = "Enter site ID"
#$TemplateName= "WorkspacesAdminAddedParticipantMsg.html"
$TemplateDetails = Invoke-RestMethod -Uri "$baseURL/experimental/server/templates/WorkspacesAdminAddedParticipantMsg.html" -Method 'GET' -Headers $authHeader
Write-Output $TemplateDetails | ConvertTo-Json -Depth 25
PATCH HTTPS://{{host}}/admin/experimental/server/templates/{templateName}
PATCH Body Sample
###
#PATCH - Update Server template ###
PATCH https://{{host}}/admin/experimental/server/templates/PasswordResetReminderMsg.html HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
{
"data": "<html>\r\n<body>\r\n HELLO USERS %USER.FULL_NAME%,<br>\r\nThe -___API TEST___ password for account:
%USER.LOGIN% will expire in %DAYS_LEFT% days. Please change your password at your earliest convenience.\r\n
Instructions for changing your password via FTP, SFTP, and HTTP/S are provided below for your convenience:<br>
\r\n1. Please enter the following URL into your browser: %SITE.ACCOUNT_MANAGEMENT_URL%<br>\r\n2.
Supply your current password when prompted<br>\r\n3. Enter your new password and confirm<br>\r\n4.
If approved, exit the browser and login as normal<br>\r\n</body>\r\n</html>"
}
PATCH PowerShell Sample
### Update Content of Template###
### Modify Server Template - ###
Write-Output "PATCH Server Template"
Write-Output "---------------------"
$update =
'
{
"data": "Notice: ___PATCH TEST__The SSL certificate: %certid% is set to expire %d% day(s) from now on
%expirationdate%, which may impact operations or communications with the entity associated with this certificate."
}
'
$update = $update | ConvertFrom-Json
$update = $update | ConvertTo-Json -Depth 9
$TemplateDetails = Invoke-RestMethod -Uri "$baseURL/experimental/server/templates/SSLCertExpirationWarning.txt"
-Method 'PATCH' -Headers $authHeader -Body $update