Nodes/{name}/services: GET
Get status of all services that are hosted on a node or node class in the cluster.
Availability
Available on all IBM Storage Scale editions.
Description
The GET nodes/{name}/services request gets information about the services that are configured 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
where- nodes/name/services
- Specifies services in a particular node or node class as the resource of the GET call.
Request headers
Accept: application/json
Parameters
The following parameters can be used in the request URL to customize the
request:
Parameter name | Description and applicable keywords | Required/optional |
---|---|---|
name | Name of the node or node class. | 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
The following example gets information about the services that are configured on the node mari-13.localnet.com.
Request data:
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'
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
mari-13.localnet.com.
{
"serviceStatus" : [ {
"nodeName" : "mari-12.localnet.com",
"serviceName" : "NFS",
"state" : "running",
"healthState" : "HEALTHY"
}, {
"nodeName" : "mari-12.localnet.com",
"serviceName" : "SMB",
"state" : "running",
"healthState" : "HEALTHY"
}, {
"nodeName" : "mari-12.localnet.com",
"serviceName" : "OBJ",
"state" : "running",
"healthState" : "HEALTHY"
} ],
"status" : {
"code" : 200,
"message" : "The request finished successfully."
}
}