Please note
Projects can not be edited by time trackers. Time trackers can only read projects they were granted access to.
Show all active projects
GET /projects.xml
Lists all active projects, sorted by name.
Response : 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<projects type="array">
<project>
...
</project>
<project>
...
</project>
</projects>
You can limit the output by using the parameter name:
GET /projects.xml?name=web
Lists all active projects with a name containing 'web'. Upper / lower case will be ignored.
Per default the API returns all matching projects. You can limit the output by using the limit parameter:
GET /projects.xml?limit=100
Returns the first 100 matching projects. To access projects per page, use the page attribute:
GET /projects.xml?limit=100&page=2
Returns projects 101 to 200.
Show all archived projects
GET /projects/archived.xml
Lists all archived projects, sorted by name. You can limit the output by using the parameter name here as well.
Show a single project
GET /projects/{id}.xml
Returns a single project.
Response : 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<project>
<id type="integer">123</id>
<name>Relaunch microsite</name>
<note></note>
<budget type="integer">0</budget>
<budget-type>minutes</budget>
<archived type="boolean">false</archived>
<customer-id type="integer">2</customer-id>
<customer-name>Moodster Inc.</customer-name>
<hourly-rate type="integer">0</hourly-rate>
<active-hourly-rate nil="true"></active-hourly-rate>
<hourly-rates-per-service type="array"></hourly-rates-per-service>
<updated-at type="datetime">2007-12-13T12:12:00+01:00</updated-at>
<created-at type="datetime">2007-12-13T12:12:00+01:00</created-at>
</project>
Create
POST /projects.xml
Creates a new project. All parameters are optional, except of the name.
- note
- Default: '' (empty string)
- budget
- in minutes or cents (depends on budget_type) - default: 0 (no budget specified)
- budget_type
- minutes (default) or cents
- archived
- true or false - default: false
- customer_id
- Default: nil
- hourly_rate
- in cent (a hundredth of the base unit, irrespective of the curreny) - default: 0
- hourly_rates_per_service
- List of rates per service - default: [] (empty array)
- active_hourly_rate
- nil, hourly_rate or hourly_rates_per_service - default: nil
Request Body
<project>
<name>Project XY</name>
<archived>true</archived>
</project>
Response : 201 Created
<?xml version="1.0" encoding="UTF-8"?>
<project>
<id type="integer">123</id>
<name>Project XY</name>
<note></note>
<budget type="integer">0</budget>
<budget-type>minutes</budget>
<archived type="boolean">true</archived>
<customer-id type="integer" nil="true"></customer-id>
<hourly-rate type="integer">0</hourly-rate>
<active-hourly-rate nil="true"></active-hourly-rate>
<hourly-rates-per-service type="array"></hourly-rates-per-service>
<updated-at type="datetime">2008-02-11T22:12:00+01:00</updated-at>
<created-at type="datetime">2008-02-11T22:12:00+01:00</created-at>
</project>
Edit
PUT /projects/{id}.xml
Updates the project with the given parameters.
Request Body
<project>
<note>Go!</note>
</project>
Response : 200 OK
If you change the hourly rate, it is possible to apply the new rate to all existing time entries by setting the additional parameter update_hourly_rate_on_time_entries to true. By default the new hourly rate does not apply to existing time entries.
Delete
DELETE http://demo.mite.yo.lk/projects/{id}.xml
Deletes a project. This is only possible if there are no time entries attached to this project.
