Skip to content

Commit 7e0d07d

Browse files
committed
Updated API from documentation release
1 parent b5b44c6 commit 7e0d07d

9 files changed

+49
-20
lines changed

api-specs/api/resources/in-store.raml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2623,10 +2623,10 @@ uriParameters:
26232623
maximum: 10000
26242624
withTotal:
26252625
type: boolean
2626-
default: true
2626+
default: false
26272627
required: false
26282628
description: |
2629-
By default, the response does not include the `total` field. Set to `true` to get the [total](/../api/general-concepts#total) number of query results included.
2629+
Controls the calculation of the [total](/../api/general-concepts#total) number of query results. Set to `true` to get the [total](/general-concepts#total) number of query results. This may impact query performance.
26302630
responses:
26312631
200:
26322632
body:
@@ -2928,10 +2928,10 @@ uriParameters:
29282928
maximum: 10000
29292929
withTotal:
29302930
type: boolean
2931-
default: true
2931+
default: false
29322932
required: false
29332933
description: |
2934-
By default, the response does not include the `total` field. Set to `true` to get the [total](/../api/general-concepts#total) number of query results included.
2934+
Controls the calculation of the [total](/../api/general-concepts#total) number of query results. Set to `true` to get the [total](/general-concepts#total) number of query results. This may impact query performance.
29352935
responses:
29362936
200:
29372937
body:

api-specs/api/resources/product-selections.raml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ post:
8383
queryParameters:
8484
where?:
8585
type: QueryPredicate[]
86+
withTotal:
87+
type: boolean
88+
default: false
89+
required: false
90+
description: |
91+
Controls the calculation of the [total](/../api/general-concepts#total) number of query results. Set to `true` to get the [total](/general-concepts#total) number of query results. This may impact query performance.
8692
securedBy:
8793
[oauth_2_0: { scopes: ['view_product_selections:{projectKey}'] }]
8894
is:
@@ -139,6 +145,12 @@ post:
139145
queryParameters:
140146
where?:
141147
type: QueryPredicate[]
148+
withTotal:
149+
type: boolean
150+
default: false
151+
required: false
152+
description: |
153+
Controls the calculation of the [total](/../api/general-concepts#total) number of query results. Set to `true` to get the [total](/general-concepts#total) number of query results. This may impact query performance.
142154
securedBy:
143155
[oauth_2_0: { scopes: ['view_product_selections:{projectKey}'] }]
144156
is:

api-specs/api/resources/product-tailoring.raml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ get:
1616
body:
1717
application/json:
1818
example: !include ../examples/product-tailoring-list.example.json
19+
queryParameters:
20+
withTotal:
21+
type: boolean
22+
default: false
23+
required: false
24+
description: |
25+
Controls the calculation of the [total](/../api/general-concepts#total) number of query results. Set to `true` to get the [total](/general-concepts#total) number of query results. This may impact query performance.
1926
head:
2027
securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }]
2128
description: Checks if a ProductTailoring exists for a given Query Predicate. Returns a `200 OK` status if any ProductTailoring match the Query Predicate or a `404 Not Found` otherwise.

api-specs/api/resources/products.raml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ post:
121121
get:
122122
securedBy:
123123
[oauth_2_0: { scopes: ['view_product_selections:{projectKey}'] }]
124+
queryParameters:
125+
withTotal:
126+
type: boolean
127+
default: false
128+
required: false
129+
description: |
130+
Controls the calculation of the [total](/../api/general-concepts#total) number of query results. Set to `true` to get the [total](/general-concepts#total) number of query results. This may impact query performance.
124131
responses:
125132
200:
126133
body:
@@ -247,6 +254,13 @@ post:
247254
get:
248255
securedBy:
249256
[oauth_2_0: { scopes: ['view_product_selections:{projectKey}'] }]
257+
queryParameters:
258+
withTotal:
259+
type: boolean
260+
default: false
261+
required: false
262+
description: |
263+
Controls the calculation of the [total](/../api/general-concepts#total) number of query results. Set to `true` to get the [total](/general-concepts#total) number of query results. This may impact query performance.
250264
responses:
251265
200:
252266
body:

api-specs/api/types/product-selection/AssignedProductSelectionPagedQueryResponse.raml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ properties:
3030
format: int64
3131
description: |
3232
Total number of results matching the query.
33-
This number is an estimation that is not [strongly consistent](/general-concepts#strong-consistency).
34-
Unlike other endpoints, the Product Selection endpoint does not return this field by default.
35-
To get `total`, pass the query parameter `withTotal` set to `true`.
36-
When the results are filtered with a [Query Predicate](/predicates/query), `total` is subject to a [limit](/limits#queries).
33+
Present only when the `withTotal` query parameter is set to `true`.
34+
This number is an estimation that is not [strongly consistent](/../api/general-concepts#strong-consistency).
35+
When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/limits#queries).
3736
results:
3837
type: AssignedProductSelection[]
3938
description: |-

api-specs/api/types/product-selection/ProductSelectionPagedQueryResponse.raml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ properties:
3131
description: |
3232
Total number of results matching the query.
3333
This number is an estimation that is not [strongly consistent](/general-concepts#strong-consistency).
34-
Unlike other endpoints, the Product Selection endpoint does not return this field by default.
35-
To get `total`, pass the query parameter `withTotal` set to `true`.
34+
This field is returned by default.
35+
For improved performance, calculating this field can be deactivated by using the query parameter `withTotal=false`.
3636
When the results are filtered with a [Query Predicate](/predicates/query), `total` is subject to a [limit](/limits#queries).
3737
results:
3838
type: ProductSelection[]

api-specs/api/types/product-selection/ProductSelectionProductPagedQueryResponse.raml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ properties:
3131
format: int64
3232
description: |
3333
Total number of results matching the query.
34-
This number is an estimation that is not [strongly consistent](/general-concepts#strong-consistency).
35-
Unlike other endpoints, the Product Selection endpoint does not return this field by default.
36-
To get `total`, pass the query parameter `withTotal` set to `true`.
37-
When the results are filtered with a [Query Predicate](/predicates/query), `total` is subject to a [limit](/limits#queries).
34+
Present only when the `withTotal` query parameter is set to `true`.
35+
This number is an estimation that is not [strongly consistent](/../api/general-concepts#strong-consistency).
36+
When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/limits#queries).
3837
results:
3938
type: AssignedProductReference[]
4039
description: |-

api-specs/api/types/product-selection/ProductsInStorePagedQueryResponse.raml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ properties:
3030
format: int64
3131
description: |
3232
Total number of results matching the query.
33-
This number is an estimation that is not [strongly consistent](/general-concepts#strong-consistency).
34-
Unlike other endpoints, the Product Selection endpoint does not return this field by default.
35-
To get `total`, pass the query parameter `withTotal` set to `true`.
36-
When the results are filtered with a [Query Predicate](/predicates/query), `total` is subject to a [limit](/limits#queries).
33+
Present only when the `withTotal` query parameter is set to `true`.
34+
This number is an estimation that is not [strongly consistent](/../api/general-concepts#strong-consistency).
35+
When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/limits#queries).
3736
results:
3837
type: ProductSelectionAssignment[]
3938
description: ProductSelectionAssignments matching the query.

api-specs/api/types/product-tailoring/ProductTailoringPagedQueryResponse.raml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ properties:
3131
format: int64
3232
description: |
3333
Total number of results matching the query.
34+
Present only when the `withTotal` query parameter is set to `true`.
3435
This number is an estimation that is not [strongly consistent](/../api/general-concepts#strong-consistency).
35-
This field is returned by default.
36-
For improved performance, calculating this field can be deactivated by using the query parameter `withTotal=false`.
3736
When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/limits#queries).
3837
results:
3938
type: ProductTailoring[]

0 commit comments

Comments
 (0)