Skip to main content
Version: v2.0

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

NameDescription
tableTable

Query parameters

NameDescription
sysparm_countOptional — set via the verb's QueryParameters type.
sysparm_sum_fieldsOptional — 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)
}
Was this page helpful?