AI Routines
Get a routine
Changed onGet a single routine, including its persisted condition query and the status of its most recent completed run. Verification results belong to the POST or PATCH operation that generated a condition and are not returned by GET.
get/api/v1/ai/routines/{id}
Request
- Base URLhttps://omniapp.co (the document declares no server; this is the origin it was published from)
- URLhttps://omniapp.co/api/v1/ai/routines/{id}
- AuthHTTP bearer
Path parameters
idstring uuid required
The UUID of the routine.
Query parameters
userIdstring uuid
Target user ID (for org-scoped API keys)
Response
Routine details.
Example response
{
"condition": {
"conditionPrompt": "there are failed orders",
"conditionType": "RESULTS_PRESENT",
"query": {
"aiGenerated": true,
"calculations": [],
"column_totals": {},
"fields": [
"orders.id"
],
"fill_fields": [],
"filters": {
"orders.status": {
"case_insensitive": true,
"kind": "EQUALS",
"type": "string",
"values": [
"failed"
]
}
},
"limit": 1,
"modelId": "770e8400-e29b-41d4-a716-446655440002",
"pivots": [],
"row_totals": {},
"sorts": [],
"table": "orders",
"userEditedSQL": "SELECT ${orders.id}\nFROM ${orders}\nWHERE UPPER(${orders.status}) = UPPER('failed')\nLIMIT 1",
"version": 9
}
},
"destination": {
"recipientEmails": [
"alice@example.com",
"bob@example.com"
],
"type": "email",
"userGroupIds": [
"X9kQ2mPz"
]
},
"lastRun": {
"label": "Delivered",
"state": "COMPLETE"
}
}Changes
- breaking
added to the
response propertyoneOflist for the response status - info
added
webhookdiscriminator mapping keys to theresponse property for the response status
- breaking
- breaking
the
//////response's property format changed fromuuidto no format for status
- breaking