Endpoint: /sites/{siteID}/ftps
Returns and update the FTP(s) settings
-
GET
-
PATCH
Method & URL
GET https://[server URL]:[port]/admin/v2/sites/{siteId}/ftps
GET Body Sample
Copy
### GET Site FTP(s) Settings ###
GET https://{{host}}/admin/v2/sites/{{Siteid}}/ftps/ HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
GET Response Body Sample
Copy
{
"data": {
"type": "site",
"id": "892b16dc-24a8-473f-a74e-c597b824c879",
"attributes": {
"ftp": {
"enabled": false,
"port": 21
},
"explicitFtps": {
"enabled": true,
"port": 21
},
"implicitFtps": {
"enabled": true,
"port": 990
},
"ftpConfig": {
"enableClearCommandChannel": false,
"enableFtpClientAntiTimeout": true,
"enableIntegrityChecking": true,
"enableMultiPartTransfers": true,
"enableSiteToSiteTransfer": false,
"enableUnprotectedDataChannel": false,
"enableUtf8Encoding": false,
"messageOverride": {
"connectionMsg": "EFT Login - %DATE% %TIME% - Please enter valid credentials to continue",
"userLimitReachedMsg": "",
"quitSessionMsg": ""
},
"passiveMode": {
"enabled": false,
"value": {
"ipAddress": "0.0.0.0",
"portRangeFrom": 28000,
"portRangeTo": 30000
}
}
}
}
},
"links": {
"self": "/admin/v2/sites/892b16dc-24a8-473f-a74e-c597b824c879/ftps"
}
}
GET PowerShell Sample
Copy
### GET Site FTP(S) Settings###
### User must obtain the SiteID from Get Sites
Write-Output "Site FTP(S) Settings"
Write-Output "----"
#$siteID = Enter SiteID here
$siteList = Invoke-RestMethod -Uri "$baseURL/v2/sites/$siteID/ftps" -Method 'GET' -Headers $authHeader
Write-Output $siteList | ConvertTo-Json
Method & URL
PATCH https://[server URL]:[port]/admin/v2/sites/{siteId}/general
PATCH Body Sample
Copy
PATCH https://{{host}}/admin/v2/sites/{{Siteid}}/ftps/ HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
{
"data": {
"attributes":{
"ftp": {
"enabled": true,
"port": 10
}
}
}
}
PATCH Response Body Sample
The response will return the same response as the GET request, however, it will now include the updated PATCH request(s).
Copy
{
"data": {
"type": "site",
"id": "892b16dc-24a8-473f-a74e-c597b824c879",
"attributes": {
"ftp": {
"enabled": true,
"port": 10
},
"explicitFtps": {
"enabled": true,
"port": 10
},
"implicitFtps": {
"enabled": true,
"port": 990
},
"ftpConfig": {
"enableClearCommandChannel": false,
"enableFtpClientAntiTimeout": true,
"enableIntegrityChecking": true,
"enableMultiPartTransfers": true,
"enableSiteToSiteTransfer": false,
"enableUnprotectedDataChannel": false,
"enableUtf8Encoding": false,
"messageOverride": {
"connectionMsg": "EFT Login - %DATE% %TIME% - Please enter valid credentials to continue",
"userLimitReachedMsg": "",
"quitSessionMsg": ""
},
"passiveMode": {
"enabled": false,
"value": {
"ipAddress": "0.0.0.0",
"portRangeFrom": 28000,
"portRangeTo": 30000
}
}
}
}
},
"links": {
"self": "/admin/v2/sites/892b16dc-24a8-473f-a74e-c597b824c879/ftps"
}
}
PATCH PowerShell Sample
Copy
### PATCH FTP(S) Settings###
### User must obtain the SiteID from Get Sites
Write-Output "PATCH FTP(S) Settings"
Write-Output "-----"
$update =
'{
"data": {
"attributes":{
"ftp": {
"enabled": true,
"port": 25
}
}
}
}'
$update = $update | ConvertFrom-Json
$update = $update | ConvertTo-Json -Depth 9
$patchReturn = Invoke-RestMethod -Uri "$baseURL/v2/sites/$siteID/ftps"
-Method 'PATCH' -Headers $authHeader -Body $update