Get Agent Sample Record
Pull the latest record from the topic that matches topicPattern.
Used by the wizard’s persistent test pane to pre-fill the Monaco editor with a concrete sample, so the user doesn’t have to hand-craft one. Returns 200 in every “no record” case (regex matches no topic, every matched topic is empty, deserialization fails) so the FE can render inline state without retry logic.
read:agents is the right gate - this is observation, not config
mutation, and the response is the same record any team member with
Kafka topic-read access could pull manually.
Per-tenant rate limit: 30 req/min/bucket -> 429 with Retry-After.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request body for POST /agents/sample-record.
Mirrors the shape of :class:AgentInputConfig so the FE can forward the
wizard's input config straight through without remapping field names.
Response
Successful Response
Response body for POST /agents/sample-record.
All three fields nullable because every "no record found" branch (regex matches no topic, every matched topic is empty, or deserialization fails) is a 200 with explanatory state - not an HTTP error - so the FE can render a hint inline without retry logic.