-
Home -
GoPlant API v3.0

API 2.0: For any of the endpoints that require a start and end date / time, you can now pass a storage group date / time with "StartDatetimeSG" and "EndDatetimeSG" instead of "StartDatetimeUTC" and "EndDatetimeUTC". Include "StorageGroupID" to tell the system which storage group date / time you are sending.
{ "RowStart": 0, "RowCount": 2, "ReturnType": "json", "StartDatetimeUTC":"2017-11-15T01:57:53", "EndDatetimeUTC": "2017-11-16T19:57:53", "TagSourceCodeName": "MAXIMO", "TagDataValue": "", "EndpointVersion": null (null = latest 1.x) }
{ "status": { "HTTPStatusCode": 200, "HTTPStatus": "OK", "RowStart": 0, "RowsReturned": 3, "LastIdReturned": 259761, "RequestBegin": "2019-05-07T20:24:54.3566363Z", "StopWatch": { "IsRunning": true, "Elapsed": "00:00:00.0044794", "ElapsedMilliseconds": 4, "ElapsedTicks": 50975 }, "APIversion": "5.13.0.0", "EndpointVersionReturned": 1.1, "ExternalRequest": { "RowStart": 0, "RowCount": 3, "StartDatetimeUTC": "2017-11-15T01:57:53", "EndDatetimeUTC": "2018-11-16T19:57:53", "ResponseID": null, "TagSourceCodeName": "HACHWIMS", "ReturnType": 1, "EndpointVersion": null, "EndpointVersionReturned": 1.1 } }, "data": [ { "responseID": 259759, "responseType": "Number", "responseValue": "73.00", "responseDate": "2018-05-25T15:55:49", "stepComments": "Step Note spot", "stepWasVisible": null, "formName": "U1FEXT", "assetTag": "U1FEXTINGUISHER08", "assetDescription": null, "assetStatus": "Nominal", "roundName": "Safety Round", "roundVariantName": "Shift1", "elementLabel": "U1FEXTINGUISHER08 / U1FEXT", "taskName": "", "taskEventStatus": "", "tagSourceCode": "HACHWIMS", "tagSourceDisplayName": "Hach WIMS", "tagDataValue": "Hach WIMS Asset01", "tagDataDescription": "Hach WIMS Asset01", "operatorFullName": "Max Admin", "completedFormID": 29182, "completedRoundID": 7816, "completedRoundElementID": 48954, "taskEventID": null, "timeZone": "America/Chicago", "lastUpdated": "2018-05-25T15:55:21", "responseLabel": "number_1", "roundStorageGroupID": 425, "roundStorageGroupName:"TXRG1", "roundStartDate": "2018-05-23T11:05:48.84", "roundEndDate": "2018-05-23T13:04:48.84" }, { "responseID": 259760, "responseType": "List", "responseValue": "Class B", "responseDate": "2018-05-25T15:55:21", "stepComments": "Step Note spot", "stepWasVisible": null, "formName": "U1FEXT", "assetTag": "U1FEXTINGUISHER08", "assetDescription": null, "assetStatus": "Nominal", "roundName": "Safety Round", "roundVariantName": "Shift1", "elementLabel": "U1FEXTINGUISHER08 / U1FEXT", "taskName": "", "taskEventStatus": "", "tagSourceCode": "HACHWIMS", "tagSourceDisplayName": "Hach WIMS", "tagDataValue": "Hach WIMS Asset02", "tagDataDescription": "Hach WIMS Asset02", "operatorFullName": "Max Admin", "completedFormID": 29182, "completedRoundID": 7816, "completedRoundElementID": 48954, "taskEventID": null, "timeZone": "America/Chicago", "lastUpdated": "2018-05-25T15:55:21", "responseLabel": "list_1", "roundStorageGroupID": 425, "roundStorageGroupName:"TXRG1", "roundStartDate": "2018-05-23T11:05:48.84", "roundEndDate": "2018-05-23T13:04:48.84" }, { "responseID": 259761, "responseType": "Yes/No", "responseValue": "No", "responseDate": "2018-05-25T15:55:30", "stepComments": "Step Note spot", "stepWasVisible": null, "formName": "U1FEXT", "assetTag": "U1FEXTINGUISHER08", "assetDescription": null, "assetStatus": "Nominal", "roundName": "Safety Round", "roundVariantName": "Shift1", "elementLabel": "U1FEXTINGUISHER08 / U1FEXT", "taskName": "", "taskEventStatus": "", "tagSourceCode": "HACHWIMS", "tagSourceDisplayName": "Hach WIMS", "tagDataValue": "Hach WIMS Asset03", "tagDataDescription": "Hach WIMS Asset03", "operatorFullName": "Max Admin", "completedFormID": 29182, "completedRoundID": 7816, "completedRoundElementID": 48954, "taskEventID": null, "timeZone": "America/Chicago", "lastUpdated": "2018-05-25T15:55:21", "responseLabel": "YesNo_1", "roundStorageGroupID": 425, "roundStorageGroupName:"TXRG1", "roundStartDate": "2018-05-23T11:05:48.84", "roundEndDate": "2018-05-23T13:04:48.84" } ] }
{"message": "Unauthorized API access"}
{"message": "Missing body in post."}
{"message": "RowStart cannot be less than 0."}
{"message": "RowCount cannot be less than 0."}
{"message": "You must pass a source code name."}
{"message": "StartDatetimeUTC cannot be null"}OR
{"message": "EndDatetimeUTC cannot be null"}OR
{"message": "LastUpdateUTC cannot be null"}
{"message": "ResponsesBetweenResponseDate Error: Invalid Version Requested [1.1]. at ...
{"message":"You must pass a source code name."}
curl -X POST \ http://localhost:9080/api/svc/Historian/HistorianBetweenDateTimes \ -H 'Authorization: Basic TXlUYWdTb3VyY2UxOjhFRTMxNTFCMUQwODQzOUZCMEQyQjhFQ0MzMzNBNkZF' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -d '{ "RowStart": 0, "RowCount": 2, "ReturnType": "json", "StartDatetimeUTC":"2017-11-15T01:57:53", "EndDatetimeUTC": "2017-11-16T19:57:53", "TagSourceCodeName": "MAXIMO", "EndpointVersion": 1.1 }'
var client = new RestClient("http://localhost:9080/api/svc/Historian/HistorianBetweenDateTimes"); var request = new RestRequest(Method.POST); request.AddHeader("cache-control", "no-cache"); request.AddHeader("Authorization", "Basic SEFDSFdJTVM6REVWTC5URVNUREVWRUxPUE1FTlRLRVk="); request.AddHeader("Content-Type", "application/json"); request.AddParameter("undefined", "{\n \"RowStart\": 0,\n \"RowCount\": 200,\n \"ReturnType\": \"json\",\n \"StartDatetimeUTC\": \"2017-11-15T01:57:53\",\n \"EndDatetimeUTC\": \"2018-11-16T19:57:53\",\n \"TagSourceCodeName\": \"HACHWIMS\",\n \"EndpointVersion\": 1.1\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var settings = { "async": true, "crossDomain": true, "url": "http://localhost:9080/api/svc/Historian/HistorianBetweenDateTimes", "method": "POST", "headers": { "Content-Type": "application/json", "Authorization": "Basic SEFDSFdJTVM6REVWTC5URVNUREVWRUxPUE1FTlRLRVk=", "cache-control": "no-cache" }, "processData": false, "data": "{\n \"RowStart\": 0,\n \"RowCount\": 3,\n \"ReturnType\": \"json\",\n \"StartDatetimeUTC\": \"2017-11-15T01:57:53\",\n \"EndDatetimeUTC\": \"2018-11-16T19:57:53\",\n \"TagSourceCodeName\": \"HACHWIMS\",\n \"EndpointVersion\": null\n}" } $.ajax(settings).done(function (response) { console.log(response); });