Time Track

Fields

id
time track unique identifier number
title
time track title string
start
time track start date and time
duration
time track duration (in hours)
created-at
discussion creation time
updated-at
discussion last update time
user_id
time track user identifier number
asset_type
time track associated asset type string
asset_id
time track associated asset id number

Methods

get_all

returns all time tracks from the given project

Parameters

  • start: START (start of time track after this date) - not mandatory
  • finish: FINISH (start of time track before this date) - not mandatory
  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/project_alias/api/timetracks/get_all - all time tracks
http://company_alias.goplanapp.com/project_alias/api/timetracks/get_all?start=2009-07-19&finish;=2009-07-21
http://company_alias.goplanapp.com/project_alias/api/timetracks/get_all?&format;=json

Output Formats

  • XML - all time tracks

    
    <?xml version="1.0" encoding="UTF-8"?>
    <time-tracks type="array">
    	<time-track>
    		<asset-type nil="true"/>
    		<created-at type="datetime">2009-07-17T15:56:26+01:00</created-at>
    		<duration type="decimal">2.0</duration>
    		<id type="integer">10</id>
    		<start type="datetime">2009-07-23T00:00:00+01:00</start>
    		<title>This one won't appear in the filtering</title>
    		<updated-at type="datetime">2009-07-17T15:56:26+01:00</updated-at>
    		<user-id type="integer">5</user-id>
    	</time-track>
    	<time-track>
    		<asset-type nil="true"/>
    		<created-at type="datetime">2009-07-14T00:19:28+01:00</created-at>
    		<duration type="decimal">1.5</duration>
    		<id type="integer">5</id>
    		<start type="datetime">2009-07-22T00:00:00+01:00</start>
    		<title>Time tracking description</title>
    		<updated-at type="datetime">2009-07-14T00:19:28+01:00</updated-at>
    		<user-id type="integer">3</user-id>
    	</time-track>
    	<time-track>
    		<asset-type nil="true"/>
    		<created-at type="datetime">2009-07-14T00:18:57+01:00</created-at>
    		<duration type="decimal">2.0</duration>
    		<id type="integer">4</id>
    		<start type="datetime">2009-07-20T00:00:00+01:00</start>
    		<title>Yet another time track</title>
    		<updated-at type="datetime">2009-07-14T00:18:57+01:00</updated-at>
    		<user-id type="integer">2</user-id>
    	</time-track>
    	<time-track>
    		<asset-type nil="true"/>
    		<created-at type="datetime">2009-07-14T09:43:11+01:00</created-at>
    		<duration type="decimal">0.01</duration>
    		<id type="integer">6</id>
    		<start type="datetime">2009-07-14T09:43:11+01:00</start>
    		<title>testing stuff</title>
    		<updated-at type="datetime">2009-07-14T09:43:16+01:00</updated-at>
    		<user-id type="integer">4</user-id>
    	</time-track>
    	<time-track>
    		<asset-type nil="true"/>
    		<created-at type="datetime">2009-07-14T00:18:33+01:00</created-at>
    		<duration type="decimal">3.0</duration>
    		<id type="integer">3</id>
    		<start type="datetime">2009-07-14T00:00:00+01:00</start>
    		<title>Time</title>
    		<updated-at type="datetime">2009-07-14T00:18:33+01:00</updated-at>
    		<user-id type="integer">1</user-id>
    	</time-track>
    </time-tracks>
    		
  • JSON - all time tracks

    
    [{"time_track": {"updated_at": "2009/07/17 15:56:26 +0100", "title": "This one won't appear in the filtering", "id": 10, "start": "2009/07/23 00:00:00 +0100", "user_id": 5, "duration": 2.0, "asset_type": null, "created_at": "2009/07/17 15:56:26 +0100"}}, {"time_track": {"updated_at": "2009/07/14 00:19:28 +0100", "title": "Time tracking description", "id": 5, "start": "2009/07/22 00:00:00 +0100", "user_id": 3, "duration": 1.5, "asset_type": null, "created_at": "2009/07/14 00:19:28 +0100"}}, {"time_track": {"updated_at": "2009/07/14 00:18:57 +0100", "title": "Yet another time track", "id": 4, "start": "2009/07/20 00:00:00 +0100", "user_id": 2, "duration": 2.0, "asset_type": null, "created_at": "2009/07/14 00:18:57 +0100"}}, {"time_track": {"updated_at": "2009/07/14 09:43:16 +0100", "title": "testing stuff", "id": 6, "start": "2009/07/14 09:43:11 +0100", "user_id": 4, "duration": 0.01, "asset_type": null, "created_at": "2009/07/14 09:43:11 +0100"}}, {"time_track": {"updated_at": "2009/07/14 00:18:33 +0100", "title": "Time ", "id": 3, "start": "2009/07/14 00:00:00 +0100", "user_id": 1, "duration": 3.0, "asset_type": null, "created_at": "2009/07/14 00:18:33 +0100"}}]
    		

