Skip to content

Function: createWebhook() ​

ts
function createWebhook(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  active?: boolean;
  configuration?: Record<string, any>;
  createdDate?: number;
  events?: string[];
  id: number;
  name: string;
  scopeType?: string;
  sslVerificationRequired?: boolean;
  statistics?: {
   [key: string]: unknown;
     counts?: {
      [key: string]: unknown;
        errors?: number;
        failures?: number;
        successes?: number;
        window?: {
         [key: string]: unknown;
           duration?: number;
           start?: number;
        };
     };
     lastError?: Record<string, any>;
  };
  updatedDate?: number;
  url: string;
}>;

Defined in: src/server/api/webhooks.ts:42

Registers a webhook. Requires administrator permission.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ configuration?: Record<string, any>; events?: string[]; excludeBody?: boolean; filters?: Record<string, any>; name: string; sslVerificationRequired?: boolean; url: string; }-
parameters.configuration?Record<string, any>-
parameters.events?string[]The events to deliver, e.g. jira:issue_created.
parameters.excludeBody?booleanDeliver the event without its body.
parameters.filters?Record<string, any>Narrows what is delivered, e.g. { "issue-related-events-section": jql }.
parameters.name?string-
parameters.sslVerificationRequired?boolean-
parameters.url?stringWhere Jira posts the event.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; active?: boolean; configuration?: Record<string, any>; createdDate?: number; events?: string[]; id: number; name: string; scopeType?: string; sslVerificationRequired?: boolean; statistics?: { [key: string]: unknown; counts?: { [key: string]: unknown; errors?: number; failures?: number; successes?: number; window?: { [key: string]: unknown; duration?: number; start?: number; }; }; lastError?: Record<string, any>; }; updatedDate?: number; url: string; }>