Skip to content

What a rule would have queued

GET
/v1/projects/{projectId}/judging-rules/preview
curl --request GET \
--url https://example.com/v1/projects/example/judging-rules/preview \
--header 'Authorization: Bearer <token>'

Among the project’s last last top-level runs (not replays), how many a rule with these fields (and its sample) would have queued. The rule editor’s “would have added N of the last 100”. Lists are comma-separated. Needs read on the project.

projectId
required
string

ProjectId — opaque branded string.

agentIds
string

Comma-separated.

flowIds
string

Comma-separated.

versions
string

Comma-separated; live for the live version.

status
string

Comma-separated: completed, failed, cancelled.

includeDryRuns
boolean

true to count dry runs.

sample
number

0 < sample ≤ 1. Default 1.

last
integer
>= 1 <= 500

How many recent runs to look at, 1 to 500. Default 100.

ruleId
string

An existing rule’s id, to sample as that rule does: matched is then exactly the runs it would take. Without it, matched is an estimate.

The preview.

Media typeapplication/json
object
considered
required

The recent runs looked at.

integer
matched
required

Those the rule would have queued, with its sample (maxOpen isn’t applied).

integer
Examplegenerated
{
"considered": 1,
"matched": 1
}

A malformed field (bad-input).

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Missing / malformed / expired / revoked bearer token.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

No project with that id (project-not-found).

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}