Rest Projects » History » Revision 20
« Previous |
Revision 20/40
(diff)
| Next »
Lucile Quirion, 2015-02-11 17:35
Creating a project parameters added: homepage, is_public, parent_id, inherit_members, tracker_ids, enabled_module_names
Projects¶
Listing projects¶
GET /projects.xml
Returns all projects (all public projects and private projects where user have access to)
Parameters:
include
: fetch associated data (optional). Possible values: trackers, issue_categories, enabled_modules (since 2.6.0). Values should be separated by a comma ",".
Response:
<projects type="array"> <project> <id>1</id> <name>Redmine</name> <identifier>redmine</identifier> <description> Redmine is a flexible project management web application written using Ruby on Rails framework. </description> <created_on>Sat Sep 29 12:03:04 +0200 2007</created_on> <updated_on>Sun Mar 15 12:35:11 +0100 2009</updated_on> <is_public>true</is_public> </project> <project> <id>2</id> ... </project>Notes:
is_public
is exposed since 2.6.0
Showing a project¶
GET /projects/[id].xml
Returns the project of given id or identifier.
Parameters:
include
: fetch associated data (optional). Possible values: trackers, issue_categories, enabled_modules (since 2.6.0). Values should be separated by a comma ",".
Examples:
GET /projects/12.xml GET /projects/12.xml?include=trackers GET /projects/12.xml?include=trackers,issue_categories GET /projects/12.xml?include=enabled_modules GET /projects/redmine.xml
Response:
<?xml version="1.0" encoding="UTF-8"?> <project id="1"> <name>Redmine</name> <identifier>redmine</identifier> <description> Redmine is a flexible project management web application written using Ruby on Rails framework. </description> <homepage></homepage> <created_on>Sat Sep 29 12:03:04 +0200 2007</created_on> <updated_on>Sun Mar 15 12:35:11 +0100 2009</updated_on> <is_public>true</is_public> </project>Notes:
is_public
is exposed since 2.6.0
Creating a project¶
POST /projects.xml
Creates a the project.
Parameters:
project
(required): a hash of the project attributes, including:name
(required): the project nameidentifier
(required): the project identifierdescription
homepage
is_public
: true or falseparent_id
: the parent project numberinherit_members
: true or falsetracker_ids
: (repeatable element) the tracker id: 1 for Bug, etc.enabled_module_names
: (repeatable element) the module name: boards, calendar, documents, files, gantt, issue_tracking, news, repository, time_tracking, wiki.
POST /projects.xml <name>test project</name> <identifier>test</identifier> <enabled_module_names>time_tracking</enabled_module_names> <enabled_module_names>issue_tracking</enabled_module_names>
Response:
201 Created
: project was created422 Unprocessable Entity
: project was not created due to validation failures (response body contains the error messages)
Updating a project¶
PUT /projects/[id].xml
Updates the project of given id or identifier.
Deleting a project¶
DELETE /projects/[id].xml
Deletes the project of given id or identifier.
Limitations:¶
A POST request on Redmine 1.0.1-2 (debian stable) does not work using the API key, but does work with a login/passw authentication
http://www.redmine.org/issues/12104
Updated by Lucile Quirion almost 10 years ago · 20 revisions