Repository

sfp server API reference for Repository: 39 endpoints.

POST/sfp/api/repository/checks

Creates a check run on a commit with optional code annotations. Supports GitHub check runs and Azure DevOps build status. Useful for reporting CI/CD results, code quality checks, or custom validations. Annotations can highlight specific lines in files with issues.

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/repository/checks" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "string",    "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",    "title": "sfp Metadata Duplicate Check",    "summary": "string"  }'
{  "id": 0,  "html_url": "string",  "conclusion": "success",  "status": "completed"}
GET/sfp/api/repository/pull-requests/between-commits

Returns full PR metadata (title, author, comments, files, reviewers, labels) for all PRs merged between two commits. Supports GitHub and Azure DevOps.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string
fromCommit*string
toCommit*string

Response Body

curl -X GET "https://example.com/sfp/api/repository/pull-requests/between-commits?repositoryIdentifier=string&fromCommit=string&toCommit=string"
Empty
PATCH/sfp/api/repository/checks/update

Updates a check run using check_id from the request body. Use this for check IDs that contain special characters (e.g., ADO genre/name format like "sfp/PR Validation").

Authorization

access-token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PATCH "https://example.com/sfp/api/repository/checks/update" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "string",    "status": "completed"  }'
Empty
PATCH/sfp/api/repository/checks/{check_id}

Updates the status, conclusion, or output of an existing check run. For check IDs with special characters (slashes, spaces), use PATCH /checks/update instead.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

check_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/sfp/api/repository/checks/string" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "string",    "status": "completed"  }'
{  "id": "string",  "status": "string",  "conclusion": "string"}
POST/sfp/api/repository/pull-requests

Creates a new pull request between two branches. Supports draft pull requests. The source branch must have commits ahead of the target branch. Useful for automated PR creation in CI/CD workflows.

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/repository/pull-requests" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "octocat/Hello-World",    "sourceBranch": "feature-branch",    "targetBranch": "main",    "title": "Add new feature"  }'
{  "id": 0,  "number": 0,  "html_url": "string",  "state": "open",  "title": "string",  "body": "string",  "draft": true}
GET/sfp/api/repository/pull-requests

Lists pull requests with optional filtering by username and state. Supports GitHub and Azure DevOps repositories. Supports pagination. Can filter PRs created by or assigned to a specific user. Returns basic PR information including title, state, and branch details.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo (GitHub) or org/project/repo (Azure DevOps)

username?string

Filter pull requests by username

state?string

State of pull requests to return (default: open)

Value in

  • "open"
  • "closed"
  • "all"
page?number

Page number (1-based, default: 1)

per_page?number

Number of results per page (default: 30, max: 100)

Response Body

application/json

curl -X GET "https://example.com/sfp/api/repository/pull-requests?repositoryIdentifier=string"
[  {    "id": 0,    "number": 0,    "html_url": "string",    "state": "open",    "title": "string",    "body": "string",    "user": {      "login": "string"    },    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  }]
PATCH/sfp/api/repository/pull-requests/{pull_number}/description

Replaces only the pull request description. Draft state, title, branches, and commits are unchanged.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

pull_number*number

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PATCH "https://example.com/sfp/api/repository/pull-requests/0/description" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "string",    "description": "string"  }'
Empty
GET/sfp/api/repository/pull-requests/{pull_number}

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

pull_number*number

Query Parameters

repositoryIdentifier*string

Response Body

curl -X GET "https://example.com/sfp/api/repository/pull-requests/0?repositoryIdentifier=string"
Empty
GET/sfp/api/repository/pull-requests/{pull_number}/context

Returns a provider-agnostic PR context with branch info, commit SHAs, changed files, reviews, and metadata. Works with GitHub, Azure DevOps, and GitLab repositories. Used by sfp analyze to get PR context without needing CI-specific environment variables.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

pull_number*number

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo (GitHub) or org/project/repo (Azure DevOps)

includeChecks?string

Include aggregated CI check status/conclusion for the head commit (extra provider calls; off by default)

Response Body

application/json

curl -X GET "https://example.com/sfp/api/repository/pull-requests/0/context?repositoryIdentifier=flxbl-io%2Fsf-core"
{  "prNumber": 0,  "repositoryIdentifier": "string",  "sourceRepositoryIdentifier": "string",  "targetRepositoryIdentifier": "string",  "sameRepository": true,  "sourceBranch": "string",  "targetBranch": "string",  "sourceSha": "string",  "targetSha": "string",  "title": "string",  "body": "string",  "changedFiles": [    "string"  ],  "reviews": [    {      "id": 0,      "user": "string",      "state": "string",      "body": "string",      "submittedAt": "string"    }  ],  "author": "string",  "state": "string",  "merged": true,  "draft": true,  "htmlUrl": "string",  "checkStatus": "string",  "checkConclusion": "string"}
PATCH/sfp/api/repository/pull-requests/{pull_number}/close

