Skip to content

Commit

Permalink
fix(specs): update analytics and abtesting max pagination query limit (
Browse files Browse the repository at this point in the history
…#3696)

Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
  • Loading branch information
febeck and millotp authored Oct 3, 2024
1 parent 3a3b794 commit ad8e3d2
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 37 deletions.
17 changes: 15 additions & 2 deletions specs/abtesting/paths/abtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,21 @@ get:
summary: List all A/B tests
description: Lists all A/B tests you configured for this application.
parameters:
- $ref: '../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Limit'
- name: offset
in: query
description: Position of the first item to return.
required: false
schema:
type: integer
default: 0
minimum: 0
- name: limit
in: query
description: Number of items to return.
required: false
schema:
type: integer
default: 10
- name: indexPrefix
in: query
description: Index name prefix. Only A/B tests for indices starting with this string are included in the response.
Expand Down
28 changes: 28 additions & 0 deletions specs/analytics/common/parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,34 @@ OrderBy:
schema:
$ref: '#/orderBy'

Offset:
in: query
name: offset
description: |
Position of the first item to return.
Combined with the `limit` parameter, only the first 1000 items can be retrieved.
required: false
schema:
type: integer
default: 0
minimum: 0
maximum: 1000

Limit:
in: query
name: limit
description: |
Number of items to return.
Combined with the `offset` parameter, only the first 1000 items can be retrieved.
required: false
schema:
type: integer
default: 10
maximum: 1000

# private
orderBy:
type: string
Expand Down
4 changes: 2 additions & 2 deletions specs/analytics/paths/search/getSearchesNoClicks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ get:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../../common/parameters.yml#/StartDate'
- $ref: '../../../common/parameters.yml#/EndDate'
- $ref: '../../../common/parameters.yml#/Limit'
- $ref: '../../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Limit'
- $ref: '../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Tags'
responses:
'200':
Expand Down
4 changes: 2 additions & 2 deletions specs/analytics/paths/search/getSearchesNoResults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ get:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../../common/parameters.yml#/StartDate'
- $ref: '../../../common/parameters.yml#/EndDate'
- $ref: '../../../common/parameters.yml#/Limit'
- $ref: '../../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Limit'
- $ref: '../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Tags'
responses:
'200':
Expand Down
4 changes: 2 additions & 2 deletions specs/analytics/paths/search/getTopCountries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ get:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../../common/parameters.yml#/StartDate'
- $ref: '../../../common/parameters.yml#/EndDate'
- $ref: '../../../common/parameters.yml#/Limit'
- $ref: '../../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Limit'
- $ref: '../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Tags'
responses:
'200':
Expand Down
4 changes: 2 additions & 2 deletions specs/analytics/paths/search/getTopFilterAttributes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ get:
- $ref: '../../common/parameters.yml#/Search'
- $ref: '../../../common/parameters.yml#/StartDate'
- $ref: '../../../common/parameters.yml#/EndDate'
- $ref: '../../../common/parameters.yml#/Limit'
- $ref: '../../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Limit'
- $ref: '../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Tags'
responses:
'200':
Expand Down
4 changes: 2 additions & 2 deletions specs/analytics/paths/search/getTopFilterForAttribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ get:
- $ref: '../../common/parameters.yml#/Search'
- $ref: '../../../common/parameters.yml#/StartDate'
- $ref: '../../../common/parameters.yml#/EndDate'
- $ref: '../../../common/parameters.yml#/Limit'
- $ref: '../../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Limit'
- $ref: '../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Tags'
responses:
'200':
Expand Down
4 changes: 2 additions & 2 deletions specs/analytics/paths/search/getTopFiltersNoResults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ get:
- $ref: '../../common/parameters.yml#/Search'
- $ref: '../../../common/parameters.yml#/StartDate'
- $ref: '../../../common/parameters.yml#/EndDate'
- $ref: '../../../common/parameters.yml#/Limit'
- $ref: '../../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Limit'
- $ref: '../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Tags'
responses:
'200':
Expand Down
4 changes: 2 additions & 2 deletions specs/analytics/paths/search/getTopHits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ get:
- $ref: '../../common/parameters.yml#/RevenueAnalytics'
- $ref: '../../../common/parameters.yml#/StartDate'
- $ref: '../../../common/parameters.yml#/EndDate'
- $ref: '../../../common/parameters.yml#/Limit'
- $ref: '../../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Limit'
- $ref: '../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Tags'
responses:
'200':
Expand Down
4 changes: 2 additions & 2 deletions specs/analytics/paths/search/getTopSearches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ get:
- $ref: '../../../common/parameters.yml#/EndDate'
- $ref: '../../common/parameters.yml#/OrderBy'
- $ref: '../../common/parameters.yml#/Direction'
- $ref: '../../../common/parameters.yml#/Limit'
- $ref: '../../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Limit'
- $ref: '../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Tags'
responses:
'200':
Expand Down
19 changes: 0 additions & 19 deletions specs/common/parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,25 +104,6 @@ HitsPerPage:
type: integer
default: 100

Offset:
in: query
name: offset
description: Position of the first item to return.
required: false
schema:
type: integer
default: 0
minimum: 0

Limit:
in: query
name: limit
description: Number of items to return.
required: false
schema:
type: integer
default: 10

# misc
objectID:
type: string
Expand Down

0 comments on commit ad8e3d2

Please sign in to comment.