diff --git a/specs/ingestion/common/schemas/common.yml b/specs/ingestion/common/schemas/common.yml index 8bed2a66ca..3302747ae0 100644 --- a/specs/ingestion/common/schemas/common.yml +++ b/specs/ingestion/common/schemas/common.yml @@ -60,3 +60,18 @@ eventID: name: type: string description: An human readable name describing the object. + +Window: + type: object + additionalProperties: false + description: The window parameter represents the holds the dates used to query the Observability data from the database in a given window. + properties: + startDate: + type: string + description: A date in format RFC3339 representing the oldest possible data in query window. + endDate: + type: string + description: A date in format RFC3339 representing the newest possible data in query window. + required: + - startDate + - endDate diff --git a/specs/ingestion/common/schemas/run.yml b/specs/ingestion/common/schemas/run.yml index 8e111b0992..669d103106 100644 --- a/specs/ingestion/common/schemas/run.yml +++ b/specs/ingestion/common/schemas/run.yml @@ -21,6 +21,8 @@ RunListResponse: $ref: '#/Run' pagination: $ref: './pagination.yml#/Pagination' + window: + $ref: './common.yml#/Window' required: - runs - pagination diff --git a/specs/ingestion/paths/runs/events/events.yml b/specs/ingestion/paths/runs/events/events.yml index ff53a98831..6c7622e985 100644 --- a/specs/ingestion/paths/runs/events/events.yml +++ b/specs/ingestion/paths/runs/events/events.yml @@ -28,8 +28,11 @@ get: $ref: '../../../common/schemas/event.yml#/Event' pagination: $ref: '../../../common/schemas/pagination.yml#/Pagination' + window: + $ref: '../../../common/schemas/common.yml#/Window' required: - events - pagination + - window '400': $ref: '../../../../common/responses/BadRequest.yml'