Validation

sfp server API reference for Validation: 6 endpoints.

POST/sfp/api/validation/run

Dispatches the same pr-validate flow a webhook would, for an open (or draft) pull request the member, owner or authorized application requests. Head/base SHAs and branches are resolved server-side from the provider. When reviewEnvironmentOverride is supplied it selects the target directly (a pool or a dedicated environment); the project rules resolve the review environment only when the override is omitted.

Authorization

access-token
AuthorizationBearer <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/validation/run" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "flxbl-io/sf-core",    "pullRequestNumber": 142  }'
{  "flowRunId": "7b2f…",  "pullRequestNumber": 142,  "sourceBranch": "feat/omni-routing",  "targetBranch": "main",  "htmlUrl": "https://github.com/flxbl-io/sf-core/pull/142"}
POST/sfp/api/validation/results

Store validation results from sfp validate. Called by the CLI when --publish-results is used.

Dual write: Stores full results (with markdown and deployment/test data) in the results table and a lightweight summary in the summary table.

Duplicate handling: If results already exist for the same PR + commit + domain, they are overwritten.

Retention: Keeps last 500 results per repository.

Authorization

access-token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/sfp/api/validation/results" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "flxbl-io/sf-core",    "commitSha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",    "status": "succeeded",    "validationMode": "individual",    "deploymentResult": {      "deployed": [        {          "packageName": "string",          "packageType": "string"        }      ],      "failed": [        {          "packageName": "string"        }      ]    }  }'
Empty
GET/sfp/api/validation/results

Retrieve lightweight validation summaries for a repository. Returns only counts and status — no markdown content or raw deployment data.

Use cases:

  • Table view: list recent validations with status badges and package counts
  • Filter by base branch or PR number

Results are ordered by most recent first.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier (e.g., flxbl-io/sf-core)

pullRequestNumber?string

Filter by PR number

baseBranch?string

Filter by target/base branch

limit?number

Maximum results (default: 20, max: 100)

Response Body

curl -X GET "https://example.com/sfp/api/validation/results?repositoryIdentifier=flxbl-io%2Fsf-core"
Empty
GET/sfp/api/validation/result

Retrieve the single full validation record published for a commit, optionally scoped to one domain.

Unlike GET /validation/pr/:prNumber, this returns exactly one record instead of every run on the PR — use it to look up why a specific domain validation failed (deployment error, failed packages, rendered markdown) without pulling the PR's whole history.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier (e.g., flxbl-io/sf-core)

commitSha*string

Git commit SHA that was validated

pullRequestNumber?string

Pull request number the validation ran for

domain?string

Domain / release config name (e.g., "frameworks")

Response Body

curl -X GET "https://example.com/sfp/api/validation/result?repositoryIdentifier=string&commitSha=string"
Empty
GET/sfp/api/validation/status

Retrieve lightweight validation workflow statuses produced by server-side PR validation dispatch.

These records are stored separately from published validation results and are used by the Change Analysis page to show pending, skipped, and terminal PR validation state.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier (e.g., flxbl-io/sf-core)

pullRequestNumber?string

Filter by PR number

baseBranch?string

Filter by target/base branch

limit?number

Maximum results (default: 100, max: 100)

Response Body

curl -X GET "https://example.com/sfp/api/validation/status?repositoryIdentifier=string"
Empty
GET/sfp/api/validation/pr/{prNumber}

Retrieve all validation runs for a specific PR with full data including markdown and deployment/test details.

Use cases:

  • PR detail view: show deployment breakdown, test results, and markdown reports
  • Compare validation results between commits on the same PR

Each entry represents a separate validation run (one per commit + domain combination).

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

prNumber*string

Pull request number

Query Parameters

repositoryIdentifier*string

Repository identifier (e.g., flxbl-io/sf-core)

Response Body

curl -X GET "https://example.com/sfp/api/validation/pr/617?repositoryIdentifier=flxbl-io%2Fsf-core"
Empty