Activities provide a secondary way of classifying your time entries independent of jobs.

You can check if activities are enabled using the Account Information interface (account / time-settings / show-activities). Administrators can enable activities from Syncd's web interface via Settings / Time Tracking.

Activity Managers can view, create, update and delete activities. Other users can only view their assigned activities.

Show

Request

GET /activities/#{activity-id}.xml

Response

Status: 200 OK

<activity>
  <id type="integer">14</id>
  <name>Client interview</name>
  <active type="boolean">true</active>
  <code>INT</code>
  <description>Non-billable introductory interview</description>
  <url/>
  <!-- if include=timestamps -->
  <created-at type="datetime">2007-08-16T20:49:05Z</created-at>
  <updated-at type="datetime">2008-07-12T13:30:38Z</updated-at>
  <!-- end -->
</activity>

List

Request

All activities:

GET /activities.xml

All active activities:

GET /activities/active.xml

All inactive activities:

GET /activities/inactive.xml

Activities assigned to the current user:

GET /activities/my_assignments.xml

Active activities assigned to the current user:

GET /activities/my_active_assignments.xml

Inactive activities assigned to the current user:

GET /activities/my_inactive_assignments.xml

Optional parameters

Specify start and end to request a specific range of items. For example:

GET /activities.xml?start=1&end=4

Response

Status: 200 OK

<activities type="array">
  <activity>
    ...
  </activity>
  ...
</activities>

Create

Request

POST /activities.xml

Include the following data with your request:

<activity>
  <!-- name (required, unique, max-length=50) -->
  <name>Client interview</name>
  <!-- active (optional boolean, default=true) -->
  <active>true</active>
  <!-- code (optional identifier, max-length=50) -->
  <code>INT</code>
  <!-- description (optional, max-length=255) -->
  <description>Non-billable introductory interview</description>
  <!-- url (optional external link, max-length=255) -->
  <url></url>
</activity>

Response

Status: 201 Created

<activity>
  <id type="integer">#{new-activity-id}</id>
  <name>Client interview</name>
  <active type="boolean">true</active>
  <code>INT</code>
  <description>Non-billable introductory interview</description>
  <url></url>
</activity>

Update

Request

PUT /activities/#{activity-id}.xml

Include ANY of the following data with your request:

<activity>
  <name>Client interview</name>
  <active>true</active>
  <code>INT</code>
  <description>Non-billable introductory interview</description>
  <url></url>
</activity>

Response

Status: 200 OK

Delete

Activities associated with time entries can not be deleted. Instead, deactivate them (update the activity, setting active to false).

Request

DELETE /activities/#{activity-id}.xml

Response

Status: 200 OK

Continue to Activity Assignments