get

returns a specific time track, the user and asset (if any)

Parameters

  • id: ID (unique time track identifier) - mandatory
  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/project_alias/api/timetracks/get?id=24
http://company_alias.goplanapp.com/project_alias/api/timetracks/get_all?id=24&format;=json

Output Formats

  • XML - all time tracks

    
    <?xml version="1.0" encoding="UTF-8"?>
    <time-track>
    	<asset-type>Task</asset-type>
    	<created-at type="datetime">2009-07-17T17:24:32+01:00</created-at>
    	<duration type="decimal">3.5</duration>
    	<id type="integer">24</id>
    	<start type="datetime">2009-07-15T00:00:00+01:00</start>
    	<title>We will now create a time track</title>
    	<updated-at type="datetime">2009-07-17T17:24:32+01:00</updated-at>
    	<user-id type="integer">1</user-id>
    	<user>
    		<alias>john</alias>
    		<created-at type="datetime">2009-05-04T15:36:26+01:00</created-at>
    		<email>[email protected]</email>
    		<id type="integer">1</id>
    		<name>John</name>
    		<picture-url>http://goplanapp.com/content/servers.jpg</picture-url>
    		<time-zone>Lisbon</time-zone>
    		<updated-at type="datetime">2009-06-30T02:01:52+01:00</updated-at>
    		<user-type type="integer">0</user-type>
    	</user>
    	<asset>
    		<cid type="integer">35</cid>
    		<created-at type="datetime">2009-07-17T16:32:38+01:00</created-at>
    		<description/>
    		<due-date type="date" nil="true"/>
    		<id type="integer">39</id>
    		<parent-id type="integer" nil="true"/>
    		<status type="integer">0</status>
    		<title>Buy snacks</title>
    		<updated-at type="datetime">2009-07-17T16:32:38+01:00</updated-at>
    	</asset>
    </time-track>
    		
  • JSON - all time tracks

    
    {"time_track": {"updated_at": "2009/07/17 17:31:54 +0100", "title": "We will now create a time track", "user": {"name": "John", "updated_at": "2009/06/30 02:01:52 +0100", "picture_url": "http://goplanapp.com/content/servers.jpg", "id": 1, "user_type": 0, "time_zone": "Lisbon", "alias": "john", "email": "[email protected]", "created_at": "2009/05/04 15:36:26 +0100"}, "id": 26, "start": "2009/07/15 00:00:00 +0100", "asset": {"status": 0, "updated_at": "2009/07/17 16:32:38 +0100", "title": "Buy snacks", "id": 39, "description": "", "due_date": null, "cid": 35, "parent_id": null, "created_at": "2009/07/17 16:32:38 +0100"}, "user_id": 1, "duration": 3.5, "asset_type": "Task", "created_at": "2009/07/17 17:31:54 +0100"}}			
    		

create

creates a time track and returns it, the user and the asset (if any)

Parameters

  • timetrack[title]: TIMETRACK_TITLE (title of the time track) - mandatory
  • timetrack[start]: TIMETRACK_START (starting date of the time track) - mandatory
  • timetrack[duration]: TIMETRACK_DURATION (duration of the time track) - mandatory
  • timetrack[asset_type]: TIMETRACK_ASSET_TYPE (type of the item related to the time track: ticket, task) - not mandatory
  • timetrack[asset_cid]: TIMETRACK_ASSET_CID (project wide ID of the item related to the time track) - not mandatory (mandatory if asset type is present)
  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/project_alias/api/timetracks/create - pass the other parameters by POST
