You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stats for multiple categories in one API call #129
Sendgrid API v3 Reference for categories/stats endpoints states that API call can be made to get stats for upto 10 categories.
However, it does not provide any reference for how to make that API call. I checked the code for addQueryParam here https://github.com/sendgrid/java-http-client/blob/main/src/main/java/com/sendgrid/Request.java
which takes categories as only key-value pair. How are we supposed to pass "upto 10 categories"?
Steps to Reproduce
Use categories/stats endpoint to get stats for 10 categories in the same API call.
Code Snippet
# pastecodehererequest.setMethod(Method.GET);
request.setEndpoint("categories/stats");
request.addQueryParam("categories", "qa2"); //how to pass multiple categories here
### Exception/Log
Apologies for late reply but I had actually tried this already. This doesn't work. The addQueryParam will just replace the previously set category with the latter one. Please see the following example -
+1
Would you like us to raise a priority support request on this feature from our enterprise account? Let me know if that helps in moving this up the backlog.
Activity
thinkingserious commentedon Jan 8, 2021
Hello @neelabhtiwari,
You would call the
addQueryParamfunction multiple times, like so.Please let me know if that solves your issue. Thank you!
With best regards,
Elmer
neelabhtiwari commentedon Feb 2, 2021
Hi Elmer,
Apologies for late reply but I had actually tried this already. This doesn't work. The addQueryParam will just replace the previously set category with the latter one. Please see the following example -
Expected would be to get category stats for all three categories but it would just replace the category value with the latest one i.e. prod.
Thanks & Regards,
Neelabh
JenniferMah commentedon Feb 2, 2021
This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.
neelabhtiwari commentedon Feb 3, 2021
+1
Would you like us to raise a priority support request on this feature from our enterprise account? Let me know if that helps in moving this up the backlog.