Get cloudPcExportJob
Namespace: microsoft.graph
Important
APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Read the properties and relationships of a cloudPcExportJob object.
You can download a report by first creating a new cloudPcExportJob resource to initiate downloading.
Use this GET operation to verify the exportJobStatus property of the cloudPcExportJob resource. The property becomes completed
when the report finishes downloading in the location specified by the exportUrl property.
This API is available in the following national cloud deployments.
Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
---|---|---|---|
✅ | ✅ | ✅ | ❌ |
Permissions
Choose the least privileged permission or permissions to download reports with this API. Delegated access require read access to the report that you need to export. App-only tokens with CloudPC.ReadWrite.All have permission or permissions to download all reports without specific permission. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | CloudPC.ReadWrite.All | Not available. |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | CloudPC.ReadWrite.All | Not available. |
The following permissions in the in the Cloud PC admin portal provide access to specific kinds of reports:
- ActionStatus/Read
- DeviceRecommendation/Read
- CrossRegionDisasterRecovery/Read
- FrontlineReports/Read
- InaccessibleReports/Read
- PerformanceReports/Read
HTTP request
GET /deviceManagement/virtualEndpoint/reports/exportJobs/{cloudPcExportJobId}
Optional query parameters
This method supports some of the OData query parameters to help customize the response. For general information, see OData query parameters.
Request headers
Name | Description |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Request body
Don't supply a request body for this method.
Response
If successful, this method returns a 200 OK
response code and a cloudPcExportJob object in the response body.
Examples
Example 1: Get an export job for the TotalAggregatedRemoteConnectionReports report
The following example shows how to get an export job that a POST request for the TotalAggregatedRemoteConnectionReports
report created.
Request
The following example shows a request.
GET https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/reports/exportJobs/TotalAggregatedRemoteConnectionReports__d39979c9-a0a2-4916-a158-1b984742ffff
Response
The following example shows the response.
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": {
"@odata.type": "#microsoft.graph.cloudPcExportJob",
"id": "TotalAggregatedRemoteConnectionReports__d39979c9-a0a2-4916-a158-1b984742ffff",
"reportName": "totalAggregatedRemoteConnectionReports",
"format": "csv",
"select": ["CloudPcId", "ManagedDeviceName", "UserPrincipalName", "DaysSinceLastSignIn", "TotalUsageInHour"],
"filter": null,
"requestDateTime": "2022-09-16T12:00:06.5137388Z",
"expirationDateTime": "0001-01-01T00:00:00Z",
"exportJobStatus": "completed",
"exportUrl": "https://westus01repexpstorage.blob.core.windows.net/599fe3a3-0285-4e7f-9c83-ffdf37914e27/remoteConnectionEvents_af34378a-cf5a-418d-b735-54b0ee155118.zip"
}
}
Example 2: Get an export job for the RemoteConnectionQualityReports report
The following example shows how to get an export job that a POST request for the RemoteConnectionQualityReports
report created.
Request
The following example shows a request.
GET https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/reports/exportJobs/RemoteConnectionQualityReports__85678957-6202-4e29-97e6-eb26ef07f330
Response
The following example shows the response.
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": {
"@odata.type": "#microsoft.graph.cloudPcExportJob",
"id": "RemoteConnectionQualityReports__85678957-6202-4e29-97e6-eb26ef07f330",
"reportName": "remoteConnectionQualityReports",
"format": "csv",
"select": ["CloudPcId", "ManagedDeviceName", "UserPrincipalName", "DaysSinceLastSignIn", "TotalUsageInHour"],
"filter": null,
"requestDateTime": "2023-06-14T07:40:41.694Z",
"expirationDateTime": "",
"exportJobStatus": "completed",
"exportUrl": "https://westus01repexpstorage.blob.core.windows.net/599fe3a3-0285-4e7f-9c83-ffdf37914e27/remoteConnectionHistoricalReports_af34378a-cf5a-418d-b735-54b0ee155118.zip"
}
}