简体   繁体   中英

Search query doesn't return @microsoft.graph.downloadUrl

It seems that the Microsoft Graph search functionality for driveItem doesn't return a @mcirosoft.graph.downloadUrl

Using the Graph Explorer, I tried to fetch the following and the downloadUrl isn't present in the response:

/v1.0/sites/{site-id}/drive/root/search(q='')?$select=id,name,file,folder,size,lastModifiedDateTime,@microsoft.graph.downloadUrl

In the documentation, the DriveItem should include the @microsoft.graph.downloadUrl on the response.

The select query parameter applies only to properties , not instance attributes . Instance attributes are properties with special behaviors.

In your query, id,name,file,folder,size,lastModifiedDateTime are valid properties but @microsoft.graph.downloadUrl is an instance attribute.

In order to obtain the downloadUrl , you will need to execute a second call to /v1.0/sites/{site-id}/drive/items{driveItemId} .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM