Skip to content

When using the client to get statistics for categories, it's not possible to submit multiple categories. #702

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

Closed
lucasfen opened this issue Sep 14, 2021 · 1 comment · Fixed by sendgrid/java-http-client#134
Labels
status: help wanted requesting help from the community type: bug bug in the library

Comments

@lucasfen
Copy link

Steps to Reproduce
SendGrid sg = new SendGrid(sendGridApiKey);
Request request = new Request();
request.setMethod(Method.GET);
request.setEndpoint("categories/stats");
request.addQueryParam("aggregated_by", "day");
request.addQueryParam("start_date", "2021-09-06");;
request.addQueryParam("categories", "category1&category2");
Response response = sg.api(request);
The above code makes a GET to this URL. Sendgrid returns a 404 for this request.

When utilizing the code it reproduces this url:

https://api.sendgrid.com/v3/categories/stats?start_date=2021-09-01&categories=Promotions%26Survey&limit=500&aggregated_by=day

When it should be producing this url:

https://api.sendgrid.com/v3/categories/stats?start_date=2021-09-01&categories=Promotions&categories=Survey&limit=500&aggregated_by=day

And I found the same problem mentioned in below issue had been fixed in python client
sendgrid/sendgrid-python#186.

@shwetha-manvinkurke shwetha-manvinkurke added status: help wanted requesting help from the community type: bug bug in the library labels Sep 16, 2021
@shwetha-manvinkurke
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted requesting help from the community type: bug bug in the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants