Commands listed in this chapter are used for management of your projects via the API.

1. Project Fields

  1. name (string) - Project name;
  2. overview (text) - Project overview;
  3. default_visibility (integer) - Default visibility that is pre-selected for objects in this project. 0 for private, 1 for normal;
  4. starts_on (date) - Date when the project starts;
  5. group_id (integer) - ID of the project group;
  6. company_id (integer) - ID of the client company;
  7. leader_id (integer) - ID of the user who is the Project Leader;
  8. status (string) - Project status. This field is available only for the edit-status action and has four possible values: active, paused, completed and canceled.

2. /projects

Displays all projects that the authenticated user has access to. This function will show all - active, paused, completed and canceled projects.

Method: GET

Example response:

<projects>
  <project>
    <id>1</id>
    <name>
      <![CDATA[First Project]]>
    </name>
    <overview>
      <![CDATA[<p>This is overview of the first project</p>]]>
    </overview>
    <status>
      <![CDATA[active]]>
    </status>
    <type>...</type>
    <permalink>...</permalink>
    <leader_id>...</leader_id>
    <company_id>...</company_id>
    <group_id>...</group_id>
  </project>
</projects>

3. /projects/add

Creates a new project.

Method: POST.

Additionally you can include a project_template_id variable, which should be a valid project ID. If this variable is included, the new project will be created using an existing project (determined by the ID that has been passed) as a template.

Example request:

submitted=submitted
project[name] = Testing API
project[leader_id] = 1

Response:

<project>
  <id>2</id>
  <name>
    <![CDATA[Created through API]]>
  </name>
  <overview></overview>
  <status>
    <![CDATA[active]]>
  </status>
  <permalink>...</permalink>
  <leader_id>...</leader_id>
  <company_id>...</company_id>
  <group_id>...</group_id>
</project>

4. /projects/:project_id

Shows properties of the specific project. Besides project properties, this request also returns:

  1. Brief information about the Projet Leader;
  2. Brief information about the client;
  3. Permissions that any logged in user has in each project area.

Method: GET

Example response:

<project>
  <id>2</id>
  <name>
    <![CDATA[Created through API]]>
  </name>
  <overview></overview>
  <status>
    <![CDATA[active]]>
  </status>
  <permalink>...</permalink>
  <leader>...</leader>
  <company_id>0</company_id>
  <group_id>0</group_id>
  <logged_user_permissions>
    <role>
      <![CDATA[administrator]]>
    </role>
    <permissions>
      <milestone>3</milestone>
      <discussion>3</discussion>
      <file>3</file>
      <page>3</page>
      <ticket>3</ticket>
      <timerecord>3</timerecord>
    </permissions>
  </logged_user_permissions>
  <icon_url>...</icon_url>
</project>

5. /projects/:project_id/edit

Updates project properties.

Method: POST.

Request example:

submitted = submitted
project[name] = New name
project[company_id] = 16
<project>
  <id>2</id>
  <name>
    <![CDATA[New name]]>
  </name>
  <overview></overview>
  <status>
    <![CDATA[active]]>
  </status>
  <permalink>...</permalink>
  <leader_id>15</leader_id>
  <company_id>16</company_id>
  <group_id>0</group_id>
</project>

6. /projects/:project_id/edit-status

Updates the project status, which can have four different values:

  1. Active;
  2. Paused;
  3. Completed;
  4. Canceled.

Method: POST.

Request example:

submitted = submitted
project[status] = completed

Response:

<project>
  <id>2</id>
  <name>
    <![CDATA[Project Name]]>
  </name>
  <overview></overview>
  <status>
    <![CDATA[completed]]>
  </status>
  <permalink>...</permalink>
  <leader_id>15</leader_id>
  <company_id>16</company_id>
  <group_id>0</group_id>
</project>

7. /projects/:project_id/delete

Delete a selected project. If successful, system will return a HTTP status 200 OK message.

Note

This operation is final and when it is executed you will not be able to restore it. There is no undo option!

Method: POST.

Request example:

submitted=submitted

8. /projects/:project_id/user-tasks

Returns all tasks assigned to a logged in user for that particular project.

Method: GET

Since: activeCollab 1.1.2

<assignments>
  <assignment>
    <id>10</id>
    <type>
      <![CDATA[Ticket]]>
    </type>
    <name>
      <![CDATA[One ticket]]>
    </name>
    <body>...</body>
    <state>3</state>
    <visibility>0</visibility>
    <created_on>2009-03-24 13:44:34</created_on>
    <created_by_id>15</created_by_id>
    <updated_on></updated_on>
    <updated_by_id>0</updated_by_id>
    <version>1</version>
    <permalink>...</permalink>
    <priority>0</priority>
    <due_on>...</due_on>
    <completed_on>...</completed_on>
    <completed_by_id>0</completed_by_id>
    <project_id>2</project_id>
    <parent_id>0</parent_id>
    <milestone_id>0</milestone_id>
    <permissions>
      <can_edit>1</can_edit>
      <can_delete>1</can_delete>
      <can_change_visibility>1</can_change_visibility>
      <can_move>1</can_move>
      <can_copy>1</can_copy>
      <can_change_complete_status>1</can_change_complete_status>
    </permissions>
    <ticket_id>1</ticket_id>
  </assignment>
</assignments>