Nodes/{name}/services/{serviceName}: GET

Gets status of a specific service that is hosted on a node or node class in the cluster.

Availability

Available on all IBM Storage Scale editions.

Description

The GET nodes/name/services/serviceName request gets information about a specific service that is hosted on a specific node or node class. For more information about the fields in the returned data structure, see mmces command.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v2/nodes/name/services/serviceName
where
nodes/name
Specifies the node or node class on which the service is hosted.
/services/serviceName
Specifies the service about which you need the details.

Request headers

Accept: application/json

Parameters

The following parameters can be used in the request URL to customize the request:
Table 1. List of parameters
Parameter name Description and applicable keywords Required/optional
name Name of the node or node class on which the service is hosted. Required.
serviceName Name of the service about which the information is required. Required.
fields Comma separated list of fields to be included in response. ':all:' selects all available fields. Optional.
filter Filter objects by expression. For example, 'status=HEALTHY,entityType=FILESET' Optional.

Request data

No request data.

Response data

{      
"status":
   {
      "code": ReturnCode
      "message": "ReturnMessage",   
   },
"paging":
   {
      "next": Next page URL
      "fields": "Fields",  
      "filter": Filter
      "baseUrl": "URL", 
      "lastID": ID
      ,  
   },
{
   "serviceStatus": [
      {
      "nodeName": Node name
      "serviceName": "Service name",  
      "state": State
      "healthState": "Health state", 
      
       }
}
"status":
Return status.
"code": ReturnCode,
The HTTP status code that was returned by the request.
"message": "ReturnMessage"
The return message.
"paging":
An array of information about the paging information that is used for displaying the details.
"next": "Next page URL"
The URL to retrieve the next page. Paging is enabled when more than 1000 objects would be returned by the query.
"fields": "Fields in the request"
The fields that are used in the original request.
"filter": "Filters used in the request"
The filter that is used in the original request.
"baseUrl": "URL"
The URL of the request without any parameters.
"lastId": "ID"
The ID of the last element that can be used to retrieve the next elements.
"serviceStatus":
An array of information that provides the details of the services configured on the node.
"nodeName": Node name
The node where the service is hosted.
"serviceName": "Service name"
Name of the service.
"state": State
Status of the service.
"healthState": "Health state"
Health status of the service.

Examples

Example 1:

The following example gets information about the SMB service on the CES nodes.

Request data:
curl -k -u admin:admin001 -X GET --header 'accept:application/json'  
'https://198.51.100.1:443/scalemgmt/v2/nodes/cesNodes/services/smb'
Response data:
Note: In the JSON data that is returned, the return code indicates whether the command is successful. The response code 200 indicates that the command successfully retrieved the information. Error code 400 represents an invalid request and 500 represents internal server error.
The serviceStatus array returns the details of the services that are configured on the node scale01.
{
  "serviceStatus" : [ {
    "nodeName" : "mari-14.localnet.com",
    "serviceName" : "SMB",
    "state" : "running",
    "healthState" : "HEALTHY"
  }, {
    "nodeName" : "mari-15.localnet.com",
    "serviceName" : "SMB",
    "state" : "running",
    "healthState" : "HEALTHY"
  }, {
    "nodeName" : "mari-13.localnet.com",
    "serviceName" : "SMB",
    "state" : "running",
    "healthState" : "HEALTHY"
  }, {
    "nodeName" : "mari-12.localnet.com",
    "serviceName" : "SMB",
    "state" : "running",
    "healthState" : "HEALTHY"
  } ],
  "status" : {
    "code" : 200,
    "message" : "The request finished successfully."
  }
}

Example 2:

The following example lists the details of the NFS service that is hosted on a specific node:

curl -k -u admin:admin001 -X GET --header 'accept:application/json'  
'https://198.51.100.1:443/scalemgmt/v2/nodes/mari-13.localnet.com/services/nfs'
Response data:
Note: In the JSON data that is returned, the return code indicates whether the command is successful. The response code 200 indicates that the command successfully retrieved the information. Error code 400 represents an invalid request and 500 represents internal server error.
The serviceStatus array returns the details of the NFS service on the specified node.
{
  "serviceStatus" : [ {
    "nodeName" : "mari-13.localnet.com",
    "serviceName" : "NFS",
    "state" : "running",
    "healthState" : "HEALTHY"
  } ],
  "status" : {
    "code" : 200,
    "message" : "The request finished successfully."
  }
}