Skip to content

Expose the event search count endpoint #302

Description

@exe-dev-github-integration

API release 61.3 moves the event count out of the search request. The count_only field left Search_Request, and a dedicated endpoint replaces it. snouty never exposed count_only, so this is a new capability. The spec is vendored in src/openapi.json as of #300.

  • POST /api/v0/runs/{run_id}/events/search/count takes Search_Count_Request: { "query": string, "validate_only": boolean }. query is an event-set DSL pipeline, the same grammar runs search sends.
  • The response is a single JSON object, Search_Count_Response: { "count": integer }. No limit applies.
  • With validate_only set, the server answers 200 with an empty body for a query that parses, and 400 for one that does not, and computes no count.
  • The endpoint documents a 503 with an optional Retry-After header when the events query backend is unavailable.

The runs search command and the event-set DSL are behind the runs-search unstable feature, so the count belongs behind the same gate until that API stabilizes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions