Skip to content

Commit 5bf6986

Browse files
authored
Merge pull request #42877 from eugeneniemand/patch-1
Update control-flow-webhook-activity.md
2 parents 2d3b058 + 7596c18 commit 5bf6986

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

articles/data-factory/control-flow-webhook-activity.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.date: 03/25/2019
1414
---
1515

1616
# 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.
1818

1919
## Syntax
2020

@@ -55,17 +55,40 @@ type | Must be set to **WebHook**. | String | Yes |
5555
method | Rest API method for the target endpoint. | String. Supported Types: 'POST' | Yes |
5656
url | Target endpoint and path | String (or expression with resultType of string). | Yes |
5757
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 |
5959
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 |
6060
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 |
6162

6263
## Additional notes
6364

6465
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’.
6566

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+
6789

6890
## Next steps
91+
6992
See other control flow activities supported by Data Factory:
7093

7194
- [If Condition Activity](control-flow-if-condition-activity.md)

0 commit comments

Comments
 (0)