getSituationVisualization
A Graze API GET request that returns the Visualize information for a Situation.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint getSituationVisualization
takes the following request
arguments:
Name |
Type |
Required |
Description |
---|---|---|---|
|
String |
Yes |
A valid |
|
Number |
Yes |
Situation ID. |
Response
Endpoint getSituationVisualization
returns the following response:
Successful requests return an array of JSON objects containing the following:
Name |
Type |
Description |
---|---|---|
|
Integer |
Situation ID. |
|
String |
Process that caused the Situation to be created, for example, |
|
Object |
Cause of the Situation. This varies depending on how the Situation was created. |
Examples
The following examples demonstrate typical use of endpoint getSituationVisualization
:
Request example
Example cURL request to return information on the origin and cause of Situation ID 358:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getSituationVisualization" \ --data-urlencode "sitn_id=358"
Response examples
Example response for a Situation created by a Cookbook Recipe:
{ "origin": "cookbook", "cause": { "cookbook_name": "Default Cookbook", "recipe_id": 4, "cookbook_id": 7, "recipe_name": "Recipe 1", "reference_event_id": 6 }, "sig_id": 1 }
Example response for a manually created Situation:
{ "origin": "Manual Creation", "cause": {"uid": 3}, "sig_id": 6 }
Example response when two Situations have been merged:
{ "origin": "Manual Merge", "cause": { "uid": 3, "merged_sigs": [ 8, 7 ] }, "sig_id": 9 }
If there is no Situation visualization data, the response returns the following information:
{ "additional": { "debugMessage": "com.moogsoft.servletutils.CGeneralServerException: com.moogsoft.services.CGeneralServiceException: No visualize data found for Situation ID [2323]" }, "message": "Internal server error", "statusCode": 1000 }