Skip to content

Commit

Permalink
chore: optimize getting started section
Browse files Browse the repository at this point in the history
  • Loading branch information
webhookx-x committed Aug 23, 2024
1 parent df82419 commit 8000941
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WebhookX is an open-source webhooks gateway for message receiving, processing, a

## Roadmap

- [x] Workspace
- [x] Workspace
- [ ] Data retention policy
- [x] OpenAPI
- [ ] Insight admin APIs
Expand Down Expand Up @@ -51,7 +51,7 @@ $ curl http://localhost:8080
##### 1. Create an endpoint

```
curl --location 'http://localhost:8080/workspaces/default/endpoints' \
curl -X POST 'http://localhost:8080/workspaces/default/endpoints' \
--header 'Content-Type: application/json' \
--data '{
"request": {
Expand All @@ -64,10 +64,22 @@ curl --location 'http://localhost:8080/workspaces/default/endpoints' \
}'
```

#### 2. Send an event to proxy
##### 2. Create a source

```
curl --location 'http://localhost:8081/' \
curl -X POST 'http://localhost:8080/workspaces/default/sources' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"path": "/",
"methods": ["POST"]
}'
```

#### 3. Send an event to proxy

```
curl -X POST 'http://localhost:8081/' \
--header 'Content-Type: application/json' \
--data '{
"event_type": "charge.succeeded",
Expand All @@ -77,10 +89,10 @@ curl --location 'http://localhost:8081/' \
}'
```

#### 3. Retrieve delivery attemp
#### 4. Retrieve delivery attemp

```
curl --location 'http://localhost:8080/workspaces/default/attempts'
curl 'http://localhost:8080/workspaces/default/attempts'
{
"total": 1,
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ services:
WEBHOOKX_PROXY_LISTEN: 0.0.0.0:8081
ports:
- "8080:8080"
- "8081:8081"
depends_on:
webhookx-database:
condition: service_healthy
Expand Down

0 comments on commit 8000941

Please sign in to comment.