---
title: "Status - Service List"
description: ""
url: "https://docs.itrsgroup.com/docs/opsview/current/rest-api/status/api-status-service-list/index.html"
---
Request URL: `/rest/status/service`

   - `GET` — lists information about services.
   - `PUT`, `POST`, `DELETE` — unimplemented.

The URL parameters includes the service object filtering parameters. These are also available:

   - `downtime_start_time` and `downtime_comment` — filter based on downtime that matches these conditions.
   - `filter` — either `handled` or `unhandled`. Filters services by this condition.
   - `host_filter` — either `handled` or `unhandled`. Filters host by this condition.
   - `state` — filters by services in this state. Expects the numeric ID for state. Can be repeated.
   - `state_type` — filters by service state type. Expects either `0` (soft) or `1` (hard). Defaults to both.
   - `host_state` — numeric state value. The value can be repeated. If `includehosts=0` (default), then the host state of each service must be in this state (AND condition). If `includehosts=1`, then either services are in the chosen state, or any host are in this chosen state (OR condition).  
   - `host_state_type` — filters by host state type. Expects either `0` (soft) or `1` (hard). Defaults to both.
   - `includeperfdata` — if set, will add data about the performance metrics for services that have performance information.
   - `convertuom` — if set, this will convert performance data into base units. For example, if `value=1500` and `uom=MB`, with this flag set, this will return `value=1500000000` and `uom=bytes`.
   - `includehandleddetails` — if set, will include acknowledgement information.
   - `includehosts` — default value is `0`. If set, this will change the ordering by state to the order below. Also, it will change the filter to `unhandled` or `handled` to include hosts specifically. When `includehosts` is set, each host could have services = [], which means this is a host only object. This parameter can change the definition of `host_state`.
   - `type` — only applicable when `includehosts=1`.  Set to either `host` or `service`. If not set, will assume both. If set more than once, the first value is used.
   - `rows` — returns this number of rows. Set to `all` to get all results. Defaults to `all`.
   - `page` — returns this page number if rows is set to a number. Defaults to first page.
   - `include_allrows` — if set and page is set, this will return `summary.allrows` which will be the total number of rows based on the filtering parameters. Default `no`.
   - `recheck=1` — response will filter only the objects that can be rechecked. Default is `0`.
   - `order` — can order the results. The value can be repeated. Valid values (you can suffix with `_desc` to order descending):
      - `state` — orders by service state. 
            - If `includehosts=0`, host states have priority (`DOWN`, `UNREACHABLE`, `UP`, `CRITICAL`, `WARNING`, `UNKOWN`, and `OK`).
            - If `includehosts=1`, then states are intermingled by priority (`DOWN`, `CRITICAL`, `WARNING`, `UNREACHABLE`, `UNKNOWN`, `UP`, and `OK`)
      - `service` — orders by service name.
      - `host` — orders by host name.
      - `host_state` — orders by host state.
      - `ip` — orders by network address.
      - `alias` — orders by host description.
      - `hostgroup` — orders by host group name.
      - `last_check` — orders by last check time.
      - `last_state_change` — orders by last state change time.
      - `state_duration` — orders by most recent state changes first.

## Example output


**Note**


The host portion can have two additional keys regarding Monitoring Collector or Cluster health. For more details, see [Host Summary](https://docs.itrsgroup.com/docs/opsview/current/rest-api/status/api-status-host-summary/index.html).



```
    {
       "list" : [
          {
             "alias" : "Opsview Master Server",    // Host description
             "comments" : "1",
             "current_check_attempt" : "0",
             "downtime" : "0",
             "hostgroup" : "US Data Centre",       // Host group for the host
             "icon" : "opsview",
             "ip" : "10.10.10.10",                 // Network address for the host
             "last_check" : "1970-01-01 00:00:00",
             "max_check_attempts" : "0",
             "name" : "opsview",
             "num_interfaces" : "0",
             "num_services" : "6",
             "output" : "Dummy output",
             "services" : [
                {
                   "current_check_attempt" : "1",
                   "downtime" : "0",
                   "last_check" : "2011-01-16 22:51:29",
                   "markdown" : "0",
                   "max_check_attempts" : "3",
                   "name" : "Collector-node: opcollector",
                   "output" : "collector-node check with fake results",
                   "perfdata_available" : "1",
                   "service_object_id" : "219",
                   "state" : "ok",
                   "state_type" : "hard",
                   "state_duration" : "9296782",
                   "unhandled" : "0"
                },
                {
                   "current_check_attempt" : "1",
                   "downtime" : "0",
                   "last_check" : "2011-01-16 22:52:34",
                   "markdown" : "0",
                   "max_check_attempts" : "3",
                   "name" : "Collector-node: opcollectorclusterA",
                   "output" : "collector-node opcollectorclusterA check with fake results",
                   "perfdata_available" : "1",
                   "service_object_id" : "220",
                   "state" : "critical",
                   "state_type" : "soft",
                   "state_duration" : "9296717",
                   "unhandled" : "1"
                }
             ],
             "state" : "up",
             "state_type" : "hard",
             "state_duration" : "1304515071",
             "summary" : {
                "critical" : "1",
                "handled" : "1",
                "computed_state" : "critical",
                "ok" : "1",
                "total" : "2",
                "unhandled" : "1"
             },
             "unhandled" : "0"
          }
       ],
       "summary" : {
          "handled" : "2",
          "host" : {
             "handled" : "1",
             "total" : "1",
             "unhandled" : "0",
             "up" : "1"
          },
          "service" : {
             "critical" : "1",
             "handled" : "1",
             "ok" : "1",
             "total" : "2",
             "unhandled" : "1"
          },
          "total" : "3",
          "unhandled" : "1"
       }
    }
```

The following attributes will only be returned if true for a host or service. If the attribute does not exist, you can assume that the values are 0:

   - `acknowledged` — 1.
   - `flapping` — 1.


**Note**


The format of the last_check field has changed to being epoch seconds. To have the old behaviour, use the URL parameter of `format_datetime=1`.




