eBookInstallSummary aktualisieren
Artikel
02/01/2024
11 Mitwirkende
Feedback
In diesem Artikel
Namespace: microsoft.graph
Hinweis: Die Microsoft Graph-API für Intune setzt eine aktive Intune-Lizenz für den Mandanten voraus.
Aktualisieren der Eigenschaften des eBookInstallSummary -Objekts.
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
Globaler Dienst
US Government L4
US Government L5 (DOD)
China, betrieben von 21Vianet
✅
✅
✅
✅
Berechtigungen
Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie unter Berechtigungen .
Berechtigungstyp
Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)
Delegiert (Geschäfts-, Schul- oder Unikonto)
DeviceManagementApps.ReadWrite.All
Delegiert (persönliches Microsoft-Konto)
Nicht unterstützt
Anwendung
DeviceManagementApps.ReadWrite.All
HTTP-Anforderung
PATCH /deviceAppManagement/managedEBooks/{managedEBookId}/installSummary
Anforderungstext
Geben Sie im Anforderungstext eine JSON-Darstellung des Objekts des Typs eBookInstallSummary an.
In der folgenden Tabelle sind die Eigenschaften aufgeführt, die angegeben werden müssen, wenn Sie ein Objekt des Typs eBookInstallSummary erstellen.
Eigenschaft
Typ
Beschreibung
id
String
Schlüssel der Entität
installedDeviceCount
Int32
Die Anzahl der Geräte, auf denen das Buch erfolgreich installiert wurde.
failedDeviceCount
Int32
Die Anzahl der Geräte, auf denen die Installation des Buchs fehlgeschlagen ist.
notInstalledDeviceCount
Int32
Die Anzahl von Geräten, auf denen das Buch nicht installiert ist.
installedUserCount
Int32
Die Anzahl der Benutzer, deren Geräte das Buch erfolgreich installiert haben.
failedUserCount
Int32
Die Anzahl der Benutzer, die mindestens ein Gerät besitzen, auf dem die Installation des Buchs fehlgeschlagen ist.
notInstalledUserCount
Int32
Die Anzahl der Benutzer, die das Buch nicht installiert haben.
Antwort
Bei erfolgreicher Ausführung gibt die Methode den Antwortcode 200 OK
und ein aktualisiertes Objekt des Typs eBookInstallSummary im Antworttext zurück.
Beispiel
Anforderung
Nachfolgend sehen Sie ein Beispiel der Anforderung.
PATCH https://graph.microsoft.com/v1.0/deviceAppManagement/managedEBooks/{managedEBookId}/installSummary
Content-type: application/json
Content-length: 236
{
"@odata.type": "#microsoft.graph.eBookInstallSummary",
"installedDeviceCount": 4,
"failedDeviceCount": 1,
"notInstalledDeviceCount": 7,
"installedUserCount": 2,
"failedUserCount": 15,
"notInstalledUserCount": 5
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new EBookInstallSummary
{
OdataType = "#microsoft.graph.eBookInstallSummary",
InstalledDeviceCount = 4,
FailedDeviceCount = 1,
NotInstalledDeviceCount = 7,
InstalledUserCount = 2,
FailedUserCount = 15,
NotInstalledUserCount = 5,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceAppManagement.ManagedEBooks["{managedEBook-id}"].InstallSummary.PatchAsync(requestBody);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen , finden Sie in der SDK-Dokumentation .
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc device-app-management managed-ebooks install-summary patch --managed-ebook-id {managedEBook-id} --body '{\
"@odata.type": "#microsoft.graph.eBookInstallSummary",\
"installedDeviceCount": 4,\
"failedDeviceCount": 1,\
"notInstalledDeviceCount": 7,\
"installedUserCount": 2,\
"failedUserCount": 15,\
"notInstalledUserCount": 5\
}\
'
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen , finden Sie in der SDK-Dokumentation .
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphmodels.NewEBookInstallSummary()
installedDeviceCount := int32(4)
requestBody.SetInstalledDeviceCount(&installedDeviceCount)
failedDeviceCount := int32(1)
requestBody.SetFailedDeviceCount(&failedDeviceCount)
notInstalledDeviceCount := int32(7)
requestBody.SetNotInstalledDeviceCount(¬InstalledDeviceCount)
installedUserCount := int32(2)
requestBody.SetInstalledUserCount(&installedUserCount)
failedUserCount := int32(15)
requestBody.SetFailedUserCount(&failedUserCount)
notInstalledUserCount := int32(5)
requestBody.SetNotInstalledUserCount(¬InstalledUserCount)
installSummary, err := graphClient.DeviceAppManagement().ManagedEBooks().ByManagedEBookId("managedEBook-id").InstallSummary().Patch(context.Background(), requestBody, nil)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen , finden Sie in der SDK-Dokumentation .
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EBookInstallSummary eBookInstallSummary = new EBookInstallSummary();
eBookInstallSummary.setOdataType("#microsoft.graph.eBookInstallSummary");
eBookInstallSummary.setInstalledDeviceCount(4);
eBookInstallSummary.setFailedDeviceCount(1);
eBookInstallSummary.setNotInstalledDeviceCount(7);
eBookInstallSummary.setInstalledUserCount(2);
eBookInstallSummary.setFailedUserCount(15);
eBookInstallSummary.setNotInstalledUserCount(5);
EBookInstallSummary result = graphClient.deviceAppManagement().managedEBooks().byManagedEBookId("{managedEBook-id}").installSummary().patch(eBookInstallSummary);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen , finden Sie in der SDK-Dokumentation .
const options = {
authProvider,
};
const client = Client.init(options);
const eBookInstallSummary = {
'@odata.type': '#microsoft.graph.eBookInstallSummary',
installedDeviceCount: 4,
failedDeviceCount: 1,
notInstalledDeviceCount: 7,
installedUserCount: 2,
failedUserCount: 15,
notInstalledUserCount: 5
};
await client.api('/deviceAppManagement/managedEBooks/{managedEBookId}/installSummary')
.update(eBookInstallSummary);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen , finden Sie in der SDK-Dokumentation .
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\EBookInstallSummary;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new EBookInstallSummary();
$requestBody->setOdataType('#microsoft.graph.eBookInstallSummary');
$requestBody->setInstalledDeviceCount(4);
$requestBody->setFailedDeviceCount(1);
$requestBody->setNotInstalledDeviceCount(7);
$requestBody->setInstalledUserCount(2);
$requestBody->setFailedUserCount(15);
$requestBody->setNotInstalledUserCount(5);
$result = $graphServiceClient->deviceAppManagement()->managedEBooks()->byManagedEBookId('managedEBook-id')->installSummary()->patch($requestBody)->wait();
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen , finden Sie in der SDK-Dokumentation .
Import-Module Microsoft.Graph.Devices.CorporateManagement
$params = @{
"@odata.type" = "#microsoft.graph.eBookInstallSummary"
installedDeviceCount = 4
failedDeviceCount = 1
notInstalledDeviceCount = 7
installedUserCount = 2
failedUserCount = 15
notInstalledUserCount = 5
}
Update-MgDeviceAppManagementManagedEBookInstallSummary -ManagedEBookId $managedEBookId -BodyParameter $params
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen , finden Sie in der SDK-Dokumentation .
from msgraph import GraphServiceClient
from msgraph.generated.models.e_book_install_summary import EBookInstallSummary
graph_client = GraphServiceClient(credentials, scopes)
request_body = EBookInstallSummary(
odata_type = "#microsoft.graph.eBookInstallSummary",
installed_device_count = 4,
failed_device_count = 1,
not_installed_device_count = 7,
installed_user_count = 2,
failed_user_count = 15,
not_installed_user_count = 5,
)
result = await graph_client.device_app_management.managed_e_books.by_managed_e_book_id('managedEBook-id').install_summary.patch(request_body)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen , finden Sie in der SDK-Dokumentation .
Antwort
Nachfolgend sehen Sie ein Beispiel der Antwort. Hinweis: Das hier gezeigte Antwortobjekt ist möglicherweise aus Platzgründen abgeschnitten. Von einem tatsächlichen Aufruf werden alle Eigenschaften zurückgegeben.
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 285
{
"@odata.type": "#microsoft.graph.eBookInstallSummary",
"id": "9708ad78-ad78-9708-78ad-089778ad0897",
"installedDeviceCount": 4,
"failedDeviceCount": 1,
"notInstalledDeviceCount": 7,
"installedUserCount": 2,
"failedUserCount": 15,
"notInstalledUserCount": 5
}