Sazabi
APIAutomations

Update an automation

Update an automation's name, description, or schedule. Does not change which script it runs.

PATCH https://api.sazabi.com/v1/automations/{automationId}

PATCH
/automations/{automationId}

Path Parameters

automationId*string

Automation ID.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/automations/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "expectedRevision": -9007199254740991  }'
{  "automation": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "configurationRevision": -9007199254740991,    "templateProvenance": {      "templateId": "string",      "templateVersion": -9007199254740991,      "resolvedInputs": {        "property1": "string",        "property2": "string"      }    },    "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",    "name": "string",    "description": "string",    "kind": "script",    "trigger": "schedule",    "webhook": {      "hookId": "string",      "url": "string",      "lastDeliveryAt": "2019-08-24T14:15:22Z",      "secretRotatedAt": "2019-08-24T14:15:22Z"    },    "scriptId": "f0627ad0-1039-49a9-8db1-75a1523ed451",    "scriptName": "string",    "enabled": true,    "cronExpression": "string",    "timezone": "string",    "timeoutSeconds": -9007199254740991,    "health": "healthy",    "lastRun": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "automationRunKey": "string",      "status": "running",      "startedAt": "2019-08-24T14:15:22Z",      "completedAt": "2019-08-24T14:15:22Z",      "durationMs": -9007199254740991,      "exitCode": -9007199254740991    },    "successRate": 0,    "runCount": -9007199254740991,    "failedRunCount": -9007199254740991,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "recordedHistoryStartsAt": "2019-08-24T14:15:22Z",    "scriptIdentifier": "string",    "canToggle": true  }}