StackStorm / StackStorm/st2

Get executions for a set of rules via the REST api

Open
#4,035 9 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

API feature proposal
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

We have a need to request executions for a set of rules in a single pack. According to the API docs, we can add a ?rule=rulename parameter, but this has two problems:

  1. We can only specify one rule
  2. We cannot specify the full ref of the rule (packname.rulename), so if there are two separate packs with the same rule name (handle-webhook, for example), we'll get executions back for multiple packs.

We have tried the following to no avail:

rule[]=rule-one&rule[]=rule-two
rule=rule-one&rule=rule-two
rule=rule-one,rule-two
rule.0=rule-one&rule.1=rule-two

This is a feature request for the following:

  1. The ability to specify multiple rules when filtering executions
  2. The ability to EITHER specify a pack name to filter in addition to the rules OR specify the full ref (packname.rulename) for each rule we want to filter on (obviously, the latter would be a bit more flexible - but probably also less performant).

something like:

?pack=packa&rule[]=rule-one&rule[]=rule-two

or

?rule[]=packa.rule-one&rule[]=packb.rule-two

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documented action_executions_controller.get_all endpoint and its current rule query behavior. Review how execution filters are parsed and tested, then establish whether multiple rules should accept full rule references or a separate pack filter. Done means the REST API can unambiguously filter executions for the requested rules without matching same-named rules from unrelated packs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.