Project

General

Profile

Actions

Feature #6779

closed

Project JSON API

Added by Patrick Logé over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
Start date:
2010-10-31
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

I doesn't seem to be possible to get projects as JSON
I did add this

  def index
    respond_to do |format|
      >>>>>>> format.json { render :text => Project.visible.find(:all, :order => 'lft').to_json, :layout => false }
      format.html { 
        @projects = Project.visible.find(:all, :order => 'lft') 
      }
      format.xml  {
        @projects = Project.visible.find(:all, :order => 'lft')
      }
      format.atom {
        projects = Project.visible.find(:all, :order => 'created_on DESC',
                                              :limit => Setting.feeds_limit.to_i)
        render_feed(projects, :title => "#{Setting.app_title}: #{l(:label_project_latest)}")
      }
    end
  end


to make it work

in the

Actions

Also available in: Atom PDF