Select inner JsonObject with $select and GraphAPI

Martin Bilda 176 Reputation points
2020-04-18T09:28:26.893+00:00

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 Monitored
Not Monitored
Tag not monitored by Microsoft.
37,799 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2020-04-20T02:31:04.507+00:00

    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)

    0 comments No comments