There is a existing request:
$requestUrl = "/users/".$userId."/tasks";
But it looks like it doesn't work for Subscriber, its empty. If I do a Assigned for this User, well it's filled but I require it for Subscriber.
Sadly I didn't find something in the documentation.
array(3) {
["tasks"]=>
array(0) {
}
["subtasks"]=>
array(0) {
}
["related"]=>
array(0) {
}
}
Do anyone know, if there is a request where i can find all tasks, which are Assigned, Created or Subscribed by a certain user id?
Or is there a chance I found a bug?
Resource /user/:user_id/tasks
returns user's assignments (tasks and subtasks that user is assigned to). That's how it was designed to work and that's how it works, so that's not a bug.
Active Collab 5 does not feature an API resource that can return you all of the user's subscriptions.
To get a list of tasks that user created, you can run an assignment filter report, by sending this list of query arguments:
type
: AssignmentFilter
(required)created_by_filter
: selected_USERID,USERID,USERID
(list of user ID-s)include_subtasks
: 0
or 1
(include subtasks, or not)include_all_projects
: 0
or 1
(when report is ran by an Owneer, should we look through all projects, or only projects that this Owner is assigned to).Example:
GET https://myac.com/api/v1/reports/run?created_by_filter=selected_USERID,USERID,USERID&include_subtasks=0&type=AssignmentFilter&include_all_projects=1
Resource reports/run
is available to users with Owner
and Member+
role (Member with permissions to start new projects and invite people). It is not available to Members without that permission or people with Client role.
PS: I work for Active Collab.