HTTP GET for /service
When the NSM client user requests the /service
URI
using the GET
method, a list of services is returned.
The sample response shows a list of services and information about
them.
Input parameters
None
Available HTTP Headers
Accept: application/json
Accept: text/xml
Sample request
http://www.example.com:16310/nsm/service
Sample response
<services>
<service id="311" createdByUser="administrator"
createDate="2012-10-26 10:59:19.313 GMT+00:00"
lastUpdatedDate="2012-11-05 15:45:47.19 GMT+00:00" serviceWorkKey="29975">
<status>Success</status>
<devices>
<device>
<id>2</id>
</device>
</devices>
<appliedServiceTemplates>
<serviceTemplate version="1" serviceTemplateId="2">
<deviceID>2</deviceID>
</serviceTemplate>
</appliedServiceTemplates>
<serviceWorkItems>
<workItem status="FINISHED_SUCCESS" id="30083" type="COMMANDSET"
name="ITNCM/CommandSet1" deviceId="2"/>
<workItem status="FINISHED_SUCCESS" id="30084" type="COMMANDSET"
name="ITNCM/CommandSet2" deviceId="2"/>
</serviceWorkItems>
</service>
</services>
{
"services": [
{
"id": 311,
"referenceId": "311",
"status": "SUCCESS",
"createDate": 1351249159313,
"devices": [
{
"id": 2
}
],
"appliedServiceTemplates": [
{
"version": 2,
"deviceID": 2,
"id": 1
}
],
"serviceWorkItems": [
{
"status": "FINISHED_SUCCESS",
"workItemId": 30083,
"workType": "COMMANDSET",
"deviceId": 2,
"name": "ITNCM/command1"
},
{
"status": "FINISHED_SUCCESS",
"workItemId": 30084,
"workType": "COMMANDSET",
"deviceId": 2,
"name": "ITNCM/command2"
}
],
"createdByUser": "administrator",
"lastUpdatedDate": 1352130347019,
"serviceWorkKey": 29975
}
]
}
XML response details
Tag | Type | Description |
---|---|---|
<services> |
Container | Specifies a container that includes the list
of services. The list of services are encapsulated within the |
<service> |
List of strings | The
|
<status> |
String | Specifies the status of the service, for
example, |
<devices> |
Container | Specifies a container that includes the list
of devices affected by the service. The list of devices are encapsulated
within the <devices> and </devices> element
pair. |
<device> |
String, integer | Specifies the list of devices affected by the
service. Each device is identified by its <id> tag.
For example, in the Sample response a device is defined by its associated <id> tag
(2 ). |
<appliedServiceTemplates> |
Container | Specifies a container that includes the list
of applied NSM service
templates.
The list of supplied NSM service
templates are
encapsulated within the <appliedServiceTemplates> and </appliedServiceTemplates> element
pair. |
<appliedServiceTemplate> |
Strings, integer | Specifies the list of applied NSM service templates that are submitted for the service. Each applied NSM service template includes the following information:
|
<serviceWorkItems> |
Container | Specifies a container that includes the list
of service work item entries. The list of service work item entries
are encapsulated within the |
<workItem> |
Strings, integer | Specifies the list of work item entries that are submitted for the service. Each service work item includes the following information:
|