question

MartinBilda-7257 avatar image
0 Votes"
MartinBilda-7257 asked ·

Select inner JsonObject with $select and GraphAPI

Hi, I would like to use the MSGraph API and the $select to limit my response a bit. For this the API provides the select() function.

 graphApplicationClient.groups(pTeamId).drive().items(id).children().buildRequest().select("content.downloadUrl,createdDateTime,id,name,size,file").get().getRawObject();

Now the JsonObject "file" is in the response. This consists of two inner JsonObjects namely "mimeType" and "hashes".

 "file":{"mimeType": "application/zip", "hashes":{"quickXorHash": "xyzabcdefg="}}

Is there a way to select inner Json objects with the select() so that I don't get the whole file object back, but only the inner e.g. mimeType?

Like this:

 graphApplicationClient.groups(pTeamId).drive().items(id).children().buildRequest().select("content.downloadUrl,createdDateTime,id,name,size,**file/mimeType**").get().getRawObject();


Greetings

not-supported
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DSPatrick avatar image
0 Votes"
DSPatrick answered ·

QnA currently supports the products listed in right-hand pane (more to be added) Better to reach out to subject matter experts in dedicated forums over here.

https://stackoverflow.com/questions/tagged/microsoft-graph



(please don't forget to mark helpful replies as answer)


· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.