Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

querying arbitrary number of keys in a dictionary insted #498

Open
dxynnez opened this issue Sep 20, 2023 · 1 comment
Open

querying arbitrary number of keys in a dictionary insted #498

dxynnez opened this issue Sep 20, 2023 · 1 comment

Comments

@dxynnez
Copy link

dxynnez commented Sep 20, 2023

Hello team,

In the https://github.com/microsoft/api-guidelines/blob/vNext/graph/patterns/dictionary.md, it mentioned that the keys must be defined by the client. However, there were only examples for client to specify a single key (by appending it in the path). What if the client is interested in multiple keys? Do we have an example on what the request should be?

@OlgaPodo
Copy link
Collaborator

OlgaPodo commented Oct 2, 2023

You should be able to use $select to retrieve values for multiple keys. Here is an example:
Request:
GET /users/10/assignedRoles?$select=author,architect
Response:
{ "author": { "domain": "contoso" }, "architect": { "domain": "adventureWorks" } }
In the future, we will update the pattern as well. Thank you for your suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants