Design In Context
APIs
: GetJSONResponse_GET
GetJSONResponse_GET
Gets JSON response string from given DashBoard site, using HTTP GET method.
Syntax:
Public static bool GetJSONResponse_GET (
string strURL,
string strQuery,
out string strErrorMessage,
out string strJSONReturn
)
Parameters:
strURL - The dashboard URL to be queried with HTTP GET method
strQuery - Query for HTTP GET method
strErrorMessage - When this method returns, contains the error message, if fails otherwise, contains String.Empty
strJSONReturn - When this method returns, contains the JSON response from DashBoard, if query gets response otherwise, contains String.Empty
Return value:
true if success; otherwise, false.
Example:
string strMessage = string.Empty;
string strJSON = string.Empty;
if (GetJSONResponse_GET(
"http://inhyzvms8r09:16000/",
"/api/v1/domain/items?fullId=IPE|905675",
out strMessage, out strJSON))
{
Console.WriteLine("Returned JSON - {0}", strJSON);
}
else
{
Console.WriteLine("Failed - Error - {0}", strMessage);
}
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.