SDK reference · Python · TypeScript · curl
SDK reference
Every call shows the request, the response, and a copyable example. Docs show placeholder values; signed-in users see their real key on working screens. Your language choice sticks across every page.
emitEvent()
Send one event about a watched thing. This is how data gets in — the start of every Flow.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
| subject | string | Yes | The watched thing this event is about, e.g. "pump-12". |
| kind | string | Yes | What kind of event this is, e.g. "observation". |
| data | object | No | Any extra fields you want kept with the event. |
Request
from dmzagent import Client
client = Client(api_key="YOUR_API_KEY")
client.emit_event(
subject="pump-12",
kind="observation",
data={"route": "/checkout", "status": 200},
)Placeholder key shown. Signed-in users see their real key on working screens.
Response
{
"frame_id": "fr_01HZX…",
"accepted": true,
"n_workspaces": 2
}The event id, whether it was taken in, and how many work areas will weigh it.
guard()
Check a message before your chatbot answers. One of three answers, with a plain reason.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
| deployment | string | Yes | Your guarded chatbot deployment id. |
| message | string | Yes | The user message to check, before your bot sees it. |
Request
from dmzagent import Client
client = Client(api_key="YOUR_API_KEY")
verdict = client.guard(
deployment="YOUR_DEPLOYMENT_ID",
message=user_message,
)
if verdict.allowed:
reply = your_bot(user_message)Placeholder key shown. Signed-in users see their real key on working screens.
Response
{
"allowed": false,
"verdict": "block",
"reason": "matches a warning label in your rule packs",
"record": "rec_01HZX…"
}allow, take a look, or block — with the reason and a link to the logbook record. A denying state fails safe to block.
ackOutput()
Tell the platform a dispatched fix completed in your system — this closes the decision record.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
| output_id | string | Yes | The held action’s id, from the review screen or the dispatch call to your system. |
| ack_ref | string | Yes | Your ticket or change id. The call is idempotent on (output_id, ack_ref). |
Request
from dmzagent import Client
client = Client(api_key="YOUR_API_KEY")
client.ack_output(
output_id="OUTPUT_ID",
ack_ref=your_ticket_id, # idempotent on (output_id, ack_ref)
)Placeholder key shown. Signed-in users see their real key on working screens.
Response
{
"output_id": "out_01HZX…",
"state": "acknowledged"
}The decision record moves to acknowledged. Sending the same pair twice is safe; if no acknowledgment arrives in time, the record marks itself failed.