http://company_alias.goplanapp.com/project_alias/api/timetracks/create?timetrack[title]=We will now create a time track&timetrack;[start]=2009-07-15T09:43:11+01:00&timetrack;[duration]=2.35&timetrack;[asset_cid]=19
http://company_alias.goplanapp.com/project_alias/api/timetracks/create?&format;=json&callback;=handlerFunction&

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <time-track>
    	<asset-type>Task</asset-type>
    	<created-at type="datetime">2009-07-17T17:24:32+01:00</created-at>
    	<duration type="decimal">3.5</duration>
    	<id type="integer">24</id>
    	<start type="datetime">2009-07-15T00:00:00+01:00</start>
    	<title>We will now create a time track</title>
    	<updated-at type="datetime">2009-07-17T17:24:32+01:00</updated-at>
    	<user-id type="integer">1</user-id>
    	<user>
    		<alias>john</alias>
    		<created-at type="datetime">2009-05-04T15:36:26+01:00</created-at>
    		<email>[email protected]</email>
    		<id type="integer">1</id>
    		<name>John</name>
    		<picture-url>http://goplanapp.com/content/servers.jpg</picture-url>
    		<time-zone>Lisbon</time-zone>
    		<updated-at type="datetime">2009-06-30T02:01:52+01:00</updated-at>
    		<user-type type="integer">0</user-type>
    	</user>
    	<asset>
    		<cid type="integer">35</cid>
    		<created-at type="datetime">2009-07-17T16:32:38+01:00</created-at>
    		<description/>
    		<due-date type="date" nil="true"/>
    		<id type="integer">39</id>
    		<parent-id type="integer" nil="true"/>
    		<status type="integer">0</status>
    		<title>Buy snacks</title>
    		<updated-at type="datetime">2009-07-17T16:32:38+01:00</updated-at>
    	</asset>
    </time-track>
    		
  • JSON

    
    handlerFunction({"time_track": {"updated_at": "2009/07/17 17:31:54 +0100", "title": "We will now create a time track", "user": {"name": "John", "updated_at": "2009/06/30 02:01:52 +0100", "picture_url": "http://goplanapp.com/content/servers.jpg", "id": 1, "user_type": 0, "time_zone": "Lisbon", "alias": "john", "email": "[email protected]", "created_at": "2009/05/04 15:36:26 +0100"}, "id": 26, "start": "2009/07/15 00:00:00 +0100", "asset": {"status": 0, "updated_at": "2009/07/17 16:32:38 +0100", "title": "Buy snacks", "id": 39, "description": "", "due_date": null, "cid": 35, "parent_id": null, "created_at": "2009/07/17 16:32:38 +0100"}, "user_id": 1, "duration": 3.5, "asset_type": "Task", "created_at": "2009/07/17 17:31:54 +0100"}})
    		

update

updates a time track and returns it

Parameters

  • id: ID (unique identifier of the time track) - mandatory
  • timetrack[title]: TIMETRACK_TITLE (title of the time track) - mandatory
  • timetrack[duration]: TIMETRACK_DURATION (duration of the time track) - not mandatory
  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/project_alias/api/timetracks/update - pass the other parameters by POST
