https://api.totalsynergy.com/api/v2/Timers
Response:
{
"totalItems": 1,
"items": [
{
"id": null,
"startDate": "2016-08-02T06:57:32.1788558Z",
"endDate": null,
"userName": "SynergyUser",
"text": "Api documentation",
"isRunning": true,
"groupId": "36803fa8-b782-401c-8a9e-5f8b923cc188",
"duration": 7220,
"durationDisplay": "2 hour 1 min",
"details": "02 Aug 2016",
"organisationId": 470,
"organisationName": "Fabrikam - OZ",
"organisationSlug": "fabrikam",
"projectId": 1050,
"projectName": "21 Waratah Street - Residence redevelopment",
"stageId": 0,
"stageName": null,
"taskId": 0,
"taskName": null,
"isToday": true
}
],
"currentPage": 0,
"pageSize": 10,
"totalPages": 1,
"hasNext": true
}
{Response body}
Text | string value - Description of the timer |
Duration | long value - Starting time of the timer |
ProjectId | long value - Project to assign the timer to |
TaskId | long value - Task to assign the timer to |
StageId | long value - Stage to assign the timer to |
OrganisationId | long value - Organisation to assign the timer to |
GroupId | string value - Timer group to add the timer to |
https://api.totalsynergy.com/api/v2/Timers?Text=Testing&Duration=50
Example Request:
{
"text" : "Testing",
"duration" : 50
}
Response:
{
"id": null,
"startDate": "2016-08-02T23:23:17.9866374Z",
"endDate": null,
"userName": "SynergyUser",
"text": "Testing",
"isRunning": true,
"groupId": "af7f7a12-2df8-4d33-8026-659a68aa4f9c",
"duration": 50,
"durationDisplay": "1 min",
"details": "03 Aug 2016",
"organisationId": 0,
"organisationName": null,
"organisationSlug": null,
"projectId": 0,
"projectName": null,
"stageId": 0,
"stageName": null,
"taskId": 0,
"taskName": null,
"isToday": true
}
GroupId | string value - Timer group to update |
Text | string value - Description of the timer |
Duration | long value - Starting time of the timer |
ProjectId | long value - Project to assign the timer to |
TaskId | long value - Task to assign the timer to |
StageId | long value - Stage to assign the timer to |
OrganisationId | long value - Organisation to assign the timer to |
{
"text" : "UpdatedText",
"groupId" : "af7f7a12-2df8-4d33-8026-659a68aa4f9c9"
}
Example: https://api.totalsynergy.com/api/v2/Timers/Update?GroupId=af7f7a12-2df8-4d33-8026-659a68aa4f9c9&Text=UpdatedText
Response:
{
"id": null,
"startDate": "2016-08-02T23:23:17.9866374Z",
"endDate": null,
"userName": "AdamHannigan",
"text": "UpdatedText",
"isRunning": true,
"groupId": "af7f7a12-2df8-4d33-8026-659a68aa4f9c",
"duration": 373,
"durationDisplay": "6 mins",
"details": "03 Aug 2016",
"organisationId": 0,
"organisationName": "",
"organisationSlug": "",
"projectId": 0,
"projectName": "",
"stageId": 0,
"stageName": "",
"taskId": 0,
"taskName": "",
"isToday": true
}
GroupId | string value - Timer group to start |
https://api.totalsynergy.com/api/v2/Timers/Start?GroupId=af7f7a12-2df8-4d33-8026-659a68aa4f9c9
Response:
{
"id": null,
"startDate": "2016-08-02T23:23:17.9866374Z",
"endDate": null,
"userName": "SynergyUser",
"text": "UpdatedText",
"isRunning": true,
"groupId": "af7f7a12-2df8-4d33-8026-659a68aa4f9c",
"duration": 0,
"durationDisplay": "< 1 min",
"details": "03 Aug 2016",
"organisationId": 0,
"organisationName": null,
"organisationSlug": null,
"projectId": 0,
"projectName": null,
"stageId": 0,
"stageName": "",
"taskId": 0,
"taskName": "",
"isToday": true
}
GroupId | string value - Timer group to stop |
https://api.totalsynergy.com/api/v2/Timers/Stop?GroupId=af7f7a12-2df8-4d33-8026-659a68aa4f9c9
Response:
{
"id": null,
"startDate": "2016-08-02T23:23:17.9866374Z",
"endDate": "2016-08-02T23:32:55.8250791Z",
"userName": "AdamHannigan",
"text": "UpdatedText",
"isRunning": false,
"groupId": "af7f7a12-2df8-4d33-8026-659a68aa4f9c",
"duration": 67,
"durationDisplay": "1 min",
"details": "03 Aug 2016",
"organisationId": 0,
"organisationName": null,
"organisationSlug": null,
"projectId": 0,
"projectName": null,
"stageId": 0,
"stageName": "",
"taskId": 0,
"taskName": "",
"isToday": true
}
Page | int value - Page of timers to retrieve |
Date | Date value - Timers after a given date (format - ddd MMM d yyyy HH:mm:ss) |
https://api.totalsynergy.com/api/v2/Timers/GetPagedTimers?page=1
Response:
{
"totalItems": 34,
"items": [
{
"id": null,
"startDate": "2016-08-02T23:23:17.9866374Z",
"endDate": "2016-08-02T23:32:55.8250791Z",
"userName": "AdamHannigan",
"text": "UpdatedText",
"isRunning": false,
"groupId": "af7f7a12-2df8-4d33-8026-659a68aa4f9c",
"duration": 67,
"durationDisplay": "1 min",
"details": "03 Aug 2016",
"organisationId": 0,
"organisationName": null,
"organisationSlug": null,
"projectId": 0,
"projectName": null,
"stageId": 0,
"stageName": "",
"taskId": 0,
"taskName": "",
"isToday": true
},
......8 more timer objects.......
{
"id": null,
"startDate": "2016-07-03T08:32:16.6765564Z",
"endDate": "2016-07-03T08:34:16.5971091Z",
"userName": "AdamHannigan",
"text": "New Timers UI",
"isRunning": false,
"groupId": "5f3ab51e-bbe2-4546-a856-f413149f7f86",
"duration": 120,
"durationDisplay": "2 mins",
"details": "03 Jul 2016",
"organisationId": 0,
"organisationName": "Interns R Us",
"organisationSlug": "internsrus",
"projectId": 1031,
"projectName": "",
"stageId": 0,
"stageName": null,
"taskId": 0,
"taskName": null,
"isToday": false
}
],
"currentPage": 1,
"pageSize": 10,
"totalPages": 4,
"hasNext": true
}
GroupId | string value - Timer group to delete |
https://api.totalsynergy.com/api/v2/Timers/Delete?GroupId=af7f7a12-2df8-4d33-8026-659a68aa4f9c9
Response:
{
"id": null,
"startDate": "0001-01-01T00:00:00",
"endDate": null,
"userName": null,
"text": null,
"isRunning": false,
"groupId": "af7f7a12-2df8-4d33-8026-659a68aa4f9c",
"duration": 0,
"durationDisplay": null,
"details": null,
"organisationId": 0,
"organisationName": null,
"organisationSlug": null,
"projectId": 0,
"projectName": null,
"stageId": 0,
"stageName": null,
"taskId": 0,
"taskName": null,
"isToday": false
}
https://api.totalsynergy.com/api/v2/Timers/ProjectSummary
Response:
[
{
"id": 1029,
"name": "",
"number": "",
"display": " ",
"organisationId": 8,
"organisation": "Contractors Contracts",
"group": null,
"groupId": 0
},
{
"id": 1164,
"name": "",
"number": "",
"display": " ",
"organisationId": 470,
"organisation": "Fabrikam - OZ",
"group": null,
"groupId": 0
}
]