Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:expgraphqlwebhooks

The webhooks of the GraphQL API: list them, add or change one (with a new signing secret), remove one, send a test, deliver now, read the delivery log; a dry run unless --apply.

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/commands/expgraphqlwebhooks.md

On this page

exp:expgraphqlwebhooks

The webhooks of the GraphQL API: list them, add or change one (with a new signing secret), remove one, send a test, deliver now, read the delivery log; a dry run unless --apply.

Script bin/php/expgraphqlwebhooks.php, code in kernel/private/classes/commands/expgraphqlwebhooks.php. Run it from the installation root, as the user the web server runs as:

./console exp:expgraphqlwebhooks --help
./console exp:graphql:webhooks --help
php bin/php/expgraphqlwebhooks.php --help

Help text

The webhooks of the GraphQL API
Every event of the GraphQL event journal an end point asks for (publish, update, trash, delete, move,
hide, reveal, mutation) is POSTed to it as JSON, signed with HMAC-SHA-256 (X-Exponential-Signature,
X-Exponential-Timestamp), by the cronjob part graphqlwebhooks, with retries. The end points are
settings (graphql.ini [GraphQLWebhooks] EndpointList[] and a block [GraphQLWebhook_<name>] each,
written to settings/override); the signing secret is kept in the secret store (Setup > Secrets)
and shown once, when --add makes it. Nothing is written or sent without --apply.

./console exp:graphql:webhooks                                    the list
./console exp:graphql:webhooks --add=shop --url=https://shop.example.com/hooks/exponential \
      --events=publish,update,trash --classes=article --siteaccess=eng --apply
./console exp:graphql:webhooks --add=search --url=https://search.example.com/hook --payload=query \
      --query=article_for_index --as=indexer --apply
./console exp:graphql:webhooks --test=shop --apply                 send a test event now
./console exp:graphql:webhooks --deliver --apply                   what the cronjob part does, now
./console exp:graphql:webhooks --log --limit=50
./console exp:graphql:webhooks --remove=shop --apply

Exit code: 0 done (or shown); 1 a file could not be written, a secret not stored, or the test was
not answered with 2xx; 2 wrong options (an unknown webhook, a URL or an event that is not one).

Options

OptionValueHelp
--listlist the webhooks (the default)
--addrequiredadd the webhook of this name, or change it (lower case letters, digits and _)
--removerequiredremove the webhook of this name (and its signing secret)
--testrequiredsend a test event (ping) to the webhook of this name
--deliverread the journal and send the deliveries that are due, as the cronjob part does
--logthe last lines of the delivery log
--urlrequiredthe end point (--add): http:// or https://
--eventsrequiredthe events it wants (--add), comma separated: publish, update, trash, delete, move, hide, reveal, mutation; none: every event
--siteaccessrequiredonly content of these siteaccesses (their root node and languages), comma separated
--classesrequiredonly these class identifiers, comma separated
--subtreerequiredonly content at or below these node ids, comma separated
--payloadrequiredevent (the default): the event and its ids; query: the answer of a persisted query
--queryrequiredthe name or SHA-256 of the persisted query (--payload=query)
--asrequiredthe user the persisted query runs as (a login; default: anonymous)
--secret-namerequiredthe name of the signing secret in the secret store, or env:VARIABLE (default graphql.webhook.<name>)
--limitrequiredlines of the delivery log (--log; default 20)
--formatrequiredtext (the default) or json (the list, --log)
--applywrite and send; without it nothing is changed

Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).


Generated by ./console exp:help:examples from bin/php/expgraphqlwebhooks.php, kernel/private/classes/commands/expgraphqlwebhooks.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x