Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

getWebhookPayload()

Package

Alias

Pkg Usage

Description

Excerpt
hiddentrue

Gets the Webhook payload from the calling client.

Gets the Webhook payload from the calling client.

Parameters

...

applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

...

Parameter name

...

Type

...

Required

...

Description

Return Type

WebhookPayload

Examples

Example 1 - Getting the Webhooks payload from the calling client

Code Block
languagejs
//getting the REST/HTTP call input parameters:
WebhookPayload httpRequestPayload = getWebhookPayload();
//getting the used HTTP method:
string httpMethod = httpRequestPayload.httpMethod;//This can be something like "GET", "POST", "PUT", etc.
//getting the http request payload (body):
string httpPayload = httpRequestPayload.payload;
//getting the http query parameters:
WebhookParam[] httpQueryParams = httpRequestPayload.queryParams;
string firstQueryParamName = httpQueryParams[0].name;
string firstQueryParamValue = httpQueryParams[0].values[0];
//sending the response back to the caller:
appendToWebhookResponse("http method:");
appendToWebhookResponse(httpMethod);
appendToWebhookResponse("payload:");
appendToWebhookResponse(httpPayload);
appendToWebhookResponse("firstQueryParamName:");
appendToWebhookResponse(firstQueryParamName);
appendToWebhookResponse("firstQueryParamValue:");
appendToWebhookResponse(firstQueryParamValue);
//returning a custom HTTP status code:
return true, 1234;

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "webhook_routine" and space = currentSpace ( )
labelsarray_routines