Sets one of an automation's spend limits
Creates the limit for the window in the body (default `MONTHLY`), or replaces the amount, thresholds and enforce flag of the one already there. A daily, a weekly and a monthly limit can coexist, and must stay ordered daily ≤ weekly ≤ monthly. A new limit enforces and alerts at 80% and 100% unless the body says otherwise; `enforceLimit: false` makes it alert only. Spend already made in the current window counts against a new limit from the moment runs recording it settle; the limit does not reach back over runs before it existed.
Authorization
Bearer JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.
In: header
Path Parameters
The automation (trigger) identifier.
uuidThe tenant identifier
The limit: amount, window, thresholds and enforce flag.
The limit, in USD. Must be greater than zero.
doubleThe window the limit caps spend over: DAILY, WEEKLY or MONTHLY. Omitted means
MONTHLY. It names which limit to set, so it cannot be changed on an existing one; set the
other window's limit instead.
"UNSPECIFIED" | "DAILY" | "WEEKLY" | "MONTHLY"The percentages of the limit at which the automation's admins are told. Omitted keeps the existing ones on an update, and on a new limit means 80 and 100.
Whether runs are refused once the limit is reached. Omitted keeps the existing value on an
update; a new limit enforces. false makes it alert only.
Response Body
curl -X PUT "https://api.fruxon.com/v1/tenants/string/triggers/497f6eca-6276-4993-bfeb-53cbbbba6f08/budget" \ -H "Content-Type: application/json" \ -d '{}'{
"automationId": "00000000-0000-0000-0000-000000000000",
"amount": 0,
"period": "DAILY",
"thresholdRules": [
{
"percent": 0
}
],
"enforceLimit": false,
"currentPeriodCost": 0,
"usagePercent": 0,
"periodStart": 0,
"periodEnd": 0,
"createdAt": 0,
"modifiedAt": 0
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}Removes one of an automation's spend limits
Any of an automation's limits can be removed; removing one that is not set does nothing. The automation's runs and what they cost are unaffected, and its agents' own limits still apply.
Deletes a trigger and all its bindings.
Permanently removes the trigger along with every agent binding attached to it. The bound agents themselves are not deleted. Returns 404 when the trigger does not exist.