-
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": 1000, "ReturnType": "json", "ResponseID": 500, "StartDatetimeUTC":"5/1/2018 15:00", "EndDatetimeUTC": "6/1/2018 15:00", "EndpointVersion": null (null = latest 1.x) }
{ "status": { "HTTPStatusCode": 200, "HTTPStatus": "Welcome. You have successfully accessed the API.", "RowStart": 0, "RowsReturned": 0, "LastIdReturned": 0, "RequestBegin": "2019-03-27T20:17:51.3778288Z", "StopWatch": { "IsRunning": true, "Elapsed": "00:00:00.0044530", "ElapsedMilliseconds": 4, "ElapsedTicks": 50865 }, "APIversion": "5.7.4.0", "EndpointVersionReturned": 1, "ExternalRequest": { "RowStart": 0, "RowCount": 1000, "StartDatetimeUTC": "2018-05-01T15:00:00", "EndDatetimeUTC": "2018-06-01T15:00:00", "ResponseID": 500, "TagSourceCodeName": "DYNAMO", "ReturnType": 1, "EndpointVersion": null, "EndpointVersionReturned": 1 } }, "data": null }
{"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 ...
curl -X POST \ http://localhost:9080/api/svc/Historian/Test \ -H 'Authorization: Basic R29QbGFudEV4dGVybmFsQWNjZXNzOjc3NjRFRDE3Q0QyODRGNzhBNDYy' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -d '{ "RowStart":0, "RowCount": 10, "ReturnType": "json", "StartDatetime":"5/1/2018 15:00", "EndDatetime": "6/1/2018 15:00" }'
var client = new RestClient("http://localhost:9080/api/svc/Historian/Test"); 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\": 10,\n\t\"ReturnType\": \"json\",\n\t\"StartDatetime\":\"5/1/2018 15:00\",\n\t\"EndDatetime\": \"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/Historian/Test", "method": "POST", "headers": { "Content-Type": "application/json", "Authorization": "Basic R29QbGFudEV4dGVybmFsQWNjZXNzOjc3NjRFRDE3Q0QyODRGNzhBNDYy", "Cache-Control": "no-cache" }, "processData": false, "data": "{\n\t\"RowStart\":0,\n\t\"RowCount\": 10,\n\t\"ReturnType\": \"json\",\n\t\"StartDatetime\":\"5/1/2018 15:00\",\n\t\"EndDatetime\": \"6/1/2018 15:00\"\n}" } $.ajax(settings).done(function (response) { console.log(response); });