Commerce Layer CLI Webhooks plugin
commercelayer COMMAND
commercelayer [COMMAND] (--help | -h) for detailed information about plugin commands.
commercelayer webhooks [ID]
commercelayer webhooks:create
commercelayer webhooks:destroy ID
commercelayer webhooks:details ID
commercelayer webhooks:disable ID
commercelayer webhooks:enable ID
commercelayer webhooks:event ID
commercelayer webhooks:events ID
commercelayer webhooks:list
commercelayer webhooks:listen ID
commercelayer webhooks:payload ID
commercelayer webhooks:reset ID
commercelayer webhooks:topics
commercelayer webhooks:update ID
List all the registered webhooks or the details of a single webhook.
USAGE
$ commercelayer webhooks [ID] [-c open|closed] [-t <value>] [-H] [-e]
ARGUMENTS
ID unique id of the webhook to get a single webhook
FLAGS
-H, --hide-empty hide empty attributes
-c, --circuit=<option> show only webhooks with circuit in the declared state
<options: open|closed>
-e, --events show the last event callbacks associated to the webhook
-t, --topic=<value> the event that triggered the webhook
DESCRIPTION
list all the registered webhooks or the details of a single webhook
See code: src/commands/webhooks/index.ts
Create a new webhook.
USAGE
$ commercelayer webhooks:create -t <value> -u <value> [-i <value>...] [-n <value>]
FLAGS
-i, --include=<value>... a comma separated list of related resources to be included
-n, --name=<value> the webhook short name
-t, --topic=<value> (required) the identifier of the event that will trigger the webhook
-u, --url=<value> (required) the callback URL used to POST data
DESCRIPTION
create a new webhook
ALIASES
$ commercelayer wh:create
EXAMPLES
$ commercelayer webhooks:create -t customers.create -u https://callback.url.io
$ cl wh:create -t orders.place -u http://myurl.com
See code: src/commands/webhooks/create.ts
Destroy an existing webhook.
USAGE
$ commercelayer webhooks:destroy ID
ARGUMENTS
ID unique id of the webhook
DESCRIPTION
destroy an existing webhook
ALIASES
$ commercelayer webhooks:delete
$ commercelayer wh:delete
$ commercelayer wh:destroy
EXAMPLES
$ commercelayer webhooks:destroy <webhook-id>>
$ cl wh:destroy <webhook-id>>
See code: src/commands/webhooks/destroy.ts
Show the details of an existing webhook.
USAGE
$ commercelayer webhooks:details ID [-H] [-e]
ARGUMENTS
ID unique id of the webhook
FLAGS
-H, --hide-empty hide empty attributes
-e, --events show the last event callbacks associated to the webhook
DESCRIPTION
show the details of an existing webhook
ALIASES
$ commercelayer wh:details
EXAMPLES
$ commercelayer webhooks:details <webhook-id>
$ cl webhooks:details <webhook-id> -H
$ cl wh:details <webhook-id>
See code: src/commands/webhooks/details.ts
Disable an enabled webhook.
USAGE
$ commercelayer webhooks:disable ID
ARGUMENTS
ID unique id of the webhook
DESCRIPTION
disable an enabled webhook
ALIASES
$ commercelayer wh:disable
EXAMPLES
$ commercelayer webhooks:disable <webhook-id>
$ cl wh:disable <webhook-id>
See code: src/commands/webhooks/disable.ts
Enable a disabled webhook.
USAGE
$ commercelayer webhooks:enable ID
ARGUMENTS
ID unique id of the webhook
DESCRIPTION
enable a disabled webhook
ALIASES
$ commercelayer wh:enable
EXAMPLES
$ commercelayer webhooks:enable <webhook-id>
$ cl wh:enable <webhook-id>
See code: src/commands/webhooks/enable.ts
Show the details of a firedf webhook event.
USAGE
$ commercelayer webhooks:event ID [-f -p]
ARGUMENTS
ID unique id of the webhook
FLAGS
-f, --format format the payload output
-p, --payload show the event payload sent to the callback endpoint
DESCRIPTION
show the details of a firedf webhook event
ALIASES
$ commercelayer wh:event
EXAMPLES
$ commercelayer webhooks:event <event-id>
$ cl wh:event <event-id> -p
See code: src/commands/webhooks/event.ts
List all the events associated to the webhook.
USAGE
$ commercelayer webhooks:events ID [-A | -l <value>]
ARGUMENTS
ID unique id of the webhook
FLAGS
-A, --all show all events instead of first 25 only
-l, --limit=<value> limit number of events in output
DESCRIPTION
list all the events associated to the webhook
ALIASES
$ commercelayer wh:events
EXAMPLES
$ commercelayer webhooks:events <webhook-id>
$ cl wh:events <webhook-id>
See code: src/commands/webhooks/events.ts
List all the registered webhooks.
USAGE
$ commercelayer webhooks:list [-c open|closed] [-t <value>]
FLAGS
-c, --circuit=<option> show only webhooks with circuit in the declared state
<options: open|closed>
-t, --topic=<value> the event that triggered the webhook
DESCRIPTION
list all the registered webhooks
ALIASES
$ commercelayer wh:list
EXAMPLES
$ commercelayer webhooks
$ cl webhooks:list -c open
$ cl wh:list
See code: src/commands/webhooks/list.ts
Listen a webhook for outgoing callbacks.
USAGE
$ commercelayer webhooks:listen ID [-t <value>]
ARGUMENTS
ID unique id of the webhook
FLAGS
-t, --time=<value> [default: 120] waiting time for the first event
DESCRIPTION
listen a webhook for outgoing callbacks
ALIASES
$ commercelayer wh:listen
EXAMPLES
$ commercelayer webhooks:listen <webhook-id>
$ cl wh:listen <webhook-id>
See code: src/commands/webhooks/listen.ts
Show the payload associated to an event callback.
USAGE
$ commercelayer webhooks:payload ID [-f]
ARGUMENTS
ID unique id of the webhook
FLAGS
-f, --format format the payload output
DESCRIPTION
show the payload associated to an event callback
ALIASES
$ commercelayer wh:payload
EXAMPLES
$ commercelayer webhooks:payload <event-id>
$ cl wh:payload <event-id> -f
See code: src/commands/webhooks/payload.ts
Reset the circuit breaker associated to the webhook.
USAGE
$ commercelayer webhooks:reset ID
ARGUMENTS
ID unique id of the webhook
DESCRIPTION
reset the circuit breaker associated to the webhook
ALIASES
$ commercelayer wh:reset
EXAMPLES
$ commercelayer webhooks:reset <webhook-id>
$ cl wh:reset <webhook-id>
See code: src/commands/webhooks/reset.ts
Show online documentation for supported events.
USAGE
$ commercelayer webhooks:topics
DESCRIPTION
show online documentation for supported events
ALIASES
$ commercelayer wh:topics
EXAMPLES
$ commercelayer webhooks:topics
$ cl wh:topics
See code: src/commands/webhooks/topics.ts
Update an existing webhook.
USAGE
$ commercelayer webhooks:update ID [-t <value>] [-u <value>] [-i <value>...] [-n <value>]
ARGUMENTS
ID unique id of the webhook
FLAGS
-i, --include=<value>... a comma separated list of related resources to be included
-n, --name=<value> the webhook short name
-t, --topic=<value> the identifier of the event that will trigger the webhook
-u, --url=<value> the callback URL used to POST data
DESCRIPTION
update an existing webhook
ALIASES
$ commercelayer wh:update
EXAMPLES
$ commercelayer webhooks:update <webhook-id> -t customers.create -u https://callback.url.io
$ cl wh:update <webhook-id> -t orders.place -u http://myurl.com
See code: src/commands/webhooks/update.ts