Create a Trail
Create a Trail with one trigger and one or more action bindings. The server records the requesting account as the creator and validates the trigger, actions, and lifecycle state. An active Trail receives its next occurrence when the trigger has a future occurrence.
Create a Trail with one trigger and one or more action bindings. The server records the requesting account as the creator and validates the trigger, actions, and lifecycle state. An active Trail receives its next occurrence when the trigger has a future occurrence.
storyden-session<token>application/json- body
name*string1 <= length <= 120description?stringstatus*TrailMutableStatus"active""paused""archived"trigger*|actions*array<>1 <= itemsTrail created.
application/json- response
id*IdentifierA unique identifier for this resource.
xidcreatedAt*stringThe time the resource was created.
date-timeupdatedAt*stringThe time the resource was updated.
date-timedeletedAt?stringThe time the resource was soft-deleted.
date-timemisc?Arbitrary extra data stored with the resource.
name*stringdescription*stringcreated_by*A minimal reference to an account.
status*TrailStatus"active""paused""finished""archived"trigger*|actions*array<>next_occurrence_at?stringdate-timelast_occurrence_at?stringdate-timecurl -X POST 'https://example.com/api/trails' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "status": "active", "trigger": { "type": "schedule", "schedule": { "start": "string", "timezone": "string", "rule": { "frequency": "hourly", "interval": 1 } } }, "actions": [ { "type": "robot_run", "robot_ref": "string", "instruction": "string" } ]}'{ "id": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "misc": {}, "name": "string", "description": "string", "created_by": { "id": "string", "joined": "2019-08-24T14:15:22Z", "suspended": "2019-08-24T14:15:22Z", "handle": "string", "name": "string", "signature": "string", "roles": [ { "badge": true, "default": true, "id": "string", "name": "string", "colour": "string", "meta": {} } ] }, "status": "active", "trigger": { "type": "schedule", "schedule": { "start": "string", "timezone": "string", "rule": { "frequency": "hourly", "interval": 1, "by_weekday": [ "monday" ], "by_month": [ 1 ], "by_month_day": [ -31 ], "count": 1 } } }, "actions": [ { "id": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "misc": {}, "action": { "type": "robot_run", "robot_ref": "string", "instruction": "string" } } ], "next_occurrence_at": "2019-08-24T14:15:22Z", "last_occurrence_at": "2019-08-24T14:15:22Z"}Cancel an active Robot action PUT
Request cancellation for one queued or running Robot action. A queued action is cancelled before it starts. A running action forwards the cancellation request to the Robot session coordinator. Other action runs in the same Trail run continue independently.
Get a Trail GET
Return one Trail definition. The response includes the current trigger, active action bindings, lifecycle state, and occurrence times. The operation does not return run history.