Closes an open pull request without merging. The PR can be reopened later if needed. This action preserves all PR history including comments and reviews.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

pull_number*number

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/sfp/api/repository/pull-requests/0/close" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "flxbl-io/sf-core"  }'
{  "id": 0,  "number": 0,  "state": "closed"}
PATCH/sfp/api/repository/pull-requests/{pull_number}/reopen

Reopens a previously closed pull request. The PR must not have been merged. All previous history including comments and reviews is preserved.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

pull_number*number

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/sfp/api/repository/pull-requests/0/reopen" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "flxbl-io/sf-core"  }'
{  "id": 0,  "number": 0,  "state": "open"}
GET/sfp/api/repository/auth-token

Generates a scoped authentication token for the specified repository. Supports GitHub (installation tokens via GitHub App or PAT) and Azure DevOps (PAT or Service Principal). The token is cached for 50 minutes to avoid unnecessary API calls. This endpoint requires an application token and the repository must be registered as a project.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo (GitHub) or org/project/repo (Azure DevOps)

Response Body

application/json

curl -X GET "https://example.com/sfp/api/repository/auth-token?repositoryIdentifier=flxbl-io%2Fsf-core"
{  "token": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "type": "installation",  "provider": "github",  "scope": "string"}
GET/sfp/api/repository/clone-url

Returns an HTTPS clone URL with embedded authentication token. Supports GitHub and Azure DevOps repositories. This URL can be used directly with git clone without additional authentication. The token is scoped to the repository and has the same expiration as the auth token (cached for 50 minutes). Useful for automated workflows, CI/CD pipelines, or services like Hatchet that need to clone repositories programmatically.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo (GitHub) or org/project/repo (Azure DevOps)

Response Body

application/json

curl -X GET "https://example.com/sfp/api/repository/clone-url?repositoryIdentifier=flxbl-io%2Fsf-core"
{  "cloneUrl": "https://x-access-token:ghs_xxxxxxxxxxxx@github.com/owner/repo.git",  "expiresAt": "2019-08-24T14:15:22Z",  "type": "installation",  "provider": "github",  "scope": "string"}
GET/sfp/api/repository/npmrc

Returns authenticated .npmrc file content for npm package registry access. Supports GitHub Packages (via integration), JFrog Artifactory, GitLab Package Registry, and custom npm registries. Content is cached for 50 minutes. Use this endpoint to generate .npmrc files for CI/CD workflows and Hatchet workflows that need to install private npm packages.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo

scope?string

NPM scope (without @ symbol). If not provided, inferred from repository owner or integration config.

Response Body

application/json

curl -X GET "https://example.com/sfp/api/repository/npmrc?repositoryIdentifier=flxbl-io%2Fsf-core"
{  "npmrcContent": "string",  "scope": "string"}
GET/sfp/api/repository/domains

Downloads a repository snapshot and extracts all domain/release configurations from the config directory. Returns both a simple array of domain names and full release config details. Results are cached for 30 minutes. The config directory location defaults to "config" but can be customized in project configuration.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo (GitHub) or org/project/repo (Azure DevOps)

branch?string

Git branch name (defaults to "main")

forceRefresh?string

Bypass cache and fetch fresh data

Response Body

application/json

curl -X GET "https://example.com/sfp/api/repository/domains?repositoryIdentifier=flxbl-io%2Fsf-core"
{  "domains": [    "sales",    "frameworks",    "integration"  ],  "releaseConfigs": [    {      "name": "sales",      "filePath": "config/sales.yml",      "packages": [        "salespkg",        "sales-unpackaged-pkg"      ],      "config": {        "releaseName": "sales",        "pool": "sales-pool",        "includeOnlyArtifacts": [          "core-crm",          "sales-cloud"        ],        "excludeArtifacts": [],        "dependencyOn": [          "frameworks"        ]      }    }  ]}
GET/sfp/api/repository/packages

Downloads a repository snapshot and extracts all package information from sfdx-project.json. Returns both a simple array of package names and detailed package metadata including paths, versions, types, and dependencies. Results are cached for 30 minutes.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo (GitHub) or org/project/repo (Azure DevOps)

branch?string

Git branch name (defaults to "main")

forceRefresh?string

Bypass cache and fetch fresh data

