Endpoint:/sites/status
Returns the current status of all sites
-
GET
Method & URL
GET https://[server URL]:[port]/admin/v1/sites/status
GET Body Sample
Copy
### GET SITE ###
# @name siteList
GET https://{{host}}/admin/v1/sites/status HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
GET Response Body Sample
Copy
{"info":[{"nodeName":"DY-Win2019-1a","sites":[{"DMZConnected":false,"activity":{"activeClientDownloadBytesPerSecond":0,
"activeClientDownloadCount":0,"activeClientUploadBytesPerSecond":0,"activeClientUploadCount":0,
"activeServerDownloadBytesPerSecond":0,"activeServerDownloadCount":0,"activeServerUploadBytesPerSecond":0,
"activeServerUploadCount":0,"connectedUserCount":0,"runningAWTaskCount":0,"runningEventRuleCount":0},"id":
"5ceae6e3-11b1-40c6-b4e4-3078a8e88a35","lastUserLoginTime":0,"name":"MySite","startTime":1659543775,"state":"Running"}]}]
}
GET PowerShell Sample
Copy
# Get all sites
Write-Output "Site"
Write-Output "----"
$siteList = Invoke-RestMethod -Uri "$baseURL/v1/sites/status" -Method 'GET' -Headers $authHeader
Write-Output $siteList | ConvertTo-Json
foreach ($site in $siteList.data)
{
Write-Output ("Site $($site.id): $($site.attributes.name)")
}