Feature #25792

Add Rest API for activity

Added by Mao H over 5 years ago. Updated over 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


I couldn't get the activities from the api. The "Activity" is the information shown in the tab in the website.

When I tried to query like

curl http://server/pm/projects/12/wiki.json -H "Content-Type: application/json" -H "X-Redmine-API-Key:<my key>" 

I don't get the any values back. The server's log shows:
tarted GET "/pm/projects/12/activity.json" for at 2017-05-08 21:33:27 -0700
Processing by ActivitiesController#index as JSON
  Parameters: {"id"=>"12"}
  Current user: anonymous
Filter chain halted as :check_if_login_required rendered or redirected
Completed 401 Unauthorized in 7ms (ActiveRecord: 1.8ms)

It seems like ActivitiesController does the authorization differently. By "differently", I mean it's different from other controllers such as those for issues. For example, when I query the issues like this:

curl http://server/pm/projects/12/issues.json -H "Content-Type: application/json" -H "X-Redmine-API-Key: <my key>" 

It can return the values and the server's log shows

Started GET "/pm/projects/12/issues.json" for at 2017-05-08 21:35:16 -0700
Processing by IssuesController#index as JSON
  Parameters: {"project_id"=>"12"}
  Current user: <my name> (id=7)
  Rendered issues/index.api.rsb (12.3ms)
Completed 200 OK in 142ms (Views: 11.7ms | ActiveRecord: 25.6ms)

The user is definitely authorized for activities, as I can view them from the website. And it's seems like it is doing the authorization differently for the api.

Related issues

Related to Redmine - Feature #14872: Activities REST API New


#1 Updated by Toshi MARUYAMA over 5 years ago

  • Tracker changed from Defect to Feature
  • Status changed from New to Closed
  • Resolution set to Duplicate

Activities REST API is not implemented yet.

#2 Updated by Toshi MARUYAMA over 5 years ago

Also available in: Atom PDF