Tempo servlet manual
- Result example:
<?xml version="1.0" encoding="UTF-8"?> <worklogs> <worklog> <worklog_id>46445</worklog_id> <issue_id>13189</issue_id> <issue_key>CLOUD-18</issue_key> <hours>8.0</hours> <work_date>2011-10-11</work_date> <username>erica</username> <staff_id>2410724289</staff_id> <billing_key>6</billing_key> <billing_attributes>Account=201405,Billable=3600,Box=true,Input=abc,longSelect=11,Number=123,Type=3<billing_attributes/> <activity_id>v10444</activity_id> <activity_name>CloudBay Sprint 4</activity_name> <work_description>Review</work_description> <parent_key/> <reporter>john</reporter> <external_id/> <external_tstamp/> <hash_value>dc11dffc091fcc72e7358067a9488fa1e31ce314</hash_value> </worklog> </worklogs>
Activity information: The activity for the worklog is one of the following:
- The Version on the issue. If there are more than one versions on the issue the version selected as the activity is the top one in the Schedule order. Activity id has v as a prefix
- The Component on the issue. If there are more than one component on the issue the component selected is the latest (the one with the highest id). Activity id has c as a prefix
- If the issue has both a Component and a Version the version is selected as the activity
UpdateWorklogs
Updates worklogs with external information (external id & external hours).
Note: The hash_value field from getWorklog must be used with the update to verify the integrity of the update.
- URL: http(s)://yourserver.yourdomain/plugins/servlet/tempo-updateWorklog/?tempoApiToken=my-token
The Tempo API Security Token is explained in the Access control page.- HTTP GET opens a simple form to paste XML input (used for testing)
- HTTP POST accepts XML input and updates worklogs in JIRA
- The input XML must be sent as parameter: worklogs
- Example"
Input example:
Example input to UpdateWorklogs - POST-ed with the worklogs parameter<?xml version="1.0" encoding="UTF-8"?> <worklog_updates> <worklog_update> <worklog_id>46445</worklog_id> <external_id>SAP-ID-12345</external_id> <external_hours>8.0</external_hours> <external_result>OK</external_result> <hash_value>dc11dffc091fcc72e7358067a9488fa1e31ce314</hash_value> </worklog_update> </worklog_updates>
Output example:
Example output from UpdateWorklogs<?xml version="1.0" encoding="UTF-8"?> <worklog_results> <worklog_result> <worklog_id>46445</worklog_id> <external_id>SAP-ID-12345</external_id> <result_tstamp>2011-10-12 11:13:48</result_tstamp> <external_hours>8.0</external_hours> <external_result>OK</external_result> <update_result>OK</update_result> <ms>125</ms> </worklog_result> </worklog_results>
WorklogReport
Returns a worklog report as XML that can be used as input to a reporting tool (iReport).
- URL: http(s)://yourserver.yourdomain/plugins/servlet/tempo-getWorklogReport/?dateFrom=2011-01-01&dateTo=2011-02-01&billingKey=ABC&useExternalHours=true|false&tempoApiToken=my-token
The Tempo API Security Token is explained in the Access control page. - Parameters:
- dateFrom=yyyy-mm-dd
- dateTo=yyyy-mm-dd
- billingKey=billing key to be used in the query
- useExternalHours=false|true (default). External hours are hours registered in external system with updateWorklog.
BillingKeyList
Returns a list of available accounts (billing keys), to be used when creating reports.
- URL: http(s)://yourserver.yourdomain/plugins/servlet/tempo-billingKeyList&tempoApiToken=my-token
The Tempo API Security Token is explained in the Access control page. - Note that the enabled attribute can have the following values:
- "2" - Closed: The account was closed manually in Tempo Accounts.
- "3" - Open: The account is open
HolidayList
Returns a list of registered non-working days (holidays), to be used when calculating required hours in an external system
- URL: http(s)://yourserver.yourdomain/plugins/servlet/tempo-holidayList/?tempoApiToken=my-token
If you are adding a parameter like the security token in the url above you need to add ? before the first parameter.
Tempo Timesheets for Server Documentation
For the newest version Tempo Timesheets documentation, please visit our Help Center. For support, see our Support Portal.