Skip to content

Search Participant dispatch attempt

POST
/v1/object-types/hospitality.participant_dispatch_attempt/search
curl --request POST \
--url https://api.aerandil.com/v1/object-types/hospitality.participant_dispatch_attempt/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "branch": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "cursor": "example", "filters": [ { "property": "id", "type": "eq", "value": "example" } ], "limit": 1, "order": "asc", "property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "scope": { "level": "tenant" }, "sort_by": "created_at" }'

Search for instances. Filters eq, contains, gte and lte AND-compose; or / not are additive follow-ups. Pages with an opaque cursor; the +1 fetch returns has_more without a second round-trip. Ordered by sort_by (default created_at) in order (default ascending), id breaking ties; rows with no value for a property key sort last.

One row per envelope the coordinator sent to a participant runner. Records the envelope id, the parent run, the participation (federated) or workflow step (workflow), attempt counters, last HTTP outcome, last failure reason, dead-letter reference, and lifecycle status. The dispatcher worker that fills this table lands with the runner / dispatcher implementation proposal; this proposal lands only the durable state shape per 0022 §17.1.

Media typeapplication/json
object
branch

Optional open-branch id. Search composes that branch’s copy-on-first-write overlay instead of main, so a preview reads its own hypothetical writes. Omit to read main.

string format: uuid
cursor

Opaque cursor from a prior response’s next_cursor. Pass back verbatim; do not introspect.

string
filters

Conjunctive list of predicates. Empty or omitted matches every row in scope, capped by limit.

Array
One of:
object
property
required
Allowed value: id
type
required
Allowed value: eq
value
required
string
limit

Page size. Server defaults to 50, silently clamps at 500 (AIP-158 §3).

integer
>= 1 <= 500
order

Direction of sort_by: asc (oldest / smallest first) or desc. A cursor is bound to the sort_by and order it was minted under; another pair is refused (422).

string
default: asc
Allowed values: asc desc
property_id

The house a desk stands in: keeps this property’s rows (property- or venue-scoped there) and every row scoped to no property (tenant, brand, portfolio), and drops a sibling house’s — the meaning property_id has on the event tail.

string format: uuid
scope
One of: discriminator: level
object
level
required
string
Allowed value: tenant
Allowed values: tenant
sort_by

What the page is ordered by: the row’s created_at or updated_at, or a property whose type orders — strings, enums and dates as text, ints, decimals and durations as numbers, datetimes as instants. Rows with no value sort last in either direction. A property the caller is not cleared to read is refused (403).

string
default: created_at
Allowed values: created_at updated_at id envelope_id dispatch_kind target_run_id target_participation_id target_agent_installation_id target_step_run_id aerandil_correlation_id target_subject attempt_count first_attempt_at last_attempt_at last_http_status last_failure_reason next_attempt_at envelope_expires_at claim_expires_at dead_letter_reference status

Search results, ordered by (sort_by, id) in the requested order (ascending by default).

