CreateWebhook
Creates a new webhook for receiving SCM events.
Use this method to:
- Set up webhooks for repository or organization events
- Configure webhook scopes and provider
Examples
-
Create repository webhook with multiple scopes:
Creates a webhook scoped to specific repositories.
name: "My Repo Webhook" type: WEBHOOK_TYPE_SCM_REPOSITORY scopes: - host: "github.com" owner: "gitpod-io" name: "gitpod" - host: "github.com" owner: "gitpod-io" name: "gitpod-next" provider: WEBHOOK_PROVIDER_GITHUB -
Create organization webhook:
Creates a webhook scoped to all repositories in an organization.
name: "Org Webhook" type: WEBHOOK_TYPE_SCM_ORGANIZATION organizationScope: host: "github.com" name: "gitpod-io" provider: WEBHOOK_PROVIDER_GITHUB
Request body
Response
Success
Changes
Changed in 5 of the 18 revisions of this API.111
- ●
added the new
WEBHOOK_PROVIDER_BITBUCKETenum value to thewebhook/spec/providerresponse property for the response status200response-property-enum-value-added
- ○
added the new
WEBHOOK_PROVIDER_BITBUCKETenum value to the request propertyproviderrequest-property-enum-value-added
This revision also has 24 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ●
- ○
removed the
PRINCIPAL_AGENT_EXECUTIONenum value from thewebhook/metadata/creator/principalresponse property for the response status200response-property-enum-value-removed
- ○
- ○
added the new optional request property
organizationScopenew-optional-request-property
- ○
added the new optional request property
scopesnew-optional-request-property
- ○
request property
scopedeprecatedrequest-property-deprecated
- ○
added the optional property
webhook/spec/organizationScopeto the response with the200statusresponse-optional-property-added
- ○
added the optional property
webhook/spec/scopesto the response with the200statusresponse-optional-property-added
- ○
response property
webhook/spec/scopedeprecatedresponse-property-deprecated
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
the
scoperequest property's minLength was decreased from1to0request-property-min-length-decreased
- ○
added the optional property
webhook/lastTriggeredAtto the response with the200statusresponse-optional-property-added
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
endpoint added
endpoint-added
- ○