Reputation: 333
Beginning last weekend I began receiving HTTP 404
responses when requesting a change list for a drive.
First I ensure the drive exists:
GET:
https://SOMEURL/sites/ASITENAME/_api/v2.0/drives/{id}/root
Response:
{
<SNIP>
"id": "01JGC6XP56Y2GOVW7725BZO354PWSELRRZ",
"lastModifiedDateTime": "2017-08-05T22:16:24Z",
"name": "root",
"parentReference": {
"driveId": "b!n5c5t3PkRUiChm70bDc96e2yqnYltoJLq6IT5lxQYDZqi7UosRqoRa_3kgIU8qaV",
"driveType": "documentLibrary"
},
"folder": {
"childCount": 5
},
"root": {},
"size": 0
}
Since that exists, I think I should be able to get a changelist for it.I try to get the changelist for this drive using the drive api.
Get:
https://SOMEURL/sites/ASITENAME/_api/v2.0/drives/{id}/root/view.delta?token=3;%234;%231;3;28b58b6a-1ab1-45a8-aff7-920214f2a695;636434930370000000;67434848;%23;%23;%230
Response:
SPRequestGuid →b972249e-e00a-4000-8ed0-963ef7dba0e6
{
"error": {
"code": "itemNotFound",
"message": "The resource could not be found."
}
}
Nothing is found, which feels wrong to me. Checking the docs it looks like the format has changed
Using the latest OneDrive documentation (delta
instead of view.delta
)
Get:
https://SOMEURL/sites/ASITENAME/_api/v2.0/drives/{id}/root/delta?token=3;%234;%231;3;28b58b6a-1ab1-45a8-aff7-920214f2a695;636434930370000000;67434848;%23;%23;%230
Response:
SPRequestGuid →cf72249e-c0f7-4000-8ed0-97bf0cfaa584
{
"error": {
"code": "itemNotFound",
"message": "The resource could not be found."
}
}
Using /delta
with token=latest
GET:
https://SOMEURL/sites/ASITENAME/_api/v2.0/drives/{id}/root/delta?token=latest
Response:
SPRequestGuid →eb72249e-e08d-4000-8ed0-94ad25d9e424
{
"@odata.context": "https://SOMEURL/sites/ASITENAME/_api/v2.0/$metadata#items",
"@odata.deltaLink": "https://SOMEURL/sites/ASITENAME/_api/v2.0/drives/{id}/root/view.delta(token='3;%234;%231;3;28b58b6a-1ab1-45a8-aff7-920214f2a695;636440196145030000;67696039;%23;%23;%230')",
"@delta.token": "3;%234;%231;3;28b58b6a-1ab1-45a8-aff7-920214f2a695;636440196145030000;67696039;%23;%23;%230",
"value": []
}
Let's try the Microsoft Graph API to see if there is any difference:
Using Microsoft Graph API:
GET: https://graph.microsoft.com/v1.0/drives/{id}/root/delta
RESPONSE:
client-request-id →34978ae4-57cf-44c2-b5aa-05b8271ab070
request-id →34978ae4-57cf-44c2-b5aa-05b8271ab070
x-ms-ags-diagnostic →{"ServerInfo":{"DataCenter":"East US","Slice":"SliceA","ScaleUnit":"003","Host":"AGSFE_IN_1","ADSiteName":"EST"}}
{
"error": {
"code": "itemNotFound",
"message": "The resource could not be found.",
"innerError": {
"request-id": "dc105a6d-8f37-4865-bede-cbd875729af7",
"date": "2017-10-19T14:26:47"
}
}
}
I found one public issue which seems very similar to what I am experiencing.
My questions are:
Is /view.delta
now considered deprecated?
If I can retrieve a drive, in one cases should I get a 404
when requesting the delta?
Why does using ?token=latest
return data but without it a 404
is returned?
Upvotes: 0
Views: 335
Reputation: 4202
This is definitely a regression in behavior that's triggering for document libraries that have required columns or columns with validation formula. We're working on a fix and will get it deployed ASAP.
Upvotes: 1
Reputation: 33122
You need to prefix the endpoint with the OneDrive.
namespace (you can read Direct Endpoint Differences: Namespaces for details).
So for the Delta endpoint, rather than calling:
/_api/v2.0/drives/{id}/root/delta
Try calling
/_api/v2.0/drives/{id}/root/oneDrive.delta
I am however a little confused regarding the Microsoft Graph example. The syntax for your call (/v1.0/drives/{id}/root/delta
) is correct.
Upvotes: 0