You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/data-factory/control-flow-webhook-activity.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ ms.date: 03/25/2019
14
14
---
15
15
16
16
# Webhook activity in Azure Data Factory
17
-
You can use a web hook activity to control the execution of pipelines through your custom code. Using the webhook activity, customers can call an endpoint and pass a callback URL. The pipeline run waits for the callback to be invoked before proceeding to the next activity.
17
+
You can use a webhook activity to control the execution of pipelines through your custom code. Using the webhook activity, customers can call an endpoint and pass a callback URL. The pipeline run waits for the callback to be invoked before proceeding to the next activity.
18
18
19
19
## Syntax
20
20
@@ -55,17 +55,40 @@ type | Must be set to **WebHook**. | String | Yes |
55
55
method | Rest API method for the target endpoint. | String. Supported Types: 'POST' | Yes |
56
56
url | Target endpoint and path | String (or expression with resultType of string). | Yes |
57
57
headers | Headers that are sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. | String (or expression with resultType of string) | Yes, Content-type header is required. "headers":{ "Content-Type":"application/json"} |
58
-
body | Represents the payload that is sent to the endpoint. | The body passed back to the call back URI should be a valid JSON. See the schema of the request payload in [Request payload schema](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdata-factory%2Fcontrol-flow-web-activity%23request-payload-schema&data=02%7C01%7Cshlo%40microsoft.com%7Cde517eae4e7f4f2c408d08d6b167f6b1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636891457414397501&sdata=ljUZv5csQQux2TT3JtTU9ZU8e1uViRzuX5DSNYkL0uE%3D&reserved=0) section. | Yes |
58
+
body | Represents the payload that is sent to the endpoint. | Valid JSON (or expression with resultType of JSON). See the schema of the request payload in [Request payload schema](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdata-factory%2Fcontrol-flow-web-activity%23request-payload-schema&data=02%7C01%7Cshlo%40microsoft.com%7Cde517eae4e7f4f2c408d08d6b167f6b1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636891457414397501&sdata=ljUZv5csQQux2TT3JtTU9ZU8e1uViRzuX5DSNYkL0uE%3D&reserved=0) section. | Yes |
59
59
authentication | Authentication method used for calling the endpoint. Supported Types are "Basic" or "ClientCertificate." For more information, see [Authentication](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdata-factory%2Fcontrol-flow-web-activity%23authentication&data=02%7C01%7Cshlo%40microsoft.com%7Cde517eae4e7f4f2c408d08d6b167f6b1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636891457414397501&sdata=GdA1%2Fh2pAD%2BSyWJHSW%2BSKucqoAXux%2F4L5Jgndd3YziM%3D&reserved=0) section. If authentication is not required, exclude this property. | String (or expression with resultType of string) | No |
60
60
timeout | How long the activity will wait for the 'callBackUri' to be invoked. How long the activity will wait for the ‘callBackUri’ to be invoked. Default value is 10mins (“00:10:00”). Format is Timespan i.e. d.hh:mm:ss | String | No |
61
+
Report status on callback | Allows the user the report the failed status of the webhook activity which will mark the activity as failed | Boolean | No |
61
62
62
63
## Additional notes
63
64
64
65
Azure Data Factory will pass an additional property “callBackUri” in the body to the url endpoint, and will expect this uri to be invoked before the timeout value specified. If the uri is not invoked, the activity will fail with status ‘TimedOut’.
65
66
66
-
The web hook activity itself fails only when the call to the custom endpoint fails. Any error message can be added into the body of the callback and used in a subsequent activity.
67
+
The webhook activity itself fails when the call to the custom endpoint fails. Any error message can be added into the body of the callback and used in a subsequent activity.
68
+
69
+
The body passed back to the callback URI should be valid JSON. You must set the Content-Type header to `application/json`.
70
+
71
+
When you use the "Report status on callback" option, you must add the following snippet to the body when making the callback:
72
+
73
+
```
74
+
{
75
+
"Output": {
76
+
// output object will be used in activity output
77
+
"testProp": "testPropValue"
78
+
},
79
+
"Error": {
80
+
// Optional, set it when you want to fail the activity
81
+
"ErrorCode": "testErrorCode",
82
+
"Message": "error message to show in activity error"
83
+
},
84
+
"StatusCode": "403" // when status code is >=400, activity will be marked as failed
85
+
}
86
+
```
87
+
88
+
67
89
68
90
## Next steps
91
+
69
92
See other control flow activities supported by Data Factory:
0 commit comments