Class WorkflowTriggerParams
-
- All Implemented Interfaces:
-
app.knock.api.core.Params
public final class WorkflowTriggerParams implements Params
Trigger a workflow (specified by the key) to run for the given recipients, using the parameters provided. Returns an identifier for the workflow run request. All workflow runs are executed asynchronously. This endpoint also handles /managing-recipients/identifying-recipients#inline-identifying-recipients for the
actor,recipient, andtenantfields.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classWorkflowTriggerParams.BuilderA builder for WorkflowTriggerParams.
public final classWorkflowTriggerParams.BodyA request to trigger a notification workflow.
public final classWorkflowTriggerParams.DataAn optional map of data to pass into the workflow execution.
-
Method Summary
Modifier and Type Method Description final Optional<String>key()final List<RecipientRequest>recipients()The recipients to trigger the workflow for. final Optional<RecipientRequest>actor()Specifies a recipient in a request. final Optional<String>cancellationKey()An optional key that is used to reference a specific workflow trigger request when issuing a /send-notifications/canceling-workflows request. final Optional<WorkflowTriggerParams.Data>data()An optional map of data to pass into the workflow execution. final Optional<InlineTenantRequest>tenant()An request to set a tenant inline. final JsonField<List<RecipientRequest>>_recipients()Returns the raw JSON value of recipients. final JsonField<RecipientRequest>_actor()Returns the raw JSON value of actor. final JsonField<String>_cancellationKey()Returns the raw JSON value of cancellationKey. final JsonField<WorkflowTriggerParams.Data>_data()Returns the raw JSON value of data. final JsonField<InlineTenantRequest>_tenant()Returns the raw JSON value of tenant. final Map<String, JsonValue>_additionalBodyProperties()final Headers_additionalHeaders()final QueryParams_additionalQueryParams()final WorkflowTriggerParams.BuildertoBuilder()final WorkflowTriggerParams.Body_body()final String_pathParam(Integer index)Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. Booleanequals(Object other)IntegerhashCode()StringtoString()final static WorkflowTriggerParams.Builderbuilder()Returns a mutable builder for constructing an instance of WorkflowTriggerParams. -
-
Method Detail
-
recipients
final List<RecipientRequest> recipients()
The recipients to trigger the workflow for. Can inline identify users, objects, or use a list of user IDs. Limited to 1,000 recipients.
-
actor
final Optional<RecipientRequest> actor()
Specifies a recipient in a request. This can either be a user identifier (string), an inline user request (object), or an inline object request, which is determined by the presence of a
collectionproperty.
-
cancellationKey
final Optional<String> cancellationKey()
An optional key that is used to reference a specific workflow trigger request when issuing a /send-notifications/canceling-workflows request. Must be provided while triggering a workflow in order to enable subsequent cancellation. Should be unique across trigger requests to avoid unintentional cancellations.
-
data
final Optional<WorkflowTriggerParams.Data> data()
An optional map of data to pass into the workflow execution.
-
tenant
final Optional<InlineTenantRequest> tenant()
An request to set a tenant inline.
-
_recipients
final JsonField<List<RecipientRequest>> _recipients()
Returns the raw JSON value of recipients.
Unlike recipients, this method doesn't throw if the JSON field has an unexpected type.
-
_actor
final JsonField<RecipientRequest> _actor()
Returns the raw JSON value of actor.
Unlike actor, this method doesn't throw if the JSON field has an unexpected type.
-
_cancellationKey
final JsonField<String> _cancellationKey()
Returns the raw JSON value of cancellationKey.
Unlike cancellationKey, this method doesn't throw if the JSON field has an unexpected type.
-
_data
final JsonField<WorkflowTriggerParams.Data> _data()
Returns the raw JSON value of data.
Unlike data, this method doesn't throw if the JSON field has an unexpected type.
-
_tenant
final JsonField<InlineTenantRequest> _tenant()
Returns the raw JSON value of tenant.
Unlike tenant, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
-
toBuilder
final WorkflowTriggerParams.Builder toBuilder()
-
_body
final WorkflowTriggerParams.Body _body()
-
_pathParam
final String _pathParam(Integer index)
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
builder
final static WorkflowTriggerParams.Builder builder()
Returns a mutable builder for constructing an instance of WorkflowTriggerParams.
The following fields are required:
.recipients()
-
-
-
-