Review Environments
sfp server API reference for Review Environments: 9 endpoints.
/sfp/api/review/environments/assignFetches an available environment from the specified pool and assigns it to a PR, issue, user, or custom identifier. If an active assignment already exists, it will be reused.
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/review/environments/assign" \ -H "Content-Type: application/json" \ -d '{ "assignmentType": "pr", "assignmentId": "string", "repositoryIdentifier": "string", "metadata": { "property1": null, "property2": null } }'/sfp/api/review/environments/by-instanceReturns the assignment(s) referencing the given org instance (incl. expired), for a legacy link that carries only the instance name.
Authorization
access-token In: header
Query Parameters
Org instance name (sandbox/scratch name)
Optional domain scope
Response Body
curl -X GET "https://example.com/sfp/api/review/environments/by-instance?target=754944"/sfp/api/review/environments/{assignmentType}/{assignmentId}Retrieves the details of a specific review environment assignment
Authorization
access-token In: header
Path Parameters
Type of assignment
Value in
- "pr"
- "issue"
- "user"
- "custom"
Assignment identifier
Query Parameters
Repository identifier (owner/repo). Optional — derived from the assignment when omitted.
Specific domain for multi-domain assignments
Response Body
application/json
curl -X GET "https://example.com/sfp/api/review/environments/pr/string"/sfp/api/review/environments/extendExtends the expiration time of a review environment assignment. Can also be used to make an environment immortal or remove immortal status.
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/review/environments/extend" \ -H "Content-Type: application/json" \ -d '{ "assignmentType": "pr", "assignmentId": "123", "repositoryIdentifier": "flxbl-io/sf-core" }'/sfp/api/review/environments/unassignReleases a review environment assignment and optionally returns it to the pool
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/review/environments/unassign" \ -H "Content-Type: application/json" \ -d '{ "assignmentType": "pr", "assignmentId": "123", "repositoryIdentifier": "flxbl-io/sf-core" }'/sfp/api/review/environments/transitionMoves a review environment from one assignment to another (e.g., from PR to issue)
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/review/environments/transition" \ -H "Content-Type: application/json" \ -d '{ "repositoryIdentifier": "flxbl-io/sf-core", "fromAssignmentType": "pr", "fromAssignmentId": "123", "toAssignmentType": "issue", "toAssignmentId": "456" }'/sfp/api/review/environments/acquireMarks an assigned environment as in-use for a specified duration. Uses optimistic locking to handle concurrent requests.
Authorization
access-token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/sfp/api/review/environments/acquire" \ -H "Content-Type: application/json" \ -d '{ "assignmentType": "pr", "assignmentId": "123", "repositoryIdentifier": "flxbl-io/sf-core", "duration": 30, "usedBy": "ci-pipeline-123 or user@example.com" }'{ "status": "environment_acquired", "message": "Environment successfully acquired for 30 minutes", "timestamp": "2019-08-24T14:15:22Z", "assignment": {}}/sfp/api/review/environments/releaseMarks an environment as idle, making it available for other processes to acquire
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/review/environments/release" \ -H "Content-Type: application/json" \ -d '{ "assignmentType": "pr", "assignmentId": "string", "repositoryIdentifier": "string" }'{ "status": "environment_released", "message": "Environment successfully released", "timestamp": "2019-08-24T14:15:22Z", "assignment": {}}/sfp/api/review/environments/listRetrieves a list of review environment assignments with optional filters
Authorization
access-token In: header
Query Parameters
Filter by repository identifier
Filter by assignment type
Value in
- "pr"
- "issue"
- "user"
- "custom"
Filter by assignment ID
Filter by pool tag
Filter by the org INSTANCE NAME (sandbox/scratch name, e.g. 754944). Resolves a legacy link that carries only the org instance, across whatever assignment(s) reference it (incl. expired/recycled).
Filter by assignment status
Value in
- "active"
- "expired"
- "released"
- "unassigned"
Filter by who assigned the environment
Include expired assignments in the results. By default, expired assignments are excluded unless explicitly requested
falseResponse Body
application/json
curl -X GET "https://example.com/sfp/api/review/environments/list"