Get aggregates
Compute count, sum, average, minimum, and/or maximum over the records of a table without returning the records.
HTTP request
GET /api/now/stats/{table}
Path parameters
| Name | Description |
|---|---|
table | Table |
Query parameters
| Name | Description |
|---|---|
sysparm_count | Optional — set via the verb's QueryParameters type. |
sysparm_sum_fields | Optional — set via the verb's QueryParameters type. |
Request body
Don't supply a request body for this method.
Response
core.ServiceNowItemResponse[*StatsResultModel] — unwrap with GetResult() then GetStats().
Example
response, err := client.Now().Stats("incident").Get(ctx, nil)
if err != nil {
log.Fatal(err)
}