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": 259978,
"RequestBegin": "2018-06-13T20:33:21.2734861Z",
"StopWatch": {
"IsRunning": true,
"Elapsed": "00:00:00.0173712",
"ElapsedMilliseconds": 19,
"ElapsedTicks": 50277
},
"APIversion": "3.25.0.0",
"EndpointVersionReturned": 1.0
"ExternalRequest": {
"RowStart": 0,
"RowCount": 3,
"StartDatetimeUTC": "0001-01-01T00:00:00",
"EndDatetimeUTC": "9999-12-31T23:59:59.9999999",
"ResponseID": 26,
"TagSourceCodeName": "UNITECH",
"ReturnType": 1,
"EndpointVersion": null,
"EndpointVersionReturned": 1.0
}
},
"data": [
{
"responseID": 259688,
"responseType": "Short text",
"responseValue": "2342",
"responseDate": "2018-05-23T13:03:57",
"stepComments": "PT - 1476",
"stepWasVisible": null,
"formName": "Form 1649 - External Tags",
"assetTag": null,
"assetDescription": null,
"assetStatus": null,
"roundName": "Round 1649 - External Tags",
"roundVariantName": "v1",
"elementLabel": "Form 1649 - External Tags",
"taskName": "",
"taskEventStatus": "",
"tagSourceCode": "UNITECH",
"tagSourceDisplayName": "Unitech",
"tagDataValue": "UT 0556",
"tagDataDescription": "UT 0556"
},
{
"responseID": 259715,
"responseType": "Number",
"responseValue": "222.00",
"responseDate": "2018-05-24T13:47:11",
"stepComments": "",
"stepWasVisible": null,
"formName": "Form 1649 - Final Dev Test",
"assetTag": "Asset 1649 - External Tags - final dev test",
"assetDescription": null,
"assetStatus": "Nominal",
"roundName": "Round 1649 - external tags - final test",
"roundVariantName": "v1",
"elementLabel": "Asset 1649 - External Tags - final dev test / Form 1649 - Final Dev Test",
"taskName": "Task 1649 B",
"taskEventStatus": "Completed",
"tagSourceCode": "UNITECH",
"tagSourceDisplayName": "Unitech",
"tagDataValue": "UT 02345",
"tagDataDescription": "UT 02345"
},
{
"responseID": 259978,
"responseType": "Number",
"responseValue": "777.00",
"responseDate": "2018-05-25T21:32:45",
"stepComments": "",
"stepWasVisible": null,
"formName": "Form 1670",
"assetTag": null,
"assetDescription": null,
"assetStatus": null,
"roundName": "Round 1670",
"roundVariantName": "V1",
"elementLabel": "Form 1670",
"taskName": "Task 1643 test A",
"taskEventStatus": "Completed",
"tagSourceCode": "UNITECH",
"tagSourceDisplayName": "Unitech",
"tagDataValue": "UT 1233",
"tagDataDescription": "UT 1233 - pump pressure"
}
]
}
{"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}", 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 R29QbGFudEV4dGVybmFsQWNjZXNzOjc3NjRFRDE3Q0QyODRGNzhBNDYy",
"Cache-Control": "no-cache"
},
"processData": false,
"data": "{\n\t\"RowStart\": 0,\n\t\"RowCount\": 4,\n\t\"ReturnType\": \"json\",\n\t\"ResponseID\": 1000,\n\t\"TagSourceCodeName\": \"MAXIMO\"\n}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});