Everstack
API ReferenceAgentsUpdate Agent Trigger

Update Agent Trigger

PATCH/v1/agent-triggers/{id}
PATCH/v1/agent-triggers/{id}

Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request Body

PropertyTypeRequiredDescription
tenantIdstringNo
namestringNo
enabledbooleanNo
cronExpressionstringNo
cronTimezonestringNo
eventSourceAgentIdstringNo
eventTypestringNo
eventFilterobjectNo
inputTemplatestringNo
maxRetriesintegerNo
retryDelaySecondsintegerNo
timeoutSecondsintegerNo
maxConcurrentintegerNo

Responses

200 Update a trigger

PropertyTypeDescription
triggerobject

default An unexpected error response.

PropertyTypeDescription
codeinteger
messagestring
detailsobject[]

Request

curl -X PATCH "http://localhost:8089/v1/agent-triggers/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tenantId":"string","name":"string","enabled":true,"cronExpression":"string","cronTimezone":"string","eventSourceAgentId":"string","eventType":"string","inputTemplate":"string","maxRetries":0,"retryDelaySeconds":0,"timeoutSeconds":0,"maxConcurrent":0}'
const response = await fetch("http://localhost:8089/v1/agent-triggers/{id}", {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "tenantId": "string",
  "name": "string",
  "enabled": true,
  "cronExpression": "string",
  "cronTimezone": "string",
  "eventSourceAgentId": "string",
  "eventType": "string",
  "inputTemplate": "string",
  "maxRetries": 0,
  "retryDelaySeconds": 0,
  "timeoutSeconds": 0,
  "maxConcurrent": 0
}),
});
const data = await response.json();
import requests

response = requests.patch(
    "http://localhost:8089/v1/agent-triggers/{id}",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
  "tenantId": "string",
  "name": "string",
  "enabled": true,
  "cronExpression": "string",
  "cronTimezone": "string",
  "eventSourceAgentId": "string",
  "eventType": "string",
  "inputTemplate": "string",
  "maxRetries": 0,
  "retryDelaySeconds": 0,
  "timeoutSeconds": 0,
  "maxConcurrent": 0
},
)
data = response.json()

Response

{
  "trigger": {
    "id": "string",
    "tenantId": "string",
    "agentId": "string",
    "name": "string",
    "triggerType": "string",
    "enabled": true,
    "cronExpression": "string",
    "cronTimezone": "string",
    "webhookPath": "string",
    "eventSourceAgentId": "string",
    "eventType": "string",
    "inputTemplate": "string",
    "maxRetries": 0,
    "timeoutSeconds": 0,
    "maxConcurrent": 0,
    "circuitState": "string",
    "consecutiveFailures": 0,
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-01T00:00:00Z",
    "retryDelaySeconds": 0
  }
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string"
    }
  ]
}