todoTaskList: delta
Namespace: microsoft.graph
Get a set of todoTaskList resources that have been added, deleted, or removed in Microsoft To Do.
A delta function call for todoTaskList is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the todoTaskList. This allows you to maintain and synchronize a local store of a user's todoTaskList without having to fetch all the todoTaskList from the server every time.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type | Permissions (from least to most privileged) |
---|---|
Delegated (work or school account) | Tasks.ReadWrite |
Delegated (personal Microsoft account) | Tasks.ReadWrite |
Application | Not supported |
HTTP request
GET /me/todo/lists/delta
GET /users/{id|userPrincipalName}/todo/lists/delta
Query parameters
Tracking changes in todoTaskList resources incurs a round of one or more delta function calls. If you use any query parameter
(other than $deltatoken
and $skiptoken
), you must specify
it in the initial delta request. Microsoft Graph automatically encodes any specified parameters
into the token portion of the @odata.nextLink
or @odata.deltaLink
URL provided in the response.
You only need to specify any desired query parameters once upfront.
In subsequent requests, simply copy and apply the @odata.nextLink
or @odata.deltaLink
URL from the previous response, as that URL already
includes the encoded, desired parameters.
Query parameter | Type | Description |
---|---|---|
$deltatoken | string | A state token returned in the @odata.deltaLink URL of the previous delta function call for the same todoTaskList collection, indicating the completion of that round of change tracking. Save and apply the entire @odata.deltaLink URL including this token in the first request of the next round of change tracking for that collection. |
$skiptoken | string | A state token returned in the @odata.nextLink URL of the previous delta function call, indicating there are further changes to be tracked in the same todoTaskList collection. |
OData query parameters
You can use a $select
query parameter as in any GET request to specify only the properties your need for best performance. The
id property is always returned.
Request headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer {token}. Required. |
Content-Type | string | application/json. Required. |
Prefer | string | odata.maxpagesize={x}. Optional. |
Response
If successful, this method returns a 200 OK
response code and todoTaskList collection object in the response body.
Example
Request
The following example shows how to make an initial delta function call, and limit the maximum number of todoTaskList in the response body to 2.
To track changes in the todoTaskList, you would make one or more delta function calls, with appropriate state tokens, to get the set of incremental changes since the last delta query.
The main differences between tracking todoTaskList and tracking todoTask resources in a list are in the delta query request URLs, and the query responses returning todoTaskList rather than todoTask collections.
GET https://graph.microsoft.com/v1.0/me/todo/lists/delta
Prefer: odata.maxpagesize=2
Response
If the request is successful, the response would include a state token, which is either a skipToken
(in an @odata.nextLink response header) or a deltaToken (in an @odata.deltaLink response header).
Respectively, they indicate whether you should continue with the round or you have completed
getting all the changes for that round.
The response below shows a skipToken in an @odata.nextLink response header.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.deltaLink":"https://graph.microsoft.com/v1.0/me/todo/lists/delta?$skiptoken=ldfdgdgfoT5csv4k99nvQqyku0jaGqMhc6XyFff5qQTQ7RJOr",
"value": [
{
"@odata.etag":"W/\"4rfRVIPi9EqXgDbc8U7HGwADLLQ93w==\"",
"displayName":"List1",
"isOwner":true,
"isShared":false,
"wellknownListName":"none",
"id":"AQMkADMwNTcyZjQzLTdkMGItNDdjMy04ZTYwLTJhYmUzNGI5ZD"
}
]
}
See also
Feedback
Submit and view feedback for