http://company_alias.goplanapp.com/project_alias/api/timetracks/update?id=24&timetrack;[title]=This is an updated time track&timetrack;[start]=2009-07-15T09:43:11+01:00&timetrack;[duration]=2.2
http://company_alias.goplanapp.com/project_alias/api/timetracks/update?id=24&timetrack;[title]=This is an updated time track&timetrack;[start]=2009-07-15T09:43:11+01:00&timetrack;[duration]=2.2&format;=json

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <time-track>
    	<asset-type>Task</asset-type>
    	<created-at type="datetime">2009-07-17T17:24:32+01:00</created-at>
    	<duration type="decimal">2.2</duration>
    	<id type="integer">24</id>
    	<start type="datetime">2009-07-15T00:00:00+01:00</start>
    	<title>This is an updated time track</title>
    	<updated-at type="datetime">2009-07-17T17:49:38+01:00</updated-at>
    	<user-id type="integer">1</user-id>
    	<user>
    		<alias>john</alias>
    		<created-at type="datetime">2009-05-04T15:36:26+01:00</created-at>
    		<email>[email protected]</email>
    		<id type="integer">1</id>
    		<name>John</name>
    		<picture-url>http://goplanapp.com/content/servers.jpg</picture-url>
    		<time-zone>Lisbon</time-zone>
    		<updated-at type="datetime">2009-06-30T02:01:52+01:00</updated-at>
    		<user-type type="integer">0</user-type>
    	</user>
    	<asset>
    		<cid type="integer">35</cid>
    		<created-at type="datetime">2009-07-17T16:32:38+01:00</created-at>
    		<description/>
    		<due-date type="date" nil="true"/>
    		<id type="integer">39</id>
    		<parent-id type="integer" nil="true"/>
    		<status type="integer">0</status>
    		<title>Buy snacks</title>
    		<updated-at type="datetime">2009-07-17T16:32:38+01:00</updated-at>
    	</asset>
    </time-track>
    		
  • JSON

    
    {"time_track": {"updated_at": "2009/07/17 17:49:38 +0100", "title": "This is an updated time track", "user": {"name": "John", "updated_at": "2009/06/30 02:01:52 +0100", "picture_url": "http://goplanapp.com/content/servers.jpg", "id": 1, "user_type": 0, "time_zone": "Lisbon", "alias": "john", "email": "[email protected]", "created_at": "2009/05/04 15:36:26 +0100"}, "id": 26, "start": "2009/07/15 00:00:00 +0100", "asset": {"status": 0, "updated_at": "2009/07/17 16:32:38 +0100", "title": "Buy snacks", "id": 39, "description": "", "due_date": null, "cid": 35, "parent_id": null, "created_at": "2009/07/17 16:32:38 +0100"}, "user_id": 1, "duration": 3.5, "asset_type": "Task", "created_at": "2009/07/17 17:31:54 +0100"}}
    		

destroy

deletes a time track and returns it

Parameters

  • id: ID (unique identifier of the time track) - mandatory
  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <time-track>
    	<asset-type>Task</asset-type>
    	<created-at type="datetime">2009-07-17T17:24:32+01:00</created-at>
    	<duration type="decimal">2.2</duration>
    	<id type="integer">24</id>
    	<start type="datetime">2009-07-15T00:00:00+01:00</start>
    	<title>This is an updated time track</title>
    	<updated-at type="datetime">2009-07-17T17:49:38+01:00</updated-at>
    	<user-id type="integer">1</user-id>
    	<user>
    		<alias>john</alias>
    		<created-at type="datetime">2009-05-04T15:36:26+01:00</created-at>
    		<email>[email protected]</email>
    		<id type="integer">1</id>
    		<name>John</name>
    		<picture-url>http://goplanapp.com/content/servers.jpg</picture-url>
    		<time-zone>Lisbon</time-zone>
    		<updated-at type="datetime">2009-06-30T02:01:52+01:00</updated-at>
    		<user-type type="integer">0</user-type>
    	</user>
    	<asset>
    		<cid type="integer">35</cid>
    		<created-at type="datetime">2009-07-17T16:32:38+01:00</created-at>
    		<description/>
    		<due-date type="date" nil="true"/>
    		<id type="integer">39</id>
    		<parent-id type="integer" nil="true"/>
    		<status type="integer">0</status>
    		<title>Buy snacks</title>
    		<updated-at type="datetime">2009-07-17T16:32:38+01:00</updated-at>
    	</asset>
    </time-track>
    		
  • JSON

    
    {"time_track": {"updated_at": "2009/07/17 17:49:38 +0100", "title": "This is an updated time track", "user": {"name": "John", "updated_at": "2009/06/30 02:01:52 +0100", "picture_url": "http://goplanapp.com/content/servers.jpg", "id": 1, "user_type": 0, "time_zone": "Lisbon", "alias": "john", "email": "[email protected]", "created_at": "2009/05/04 15:36:26 +0100"}, "id": 26, "start": "2009/07/15 00:00:00 +0100", "asset": {"status": 0, "updated_at": "2009/07/17 16:32:38 +0100", "title": "Buy snacks", "id": 39, "description": "", "due_date": null, "cid": 35, "parent_id": null, "created_at": "2009/07/17 16:32:38 +0100"}, "user_id": 1, "duration": 3.5, "asset_type": "Task", "created_at": "2009/07/17 17:31:54 +0100"}}
    		

Follow us on Twitter and Facebook. Talk to us and Get Satisfaction.

Goplan is a product of Reinhardt Media, Ltd. | Contact support | Terms of Service