Endpoint: /sites/{siteId}/metrics
Returns all site metrics for the specified Site ID; To obtain the Site ID a GET request will need to be done against the /sites endpoint prior to making this request.
-
GET
Method & URL
GET https://[server URL]:[port]/admin/v2/sites/{siteid}/metrics
GET Body Sample
Copy
### GET Site Metrics ###
GET https://{{host}}/admin/v2/sites/{{Siteid}}/metrics/ HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
GET Response Body Sample
Copy
{
"data": {
"id": "4d1b02ee-5c9c-4129-bf1d-663534248b3f",
"type": "siteMetrics",
"attributes": {
"name": "MySite6",
"startTime": " 12:00:00 AM",
"isRunning": false,
"isDMZGatewayConnected": false,
"definedUsers": 0,
"disabledUserCount": 0,
"nodes": [
{
"activeClientDownloadBytesPerSecond": 0,
"activeClientDownloadCount": 0,
"activeClientUploadBytesPerSecond": 0,
"activeClientUploadCount": 0,
"activeServerDownloadBytesPerSecond": 0,
"activeServerDownloadCount": 0,
"activeServerUploadBytesPerSecond": 0,
"activeServerUploadCount": 0,
"connectedUserCount": 0,
"name": "WIN-IKTLG8MULV9",
"runningAWTaskCount": 0,
"runningEventRuleCount": 0
}
]
}
},
"links": {
"self": "admin/v2/sites/4d1b02ee-5c9c-4129-bf1d-663534248b3f/metrics"
}
}
GET PowerShell Sample
Copy
### Returns all site Metrics for the specified Site ID ###
### User must obtain the SiteID from Get Sites
Write-Output "Site Metrics"
Write-Output "----"
#$siteID = Enter SiteID here
$siteList = Invoke-RestMethod -Uri "$baseURL/v2/sites/$siteID/metrics" -Method 'GET' -Headers $authHeader
Write-Output $siteList | ConvertTo-Json