Skip to content

Commit

Permalink
Add sort parameters in analytics routes
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierapivideo authored Aug 19, 2024
1 parent 59ecfca commit 2a9a131
Show file tree
Hide file tree
Showing 3 changed files with 215 additions and 37 deletions.
72 changes: 72 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11745,6 +11745,42 @@ paths:
format: date-time
type: string
style: form
- description: |
Use this parameter to choose which field the API will use to sort the analytics data.

These are the available fields to sort by:

- `metricValue`: Sorts the results based on the **metric** you selected in your request.
- `dimensionValue`: Sorts the results based on the **dimension** you selected in your request.
example: metricValue
explode: false
in: query
name: sortBy
required: false
schema:
enum:
- metricValue
- dimensionValue
type: string
style: form
- description: |
Use this parameter to define the sort order of results.

These are the available sort orders:

- `asc`: Sorts the results in ascending order: `A to Z` and `0 to 9`.
- `desc`: Sorts the results in descending order: `Z to A` and `9 to 0`.
example: asc
explode: false
in: query
name: sortOrder
required: false
schema:
enum:
- asc
- desc
type: string
style: form
- $ref: '#/components/parameters/filterBy_2'
description: "Use this parameter to filter the API's response based on different\
\ data dimensions. You can serialize filters in your query to receive more\
Expand Down Expand Up @@ -12188,6 +12224,42 @@ paths:
- day
type: string
style: form
- description: |
Use this parameter to choose which field the API will use to sort the analytics data.

These are the available fields to sort by:

- `metricValue`: Sorts the results based on the **metric** you selected in your request.
- `emittedAt`: Sorts the results based on the **timestamp** of the event in ATOM date-time format.
example: metricValue
explode: false
in: query
name: sortBy
required: false
schema:
enum:
- metricValue
- emittedAt
type: string
style: form
- description: |
Use this parameter to define the sort order of results.

These are the available sort orders:

- `asc`: Sorts the results in ascending order: `A to Z` and `0 to 9`.
- `desc`: Sorts the results in descending order: `Z to A` and `9 to 0`.
example: asc
explode: false
in: query
name: sortOrder
required: false
schema:
enum:
- asc
- desc
type: string
style: form
- $ref: '#/components/parameters/filterBy_2'
description: "Use this parameter to filter the API's response based on different\
\ data dimensions. You can serialize filters in your query to receive more\
Expand Down
Loading

0 comments on commit 2a9a131

Please sign in to comment.