Response Body

application/json

curl -X GET "https://example.com/sfp/api/repository/packages?repositoryIdentifier=flxbl-io%2Fsf-core"
{  "packages": [    "core-crm",    "sales-cloud",    "service-cloud"  ],  "packageDetails": [    {      "package": "core-crm",      "path": "src/core-crm",      "versionNumber": "1.0.0.NEXT",      "type": "Unlocked",      "default": true,      "dependencies": [        {          "package": "core-framework",          "versionNumber": "1.0.0.1"        }      ],      "domains": [        "sales",        "frameworks"      ]    }  ]}
GET/sfp/api/repository/metadata/names

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string
types*unknown
branch?unknown

Response Body

curl -X GET "https://example.com/sfp/api/repository/metadata/names?repositoryIdentifier=string&types=permissionsets%2Cprofiles%2Cpermissionsetgroups"
Empty
GET/sfp/api/repository/issues/{issueNumber}

Retrieves details of an issue or pull request including title, body, author, labels, and state. Works with GitHub issues/PRs and Azure DevOps work items/PRs.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

issueNumber*string

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo (GitHub) or org/project/repo (Azure DevOps)

Response Body

application/json

curl -X GET "https://example.com/sfp/api/repository/issues/string?repositoryIdentifier=flxbl-io%2Fsf-core"
{  "number": 0,  "title": "string",  "body": "string",  "author": "string",  "state": "string",  "labels": [    "string"  ]}
POST/sfp/api/repository/issues/{issueNumber}/comments

Posts a new comment to an issue or pull request. Supports GitHub and Azure DevOps repositories.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

issueNumber*string

Response Body

curl -X POST "https://example.com/sfp/api/repository/issues/string/comments"
Empty
GET/sfp/api/repository/issues/{issueNumber}/comments

Retrieves all comments on an issue or pull request.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

issueNumber*string

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo (GitHub) or org/project/repo (Azure DevOps)

Response Body

application/json

curl -X GET "https://example.com/sfp/api/repository/issues/string/comments?repositoryIdentifier=string"
[  {    "id": "string",    "body": "string",    "author": "string",    "createdAt": "2019-08-24T14:15:22Z"  }]
POST/sfp/api/repository/issues/{issueNumber}/comments/{commentId}/reactions

Creates a reaction on a specific comment. Supports standard reactions like +1, -1, laugh, confused, heart, hooray, rocket, eyes.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

issueNumber*string
commentId*string

Response Body

curl -X POST "https://example.com/sfp/api/repository/issues/string/comments/string/reactions"
Empty
PATCH/sfp/api/repository/issues/comments/{commentId}

Updates the body of an existing comment by its provider comment id. Used for sticky comments such as the AI Version Assist directive so re-runs edit one comment instead of posting duplicates.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

commentId*string

Response Body

curl -X PATCH "https://example.com/sfp/api/repository/issues/comments/string"
Empty
POST/sfp/api/repository/issues/{issueNumber}/labels

Adds one or more labels to an issue or pull request.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

issueNumber*string

Response Body

curl -X POST "https://example.com/sfp/api/repository/issues/string/labels"
Empty
DELETE/sfp/api/repository/branches/{branchName}

Deletes the specified branch from the remote repository. Protected branches cannot be deleted.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

branchName*string

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo (GitHub) or org/project/repo (Azure DevOps)

Response Body

curl -X DELETE "https://example.com/sfp/api/repository/branches/string?repositoryIdentifier=flxbl-io%2Fsf-core"
Empty
DELETE/sfp/api/repository/issues/{issueNumber}/labels/{label}

Removes a label from an issue or pull request. Works with GitHub and Azure DevOps.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

issueNumber*string
label*string

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo (GitHub) or org/project/repo (Azure DevOps)

Response Body

curl -X DELETE "https://example.com/sfp/api/repository/issues/string/labels/string?repositoryIdentifier=flxbl-io%2Fsf-core"
Empty
GET/sfp/api/repository/workspace-tree

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo

branch?string

Branch name

Default"main"

Response Body

curl -X GET "https://example.com/sfp/api/repository/workspace-tree?repositoryIdentifier=flxbl-io%2Fsf-core"
Empty
POST/sfp/api/repository/workspace-tree

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/repository/workspace-tree" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "flxbl-io/sf-core",    "branch": "main",    "nodes": []  }'
Empty
GET/sfp/api/repository/workspace-tree/payload

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo

branch?string

Branch name

Default"main"

Response Body

