Skip to main content
Matrix42 Self-Service Help Center

Rest API – Visual Controls

How to create, update, retrieve and delete visual controls (charts and graphs) in SPM using the FIreScope REST API.

Overview

The REST API allows you to work with Visual Controls (also called Graphs) in FireScope SPM.

  • Retrieve
  • Create or Update
  • Delete

Retrieve 

To retrieve the current information about an Attribute as a JSON document, send a GET request with the following URL format:

http://localhost:38050/web_services/...e&name=latency

Note: Don’t forget to change the domain name (localhost) and query parameter values (account, and name) to match your environment and data.

 Query Parameter Descriptions

Parameter Description Type Required
account Name of the SPM Account. String Yes
name Name of the Visual Control. String Yes

Create or Update

To create a Visual Control, send a POST operation with a JSON document to the following URL:

http://[SPM IP address]:38050/web_services/graphs

Use the following example as a guide.

{
 "account_id": "firescope",
 "dashboard_created_userid": null,
 "fs_dec_round": 0,
 "fs_display_max": null,
 "fs_display_min": null,
 "fs_format_num": 0,
 "fs_gauge": 0,
 "fs_multiaxis": 0,
 "graphtype": 0,
 "name": "Latency",
 "graphs_attributes":[{
    "attributeid":{
       "edge_device": "Edge 1",
       "ci": "MININT-GVTTN4V",
       "attribute": "response_time"
     },
     "color": "009900",
     "drawtype": 1,
     "sortorder": 0,
     "type": 0
  }]
}

Property Descriptions

Property Description Type Default Value Required
account_id Name of the SPM Account. String   No
dashboard_created_user_id Name of the SPM User. Number 2 No
fs_dec_round   Number   No
fs_display_max   Number   No
fs_display_min   Number 0 No
fs_format_num   Number 0 Yes
fs_gauge Display type.0 = Trend Graph1 = Performance Display2 = Pie Chart Number 1 No
fs_multiaxis   Number 0 Yes
graphtype Graph type.0 = Normal1 = Pie2 = Bar3 = Stacked Bar String   Yes
name Unique, descriptive name of the Visual Control. Object[]   Yes
graphs_attributes Attribute(s) used to generate the Visual Control.
PropertyDescriptionTypeDefault ValueRequiredattributeidName of the Attribute. Example:{“edge_device” : “edge1”, “ci” : “firescope.com”, “attribute” : “ping”}Object YescolorColor used to represent the Attribute. Expressed as a 6 digit hexadecimal code representing the RGB value. Example: 009900String Yesdrawtype0 = Line1 = Filled Region2 = Bold Line3 = Dot4 = Dashed LineNumber0YessortorderSort order for multiple Attributes.Number0Yestype0 = Simple1 = AggregatedNumber0Yes
     
markers Display a value as a horizontal line. Set value or choose attribute.
PropertyDescripionTypeDefault ValueRequiredattributeidName of the Attribute. Example:{“edge_device” : “edge1”, “ci” : “firescope.com”, “attribute” : “ping”}Object NocolorColor used to represent the Attribute. Expressed as a 6 digit hexadecimal code representing the RGB value. Example: 009900String Yeslabel String NovalueSort order for multiple Attributes.Number No
     

Delete

To delete an Attribute, send an HTTP DELETE request with the same query parameters as the GET request.See the Retrieve for the URL format and query parameter descriptions.

  • Was this article helpful?