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

When the NSM client user requests the /servicetemplate/{servicetemplate-id}/deviceid/{device-id} URI using the GET method, the latest version of a particular NSM service template that matches the NSM service template ID and device ID entered is returned. The NSM service template that is returned contains client parameters that can be populated.

Input parameters

{servicetemplate-id} and {device-id}

Available HTTP Headers

Accept: application/json

Accept: text/xml

Sample request

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

Sample response

XML
<serviceTemplate serviceTemplateId="2">
	<deviceID>2</deviceID>
	<clientParameters>
		<clientParameter>
			<name>CPO1</name>
				<value></value>
		</clientParameter>
		<clientParameter>
			<name>CPO2</name>
				<value></value>
		</clientParameter>
	  </clientParameters>
</serviceTemplate>
JSON
{
  "deviceID": 2,
  "clientParameters": [
    {
      "name": "CP01",
      "value": ""
    },
    {
      "name": "CP02",
      "value": ""
    }
  ],
  "id": 2
}

XML response details

Table 1. Response details
Element/Tag Type Description
<serviceTemplate> Integer

The <serviceTemplate> and </serviceTemplate> element pair encapsulates the following information:

  • Device identifier (encapsulated within the <deviceID> and </deviceID> tag pair).
  • One or more client parameters (encapsulated within the <clientParameter> and </clientParameter> tag pair).
  • One or more client parameter lists (encapsulated within the <clientParameterList> and </clientParameterList> tag pair).
serviceTemplateId String Specifies the unique identifier of the NSM service template. In the Sample Response, the specified NSM service template identifier is the value 2.
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.
<deviceID> Integer

Specifies the device identifier for the device that this NSM service template is being applied against. In the Sample Response, the specified device identifier is the value 2.

Client parameter descriptions
<clientParameters> Container

Specifies a container that includes one or more client parameters that the NSM client user can edit. The client parameters are encapsulated within the <clientParameters> and </clientParameters> element pair. In the Sample Response, two client parameters are defined.

<clientParameter> String

Specifies each parameter. Each client parameter is encapsulated within the <clientParameter> and </clientParameter> element pair.

<name> String

Specifies the name of the parameter. Each client parameter name is encapsulated within the <name> and </name> tag pair. In the Sample Response, the name of the first defined client parameter is CPO1.

<value> String

Specifies the tag where the NSM client user can populate the value of each client parameter. In the Sample Response, the NSM client user can populate the CPO1 client parameter in this tag pair: <value> </value>.

Client parameter lists descriptions
<clientParameterLists> Container

Specifies a container that includes one or more client parameter lists. The client parameter lists are encapsulated within the <clientParameterLists> and </clientParameterLists> element pair. In the Sample Response, no client parameter list is defined.

<clientParameterList> String

The <clientParameterList> and </clientParameterList> element pair encapsulates the following information:

  • One or more client parameters (encapsulated within the <parameter> and </parameter> tag pair).
  • One or more value containers that are specified with the <values> and </values> tag pair.
  • One or more client parameter value placeholders (encapsulated within the <value> and </value> tag pair).
name   Specifies the name of the client parameter list.
<parameter> String

Each client parameter defined within a client parameter list is encapsulated within the <parameter> and </parameter> tag pair.

name String Specifies the name of the parameter.
<values> Container

Specifies a container that includes a client parameter value for the client parameter specified in the <parameter> tag. This container encapsulates each client parameter value within the <values> and </values> tag pair.

<value> String

Specifies the tag where the NSM client user can populate values for each client parameter in the client parameter list. The NSM client user can populate the client parameter value in this tag pair: <value> and </value>. There can be multiple <value> and </value> tag pairs defined within the container <values> and </values> tag pair.

For example:

<clientParameterList name="PARAMETER_ALIAS">
<parameter name="PARAMETER06">
<values>
<value>Value1</value>
<value>Value2</value>
</values>
</parameter>
<clientParameterList>