Endpoint: /sites/{siteId}/general
Returns and update the site general settings.
-
GET
-
PATCH
Method & URL
GET https://[server URL]:[port]/admin/v2/sites/{siteId}/general
GET Body Sample
Copy
### GET Site General Settings ###
GET https://{{host}}/admin/v2/sites/{{Siteid}}/general/ HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
GET Response Body Sample
Copy
{
"data": {
"id": "892b16dc-24a8-473f-a74e-c597b824c879",
"type": "siteGeneral",
"attributes": {
"overrideVfsCredentials": {
"enabled": false,
"value": {
"login": "",
"password": ""
}
},
"siteRootFolder": "C:\\InetPub\\EFTRoot\\MySite\\"
}
},
"links": {
"self": "/admin/v2/sites/892b16dc-24a8-473f-a74e-c597b824c879/general"
}
}
GET PowerShell Sample
Copy
### GET Site General Settings###
### User must obtain the SiteID from Get Sites
Write-Output "Site General Settings"
Write-Output "----"
#$siteID = Enter SiteID here
$siteList = Invoke-RestMethod -Uri "$baseURL/v2/sites/$siteID/general" -Method 'GET' -Headers $authHeader
Write-Output $siteList | ConvertTo-Json
NOTE: As of EFT 8.1.0 the general REST API endpoint will also return any VFS Site Root folder configuration details when the site root has been configured in the cloud.
Method & URL
PATCH https://[server URL]:[port]/admin/v2/sites/{siteId}/general
PATCH Body Sample
Copy
PATCH https://{{host}}/admin/v2/sites/{{Siteid}}/general/ HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
{
"data": {
"id": "",
"type": "",
"attributes": {
"siteRootFolder": "C:\\InetPub\\EFTRoot\\MySite\\",
"overrideVfsCredentials": {
"enabled": true,
"value": {
"login": "test",
"password": "passwordtest"
}
}
}
}
}
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": {
"id": "892b16dc-24a8-473f-a74e-c597b824c879",
"type": "siteGeneral",
"attributes": {
"overrideVfsCredentials": {
"enabled": true,
"value": {
"login": "test",
"password": "cGFzc3dvcmR0ZXN0"
}
},
"siteRootFolder": "C:\\InetPub\\EFTRoot\\MySite\\"
}
},
"links": {
"self": "/admin/v2/sites/892b16dc-24a8-473f-a74e-c597b824c879/general"
}
}
PATCH PowerShell Sample
Copy
### PATCH Site General Settings###
### User must obtain the SiteID from Get Sites
Write-Output "PATCH Site General Settings"
Write-Output "-----"
$update =
'{
"data": {
"id": "",
"type": "",
"attributes": {
"siteRootFolder": "C:\\InetPub\\EFTRoot\\MySite\\",
"overrideVfsCredentials": {
"enabled": true,
"value": {
"login": "test",
"password": "passwordtest"
}
}
}
}
}'
$update = $update | ConvertFrom-Json
$update = $update | ConvertTo-Json -Depth 9
$patchReturn = Invoke-RestMethod -Uri "$baseURL/v2/sites/$siteID/general"
-Method 'PATCH' -Headers $authHeader -Body $update