@@ -35,10 +35,10 @@ In this tutorial, we will use [IBM Cloud Code Engine](https://www.ibm.com/cloud/
35353 . [ Deploy the application] ( https://cloud.ibm.com/docs/codeengine?topic=codeengine-app-source-code ) from this repository source code.
3636 - In ** Create application** , click ** Specify build details** and enter the following:
3737 - Source
38- - Code repo URL: ** TODO: public URL of this repository. https://github.com/watson-developer-cloud/discovery-webhook-enrichment ...? **
38+ - Code repo URL: ` https://github.com/watson-developer-cloud/doc-tutorial-downloads `
3939 - Code repo access: ` None `
40- - Branch name: ` main `
41- - Context directory: ` slate/experimental /proxy `
40+ - Branch name: ` master `
41+ - Context directory: ` discovery-data/webhook-enrichment-sample/ slate/wml-as-webhook /proxy`
4242 - Strategy
4343 - Strategy: ` Dockerfile `
4444 - Output
@@ -55,7 +55,7 @@ In this tutorial, we will use [IBM Cloud Code Engine](https://www.ibm.com/cloud/
5555``` shell
5656SCORING_API_TOKEN=$(
5757 curl -k -X POST ' https://{hostname of your cp4d instance}/icp4d-api/v1/authorize' \
58- --header " Content-Type: application/json"
58+ --header " Content-Type: application/json" \
5959 -d " {\" username\" :\" admin\" ,\" api_key\" :\" {api key of your cp4d instance}\" }" \
6060 | jq .token
6161)
@@ -64,16 +64,16 @@ SCORING_API_TOKEN=$(
6464 ``` bash
6565 curl -X POST {auth} \
6666 --header ' Content-Type: multipart/form-data' \
67- --form ' enrichment={"name":"my-first-webhook-enrichment", \
68- "type":"webhook", \
69- "options":{"url":"{your_code_engine_app_domain}/webhook", \
70- "headers":[
67+ --form ' enrichment={"name":"my-first-webhook-enrichment",
68+ "type":"webhook",
69+ "options":{"url":"{your_code_engine_app_domain}/webhook",
70+ "headers":[
7171 {
7272 "name": "Authorization",
7373 "value": "Bearer {SCORING_API_TOKEN}"
7474 }
75- ], \
76- "location_encoding":"utf-32"}}' \
75+ ],
76+ "location_encoding":"utf-32"}}' \
7777 ' {url}/v2/projects/{project_id}/enrichments?version=2023-03-31'
7878 ```
79794 . Create a collection in the project and apply the webhook enrichment to the collection.
0 commit comments