Skip to main content
POST
Add a trigger

Authorizations

Authorization
string
header
required

Path Parameters

jobId
string
required

The unique identifier of the job that owns the trigger. Use the reserved value unattached to address triggers that are not attached to any job, which happens when a component defines a trigger whose parent_job_id expression evaluates to nothing.

Body

application/json
trigger_type
enum<string>
required
Available options:
FILE_NAME_MATCHES
match_type
required

How the pattern is matched against filenames. A literal value or a buildtime expression resolved from component references when the trigger is saved. Buildtime expressions use JobBuildtimeContext.

Available options:
EXACT,
REGEX
pattern
required

Filename pattern to match. A literal value or a buildtime expression resolved from component references when the trigger is saved. Buildtime expressions use JobBuildtimeContext.

component_ids
string[]
component_references
object[]
parent_job_id

Id of the job this trigger belongs to. A literal job id or a buildtime expression resolved from component references when the trigger is saved; when omitted the trigger belongs to the job in the request path. Buildtime expressions use JobBuildtimeContext.

Response

Successful response

Stored file name matches trigger definition. Fields match_type and pattern are unevaluated and appear in buildtime-evaluatable form.

component_ids
string[]
required
component_references
object[]
required
id
string
required
read-only

Unique id of the trigger.

parent_job_id
required

Id of the job this trigger belongs to, as the buildtime expression or literal that was saved. Buildtime expressions use JobBuildtimeContext.

trigger_type
enum<string>
required
Available options:
FILE_NAME_MATCHES
match_type
required

How the pattern is matched against filenames. A literal value or a buildtime expression resolved from component references when the trigger is saved. Buildtime expressions use JobBuildtimeContext.

Available options:
EXACT,
REGEX
pattern
required

Filename pattern to match. A literal value or a buildtime expression resolved from component references when the trigger is saved. Buildtime expressions use JobBuildtimeContext.