-
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.
{ }
{ "status": { "HTTPStatusCode": 200, "HTTPStatus": "OK", "RowStart": 0, "RowsReturned": 19, "LastIdReturned": -1, "RequestBegin": "2018-06-13T14:48:01.3184888Z", "StopWatch": { "IsRunning": true, "Elapsed": "00:00:00.0052261", "ElapsedMilliseconds": 5, "ElapsedTicks": 14952 }, "APIversion": "3.25.0.0", "EndpointVersionReturned": 1.0 "ExternalRequest": { "RowStart": 0, "RowCount": 1000, "StartDatetimeUTC": "2018-05-01T15:00:00", "EndDatetimeUTC": "2018-06-01T15:00:00", "ResponseID": 150000, "TagSourceCodeName": "", "ReturnType": 1, "EndpointVersion": null, "EndpointVersionReturned": 1.0 } }, "data": [ { "id": 1, "name": "DEVL", "desc": "Root", "storageGroupFullPath": "DEVL", "parentStorageGroupId": 0, "timeZoneId": 29, "timeZoneDisplayName": "(UTC-06:00) Central Time (US & Canada)", "timeZoneSystemId": "Central Standard Time", "timeZoneOffsetHours": -6.0 }, { "id": 130, "name": "2016.1 Regression", "desc": null, "storageGroupFullPath": "DEVL / 2016.1 Regression", "parentStorageGroupId": 1, "timeZoneId": 29, "timeZoneDisplayName": "(UTC-06:00) Central Time (US & Canada)", "timeZoneSystemId": "Central Standard Time", "timeZoneOffsetHours": -6.0 }, { "id": 134, "name": "Power Gen Plant 3", "desc": null, "storageGroupFullPath": "DEVL / 2016.1 Regression / Power Gen Plant 3", "parentStorageGroupId": 130, "timeZoneId": 29, "timeZoneDisplayName": "(UTC-06:00) Central Time (US & Canada)", "timeZoneSystemId": "Central Standard Time", "timeZoneOffsetHours": -6.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 ...
curl -X POST \ http://localhost:9080/api/svc/Historian/GetStorageGroups \ -H 'Authorization: Basic R29QbGFudEV4dGVybmFsQWNjZXNzOkRBRTRGQzVENUIyMTQxRkJBMzgw' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -H 'Postman-Token: a7a055f3-314d-4baf-a0ba-a5f22c14577b' \ -d '{ }'
var client = new RestClient("http://localhost:9080/api/svc/Historian/GetStorageGroups"); var request = new RestRequest(Method.POST); request.AddHeader("Postman-Token", "a659bd13-c6dd-4183-8e57-952798e18ac9"); request.AddHeader("Cache-Control", "no-cache"); request.AddHeader("Authorization", "Basic R29QbGFudEV4dGVybmFsQWNjZXNzOjc3NjRFRDE3Q0QyODRGNzhBNDYy"); request.AddHeader("Content-Type", "application/json"); request.AddParameter("undefined", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var settings = { "url": "http://localhost:9080/api/svc/Historian/GetStorageGroups", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Authorization": "Basic R29QbGFudEFQSUFjY2VzczpERVZMLlRFU1RERVZFTE9QTUVOVEtFWQ==" }, "data": JSON.stringify({}), }; $.ajax(settings).done(function (response) { console.log(response); });