Files
Redmine/app/views/files/index.api.rsb
Jean-Philippe Lang e068f855dc Files REST API (#19116).
Patch by Lucile Quirion and Jake Kemme.

git-svn-id: http://svn.redmine.org/redmine/trunk@16109 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-12-21 10:05:55 +00:00

15 lines
400 B
Plaintext

api.array :files do
@containers.each do |container|
container.attachments.each do |attachment|
api.file do
render_api_attachment_attributes(attachment, api)
if container.is_a?(Version)
api.version :id => container.id, :name => container.name
end
api.digest attachment.digest
api.downloads attachment.downloads
end
end
end
end