You might want something like odata.
For me, I don't like giving api users sql-like abilities. It feels like a cop out. I'd rather have resources like
/bargin-bin
/featured
/premium-offers
/solid-values
And so forth. I don't like the idea of essentially saying, I have no idea what your use cases are, so here's a connection to my db so you can get whatever you want.
I also feel it makes it much more difficult to change the implementation over time.
This pertains to public APIs more than internal ones.
--
You received this message because you are subscribed to the Google Groups "API Craft" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-craft+...@googlegroups.com.
Visit this group at http://groups.google.com/group/api-craft.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
You received this message because you are subscribed to a topic in the Google Groups "API Craft" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/api-craft/yA0pboBEfPY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to api-craft+...@googlegroups.com.
Visit this group at http://groups.google.com/group/api-craft.
For more options, visit https://groups.google.com/groups/opt_out.
$expand (to query linked resources) and $select to get just individual fields. Customers?$expand=Orders (get customers + their orders )--
You received this message because you are subscribed to the Google Groups "API Craft" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-craft+...@googlegroups.com.
Visit this group at http://groups.google.com/group/api-craft.
For more options, visit https://groups.google.com/groups/opt_out.
Very useful $expand info! While doing expand implementation it seems like it makes sense only for one-to-one mappings, ie User to UserProfile and you can get both in the same request.
If you want to expand collection (one-to-many) for example /User/1?$expand=Orders then how many items do you return for expanded collection, what happens if you need to sort Users and Orders separately or return different number of items for internal expanded collections..
It really feels like expand is a great choice for one to one. So we decided to support only that.
Any thoughts?
--
You received this message because you are subscribed to a topic in the Google Groups "API Craft" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/api-craft/yA0pboBEfPY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to api-craft+...@googlegroups.com.
Visit this group at http://groups.google.com/group/api-craft.
For more options, visit https://groups.google.com/groups/opt_out.