Rest Projects » History » Version 9
Jean-Philippe Lang, 2011-11-20 15:53
include parameter for /projects/[id].xml
| 1 | 1 | Jean-Philippe Lang | h1. Projects |
|---|---|---|---|
| 2 | |||
| 3 | h2. Listing projects |
||
| 4 | |||
| 5 | GET /projects.xml |
||
| 6 | |||
| 7 | Returns all projects |
||
| 8 | |||
| 9 | +Response+: |
||
| 10 | |||
| 11 | <pre> |
||
| 12 | <projects type="array"> |
||
| 13 | 3 | Christoph Witzany | <project> |
| 14 | <id>1</id> |
||
| 15 | 1 | Jean-Philippe Lang | <name>Redmine</name> |
| 16 | <identifier>redmine</identifier> |
||
| 17 | <description> |
||
| 18 | Redmine is a flexible project management web application written using Ruby on Rails framework. |
||
| 19 | </description> |
||
| 20 | <created_on>Sat Sep 29 12:03:04 +0200 2007</created_on> |
||
| 21 | <updated_on>Sun Mar 15 12:35:11 +0100 2009</updated_on> |
||
| 22 | </project> |
||
| 23 | 3 | Christoph Witzany | <project> |
| 24 | <id>2</id> |
||
| 25 | 1 | Jean-Philippe Lang | ... |
| 26 | </project> |
||
| 27 | </pre> |
||
| 28 | |||
| 29 | h2. Showing a project |
||
| 30 | |||
| 31 | GET /projects/[id].xml |
||
| 32 | |||
| 33 | Returns the project of given id or identifier. |
||
| 34 | |||
| 35 | 9 | Jean-Philippe Lang | +Parameters+: |
| 36 | |||
| 37 | * @include@: fetch associated data (optional). Possible values: trackers, issue_categories. To fetch multiple associations use comma (e.g ?include=relations,journals) |
||
| 38 | |||
| 39 | 1 | Jean-Philippe Lang | +Examples+: |
| 40 | |||
| 41 | <pre> |
||
| 42 | GET /projects/12.xml |
||
| 43 | GET /projects/redmine.xml |
||
| 44 | </pre> |
||
| 45 | |||
| 46 | +Response+: |
||
| 47 | |||
| 48 | <pre> |
||
| 49 | <?xml version="1.0" encoding="UTF-8"?> |
||
| 50 | <project id="1"> |
||
| 51 | <name>Redmine</name> |
||
| 52 | <identifier>redmine</identifier> |
||
| 53 | <description> |
||
| 54 | Redmine is a flexible project management web application written using Ruby on Rails framework. |
||
| 55 | </description> |
||
| 56 | <homepage></homepage> |
||
| 57 | <created_on>Sat Sep 29 12:03:04 +0200 2007</created_on> |
||
| 58 | <updated_on>Sun Mar 15 12:35:11 +0100 2009</updated_on> |
||
| 59 | </project> |
||
| 60 | </pre> |
||
| 61 | |||
| 62 | |||
| 63 | h2. Creating a project |
||
| 64 | |||
| 65 | POST /projects.xml |
||
| 66 | |||
| 67 | Creates a the project. |
||
| 68 | |||
| 69 | +Parameters+: |
||
| 70 | |||
| 71 | * @project@ (required): a hash of the project attributes, including: |
||
| 72 | |||
| 73 | * @name@ (required): the project name |
||
| 74 | * @identifier@ (required): the project identifier |
||
| 75 | * @description@ |
||
| 76 | |||
| 77 | +Response+: |
||
| 78 | |||
| 79 | * @201 Created@: project was created |
||
| 80 | * @422 Unprocessable Entity@: project was not created due to validation failures (response body contains the error messages) |
||
| 81 | |||
| 82 | h2. Updating a project |
||
| 83 | |||
| 84 | PUT /projects/[id].xml |
||
| 85 | |||
| 86 | Updates the project of given id or identifier. |
||
| 87 | |||
| 88 | h2. Deleting a project |
||
| 89 | |||
| 90 | DELETE /projects/[id].xml |
||
| 91 | |||
| 92 | Deletes the project of given id or identifier. |