-
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": 3, "ReturnType": "json", "ResponseID": 26, "TagSourceCodeName": "UNITECH", "TagDataValue": "", "EndpointVersion": null (null = latest 1.x) }
{ "status": { "HTTPStatusCode": 200, "HTTPStatus": "OK", "RowStart": 0, "RowsReturned": 3, "LastIdReturned": 259761, "RequestBegin": "2019-05-07T20:21:50.7536514Z", "StopWatch": { "IsRunning": true, "Elapsed": "00:00:00.0831032", "ElapsedMilliseconds": 83, "ElapsedTicks": 843331 }, "APIversion": "5.13.0.0", "EndpointVersionReturned": 1.1, "ExternalRequest": { "RowStart": 0, "RowCount": 3, "StartDatetimeUTC": "0001-01-01T00:00:00", "EndDatetimeUTC": "9999-12-31T23:59:59.9999999", "ResponseID": 26, "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-23T13:04:48.84", "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-23T13:04:48.84", "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-23T13:04:48.84", "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/HistorianAfterResponseID \ -H 'Authorization: Basic R29QbGFudEV4dGVybmFsQWNjZXNzOjc3NjRFRDE3Q0QyODRGNzhBNDYy' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -d '{ "RowStart": 0, "RowCount": 4, "ReturnType": "json", "ResponseID": 1000, "TagSourceCodeName": "MAXIMO" }'
var client = new RestClient("http://localhost:9080/api/svc/Historian/HistorianAfterResponseID"); var request = new RestRequest(Method.POST); request.AddHeader("Cache-Control", "no-cache"); request.AddHeader("Authorization", "Basic R29QbGFudEV4dGVybmFsQWNjZXNzOjc3NjRFRDE3Q0QyODRGNzhBNDYy"); request.AddHeader("Content-Type", "application/json"); request.AddParameter("undefined", "{\n\t\"RowStart\": 0,\n\t\"RowCount\": 4,\n\t\"ReturnType\": \"json\",\n\t\"ResponseID\": 1000,\n\t\"TagSourceCodeName\": \"MAXIMO\"\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/HistorianAfterResponseID", "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 \"ResponseID\": 26,\n \"TagSourceCodeName\": \"HACHWIMS\"\n}" } $.ajax(settings).done(function (response) { console.log(response); });