...
By way of example, to customize the payload for a scenario_session/completed
webhook subscription, you could can supply the following a query argument when creating or updating the subscription:
Code Block | ||
---|---|---|
| ||
mutation { createWebhookSubscription( input: { webhookSubscription: { topic: { key: "scenario_session/completed" } callbackUrl: "!!!REPLACE ME WITH PRODUCTION VALUE!!!" sharedSecret: "!!!REPLACE ME WITH PRODUCTION VALUE!!!" query ($nodeId: ID!) { node(id: $nodeId) { ... on ScenarioSession {: """ query ($nodeId: ID!) { node(id: $nodeId) { ... on ScenarioSession { startedAt endedAt duration idleDuration numberOfStepsPossible numberOfStepsViewed percentOfStepsViewed state externalData scenarioRelease { author { id name } } } } startedAt endedAt } duration """ state } parts } { ) { nodeserrors { fullMessage id message path duration type } webhookSubscription }{ }id } } } |
$nodeId (of type ID
) and $nodeType (of type String
) are supplied by the server as input parameters when executing any the query that you provide.
See Sample Queries for more complicated query examples.
...