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/2018 15:00",
"EndDatetimeUTC": "6/1/2018 15:00",
"EndpointVersion": null (null = latest 1.x)
}
{
"status": {
"HTTPStatusCode": 200,
"HTTPStatus": "OK",
"RowStart": 0,
"RowsReturned": 200,
"LastIdReturned": -1,
"RequestBegin": "2018-06-13T14:29:53.240318Z",
"StopWatch": {
"IsRunning": true,
"Elapsed": "00:00:00.0125560",
"ElapsedMilliseconds": 13,
"ElapsedTicks": 34970
},
"APIversion": "3.25.0.0",
"EndpointVersionReturned": 1.0
"ExternalRequest": {
"RowStart": 0,
"RowCount": 0,
"StartDatetimeUTC": "2018-05-01T15:00:00",
"EndDatetimeUTC": "2018-06-01T15:00:00",
"ResponseID": null,
"TagSourceCodeName": null,
"ReturnType": 1,
"EndpointVersion": null,
"EndpointVersionReturned": 1.0
}
},
"data": [
{
"StorageGroupId": 357,
"StorageGroupPath": "FASQA / Company Name / Plant-1 / Unit1-1",
"TotalTaskRounds": 8,
"CompletedTaskRounds": 0,
"TotalRounds": 3,
"CompletedRounds": 3
},
{
"StorageGroupId": 365,
"StorageGroupPath": "FASQA / Company Name / Plant-4 / Unit4-1",
"TotalTaskRounds": 634,
"CompletedTaskRounds": 0,
"TotalRounds": 0,
"CompletedRounds": 0
},
{
"StorageGroupId": 390,
"StorageGroupPath": "FASQA / Bryans Testing / Group 1728",
"TotalTaskRounds": 0,
"CompletedTaskRounds": 0,
"TotalRounds": 1,
"CompletedRounds": 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/TaskRoundStatus \
-H 'Authorization: Basic TXlUYWdTb3VyY2UxOjhFRTMxNTFCMUQwODQzOUZCMEQyQjhFQ0MzMzNBNkZF' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"ReturnType": "json",
"StartDatetimeUTC":"5/1/2018 15:00",
"EndDatetimeUTC": "6/1/2018 15:00"
}'
var client = new RestClient("http://localhost:9080/api/svc/TaskRoundStatus");
var request = new RestRequest(Method.POST);
request.AddHeader("Cache-Control", "no-cache");
request.AddHeader("Authorization", "Basic TXlUYWdTb3VyY2UxOjhFRTMxNTFCMUQwODQzOUZCMEQyQjhFQ0MzMzNBNkZF");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("undefined", "{\n\t\"ReturnType\": \"json\",\n\t\"StartDatetimeUTC\":\"5/1/2018 15:00\",\n\t\"EndDatetimeUTC\": \"6/1/2018 15:00\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var settings = {
"async": true,
"crossDomain": true,
"url": "http://localhost:9080/api/svc/TaskRoundStatus",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Authorization": "Basic TXlUYWdTb3VyY2UxOjhFRTMxNTFCMUQwODQzOUZCMEQyQjhFQ0MzMzNBNkZF",
"Cache-Control": "no-cache"
},
"processData": false,
"data": "{\n\t\"ReturnType\": \"json\",\n\t\"StartDatetimeUTC\":\"5/1/2018 15:00\",\n\t\"EndDatetimeUTC\": \"6/1/2018 15:00\"\n}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});