Hey, I'm reading the webhooks docs and I'm a littl...
# ory-network
c
Hey, I'm reading the webhooks docs and I'm a little confused.
Copy code
ory patch identity-config {project-id} \
  --add "/selfservice/flows/registration/after/hooks/0=$(cat webhook-action.json)" \
  --format yaml
What does the the "0" mean here? Is that a hook id? As in if you wanted to create another hook on the same trigger you'd change it to "1" instead?
s
that is a json patch path: https://jsonpatch.com/
or more specifically json pointer
c
I see, thanks!
Does the --format mean that it'll emit yaml to the webhook endpoint?
s
format is the flag of the
ory patch
command, so it controls what you get on the terminal
c
Thanks
:>
m
IMO an easier way to configure webhooks is this:
Copy code
ory list projects
export project_id=
export project_name=
Get the current project configuration
Copy code
ory get identity-config $project_id --format json-pretty > ory-identity-config-$project_name.json
Add your webhook to the json config. Update the project again:
Copy code
ory update identity-config $project_id --file ory-identity-config-$project_name.json
c
Yeah, that looks less fiddly, thanks!