Media typeapplication/json
object
data
required
Array<object>
object
created_at
required
string format: date-time
id
required
string format: uuid
object_type
required
Allowed value: hospitality.participant_dispatch_attempt
properties
required
object
aerandil_correlation_id
Aerandil-domain correlation id copied from the parent workflow / federated run at row-creation time. Surfaced into `delivery_failed.coordinator.aerandil_correlation_id` (proposal 0022 §7.4) so the audit envelope can join back to the parent run without re-reading it. Distinct from W3C `traceparent` / `tracestate` (HTTP transport-level tracing) — this is the Aerandil domain id, not an OpenTelemetry span id.
string
attempt_count
required
Number of HTTP / SSE attempts made so far. Starts at 1 on first dispatch; the dispatcher increments per retry. 0022 §11.2 caps this at 7 by default.
integer
claim_expires_at
Visibility lease for a dispatcher worker that has claimed this pending row. Once elapsed, another worker may claim it after a crash or deploy.
string format: date-time
dead_letter_reference
Opaque pointer to the dead-letter record once retries are exhausted. The dead-letter store choice is implementation-specific per 0022 §4.2 / §16.2 open question 7 — this is just the reference.
string
dispatch_kind
required
CloudEvents `type` discriminator — `federated_contribution_request`, `workflow_step_invocation`, `federated_output_quarantine`, etc. per 0022 §5.5 / §7.
string
dispatch_payload
Kind-specific §7 data fragment the dispatcher folds into the outbound envelope's data block at send time — e.g. the §7.5 `quarantine` object for `federated_output_quarantine` rows (output id, incident id, quarantine reason, operator actions). Null for kinds whose data block is assembled entirely from the denormalised columns.
envelope_expires_at
Hard deadline copied from `data.idempotency.envelope_expires_at`. The dispatcher stops retrying and marks the attempt `expired` after this time.
string format: date-time
envelope_id
required
CloudEvents `id` carried by this dispatch (UUID v7). Reused on retry; same envelope_id across attempts of one logical dispatch.
string
first_attempt_at
required
Wall-clock time of the first dispatch attempt.
string format: date-time
id
required
Dispatch attempt id
string
last_attempt_at
required
Wall-clock time of the most recent dispatch attempt.
string format: date-time
last_failure_reason
Free-text failure reason from the most recent failed attempt — transport error, signature verification failure, expired envelope, etc. Cleared on a successful delivery.
string
last_http_status
HTTP status code from the most recent attempt. Null until the first attempt completes with a parseable response; set on every attempt afterwards.
integer
next_attempt_at
Dispatcher retry timer. Null / absent means immediately claimable; a future value parks the row until that time.
string format: date-time
status
required
Lifecycle status — pending → acknowledged → delivered (success), or → failed (retries exhausted) / expired (past `envelope_expires_at`).
string
Allowed values: pending in_flight acknowledged delivered failed expired
target_agent_installation_id
`agent_installation.id` (business id) for `workflow_step_invocation` dispatches — the endpoint resolver reads the installation's `dispatch_endpoint_url` and the receiver verifies participant signatures against its `runner_public_keys`. Null for participation-anchored (federated) dispatch kinds.
string
target_participation_id
`federated_participation.id` for federated dispatches; null for workflow agent-installation dispatches.
string
target_run_id
Parent `federated_run.id` or `workflow_run.id`. The link surface carries the typed traversal; this column is the denormalised id for fast lookup. Exactly one of the two parent-run link types is populated per row.
string
target_step_run_id
`workflow_step_run` object uuid for `workflow_step_invocation` dispatches — the receiver's completion binding advances this step via `record_workflow_step_attempt` / `record_workflow_step_result` when the participant submits its result. Null for federated kinds.
string
target_subject
required
CloudEvents `subject` attribute the envelope carried. Composite string per 0022 §5.4 — `<run_id>/<participation_id>/<contribution_slot>` for federated, `<run_id>/<step_key>/<attempt_id>` for workflow; `<output_id>/<participation_id>` for §7.5 quarantine notices.
string
provenance

Per-property source attribution and pins. An entry under properties means the property’s current value came from that source (on the source’s own clock, source_updated_at); an entry under pins is a human override protecting the property from sourced writes.

object
pins
object
key
additional properties
object
pinned_at
string format: date-time
pinned_by
object
reason
required
string
properties
object
key
additional properties
object
external_id
string
recorded_at
required
string format: date-time
source
required
string
source_updated_at
string format: date-time
stream
string
scope
required
One of: discriminator: level
object
level
required
string
Allowed value: tenant
Allowed values: tenant
tenant_id
required
string format: uuid
updated_at
required
string format: date-time
version
required
integer
>= 1
has_more
required
boolean
next_cursor

Cursor for the next page; omitted when the result set is exhausted.

string
Example
{
"data": [
{
"object_type": "hospitality.participant_dispatch_attempt",
"properties": {
"status": "pending"
},
"scope": {
"level": "tenant"
}
}
]
}

Validation error — unknown property or filter type mismatch.