diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 21eff8ca7c1104c901baac3d7143ac209509c2fe..bd13b45082a85e07a3f32c1b6c733de7d863701f 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -866,6 +866,16 @@ module ApplicationHelper
   def favicon
     "<link rel='shortcut icon' href='#{image_path('/favicon.ico')}' />"
   end
+  
+  # Returns true if arg is expected in the API response
+  def include_in_api_response?(arg)
+    unless @included_in_api_response
+      param = params[:include]
+      @included_in_api_response = param.is_a?(Array) ? param.collect(&:to_s) : param.to_s.split(',')
+      @included_in_api_response.collect!(&:strip)
+    end
+    @included_in_api_response.include?(arg.to_s)
+  end
 
   private
 
diff --git a/app/views/issues/show.api.rsb b/app/views/issues/show.api.rsb
index 9f0d59e8df053f5e19724122a30ea145059463ee..a724df10d83910736a75bf508068958287570ab0 100644
--- a/app/views/issues/show.api.rsb
+++ b/app/views/issues/show.api.rsb
@@ -25,13 +25,13 @@ api.issue do
   api.created_on @issue.created_on
   api.updated_on @issue.updated_on
   
-  render_api_issue_children(@issue, api)
+  render_api_issue_children(@issue, api) if include_in_api_response?('children')
   
   api.array :relations do
   	@issue.relations.select {|r| r.other_issue(@issue).visible? }.each do |relation|
   		api.relation(:id => relation.id, :issue_id => relation.other_issue(@issue).id, :relation_type => relation.relation_type_for(@issue), :delay => relation.delay)
   	end
-  end
+  end if include_in_api_response?('relations')
   
   api.array :changesets do
   	@issue.changesets.each do |changeset|
@@ -41,7 +41,7 @@ api.issue do
   			api.committed_on changeset.committed_on
   		end
   	end
-  end if User.current.allowed_to?(:view_changesets, @project) && @issue.changesets.any?
+  end if include_in_api_response?('changesets') && User.current.allowed_to?(:view_changesets, @project)
   
   api.array :journals do
   	@issue.journals.each do |journal|
@@ -58,5 +58,5 @@ api.issue do
   			end
   		end
   	end
-  end unless @issue.journals.empty?
+  end if include_in_api_response?('journals')
 end
diff --git a/app/views/projects/show.api.rsb b/app/views/projects/show.api.rsb
index dc02637124e9becba30d493816ace1c4db3e9594..e08f77b6645d9fbcb1102eaff9c19fe18dc2b9c3 100644
--- a/app/views/projects/show.api.rsb
+++ b/app/views/projects/show.api.rsb
@@ -14,5 +14,5 @@ api.project do
     @project.trackers.each do |tracker|
       api.tracker(:id => tracker.id, :name => tracker.name)
     end
-  end
+  end if include_in_api_response?('trackers')
 end
diff --git a/app/views/users/show.api.rsb b/app/views/users/show.api.rsb
index c177d49e9672eba108f532d446332ae2816fa969..a2e31acc1382489413b61546f1f1cd00f3e4b715 100644
--- a/app/views/users/show.api.rsb
+++ b/app/views/users/show.api.rsb
@@ -20,5 +20,5 @@ api.user do
         end
       end if membership.project
     end
-  end if @memberships.present?
+  end if include_in_api_response?('memberships') && @memberships
 end
diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb
index 3988ee5b7106b06d6c1f0bbbbb2d7b37cc297789..d3aa327f1692706b2e1467e8a7979a2f6f284054 100644
--- a/test/integration/api_test/issues_test.rb
+++ b/test/integration/api_test/issues_test.rb
@@ -94,7 +94,7 @@ class ApiTest::IssuesTest < ActionController::IntegrationTest
     context "with journals" do
       context ".xml" do
         should "display journals" do
-          get '/issues/1.xml'
+          get '/issues/1.xml?include=journals'
           
           assert_tag :tag => 'issue',
             :child => {
@@ -160,7 +160,7 @@ class ApiTest::IssuesTest < ActionController::IntegrationTest
       
       context ".xml" do
         should "display children" do
-          get '/issues/1.xml'
+          get '/issues/1.xml?include=children'
           
           assert_tag :tag => 'issue', 
             :child => {
@@ -187,7 +187,7 @@ class ApiTest::IssuesTest < ActionController::IntegrationTest
         
         context ".json" do
           should "display children" do
-            get '/issues/1.json'
+            get '/issues/1.json?include=children'
             
             json = ActiveSupport::JSON.decode(response.body)
             assert_equal([