Estimated Reading time: 2 minutes
|
Last modified: 2021-12-31, 11:27:28 amwebhook
Usage: oredge webhook ACTION [OPTIONS]
ACTION:
create
list
modify
delete
help
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Create Webhook
Usage: oredge webhook create [payload-url] [OPTIONS]
OPTIONS:
--enabled bool true or false.
--payload-url string payload url.
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge webhook create "http://a.com/b"
ID: 2
List Webhook
Usage: oredge webhook list [OPTIONS]
OPTIONS:
--page integer page, 1(default).
--page-size integer page size, 20(default).
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge webhook list
ID PAYLOAD URL ENABLED CREATE TIME MODIFY TIME
1 http://a.com/b true 2021-05-31 06:04:33 2021-05-31 06:04:33
2 http://a.com/c true 2021-05-31 06:34:46 2021-05-31 06:34:46
Modify Webhook
Usage: oredge webhook modify [id] [OPTIONS]
OPTIONS:
--id integer id.
--enabled bool true or false.
--payload-url string payload url.
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge webhook modify 2 --enabled false
OK
Delete Webhook
Usage: oredge webhook delete [id] [OPTIONS]
OPTIONS:
--id integer id.
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge webhook delete 21
OK