From 9b0ea6c8bee83428bd0fc5884810224c265cac4a Mon Sep 17 00:00:00 2001 From: raethlo Date: Wed, 17 Sep 2025 20:34:18 +0200 Subject: [PATCH] Add openapi specs for startedAt actor filters --- .../openapi/paths/actor-runs/actor-runs.yaml | 24 ++++++++++++++++++- .../paths/actors/acts@{actorId}@runs.yaml | 22 +++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/apify-api/openapi/paths/actor-runs/actor-runs.yaml b/apify-api/openapi/paths/actor-runs/actor-runs.yaml index 7f0093144e..17807bea27 100644 --- a/apify-api/openapi/paths/actor-runs/actor-runs.yaml +++ b/apify-api/openapi/paths/actor-runs/actor-runs.yaml @@ -12,7 +12,7 @@ get: By default, the records are sorted by the `startedAt` field in ascending order. Therefore, you can use pagination to incrementally fetch all records while new ones are still being created. To sort the records in descending order, use - `desc=1` parameter. You can also filter runs by status ([available + `desc=1` parameter. You can also filter runs by `startedAt`` and `status`` fields ([available statuses](https://docs.apify.com/platform/actors/running/runs-and-builds#lifecycle)). operationId: actorRuns_get parameters: @@ -58,6 +58,28 @@ get: schema: type: string example: SUCCEEDED + - name: startedAfter + in: query + description: | + Filter runs that started after the specified date and time (inclusive). + The value must be a valid ISO 8601 datetime string (UTC). + style: form + explode: true + schema: + type: string + format: date-time + example: "2025-09-01T00:00:00.000Z" + - name: startedBefore + in: query + description: | + Filter runs that started before the specified date and time (inclusive). + The value must be a valid ISO 8601 datetime string (UTC). + style: form + explode: true + schema: + type: string + format: date-time + example: "2025-09-17T23:59:59.000Z" responses: # todo 404? '200': diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml index d14dc6da63..2dd68c4d86 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml @@ -66,6 +66,28 @@ get: schema: type: string example: SUCCEEDED + - name: startedAfter + in: query + description: | + Filter runs that started after the specified date and time (inclusive). + The value must be a valid ISO 8601 datetime string (UTC). + style: form + explode: true + schema: + type: string + format: date-time + example: "2025-09-01T00:00:00.000Z" + - name: startedBefore + in: query + description: | + Filter runs that started before the specified date and time (inclusive). + The value must be a valid ISO 8601 datetime string (UTC). + style: form + explode: true + schema: + type: string + format: date-time + example: "2025-09-17T23:59:59.000Z" responses: '200': description: ''