Skip to main content
Matrix42 Self-Service Help Center

Rest API – Service Groups

How to create, update,search and delete Service Groups in SDDM using the REST API.

Overview

The REST API allows you to work with Service Groups in FireScope SDDM.

  • Retrieve
  • Search
  • Create or Update
  • Delete

Retrieve

To retrieve the current information about a Service Group as a JSON document, send a GET request with the following URL format:
http://localhost:38050/web_services/servicegroup?account=firescope&name=Orders

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 account. String Yes
name Name of Service Group. String Yes

Searching provides for the ability to return multiple results in a single call using various filter criteria. To accomplish this, a GET request is sent with a parameter search=true. Every other field besides account is optional and is used to further filter the results. Pagination is mandatory and accomplished using the page and size parameters. The JSON response will wrap the result list and also display the page and the size. The size in the response represents the number of results actually returned, not the size in the request. The response does not contain a count of the total number of pages or the total number of records for performance reasons. The client is expected to keep querying, increasing the page each time, until the result size is less than the requested size, indicating no more results.

http://localhost:38050/web_services/servicegroup?search=true&account=firescope&logicalgroup=Databases&name=substring&page=0&size=100

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

Search Parameter Descriptions

Parameter Description Type Default Required
account Name of the SDDM Account. String   Yes
search Enable searching by setting to true. Setting to false will revert functionality to retrieving a single result. Boolean FALSE Yes
page Indicates which result set is being returned starting at zero and increasing until there are no more results Number 0 Yes
size Indicates how many results are returned in a single page. A max of 250 results is supported. Number 100 Yes
name Filter the results by a case-insensitive substring search of the name field. String   No
logicalgroup Filter the results by a Logical Group’s exact name. String   No

Example Search Response

{
   "account_id": "firescope",
   "entity": "servicegroup",
   "page": 0,
   "size": 2,
   "results": [
      {
         "account_id": "firescope",
        "name": "Orders",
         "servicegrouptypeid": 1,
         "logicalgroup": [ "Windows Servers", "Databases" ]
      },
      {
         "account_id": "firescope",
         "name": "Sales",
         "servicegrouptypeid": 1,
         "logicalgroup": [ "Databases" ]
      }
   ]
 }

Create or Update

To create or update a Service Group, POST a JSON document with the specific information for that Service Group to the following URL:
http://localhost:38050/web_services/servicegroup

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

Use the following example as a guide.

{
  "account_id" : "firescope",
  "name" : "Orders",
  "servicegrouptypeid" : 1
  "ci" : [
    {"edge_device" : "edge1", "ci" : "mysql"},
    {"edge_device" : "edge2", "ci" : "apache"}
  ],
  "logicalgroup" : ["Windows Servers", "Databases"]
}

Property Descriptions

Property Description Type Default Value Required
account_id Name of the SDDM Account. String   Yes
name Name of the SDDM Service Group. String   Yes
servicegrouptypeid Type of Service Group.
Possible values:
1 = Business Service Group
2 = Infrastructure Service Group
3 = Operational Service Group
Number 1 Yes
ci Array of CI instances.
Example: [{“edge_device” : “Edge 1”, “ci” : “WEB2”}]
PropertyDescriptionTypeDefault ValueRequirededge_deviceName of existing Edge Device for this CI.String YesciName of existing CI to relate.String Yes
Object[] [] No
logicalgroup Name of Logical Group(s) to associate with the Service Group. String[] [] No

Delete

To delete a Service Group, 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?