SWOT Rest API Error Calls

Update or Error Event Logging

POST Update or Error Event

REST Post:  /api/SWOT/25/?Token=[companyToken]

Fields in Json payload
1 - 100 Reserved for SWOT Update Events
101-200 Import Data Events
501-600 Login Events
601-700 Payment and Licencing Events
Start DateTime Start Time
End DateTime End Time
RecordCount Int Available for Count of Records
Description nvarchar(254) Short Description including Token in use at time of update
Message nvarchar(max) Long Description, Dump of Error etc
{"Step":102,"Start":"2019-06-06T01:00:00","End":"2019-06-06T02:00:00","RecordCount":"5","Description":"0871fef4-53c6-4864-acd3-793f5c9df5770","Message":"Update Complete"}
Return String:
"{\r\n  \"Table\": [\r\n    {\r\n      \"Result\": 1\r\n    }\r\n  ]\r\n}" = Data Record Created
"{\r\n  \"Table\": [\r\n    {\r\n      \"Result\": -1\r\n    }\r\n  ]\r\n}" Error in POST

Get Update or Error Event

REST Get:  /api/SWOT/25/?Token=[companyToken]@Para1=[number of step]@Para2=[number of records to return]

Token: In all normal cases should be the current token of the user or the Company token. If set to 'XXX' will return all companies.
Para1 = number of the step. If left blank it will return all steps greater than 100
Para2 = number of records to return. If left blank will return 100 most recent records.
Example Return
"{\r\n \"Table\": [\r\n {\r\n \"Dataset\": \"Lifestrm\",\r\n \"Step\": 2,\r\n \"Start\": \"2018-06-26T23:00:04.14\",\r\n \"End\": \"2018-06-26T23:26:27.163\",\r\n \"RecordCount\": 15338,\r\n \"Description\": null,\r\n \"Message\": \"2. Started: 2018.06.26 23:00:04 Finished: 23:26:27. OppRecords Created: 15338 Seconds:1583\"\r\n },\r\n {\r\n \"Dataset\": \"Lifestrm\",\r\n \"Step\": 2,\r\n \"Start\": \"2018-06-25T22:00:41.03\",\r\n \"End\": \"2018-06-25T22:21:16.747\",\r\n \"RecordCount\": 15296,\r\n \"Description\": null,\r\n \"Message\": \"2. Started: 2018.06.25 22:00:41 Finished: 22:21:16. OppRecords Created: 15296 Seconds:1235\"\r\n },\r\n {\r\n \"Dataset\": \"lifestrm\",\r\n \"Step\": 2,\r\n \"Start\": \"2018-05-31T19:32:33.293\",\r\n \"End\": \"2018-05-31T19:38:27.347\",\r\n \"RecordCount\": 5377,\r\n \"Description\": null,\r\n \"Message\": \"2. Started: 2018.05.31 19:32:33 Finished: 19:38:27. OppRecords Created: 5377 Seconds:354\"\r\n },\r\n {\r\n \"Dataset\": \"Lifestrm\",\r\n \"Step\": 2,\r\n \"Start\": \"2019-06-02T20:26:37.347\",\r\n \"End\": \"2019-06-02T20:35:15.873\",\r\n \"RecordCount\": 20749,\r\n \"Description\": null,\r\n \"Message\": \"2. Started: 2019.06.02 20:26:37 Finished: 20:35:15. OppRecords Created: 20749 Seconds:518\"\r\n },\r\n {\r\n \"Dataset\": \"Lifestrm\",\r\n \"Step\": 2,\r\n \"Start\": \"2019-05-30T20:27:08.307\",\r\n \"End\": \"2019-05-30T20:36:27.52\",\r\n \"RecordCount\": 21093,\r\n \"Description\": null,\r\n \"Message\": \"2. Started: 2019.05.30 20:27:08 Finished: 20:36:27. OppRecords Created: 21093 Seconds:559\"\r\n }\r\n ]\r\n}"

Add Feedback