TodoTaskList erstellenCreate todoTaskList
Namespace: microsoft.graphNamespace: microsoft.graph
Wichtig
APIs unter der /beta
Version in Microsoft Graph können geändert werden.APIs under the /beta
version in Microsoft Graph are subject to change. Die Verwendung dieser APIs in Produktionsanwendungen wird nicht unterstützt.Use of these APIs in production applications is not supported. Verwenden Sie die Versionsauswahl, um zu ermitteln, ob eine API in Version 1.0 verfügbar ist.To determine whether an API is available in v1.0, use the Version selector.
Erstellen Sie ein neues Listenobjekt.Create a new lists object.
BerechtigungenPermissions
Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie im Artikel zum Thema Berechtigungen.One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
BerechtigungstypPermission type | Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)Permissions (from least to most privileged) |
---|---|
Delegiert (Geschäfts-, Schul- oder Unikonto)Delegated (work or school account) | Tasks.ReadWriteTasks.ReadWrite |
Delegiert (persönliches Microsoft-Konto)Delegated (personal Microsoft account) | Tasks.ReadWriteTasks.ReadWrite |
AnwendungApplication | Nicht unterstütztNot supported |
HTTP-AnforderungHTTP request
POST /me/todo/lists
POST /users/{id|userPrincipalName}/todo/lists
AnforderungsheaderRequest headers
NameName | BeschreibungDescription |
---|---|
AuthorizationAuthorization | Bearer {token}. Erforderlich.Bearer {token}. Required. |
Content-TypeContent-Type | application/json. Erforderlich. application/json. Required. |
AnforderungstextRequest body
Stellen Sie im Anforderungstext eine JSON-Darstellung des todoTaskList-Objekts zur Verfügung.In the request body, supply a JSON representation of the todoTaskList object.
In der folgenden Tabelle sind die Eigenschaften aufgeführt, die zum Erstellen der todoTaskList erforderlich sind.The following table shows the properties that are required when you create the todoTaskList.
EigenschaftProperty | TypType | BeschreibungDescription |
---|---|---|
displayNamedisplayName | ZeichenfolgeString | Feld, das den Titel der Aufgabenliste angibt.Field indicating title of the task list. |
AntwortResponse
Wenn die Methode erfolgreich ist, werden der Antwortcode und 201 Created
ein TodoTaskList -Objekt im Antworttext zurückgegeben.If successful, this method returns a 201 Created
response code and a todoTaskList object in the response body.
BeispieleExamples
AnforderungRequest
POST https://graph.microsoft.com/beta/me/todo/lists
Content-Type: application/json
Content-length: 60
{
"displayName": "Travel items"
}
AntwortResponse
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.todoTaskList",
"id": "AAMkADIyAAAhrbPWAAA=",
"displayName": "Travel items",
"isOwner": true,
"isShared": false,
"wellknownListName": "none"
}