{"action":"opened","issue":{"url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/380","repository_url":"https://api.github.com/repos/OneDrive/onedrive-api-docs","labels_url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/380/labels{/name}","comments_url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/380/comments","events_url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/380/events","html_url":"https://github.com/OneDrive/onedrive-api-docs/issues/380","id":158000852,"number":380,"title":"/drives cannot expand relationships using OData","user":{"login":"dluces","id":262662,"avatar_url":"https://avatars.githubusercontent.com/u/262662?v=3","gravatar_id":"","url":"https://api.github.com/users/dluces","html_url":"https://github.com/dluces","followers_url":"https://api.github.com/users/dluces/followers","following_url":"https://api.github.com/users/dluces/following{/other_user}","gists_url":"https://api.github.com/users/dluces/gists{/gist_id}","starred_url":"https://api.github.com/users/dluces/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dluces/subscriptions","organizations_url":"https://api.github.com/users/dluces/orgs","repos_url":"https://api.github.com/users/dluces/repos","events_url":"https://api.github.com/users/dluces/events{/privacy}","received_events_url":"https://api.github.com/users/dluces/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-01T20:35:12Z","updated_at":"2016-06-01T20:35:12Z","closed_at":null,"body":"It would be a great addition if the `/drives` endpoint could expand relationships such as `root` using OData. That is, if doing `GET /drives?select=root&expand=root` would actually return the drives and their root item information. Instead, to get the root item, we need to query `/drives` and then loop through each drive and query `/drives/{drive_id}/root`.  This can slow thing down quiet a bit.\r\n\r\n**Some context on why we need this in case there's a better way:**\r\nMy team is currently juggling both the SharePoint REST API and the OneDrive API and we would ideally want to move to the OneDrive API completely. In the meantime, we need to get both the drive IDs and their root item's SharePoint IDs (we still need these to use parts of the SharePoint REST API). Having a way to relate the drives to libraries would be ideal. However, no info returned for drives matches anything in the library counterpart (no IDs, not even names--\"Documents\" vs \"Shared Documents\", \"SiteAssets\" vs \"Site Assets\"--and drives do not get the sharepointIds facet). We basically need to know exactly what drive represents what library, and it seems like the only way to do this is by matching the drive root folder to the library root folder. Having to do that, it'd be nice if we could get the info on a single API call as it can otherwise be a painfully slow process."}}
{"actor":{"display_login":"dluces"}}