HTTP GET for /servicetemplate/deviceid/{device-id}

When the NSM client user requests the /servicetemplate/deviceid/{device-id} URI using the GET method, the latest versions of all NSM service templates that are deployed on the system applicable to a specific device are returned. The list shows which templates are currently active on the system that have an implementation that matches the device VTMOS based on the device ID that the NSM client user or service designer enters. The NSM service templates list that is returned contains the NSM service template ID, description, and name.

Input parameters

{device-id}

Available HTTP Headers

Accept: application/json

Accept: text/xml

Sample request

http://www.example.com:16310/nsm/servicetemplate/deviceid/4

Sample response

XML
<serviceTemplates>
<serviceTemplate name="Servicetemplate_1" serviceTemplateId="1" description="A Firewall Service Template"/>
<serviceTemplate name="Servicetemplate_2" serviceTemplateId="2" description="A Load balancer Service Template"/>
</serviceTemplates>
JSON
{
  "templates": [
    {
      "description": "A Firewall Service Template",
      "name": "Servicetemplate_1",
      "id": 1
    },
    {
      "description": "A Load balancer Service Template",
      "name": "Servicetemplate_2",
      "id": 2
    }
  ]
}

XML response details

Table 1. Response details
Tag Type Description
<serviceTemplates> List of strings Includes information about the NSM service template.
<serviceTemplate> List of strings

Includes information about the NSM service template. The NSM service template can be specified with the following attributes:

  • serviceTemplateId — Specifies the unique identifier of the NSM service template.
    Note: In version Netcool Configuration Manager version 6.4.2.2 and later, use id for JSON input, instead of the previous name serviceTemplateId. XML input is unchanged.
  • description — Specifies a description for the NSM service template.
  • name — Specifies the name of the NSM service template.