跳到主要内容

WebHook

What is WebHook

WebHook is an event notification mechanism implemented through HTTP requests. ILLA Flow allows users to trigger workflows in ILLA Flow by making an HTTP request to its WebHook and retrieve the returned data.

How to use it

Body params

Used to set the parameters required in the request body when making a request to this WebHook.

Property nameDescription
KeyThe parameter names.
TypeUsed to set the data type.
RequiredUsed to set whether this parameter is required.
Test valueUsed to enter test values. If your parameter type is String, you can directly enter the String. If your parameter type is another type, you need to enclose the test value in{{}}. For example, for a numerical parameter, you need to enter{{5}}, and for an array parameter, you need to enter{{[1,2,3,4]}}.

How to request

Copy cURL to get the content required when making a request to this WebHook.

Here is an example,

curl -X POST 
https://cloud-api.illacloud.com/flow/api/v1/webhook/workflows/ILAex4p1C7Wm/run?webhookToken=xxxxxx
-H "Content-Type: application/json"
-d '{"param":{"a":1,"b":2},"param1":[1,2,3]}'

cURL includes the following content:

FieldDescriptionHow to use in the REST API Action of ILLA
Request methodPOSTAction type
URLThe part before the question mark is the requested URL. For example,https://cloud-api.illacloud.com/flow/api/v1/webhook/workflows/ILAex4p1C7Wm/runBase URL
Query parametersThe part after the question mark is the requested URL. For example,webhookToken=xxxxxxURL Parameters
HeaderContent-Type: application/jsonHeaders
Request bodyIf you have set a request body in the WebHook, the cURL command will include an example of the request body.Body, it could bex-www-form-urlencodedorRaw - JSON

How to get the response

Learn more about response: https://docs.illacloud.com/illa-flow-response