HTTP GET for /servicetemplate

When the NSM client user requests the /servicetemplate URI using the GET method, the latest versions of all NSM service templates that are deployed on the system is returned. The NSM service templates list that is returned contains the NSM service template ID, description and name.

Input parameters

None

Available HTTP Headers

Accept: application/json

Accept: text/xml

Sample request

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

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"/>
<serviceTemplate name="Servicetemplate_3" serviceTemplateId="3" description="A VLAN 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
    },
    {
      "description": "A VLAN Service Template",
      "name": "Servicetemplate_3",
      "id": 3
    }
  ]
}

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.