Project

General

Profile

Actions

Patch #21378

open

Include Documents in Projects API

Added by Helder Manuel Torres Vieira almost 9 years ago. Updated almost 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

This patch adds documents to the Projects#show API.

They will be shown only if the include=documents parameter is passed on URL

The behaviour is exactly the same as for issue categories, trackers and modules.

Patch and Tests are included.

JSON Example

GET /projects.json?include=documents

{
  project: {
    id: 1,
    name: "Test Project",
    identifier: "test-project",
    description: "",
    homepage: "",
    status: 1,
    documents: [
      {
        id: 1,
        title: "Document 1",
        description: "Description 1",
        category: {
          id: 1,
          name: "Uncategorized" 
        },
        url: "https://redmine/documents/1",
        created_on: "2015-11-29T12:19:16Z" 
      }
    ],
    created_on: "2015-11-29T12:11:34Z",
    updated_on: "2015-11-29T12:11:34Z" 
  }
}

Files

Actions

Also available in: Atom PDF