diff --git a/rest-api/resources/src/main/java/org/eclipse/kapua/app/api/resources/v1/resources/Accounts.java b/rest-api/resources/src/main/java/org/eclipse/kapua/app/api/resources/v1/resources/Accounts.java index eb2848934e7..44582ea7416 100644 --- a/rest-api/resources/src/main/java/org/eclipse/kapua/app/api/resources/v1/resources/Accounts.java +++ b/rest-api/resources/src/main/java/org/eclipse/kapua/app/api/resources/v1/resources/Accounts.java @@ -79,6 +79,7 @@ public AccountListResult simpleQuery( @QueryParam("recursive") boolean recursive, // @QueryParam("sortParam") String sortParam, @QueryParam("sortDir") @DefaultValue("ASCENDING") SortOrder sortDir, + @QueryParam("askTotalCount") boolean askTotalCount, @QueryParam("offset") @DefaultValue("0") int offset, // @QueryParam("limit") @DefaultValue("50") int limit) throws KapuaException { @@ -87,6 +88,7 @@ public AccountListResult simpleQuery( } AccountQuery query = accountFactory.newQuery(scopeId); + query.setAskTotalCount(askTotalCount); AndPredicate andPredicate = query.andPredicate(); if (!Strings.isNullOrEmpty(name)) { diff --git a/rest-api/resources/src/main/resources/openapi/accounts/accounts-scopeId.yaml b/rest-api/resources/src/main/resources/openapi/accounts/accounts-scopeId.yaml index 09fe28f8cc3..6cffb645171 100644 --- a/rest-api/resources/src/main/resources/openapi/accounts/accounts-scopeId.yaml +++ b/rest-api/resources/src/main/resources/openapi/accounts/accounts-scopeId.yaml @@ -34,6 +34,7 @@ paths: type: boolean - $ref: '../openapi.yaml#/components/parameters/sortParam' - $ref: '../openapi.yaml#/components/parameters/sortDir' + - $ref: '../openapi.yaml#/components/parameters/askTotalCount' - $ref: '../openapi.yaml#/components/parameters/limit' - $ref: '../openapi.yaml#/components/parameters/offset' responses: