Skip to content

Commit

Permalink
fix org name
Browse files Browse the repository at this point in the history
  • Loading branch information
cauta committed Jun 4, 2024
1 parent 0a752ca commit 88f87ab
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
- name: Build docker image
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
docker build -t ${{ secrets.DOCKER_USERNAME }}/postmand:latest .
docker push ${{ secrets.DOCKER_USERNAME }}/postmand:latest
docker build -t crypitor/postmand:latest .
docker push crypitor/postmand:latest
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,8 @@ All environment variables is defined on file local.env.
```
docker build -f Dockerfile -t postmand .
```

## How to view API
access https://generator.swagger.io/

add URL: https://raw.githubusercontent.com/crypitor/postmand/main/docs/swagger.yaml
39 changes: 39 additions & 0 deletions api-docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Webhook Service API
## Create

curl --location --request POST 'http://localhost:8000/v1/webhooks' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Http post",
"url": "https://webhook.site/c98ef6a1-a38b-4d63-91f3-8c150a376a4e",
"content_type": "application/json",
"valid_status_codes": [
200,
201
],
"secret_token": "my-secret-token",
"active": true,
"max_delivery_attempts": 5,
"delivery_attempt_timeout": 1,
"retry_min_backoff": 10,
"retry_max_backoff": 60
}'

{"id":"dc2bacdc-f124-4932-b5db-b68f6b4721a0","name":"Http post","url":"https://play.svix.com/in/e_uFxcE36nfJ1jwdfILoy3KiMJOnc/","content_type":"application/json","valid_status_codes":[200,201],"secret_token":"my-secret-token","active":true,"max_delivery_attempts":5,"delivery_attempt_timeout":1,"retry_min_backoff":10,"retry_max_backoff":60,"created_at":"2024-03-24T04:52:46.75612936Z","updated_at":"2024-03-24T04:52:46.75612936Z"}

curl --location --request POST 'http://localhost:8000/v1/deliveries' \
--header 'Content-Type: application/json' \
--data-raw '{
"webhook_id": "dc2bacdc-f124-4932-b5db-b68f6b4721a0",
"payload": {"success": true}
}'


{"id":"2278765c-7daa-4b84-a489-b7f242af0917","webhook_id":"dc2bacdc-f124-4932-b5db-b68f6b4721a0","payload":"{\"success1\": true}","scheduled_at":"2024-03-24T05:44:30.160385163Z","delive
ry_attempts":0,"status":"pending","created_at":"2024-03-24T05:44:30.160385163Z","updated_at":"2024-03-24T05:44:30.160385163Z"}


Get deliveries:[curl --location --request GET 'http://localhost:8000/v1/deliveries?webhook_id=2278765c-7daa-4b84-a489-b7f242af0917']

Get delivery
curl --location --request GET 'http://localhost:8000/v1/deliveries/2278765c-7daa-4b84-a489-b7f242af0917'

0 comments on commit 88f87ab

Please sign in to comment.