Understanding the Network Service Manager URIs

The NSM REST API uses a RESTful web service model. REST (Representational State Transfer) uses the HTTP protocol because this protocol provides an extensive vocabulary for specifying various operations on specific resources.

Specifically, the NSM REST API uses the following HTTP methods to operate on NSM and Netcool Configuration Manager resources:
  • GET - Lists the specified resource or collection of resources
  • POST - Creates the specified resource
  • PUT - Updates or replaces the specified resource
  • DELETE - Removes the specified resource

For a REST client the following HTTP headers need to be set in order to get the required functionality working for NSM. The NSM REST API support both XML and JSON in the request and response body of any URL defined here. The default content type is XML based.

To correctly use the NSM REST API a client should adhere to the following guidelines:
  • For any of the HTTP methods GET/POST/DELETE/PUT requests, the HTTP headers should include an “Accept: text/xml” if the client requires the response in XML. The HTTP response will then contain an HTTP content type of “Content-Type: text/xml”.
    For a client that requires the response body to contain JSON, the HTTP headers should have the following set “Accept: application/json” with a HTTP response header of “Content-Type: application/json”.
  • For HTTP methods that are submitting a request body (POST/PUT), the content type HTTP header is required.
    For a request body that contains XML the content type header needs to be set as follows “Content-Type: text/xml”.
    For a client that supports JSON the content type needs to be set as follows “Content-Type: application/json”.
The various combinations supported by the NSM REST API are shown in the following tables:
Table 1. POST/PUT methods
Media types (Request/Response) Accept Header Content-Type
JSON/JSON application/json application/json
JSON/XML application/json text/xml
XML/JSON text/xml application/json
XML/XML text/xml text/xml
Table 2. GET/DELETE methods
Media types (Request/Response) Accept Header
JSON/JSON application/json
JSON/XML application/json
XML/JSON text/xml
XML/XML text/xml
The Netcool Configuration Manager and NSM resources on which the previously listed HTTP operations can be completed include the following resources:
  • Realm
  • Device
  • Service template
  • Service
Use this information to obtain an understanding of the NSM URIs and the HTTP methods that can be applied to each URI.