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.

Shared Resource: Categories

The Categories in activeCollab are used by different project sections to allow users to categorize data. Commands and parameters that handle Categories are the same for all sections, but the command prefixes can vary from one section to another.

Category Fields #

Only the filed name has to be used:

  • name (string) - The name of the Category is a required field and it has to be unique in the selected section.

{context}/categories #

This command lists all available Categories in the given context.

Method: GET

Example response:

1
2
3
4
5
6
7
8
9
10
11
12
<categories>
  <category>
    <id>1</id>
    <name>
      <![CDATA[example category]]>
    </name>
    ...
    <items_count>5</items_count>
  </category>

  ...
</categories>

{context}/categories/add #

This command creates a new Category in the given context. The name of the category needs to be unique in the selected context.

Method: POST

Request example:

1
2
3
4
category={
name=api category
}
submitted=submitted

Response:

1
2
3
4
5
6
7
<category>
  <id>1</id>
  <name>
    <![CDATA[Example Category]]>
  </name>
   ...
</category>

{context}/categories/project_category_id #

This command displays the Category details, including information the items listed in the specified category.

Method: GET

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
<category>
  <id>1</id>
  <name>
    <![CDATA[Example Category]]>
  </name>
   ...
  <items>
    <item>
      ...
    </item>
    ...
  </items>
</category>

{context}/categories/project_category_id/edit #

This command updates the existing Category name.

Method: POST

Request example:

1
2
3
4
category={
name=category name changed with api
}
submitted=submitted

Response:

1
2
3
4
5
6
7
<category>
  <id>1</id>
  <name>
    <![CDATA[New Category Name]]>
  </name>
    ...
</category>

{context}/categories/project_category_id/delete #

This command removes a specific Category from the database. If successful, the system will return a HTTP status 200 OK message. Note that the items in this Category will not be deleted, but set to "Uncategorised".

Method: POST

Request example:

1
submitted=submitted