Create trigger
POST
Create trigger.
bearerAuthheader
AuthorizationBearer <token>project_id*stringapplication/json- body
action*enabled*booleanname*stringsource*|Success
application/json- response
checkpointSequence?||nullcreatedAtMicros*|createdBy*|||||definition*error?string|nullnextFireAtMicros?||nullprojectId*stringresources*array<>revision*|triggerId*stringFormat
uuidcurl -X POST 'https://api.spiraldb.dev/api/tasks/projects/string/task-triggers' \ -H 'Content-Type: application/json' \ -d '{ "action": { "input": null, "taskSpecId": { "name": "string", "version": 0 } }, "enabled": true, "name": "string", "source": { "interval": { "everySeconds": 0 }, "type": "interval" }}'{ "checkpointSequence": "string", "createdAtMicros": "string", "createdBy": { "application": { "applicationId": "string" }, "type": "application" }, "definition": { "action": { "input": null, "options": { "deadlineAtMicros": "string", "maxAttempts": 0, "resourceProfile": "cpu_1" }, "taskSpecId": { "name": "string", "version": 0 } }, "enabled": true, "name": "string", "source": { "interval": { "everySeconds": 0, "startAtMicros": "string" }, "type": "interval" } }, "error": "string", "nextFireAtMicros": "string", "projectId": "string", "resources": [ { "definitionVersionId": "44570abd-22cb-4285-9488-b5d477271796", "readTarget": { "commitOnBranch": { "branchId": "712f308d-801e-48bc-b072-9c404734ceb7", "commitId": "a1b223ee-0195-4e35-9b2a-72c93f345117" }, "type": "commitOnBranch" }, "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6", "resourceVersionId": "9498cbd5-d381-4876-b1b6-8b7197891ece", "role": "target" } ], "revision": "string", "triggerId": "b89c9c0a-30c6-475a-b185-93813e22ffcf"}