Original post here New endpoint: project task counts - #8 by Ronald_Findling
I struggle creating this request with the java client-lib "com.asana:asana:0.10.1"
- I would assume that I just need to do the following:
client.projects.getTaskCountsForProject(projectId).option("fields", "num_tasks").execute()
But this always returns me an empty JSON object {}
-what am I missing here?
- The docu for the endpoint Get task count of a project
- The docu on input output options (as the fields all need to be opted in) Input/output options
Debugging the client I see the following:
- The LowLevelHttpRequest uses the wrong url https://app.asana.com/api/1.0/projects//task_counts?opt_pretty=false&limit=50
at [1] - This should be because in [2] the url doesn’t contain the opt_fields see [3]
But I’m still not sure what I might have configured wrong - any help would be very much appreciated.
References
- [1]
com.google.http-client/google-http-client/1.20.0/5140e4d6fc293ede7dee965e8f3426d3e9e3d0c0/google-http-client-1.20.0-sources.jar!/com/google/api/client/http/HttpRequest.java:862
- [2]
com.asana/asana/0.10.1/fea2bd16f4426fad8ae4aef42bfde7c7b03692ea/asana-0.10.1-sources.jar!/com/asana/Client.java:201
- [3]
url = { "opt_pretty" -> {Boolean@3443} false, "limit" -> {Integer@3444} 50