Repository
sfp server API reference for Repository: 39 endpoints.
/sfp/api/repository/checksCreates 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 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"}/sfp/api/repository/pull-requests/between-commitsReturns full PR metadata (title, author, comments, files, reviewers, labels) for all PRs merged between two commits. Supports GitHub and Azure DevOps.
Authorization
access-token In: header
Query Parameters
Response Body
curl -X GET "https://example.com/sfp/api/repository/pull-requests/between-commits?repositoryIdentifier=string&fromCommit=string&toCommit=string"/sfp/api/repository/checks/updateUpdates 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 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" }'/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 In: header
Path Parameters
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"}/sfp/api/repository/pull-requestsCreates 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 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}/sfp/api/repository/pull-requestsLists 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 In: header
Query Parameters
Repository identifier in format owner/repo (GitHub) or org/project/repo (Azure DevOps)
Filter pull requests by username
State of pull requests to return (default: open)
Value in
- "open"
- "closed"
- "all"
Page number (1-based, default: 1)
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" }]/sfp/api/repository/pull-requests/{pull_number}/descriptionReplaces only the pull request description. Draft state, title, branches, and commits are unchanged.
Authorization
access-token In: header
Path Parameters
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" }'/sfp/api/repository/pull-requests/{pull_number}Authorization
access-token In: header
Path Parameters
Query Parameters
Response Body
curl -X GET "https://example.com/sfp/api/repository/pull-requests/0?repositoryIdentifier=string"/sfp/api/repository/pull-requests/{pull_number}/contextReturns 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 In: header
Path Parameters
Query Parameters
Repository identifier in format owner/repo (GitHub) or org/project/repo (Azure DevOps)
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"}/sfp/api/repository/pull-requests/{pull_number}/closeCloses 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 In: header
Path Parameters
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"}/sfp/api/repository/pull-requests/{pull_number}/reopenReopens a previously closed pull request. The PR must not have been merged. All previous history including comments and reviews is preserved.
Authorization
access-token In: header
Path Parameters
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"}/sfp/api/repository/auth-tokenGenerates 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 In: header
Query Parameters
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"}/sfp/api/repository/clone-urlReturns 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 In: header
Query Parameters
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"}/sfp/api/repository/npmrcReturns 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 In: header
Query Parameters
Repository identifier in format owner/repo
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"}/sfp/api/repository/domainsDownloads 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 In: header
Query Parameters
Repository identifier in format owner/repo (GitHub) or org/project/repo (Azure DevOps)
Git branch name (defaults to "main")
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" ] } } ]}/sfp/api/repository/packagesDownloads 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 In: header
Query Parameters
Repository identifier in format owner/repo (GitHub) or org/project/repo (Azure DevOps)
Git branch name (defaults to "main")
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" ] } ]}/sfp/api/repository/metadata/namesAuthorization
access-token In: header
Query Parameters
Response Body
curl -X GET "https://example.com/sfp/api/repository/metadata/names?repositoryIdentifier=string&types=permissionsets%2Cprofiles%2Cpermissionsetgroups"/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 In: header
Path Parameters
Query Parameters
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" ]}/sfp/api/repository/issues/{issueNumber}/commentsPosts a new comment to an issue or pull request. Supports GitHub and Azure DevOps repositories.
Authorization
access-token In: header
Path Parameters
Response Body
curl -X POST "https://example.com/sfp/api/repository/issues/string/comments"/sfp/api/repository/issues/{issueNumber}/commentsRetrieves all comments on an issue or pull request.
Authorization
access-token In: header
Path Parameters
Query Parameters
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" }]/sfp/api/repository/issues/{issueNumber}/comments/{commentId}/reactionsCreates a reaction on a specific comment. Supports standard reactions like +1, -1, laugh, confused, heart, hooray, rocket, eyes.
Authorization
access-token In: header
Path Parameters
Response Body
curl -X POST "https://example.com/sfp/api/repository/issues/string/comments/string/reactions"/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 In: header
Path Parameters
Response Body
curl -X PATCH "https://example.com/sfp/api/repository/issues/comments/string"/sfp/api/repository/issues/{issueNumber}/labelsAdds one or more labels to an issue or pull request.
Authorization
access-token In: header
Path Parameters
Response Body
curl -X POST "https://example.com/sfp/api/repository/issues/string/labels"/sfp/api/repository/branches/{branchName}Deletes the specified branch from the remote repository. Protected branches cannot be deleted.
Authorization
access-token In: header
Path Parameters
Query Parameters
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"/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 In: header
Path Parameters
Query Parameters
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"/sfp/api/repository/workspace-treeAuthorization
access-token In: header
Query Parameters
Repository identifier in format owner/repo
Branch name
"main"Response Body
curl -X GET "https://example.com/sfp/api/repository/workspace-tree?repositoryIdentifier=flxbl-io%2Fsf-core"/sfp/api/repository/workspace-treeAuthorization
access-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": [] }'/sfp/api/repository/workspace-tree/payloadAuthorization
access-token In: header
Query Parameters
Repository identifier in format owner/repo
Branch name
"main"Response Body
curl -X GET "https://example.com/sfp/api/repository/workspace-tree/payload?repositoryIdentifier=flxbl-io%2Fsf-core"/sfp/api/repository/workspace-tree/refreshAuthorization
access-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" }'/sfp/api/repository/workspace-tree/overlays/code-analysisAuthorization
access-token In: header
Query Parameters
Repository identifier in format owner/repo
Branch name
"main"Node ID to scope the overlay to
Package name to scope the overlay to
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"/sfp/api/repository/workspace-tree/file-contentAuthorization
access-token In: header
Query Parameters
Repository identifier in format owner/repo
Branch name
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"/sfp/api/repository/package-baselinesGet baselines for a specific package, or all packages on a branch if packageName is omitted.
Authorization
access-token In: header
Query Parameters
Repository identifier
Branch name
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"/sfp/api/repository/package-baselinesSets the default baseline and optional per-environment baselines for a package on a branch.
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/repository/package-baselines" \ -H "Content-Type: application/json" \ -d '{ "repositoryIdentifier": "string", "branch": "string", "packageName": "string", "packageType": "source", "defaultBaseline": "string" }'/sfp/api/repository/package-baselines/baselineOverrides 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 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" }'/sfp/api/repository/package-baselines/environments/{environmentName}Advances the baseline for a specific environment after a successful package deployment.
Authorization
access-token In: header
Path Parameters
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" }'/sfp/api/repository/package-baselines/versionsRecords the latest published version after a successful build. Tracks version intent and source.
Authorization
access-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" }'/sfp/api/repository/package-baselines/versions/allocateReserves 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 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" } ]}/sfp/api/repository/package-baselines/changelogReturns the history of baseline changes, filterable by package, environment, branch, and date range.
Authorization
access-token In: header
Query Parameters
Repository identifier
Filter by package name
Filter by branch
Filter by environment name
ISO 8601 start date
ISO 8601 end date
Max results to return
50Number of results to skip
0Response Body
curl -X GET "https://example.com/sfp/api/repository/package-baselines/changelog?repositoryIdentifier=string"/sfp/api/repository/configsGeneric endpoint for reading typed config files from a repo. Supported types: access-config.
Authorization
access-token In: header
Query Parameters
Repository identifier in format owner/repo
Configuration type to look up
Branch name
"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": {} } ]}