Skip to content

Commit 534080d

Browse files
Update control-flow-webhook-activity.md
I have updated the page with information on how to use the Report status on callback feature with information provided by Monica F on the engineering team. I have also added a little tip about the content type as it is not clear when this fails what the reason is unless you go look at what http error 415 means. Even that only means invalid content type. Lastly I removed the piece about callback on the body of the request as that body refers to the body of any endpoint you are calling not the body of the callback
1 parent 1504075 commit 534080d

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

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

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,37 @@ 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 web hook 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 call back URI should be valid JSON and you must set the Content-Type to `application/json`
70+
71+
When using the "Report status on callback" option you have to 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
6991
See other control flow activities supported by Data Factory:

0 commit comments

Comments
 (0)