curl -X GET "https://example.com/sfp/api/repository/workspace-tree/payload?repositoryIdentifier=flxbl-io%2Fsf-core"
Empty
POST/sfp/api/repository/workspace-tree/refresh

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/repository/workspace-tree/refresh" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "flxbl-io/sf-core"  }'
Empty
GET/sfp/api/repository/workspace-tree/overlays/code-analysis

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo

branch?string

Branch name

Default"main"
nodeId?string

Node ID to scope the overlay to

packageName?string

Package name to scope the overlay to

domain?string

Domain to scope the overlay to

Response Body

curl -X GET "https://example.com/sfp/api/repository/workspace-tree/overlays/code-analysis?repositoryIdentifier=flxbl-io%2Fsf-core"
Empty
GET/sfp/api/repository/workspace-tree/file-content

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo

branch*string

Branch name

filePath*string

File path relative to repository root

Response Body

curl -X GET "https://example.com/sfp/api/repository/workspace-tree/file-content?repositoryIdentifier=flxbl-io%2Fsf-core&branch=main&filePath=src%2Fmain%2Fdefault%2Fclasses%2FMyClass.cls"
Empty
GET/sfp/api/repository/package-baselines

Get baselines for a specific package, or all packages on a branch if packageName is omitted.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier

branch*string

Branch name

packageName?string

Package name (omit to get all packages for the branch)

Response Body

curl -X GET "https://example.com/sfp/api/repository/package-baselines?repositoryIdentifier=string&branch=string"
Empty
PUT/sfp/api/repository/package-baselines

Sets the default baseline and optional per-environment baselines for a package on a branch.

Authorization

access-token
AuthorizationBearer <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/repository/package-baselines" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "string",    "branch": "string",    "packageName": "string",    "packageType": "source",    "defaultBaseline": "string"  }'
Empty
PATCH/sfp/api/repository/package-baselines/baseline

Overrides the default baseline commit for a diff package on a branch, or — when environmentName is given — that environment's baseline (its recorded deploy metadata is preserved). Only diff packages can be edited — baselines for other package types are advanced by the deployment pipeline.

Authorization

access-token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PATCH "https://example.com/sfp/api/repository/package-baselines/baseline" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "string",    "branch": "string",    "packageName": "string",    "baseline": "string"  }'
Empty
PATCH/sfp/api/repository/package-baselines/environments/{environmentName}

Advances the baseline for a specific environment after a successful package deployment.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

environmentName*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PATCH "https://example.com/sfp/api/repository/package-baselines/environments/string" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "string",    "branch": "string",    "packageName": "string",    "baseline": "string"  }'
Empty
PATCH/sfp/api/repository/package-baselines/versions

Records the latest published version after a successful build. Tracks version intent and source.

Authorization

access-token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PATCH "https://example.com/sfp/api/repository/package-baselines/versions" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "string",    "branch": "string",    "packageName": "string",    "version": "string"  }'
Empty
POST/sfp/api/repository/package-baselines/versions/allocate

Reserves the next version per package from the authoritative baseline under optimistic concurrency. Allocations are idempotent per commit and expire after the reservation TTL. Packages without a baseline record are returned as skipped (client falls back to local computation).

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/repository/package-baselines/versions/allocate" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "string",    "branch": "string",    "commitId": "string",    "buildNumber": 0,    "packages": [      {        "packageName": "string",        "intent": "major"      }    ]  }'
{  "allocations": [    {      "packageName": "string",      "version": "string",      "base": "string",      "replayed": true,      "intent": "string",      "escalated": true    }  ],  "skipped": [    {      "packageName": "string",      "reason": "string"    }  ]}
GET/sfp/api/repository/package-baselines/changelog

Returns the history of baseline changes, filterable by package, environment, branch, and date range.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier

packageName?string

Filter by package name

branch?string

Filter by branch

environmentName?string

Filter by environment name

since?string

ISO 8601 start date

until?string

ISO 8601 end date

limit?number

Max results to return

Default50
offset?number

Number of results to skip

Default0

Response Body

curl -X GET "https://example.com/sfp/api/repository/package-baselines/changelog?repositoryIdentifier=string"
Empty
GET/sfp/api/repository/configs

Generic endpoint for reading typed config files from a repo. Supported types: access-config.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier*string

Repository identifier in format owner/repo

type*string

Configuration type to look up

branch?string

Branch name

Default"main"

Response Body

application/json

curl -X GET "https://example.com/sfp/api/repository/configs?repositoryIdentifier=flxbl-io%2Fsf-core&type=access-config"
{  "type": "access-config",  "branch": "string",  "entries": [    {      "path": "string",      "data": {}    }  ]}