Skip to content

Commit

Permalink
Merge pull request #252 from hmtbr/fix-webhook-sample-readme
Browse files Browse the repository at this point in the history
fix code repo url, branch name, and context directory
  • Loading branch information
michelle-miller authored Dec 1, 2023
2 parents 52ef6bf + e7e0b71 commit da8f42f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions discovery-data/webhook-enrichment-sample/granite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ In this tutorial, we will use [IBM Cloud Code Engine](https://www.ibm.com/cloud/
3. [Deploy the application](https://cloud.ibm.com/docs/codeengine?topic=codeengine-app-source-code) from this repository source code.
- In **Create application**, click **Specify build details** and enter the following:
- Source
- Code repo URL: **TODO: public URL of this repository. https://github.com/watson-developer-cloud/discovery-webhook-enrichment ...?**
- Code repo URL: `https://github.com/watson-developer-cloud/doc-tutorial-downloads`
- Code repo access: `None`
- Branch name: `main`
- Context directory: `granite`
- Branch name: `master`
- Context directory: `discovery-data/webhook-enrichment-sample/granite`
- Strategy
- Strategy: `Dockerfile`
- Output
Expand Down
6 changes: 3 additions & 3 deletions discovery-data/webhook-enrichment-sample/regex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ In this tutorial, we will use [IBM Cloud Code Engine](https://www.ibm.com/cloud/
3. [Deploy the application](https://cloud.ibm.com/docs/codeengine?topic=codeengine-app-source-code) from this repository source code.
- In **Create application**, click **Specify build details** and enter the following:
- Source
- Code repo URL: **TODO: public URL of this repository. https://github.com/watson-developer-cloud/discovery-webhook-enrichment ...?**
- Code repo URL: `https://github.com/watson-developer-cloud/doc-tutorial-downloads`
- Code repo access: `None`
- Branch name: `main`
- Context directory: `regex`
- Branch name: `master`
- Context directory: `discovery-data/webhook-enrichment-sample/regex`
- Strategy
- Strategy: `Dockerfile`
- Output
Expand Down
8 changes: 4 additions & 4 deletions discovery-data/webhook-enrichment-sample/slate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@ In this tutorial, we will use [IBM Cloud Code Engine](https://www.ibm.com/cloud/
```shell
SCORING_API_TOKEN=$(
curl -k -X POST 'https://{hostname of your cp4d instance}/icp4d-api/v1/authorize' \
--header "Content-Type: application/json"
--header "Content-Type: application/json" \
-d "{\"username\":\"admin\",\"api_key\":\"{api key of your cp4d instance}\"}" \
| jq .token
)
```
3. [Deploy the application](https://cloud.ibm.com/docs/codeengine?topic=codeengine-app-source-code) from this repository source code.
- In **Create application**, click **Specify build details** and enter the following:
- Source
- Code repo URL: **TODO: public URL of this repository. https://github.com/watson-developer-cloud/discovery-webhook-enrichment ...?**
- Code repo URL: `https://github.com/watson-developer-cloud/doc-tutorial-downloads`
- Code repo access: `None`
- Branch name: `main`
- Context directory: `slate/app`
- Branch name: `master`
- Context directory: `discovery-data/webhook-enrichment-sample/slate/app`
- Strategy
- Strategy: `Dockerfile`
- Output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ In this tutorial, we will use [IBM Cloud Code Engine](https://www.ibm.com/cloud/
3. [Deploy the application](https://cloud.ibm.com/docs/codeengine?topic=codeengine-app-source-code) from this repository source code.
- In **Create application**, click **Specify build details** and enter the following:
- Source
- Code repo URL: **TODO: public URL of this repository. https://github.com/watson-developer-cloud/discovery-webhook-enrichment ...?**
- Code repo URL: `https://github.com/watson-developer-cloud/doc-tutorial-downloads`
- Code repo access: `None`
- Branch name: `main`
- Context directory: `slate/experimental/proxy`
- Branch name: `master`
- Context directory: `discovery-data/webhook-enrichment-sample/slate/wml-as-webhook/proxy`
- Strategy
- Strategy: `Dockerfile`
- Output
Expand All @@ -55,7 +55,7 @@ In this tutorial, we will use [IBM Cloud Code Engine](https://www.ibm.com/cloud/
```shell
SCORING_API_TOKEN=$(
curl -k -X POST 'https://{hostname of your cp4d instance}/icp4d-api/v1/authorize' \
--header "Content-Type: application/json"
--header "Content-Type: application/json" \
-d "{\"username\":\"admin\",\"api_key\":\"{api key of your cp4d instance}\"}" \
| jq .token
)
Expand All @@ -64,16 +64,16 @@ SCORING_API_TOKEN=$(
```bash
curl -X POST {auth} \
--header 'Content-Type: multipart/form-data' \
--form 'enrichment={"name":"my-first-webhook-enrichment", \
"type":"webhook", \
"options":{"url":"{your_code_engine_app_domain}/webhook", \
"headers":[
--form 'enrichment={"name":"my-first-webhook-enrichment",
"type":"webhook",
"options":{"url":"{your_code_engine_app_domain}/webhook",
"headers":[
{
"name": "Authorization",
"value": "Bearer {SCORING_API_TOKEN}"
}
], \
"location_encoding":"utf-32"}}' \
],
"location_encoding":"utf-32"}}' \
'{url}/v2/projects/{project_id}/enrichments?version=2023-03-31'
```
4. Create a collection in the project and apply the webhook enrichment to the collection.
Expand Down

0 comments on commit da8f42f

Please sign in to comment.