Config - BSM - Service

Object type: BSM Service

Request URL: /rest/config/bsmservice

List Copied

Parameters: N/A

Example GET response Copied

To list all available BSM services:

$ opsview_rest --username=admin --password=initial --pretty --data-format=json GET 'config/bsmservice'
{
   "list" : [
      {
         "components" : [
            {
               "name" : "Opsview",
               "ref" : "/rest/config/businesscomponent/3"
            }
         ],
         "id" : "3",
         "name" : "Opsview",
         "ref" : "/rest/config/bsmservice/3",
         "uncommitted" : "0"
      },
      {
         "components" : [],
         "id" : "4",
         "name" : "Test Env",
         "ref" : "/rest/config/bsmservice/4",
         "uncommitted" : "0"
      }
   ],
   "summary" : {
      "allrows" : "2",
      "page" : "1",
      "rows" : "2",
      "totalpages" : "1",
      "totalrows" : "2"
   }
}

Create Copied

Example POST to create a new BSM Service called Google Mail Copied

Parameters:

 opsview_rest --username=admin -t ~/opsview_restapi_token --pretty --data-format=json POST 'config/bsmservice' --data '{"name":"Web System","components":[ "5" ] } '
{
   "object" : {
      "components" : [
         {
            "name" : "New Component",
            "ref" : "/rest/config/businesscomponent/5"
         }
      ],
      "id" : "6",
      "name" : "Web System",
      "uncommitted" : "1"
   }
}

Delete Copied

Deletes must be done using the ID in the URL, as follows:

$ opsview_rest --username=admin --password=initial --pretty --data-format=json DELETE 'config/bsmservice/5'
{
   "success" : "1"
}
["Opsview"] ["API", "Technical Reference"]

Was this topic helpful?