cloudPcReports:getConnectionQualityReports
本文内容
命名空间:microsoft.graph
重要
Microsoft Graph /beta
版本下的 API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
获取给定时间段内当前租户内所有设备的总体连接质量报告,包括平均往返时间 (P50) 、平均可用带宽和 UDP 连接百分比等指标。 还获取其他实时指标,例如上次连接往返时间、上次连接客户端 IP、上次连接网关和上次连接协议。
此 API 可用于以下国家级云部署 。
全局服务
美国政府 L4
美国政府 L5 (DOD)
由世纪互联运营的中国
✅
❌
❌
❌
权限
为此 API 选择标记为最低特权的权限。 只有在应用需要它时 ,才使用更高的特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型 。 要了解有关这些权限的详细信息,请参阅 权限参考 。
权限类型
最低特权权限
更高特权权限
委派(工作或学校帐户)
CloudPC.Read.All
CloudPC.ReadWrite.All
委派(个人 Microsoft 帐户)
不支持。
不支持。
应用程序
CloudPC.Read.All
CloudPC.ReadWrite.All
HTTP 请求
POST /deviceManagement/virtualEndpoint/reports/getConnectionQualityReports
名称
说明
Authorization
持有者 {token}。 必填。 详细了解 身份验证和授权 。
Content-Type
application/json. 必需。
请求正文
在请求正文中,提供参数的 JSON 表示形式。
下表显示了可用于此操作的参数。
参数
类型
说明
filter
String
OData $filter
语法。 支持的筛选器包括:and
、、or
、lt
le
、gt
、 ge
和 eq
。
groupBy
字符串集合
指定如何对报表进行分组。 如果使用,则必须具有与 select 参数相同的内容。
orderBy
字符串集合
指定报表的排序方式。
search
String
指定要搜索的字符串。
select
字符串集合
OData $select
语法。 报表的选定列。
skip
Int32
要跳过的记录数。
top
Int32
要返回的排名靠前的记录数。
响应
如果成功,此操作将在200 OK
响应正文中返回响应代码和Stream。
示例
请求
以下示例显示了一个请求。
POST https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/reports/getConnectionQualityReports
Content-Type: application/json
Content-length: 200
{
"filter": "EventDateTime gt datetime'2023-04-16T07:40:41.694Z'",
"search": "",
"select": [
"CloudPcId",
"ManagedDeviceName",
"AvgRoundTripTimeInMsP50",
"LastConnectionRoundTripTimeInMs",
"AvgAvailableBandwidthInMBpsP50",
"LastConnectionAvailableBandWidthInMSps",
"AvgRemoteSignInTimeInSecP50",
"UDPConnectionPercentage",
"LastConnectionGateway",
"LastConnectionProtocol",
"EventDateTime"
],
"skip": "0",
"top": "25",
"orderBy": []
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetConnectionQualityReports;
var requestBody = new GetConnectionQualityReportsPostRequestBody
{
Filter = "EventDateTime gt datetime'2023-04-16T07:40:41.694Z'",
Search = "",
Select = new List<string>
{
"CloudPcId",
"ManagedDeviceName",
"AvgRoundTripTimeInMsP50",
"LastConnectionRoundTripTimeInMs",
"AvgAvailableBandwidthInMBpsP50",
"LastConnectionAvailableBandWidthInMSps",
"AvgRemoteSignInTimeInSecP50",
"UDPConnectionPercentage",
"LastConnectionGateway",
"LastConnectionProtocol",
"EventDateTime",
},
Skip = 0,
Top = 25,
OrderBy = new List<string>
{
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.DeviceManagement.VirtualEndpoint.Reports.GetConnectionQualityReports.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta device-management virtual-endpoint reports get-connection-quality-reports post --body '{\
"filter": "EventDateTime gt datetime'2023-04-16T07:40:41.694Z'",\
"search": "",\
"select": [\
"CloudPcId",\
"ManagedDeviceName",\
"AvgRoundTripTimeInMsP50",\
"LastConnectionRoundTripTimeInMs",\
"AvgAvailableBandwidthInMBpsP50",\
"LastConnectionAvailableBandWidthInMSps",\
"AvgRemoteSignInTimeInSecP50",\
"UDPConnectionPercentage",\
"LastConnectionGateway",\
"LastConnectionProtocol",\
"EventDateTime"\
],\
"skip": "0",\
"top": "25",\
"orderBy": []\
}\
'
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphdevicemanagement "github.com/microsoftgraph/msgraph-beta-sdk-go/devicemanagement"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphdevicemanagement.NewGetConnectionQualityReportsPostRequestBody()
filter := "EventDateTime gt datetime'2023-04-16T07:40:41.694Z'"
requestBody.SetFilter(&filter)
search := ""
requestBody.SetSearch(&search)
select := []string {
"CloudPcId",
"ManagedDeviceName",
"AvgRoundTripTimeInMsP50",
"LastConnectionRoundTripTimeInMs",
"AvgAvailableBandwidthInMBpsP50",
"LastConnectionAvailableBandWidthInMSps",
"AvgRemoteSignInTimeInSecP50",
"UDPConnectionPercentage",
"LastConnectionGateway",
"LastConnectionProtocol",
"EventDateTime",
}
requestBody.SetSelect(select)
skip := int32(0)
requestBody.SetSkip(&skip)
top := int32(25)
requestBody.SetTop(&top)
orderBy := []string {
}
requestBody.SetOrderBy(orderBy)
graphClient.DeviceManagement().VirtualEndpoint().Reports().GetConnectionQualityReports().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.devicemanagement.virtualendpoint.reports.getconnectionqualityreports.GetConnectionQualityReportsPostRequestBody getConnectionQualityReportsPostRequestBody = new com.microsoft.graph.beta.devicemanagement.virtualendpoint.reports.getconnectionqualityreports.GetConnectionQualityReportsPostRequestBody();
getConnectionQualityReportsPostRequestBody.setFilter("EventDateTime gt datetime'2023-04-16T07:40:41.694Z'");
getConnectionQualityReportsPostRequestBody.setSearch("");
LinkedList<String> select = new LinkedList<String>();
select.add("CloudPcId");
select.add("ManagedDeviceName");
select.add("AvgRoundTripTimeInMsP50");
select.add("LastConnectionRoundTripTimeInMs");
select.add("AvgAvailableBandwidthInMBpsP50");
select.add("LastConnectionAvailableBandWidthInMSps");
select.add("AvgRemoteSignInTimeInSecP50");
select.add("UDPConnectionPercentage");
select.add("LastConnectionGateway");
select.add("LastConnectionProtocol");
select.add("EventDateTime");
getConnectionQualityReportsPostRequestBody.setSelect(select);
getConnectionQualityReportsPostRequestBody.setSkip(0);
getConnectionQualityReportsPostRequestBody.setTop(25);
LinkedList<String> orderBy = new LinkedList<String>();
getConnectionQualityReportsPostRequestBody.setOrderBy(orderBy);
graphClient.deviceManagement().virtualEndpoint().reports().getConnectionQualityReports().post(getConnectionQualityReportsPostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const stream = {
filter: 'EventDateTime gt datetime\'2023-04-16T07:40:41.694Z\'',
search: '',
select: [
'CloudPcId',
'ManagedDeviceName',
'AvgRoundTripTimeInMsP50',
'LastConnectionRoundTripTimeInMs',
'AvgAvailableBandwidthInMBpsP50',
'LastConnectionAvailableBandWidthInMSps',
'AvgRemoteSignInTimeInSecP50',
'UDPConnectionPercentage',
'LastConnectionGateway',
'LastConnectionProtocol',
'EventDateTime'
],
skip: '0',
top: '25',
orderBy: []
};
await client.api('/deviceManagement/virtualEndpoint/reports/getConnectionQualityReports')
.version('beta')
.post(stream);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\GetConnectionQualityReportsPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new GetConnectionQualityReportsPostRequestBody();
$requestBody->setFilter('EventDateTime gt datetime\'2023-04-16T07:40:41.694Z\'');
$requestBody->setSearch('');
$requestBody->setSelect(['CloudPcId', 'ManagedDeviceName', 'AvgRoundTripTimeInMsP50', 'LastConnectionRoundTripTimeInMs', 'AvgAvailableBandwidthInMBpsP50', 'LastConnectionAvailableBandWidthInMSps', 'AvgRemoteSignInTimeInSecP50', 'UDPConnectionPercentage', 'LastConnectionGateway', 'LastConnectionProtocol', 'EventDateTime', ]);
$requestBody->setSkip(0);
$requestBody->setTop(25);
$requestBody->setOrderBy([ ]);
$graphServiceClient->deviceManagement()->virtualEndpoint()->reports()->getConnectionQualityReports()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.DeviceManagement.Actions
$params = @{
filter = "EventDateTime gt datetime'2023-04-16T07:40:41.694Z'"
search = ""
select = @(
"CloudPcId"
"ManagedDeviceName"
"AvgRoundTripTimeInMsP50"
"LastConnectionRoundTripTimeInMs"
"AvgAvailableBandwidthInMBpsP50"
"LastConnectionAvailableBandWidthInMSps"
"AvgRemoteSignInTimeInSecP50"
"UDPConnectionPercentage"
"LastConnectionGateway"
"LastConnectionProtocol"
"EventDateTime"
)
skip = "0"
top = "25"
orderBy = @(
)
}
Get-MgBetaDeviceManagementVirtualEndpointReportConnectionQualityReport -BodyParameter $params
from msgraph import GraphServiceClient
from msgraph.generated.devicemanagement.virtualendpoint.reports.get_connection_quality_reports.get_connection_quality_reports_post_request_body import GetConnectionQualityReportsPostRequestBody
graph_client = GraphServiceClient(credentials, scopes)
request_body = GetConnectionQualityReportsPostRequestBody(
filter = "EventDateTime gt datetime'2023-04-16T07:40:41.694Z'",
search = "",
select = [
"CloudPcId",
"ManagedDeviceName",
"AvgRoundTripTimeInMsP50",
"LastConnectionRoundTripTimeInMs",
"AvgAvailableBandwidthInMBpsP50",
"LastConnectionAvailableBandWidthInMSps",
"AvgRemoteSignInTimeInSecP50",
"UDPConnectionPercentage",
"LastConnectionGateway",
"LastConnectionProtocol",
"EventDateTime",
],
skip = 0,
top = 25,
order_by = [
],
)
await graph_client.device_management.virtual_endpoint.reports.get_connection_quality_reports.post(request_body)
响应
以下示例显示了相应的响应。
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-Type: application/octet-stream
{
"TotalRowCount": 3,
"Schema": [
{
"Column": "CloudPcId",
"PropertyType": "String"
},
{
"Column": "ManagedDeviceName",
"PropertyType": "String"
},
{
"Column": "AvgRoundTripTimeInMsP50",
"PropertyType": "Double"
},
{
"Column": "LastConnectionRoundTripTimeInMs",
"PropertyType": "Double"
},
{
"Column": "AvgAvailableBandwidthInMBpsP50",
"PropertyType": "Double"
},
{
"Column": "LastConnectionAvailableBandWidthInMSps",
"PropertyType": "Double"
},
{
"Column": "AvgRemoteSignInTimeInSecP50",
"PropertyType": "Double"
},
{
"Column": "UDPConnectionPercentage",
"PropertyType": "Double"
},
{
"Column": "LastConnectionGateway",
"PropertyType": "String"
},
{
"Column": "LastConnectionProtocol",
"PropertyType": "String"
},
{
"Column": "EventDateTime",
"PropertyType": "DateTime"
}
],
"Values": [
[
"1", "f5ff445f-7488-40f8-8ab9-ee784a9c1f33", "Cloud PC-Ana Bowman", "110", "90", "0.32", "0.41", "10.15", "0.80", "East US 2", "192.168.1.01", "UDP (STUN)", "2023-04-17T00:00:00Z"
],
[
"1", "f5ff445f-7488-40f8-8ab9-ee784a9c1f33", "Cloud PC-Isabel Bowman", "201", "72", "1.22", "1.7", "10.37", "0.62", "West US 3", "192.168.1.02", "UDP (STUN)", "2023-04-18T00:00:00Z"
],
[
"1", "f5ff445f-7488-40f8-8ab9-ee784a9c1f33", "Cloud PC-Mary Bowman", "213", "200", "1.74", "0.88", "12.35", "0.45", "East US 2", "192.168.1.03", "TCP", "2023-04-19T00:00:00Z"
]
]
}