Project / Webhook Configuration
sfp server API reference for Project / Webhook Configuration: 5 endpoints.
/sfp/api/project/configuration/webhookAutomatically registers all required webhooks for a repository. Supports both GitHub and Azure DevOps.
GitHub (platform: 'github'):
- Repository identifier format: owner/repo (e.g., 'octocat/hello-world')
- Creates a single webhook with events: pull_request, pull_request_review, pull_request_review_comment, issue_comment, issues, push
- Uses GitHub App authentication (configured via integrations)
Azure DevOps (platform: 'azure-devops'):
- Repository identifier format: org/project/repo (e.g., 'myorg/myproject/myrepo')
- Creates Service Hook subscriptions for: git.pullrequest.created, git.pullrequest.updated, git.pullrequest.merged, ms.vss-code.git-pullrequest-comment-event, workitem.commented, git.push
- Adds build.complete (resource version 2.0) when the saved validation trigger mode is checks
- Requires repository and Service Hooks access through a PAT or stored ADO identity; required checks also need build-read access
Push Events & Build-on-Merge: Push events trigger the build-on-merge workflow when:
- Push is to a configured default branch (set in project configuration)
- Push is to a release branch matching 'release-' or 'release/' patterns
Idempotency: This endpoint is idempotent - calling it multiple times with the same URL will not create duplicate webhooks.
Secret: A webhook secret is automatically generated if one doesn't exist. The secret is only returned in the response if it was newly generated.
Authorization
access-token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/sfp/api/project/configuration/webhook" \ -H "Content-Type: application/json" \ -d '{ "repositoryIdentifier": "octocat/hello-world" }'[ { "id": "string", "url": "string", "events": [ "string" ], "active": true, "provider": "github", "secret": "string" }]/sfp/api/project/configuration/webhook/filters/{repositoryIdentifier}Returns the webhook filter exclusion rules configured for a project. When a webhook matches a filter rule (eventType + branchPattern), the matching flows are NOT triggered.
Authorization
access-token In: header
Path Parameters
Repository identifier (e.g., flxbl-io/sf-core)
Response Body
curl -X GET "https://example.com/sfp/api/project/configuration/webhook/filters/string"/sfp/api/project/configuration/webhook/filtersReplaces all webhook filter exclusion rules for a project. When a webhook matches a filter rule (eventType + branchPattern), the matching flows are NOT triggered.
Branch patterns support wildcards: release/*, release-*, main, *
- For
pushevents: matches the pushed branch - For
pull_requestevents: matches the target (base) branch
Flow filtering: If flowIds is specified, only those flows are excluded. If omitted, ALL flows for that event+branch are excluded.
Authorization
access-token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X PUT "https://example.com/sfp/api/project/configuration/webhook/filters" \ -H "Content-Type: application/json" \ -d '{ "repositoryIdentifier": "flxbl-io/sf-core", "webhookFilters": [ { "eventType": "push", "branchPattern": "release/*" } ] }'/sfp/api/project/configuration/webhook/{platform}/{repositoryIdentifier}Retrieves all webhooks configured for the specified repository from the platform (GitHub or Azure DevOps).
GitHub: Returns webhooks from GitHub API Azure DevOps: Returns Service Hook subscriptions from Azure DevOps API
Authorization
access-token In: header
Path Parameters
Platform type
Value in
- "github"
- "azure-devops"
Repository identifier
Query Parameters
PAT for Azure DevOps (if no stored integration)
Response Body
curl -X GET "https://example.com/sfp/api/project/configuration/webhook/github/string"/sfp/api/project/configuration/webhook/{platform}/{repositoryIdentifier}/{webhookId}Deletes a specific webhook from the platform (GitHub or Azure DevOps).
GitHub: Deletes the webhook by ID Azure DevOps: Deletes the Service Hook subscription by ID
Authorization
access-token In: header
Path Parameters
Platform type
Value in
- "github"
- "azure-devops"
Repository identifier
Webhook/subscription ID to delete
Query Parameters
PAT for Azure DevOps (if no stored integration)
Response Body
curl -X DELETE "https://example.com/sfp/api/project/configuration/webhook/github/string/string"