Project

General

Profile

Actions

Bug #25487

closed

'subtotal' is incorrect in API responses

Added by John Mitsch over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
API
Target version:
Fixed in Releases:
Found in Releases:

Description

When requesting an endpoint with a search parameter, the subtotal shows the results returned, rather than responses found.

i.e.

curl -k -u admin:changeme -H "Content-Type: application/json" 'localhost:3000/api/v2/hosts?search=%20os_major%20%3D%20%207'

{
"total": 72,
"subtotal": 20,
"page": 1,
"per_page": 20,
"search": " os_major = 7",
"sort": {
"by": null,
"order": null
},
...

The subtotal is 20, which is the results returned and not the actual number of results returned by the search query.


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #24712: Foreman (1.18?) slow API call against fact_values endpointClosedTomer BriskerActions
Actions

Also available in: Atom PDF