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.
{
"ReturnType": "json",
"StartDatetimeUTC":"5/1/2017 15:00",
"EndDatetimeUTC": "6/1/2018 15:00",
"StorageGroupID": null
}
OR
{
"ReturnType": "json",
"StartDatetimeUTC":"5/1/2017 13:00",
"EndDatetimeUTC": "6/1/2018 13:00",
"StorageGroupID": 80
}
OR
{
"ReturnType": "json",
"StartDatetimeSG":"5/1/2017 15:00",
"EndDatetimeSG": "6/1/2018 15:00",
"StorageGroupID": null
}
OR
{
"ReturnType": "json",
"StartDatetimeSG":"5/1/2017 15:00",
"EndDatetimeSG": "6/1/2018 15:00",
"StorageGroupID": 80
}
{
"status": {
"HTTPStatusCode": 200,
"HTTPStatus": "OK",
"RowStart": 0,
"RowsReturned": 1,
"LastIdReturned": -1,
"RequestBegin": "2019-06-18T14:10:02.2021902Z",
"StopWatch": {
"IsRunning": true,
"Elapsed": "00:00:00.0038959",
"ElapsedMilliseconds": 4,
"ElapsedTicks": 14865
},
"APIversion": "5.21.2.0",
"EndpointVersionReturned": 1,
"ExternalRequest": {
"StartDatetimeUTC": "2017-05-01T15:00:00",
"StartDatetimeSG": null,
"EndDatetimeUTC": "2019-06-01T15:00:00",
"EndDatetimeSG": null,
"StorageGroupID": 80,
"RowStart": 0,
"RowCount": 0,
"ResponseID": null,
"TagSourceCodeName": "",
"ReturnType": 1,
"EndpointVersion": null,
"EndpointVersionReturned": 1
}
},
"data": [
{
"storageGroupId": 80,
"storageGroupName": "Todd's Company",
"storageGroupPath": "DEVL / FAS Verification / Todd's Company",
"availableTaskRoundVariants": 0,
"inProgressTaskRoundVariants": 0,
"completedTaskRoundVariants": 0,
"inProgressRoundVariants": 12,
"completedRoundVariants": 117,
"inProgressRoundVariantsNoTask": 12,
"completedRoundVariantsNoTask": 117,
"totalTaskEvents": 0,
"notStartedTaskEvents": 0,
"lateTaskEvents": 0,
"onTimeTaskEvents": 0,
"completedOnTimeOrLateTaskEvents": 0,
"completedOnTimeTaskEvents": 0,
"completedLateTaskEvents": 0,
"expiredTaskEvents": 0,
"voidedTaskEvents": 0,
"revokedTaskEvents": 0
}
]
}
{"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": "Could not convert string to DateTime: 5/25/20189 15:00. Path 'StartDatetime', line 2, position 36."
curl -X POST \
http://localhost:9080/api/svc/Historian/RoundStatusBetweenDateTimesV2 \
-H 'Accept: */*' \
-H 'Authorization: Basic R29QbGFudEFQSUFjY2VzczpERVZMLlRFU1RERVZFTE9QTUVOVEtFWQ==' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"ReturnType": "json",
"StartDatetimeUTC":"5/1/1010 15:00",
"EndDatetimeUTC": "6/1/2018 15:00",
"StorageGroupID": 80
}'
var client = new RestClient("http://localhost:9080/api/svc/Historian/RoundStatusBetweenDateTimesV2");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("Connection", "keep-alive");
request.AddHeader("content-length", "123");
request.AddHeader("accept-encoding", "gzip, deflate");
request.AddHeader("Host", "localhost:9080");
request.AddHeader("Cache-Control", "no-cache");
request.AddHeader("Accept", "*/*");
request.AddHeader("User-Agent", "PostmanRuntime/7.13.0");
request.AddHeader("Authorization", "Basic R29QbGFudEFQSUFjY2VzczpERVZMLlRFU1RERVZFTE9QTUVOVEtFWQ==");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("undefined", "{\n\t\"ReturnType\": \"json\",\n\t\"StartDatetimeUTC\":\"5/1/1010 15:00\",\n\t\"EndDatetimeUTC\": \"6/1/2018 15:00\",\n\t\"StorageGroupID\": 80\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var settings = {
"async": true,
"crossDomain": true,
"url": "http://localhost:9080/api/svc/Historian/RoundStatusBetweenDateTimesV2",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Authorization": "Basic R29QbGFudEFQSUFjY2VzczpERVZMLlRFU1RERVZFTE9QTUVOVEtFWQ==",
"User-Agent": "PostmanRuntime/7.13.0",
"Accept": "*/*",
},
"processData": false,
"data": "{\n\t\"ReturnType\": \"json\",\n\t\"StartDatetimeUTC\":\"5/1/1010 15:00\",\n\t\"EndDatetimeUTC\": \"6/1/2018 15:00\",\n\t\"StorageGroupID\": 80\n}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});