Share via

Difference between $select and select query parameter

Macháček Martin 286 Reputation points
Sep 8, 2022, 1:00 PM

In Graph Explorer I'm testing select query parameter to return all properties and webDavUrl property

GET /v1.0/drives/{driveId}/items/{itemId}?$select=webDavUrl  

select without $

GET /v1.0/drives/{driveId}/items/{itemId}?select=webDavUrl   
GET /v1.0/drives/{driveId}/items/{itemId}?select=*,webDavUrl  

return webDavUrl property.

But

GET /v1.0/drives/{driveId}/items/{itemId}?$select=*,webDavUrl  

doesn't return webDavUrl property.

Is this some expected behavior or a bug?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,451 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,761 Reputation points Microsoft External Staff
    Sep 8, 2022, 1:21 PM

    Hi @Macháček Martin ,

    As per documentation query-parameters,
    On the /beta endpoint, the $ prefix is optional. For example, instead of $filter, you can use filter. On the v1 endpoint, the $ prefix is optional for only a subset of APIs. For simplicity, always include $ if using the v1 endpoint.

    Hence the same is applicable to select query parameter, $select is recommended to use for v1.

    239105-image.png

    Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.