This page is about an old version of Active Collab that's not developed anymore.
Click here to open the documentation for the latest version.

Working with Files

Each project has a Files section, where files can be uploaded, discussed and file versions tracked. The commands described in this article will allow you to manage files.

Compatibility Note

File related API commands were introduced with activeCollab 3.3.9 and are not available in the older releases.

About Files #

The following file related fields are available:

  • name (string) - The File name is an optional field when uploading a new file (if omitted, the system will use the original file name of the uploaded file).
  • body (text) - The file description.
  • visibility (integer) - Object visibility. 0 stands for private, and 1 for normal visibility.
  • milestone_id (integer) - The ID of the parent Milestone.
  • category_id (integer) - The Category ID.

Files can be used with the following resources:

Additional commands are available here:

projects/:project_id/files/files #

This command lists all file types from a project.

FIles attached to other Object

Please note that the files attached to other project elements (like Tasks, comments, etc.) are not listed here. Only files uploaded directly to the project Files section or via the API commands are listed.

Method: GET

Example response:

1
2
3
4
5
6
7
8
9
<files>
  <file>
    <id>1</id>
    <name>
      <![CDATA[image.png]]>
    </name>
     ...
  </file>
</files>

projects/:project_id/files/files/upload #

This command will enable you to upload a single file from your computer to activeCollab. Make sure that you encode your request as multipart/form-data.

Method: POST

Request example:

1
2
file[body]=File description
submitted=submitted
About multipart/form-data request

Additional information on sending the multipart/form-data request and adding a file to it can be found in our documentation or in the library of the tool used for the API request.

Response:

1
2
3
4
5
6
7
<file>
  <id>1</id>
  <name>
    <![CDATA[image.png]]>
  </name>
  ...
</file>

projects/:project_id/files/archive #

This command displays all archived Files from this project by using.

Method: GET

Example response:

1
2
3
4
5
6
7
8
9
<file>
  <file>
    <id>12</id>
    <name>
      <![CDATA[File example]]>
    </name>
     ...
  </file>
</file>

projects/:project_id/files/files/:file_id #

This command displays the file details.

Method: GET

Example response:

1
2
3
4
5
6
7
<file>
  <id>1</id>
  <name>
    <![CDATA[image.png]]>
  </name>
  ...
</file>

projects/:project_id/files/files/:file_id/edit #

This command updates the file details.

Method: POST

Example request:

1
2
file[name]=new-image-name.png
submitted=submitted

Response:

1
2
3
4
5
6
7
<file>
  <id>1</id>
  <name>
    <![CDATA[new-image-name.png]]>
  </name>
   ...
</file>