Project

General

Profile

Actions

Feature #25792

closed

Add Rest API for activity

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

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate

Description

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 192.168.1.6 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 192.168.1.6 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 APINew

Actions
Actions #1

Updated by Toshi MARUYAMA over 7 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.

Actions #2

Updated by Toshi MARUYAMA over 7 years ago

Actions

Also available in: Atom PDF