mirror of
https://github.com/chillout2k/gulag.git
synced 2025-12-13 16:00:18 +00:00
Bounce QuarMail is now a POST
This commit is contained in:
parent
095a611691
commit
aeb5fc932d
19
README.md
19
README.md
@ -4,7 +4,7 @@ Gulag quarantine
|
|||||||
|
|
||||||
## get all QuarMail metadata
|
## get all QuarMail metadata
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -v -s http://127.0.0.1:9090/api/v1/quarmails | jq
|
curl -v -s http://127.0.0.1:9090/api/v1/quarmails | jq
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -18,6 +18,11 @@ curl -v -s http://127.0.0.1:9090/api/v1/quarmails?rfc822_message=1 | jq
|
|||||||
curl -v -s -G --data-urlencode 'filters={"groupOp":"OR","rules":[{"field":"hdr_subject","op":"eq","data":"996 test from quar mit sync xyz"}]}' http://127.0.0.1:9090/api/v1/quarmails | jq
|
curl -v -s -G --data-urlencode 'filters={"groupOp":"OR","rules":[{"field":"hdr_subject","op":"eq","data":"996 test from quar mit sync xyz"}]}' http://127.0.0.1:9090/api/v1/quarmails | jq
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## update a QuarMail´s metadata (e.g. sandbox_results) by ID
|
||||||
|
```
|
||||||
|
curl -v -s -X PATCH -d '{"sandbox_results":"12345abc"}' http://127.0.0.1:9090/api/v1/quarmails/311|jq
|
||||||
|
```
|
||||||
|
|
||||||
## delete a QuarMail by ID
|
## delete a QuarMail by ID
|
||||||
```
|
```
|
||||||
curl -v -s -X DELETE http://127.0.0.1:9090/api/v1/quarmails/141 | jq
|
curl -v -s -X DELETE http://127.0.0.1:9090/api/v1/quarmails/141 | jq
|
||||||
@ -29,10 +34,20 @@ curl -v -s http://127.0.0.1:9090/api/v1/quarmails?rfc822_message=1 | jq
|
|||||||
```
|
```
|
||||||
|
|
||||||
## get a QuarMail´s metadata by ID + RFC822 message
|
## get a QuarMail´s metadata by ID + RFC822 message
|
||||||
```
|
```
|
||||||
curl -v -s http://127.0.0.1:9090/api/v1/quarmails/136?rfc822_message=1 | jq
|
curl -v -s http://127.0.0.1:9090/api/v1/quarmails/136?rfc822_message=1 | jq
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## get a QuarMail´s metadata by ID + RFC822 message headers
|
||||||
|
```
|
||||||
|
curl -v -s http://127.0.0.1:9090/api/v1/quarmails/136?headers=1 | jq
|
||||||
|
```
|
||||||
|
|
||||||
|
## Bounce QuarMail by ID
|
||||||
|
```
|
||||||
|
curl -v -s -X POST http://127.0.0.1:9090/api/v1/quarmails/136/bounce | jq
|
||||||
|
```
|
||||||
|
|
||||||
## get all URIs of a QuarMail
|
## get all URIs of a QuarMail
|
||||||
```
|
```
|
||||||
curl -v -s http://127.0.0.1:9090/api/v1/quarmails/136/uris | jq
|
curl -v -s http://127.0.0.1:9090/api/v1/quarmails/136/uris | jq
|
||||||
|
|||||||
@ -110,7 +110,7 @@ class ResQuarMailRelease(GulagResource):
|
|||||||
abort(500, message=whoami(self)+e.message)
|
abort(500, message=whoami(self)+e.message)
|
||||||
|
|
||||||
class ResQuarMailBounce(GulagResource):
|
class ResQuarMailBounce(GulagResource):
|
||||||
def get(self,quarmail_id):
|
def post(self,quarmail_id):
|
||||||
args = {"quarmail_id": quarmail_id}
|
args = {"quarmail_id": quarmail_id}
|
||||||
if(request.args.get('purge')):
|
if(request.args.get('purge')):
|
||||||
args['purge'] = True
|
args['purge'] = True
|
||||||
|
|||||||
@ -260,7 +260,7 @@ paths:
|
|||||||
500:
|
500:
|
||||||
description: server error
|
description: server error
|
||||||
/quarmails/{quarmail_id}/bounce:
|
/quarmails/{quarmail_id}/bounce:
|
||||||
get:
|
post:
|
||||||
summary: bounces a quarantined email by quarmail_id
|
summary: bounces a quarantined email by quarmail_id
|
||||||
operationId: bounce_quarmail
|
operationId: bounce_quarmail
|
||||||
produces:
|
produces:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user