Review Environments

sfp server API reference for Review Environments: 9 endpoints.

POST/sfp/api/review/environments/assign

Fetches 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
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/review/environments/assign" \  -H "Content-Type: application/json" \  -d '{    "assignmentType": "pr",    "assignmentId": "string",    "repositoryIdentifier": "string",    "metadata": {      "property1": null,      "property2": null    }  }'
Empty
GET/sfp/api/review/environments/by-instance

Returns the assignment(s) referencing the given org instance (incl. expired), for a legacy link that carries only the instance name.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

target*string

Org instance name (sandbox/scratch name)

domain?string

Optional domain scope

Response Body

curl -X GET "https://example.com/sfp/api/review/environments/by-instance?target=754944"
Empty
GET/sfp/api/review/environments/{assignmentType}/{assignmentId}

Retrieves the details of a specific review environment assignment

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

assignmentType*string

Type of assignment

Value in

  • "pr"
  • "issue"
  • "user"
  • "custom"
assignmentId*string

Assignment identifier

Query Parameters

repositoryIdentifier?string

Repository identifier (owner/repo). Optional — derived from the assignment when omitted.

domain?string

Specific domain for multi-domain assignments

Response Body

application/json

curl -X GET "https://example.com/sfp/api/review/environments/pr/string"
Empty
POST/sfp/api/review/environments/extend

Extends the expiration time of a review environment assignment. Can also be used to make an environment immortal or remove immortal status.

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/review/environments/extend" \  -H "Content-Type: application/json" \  -d '{    "assignmentType": "pr",    "assignmentId": "123",    "repositoryIdentifier": "flxbl-io/sf-core"  }'
Empty
POST/sfp/api/review/environments/unassign

Releases a review environment assignment and optionally returns it to the pool

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/review/environments/unassign" \  -H "Content-Type: application/json" \  -d '{    "assignmentType": "pr",    "assignmentId": "123",    "repositoryIdentifier": "flxbl-io/sf-core"  }'
Empty
POST/sfp/api/review/environments/transition

Moves a review environment from one assignment to another (e.g., from PR to issue)

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/review/environments/transition" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "flxbl-io/sf-core",    "fromAssignmentType": "pr",    "fromAssignmentId": "123",    "toAssignmentType": "issue",    "toAssignmentId": "456"  }'
Empty
POST/sfp/api/review/environments/acquire

Marks an assigned environment as in-use for a specified duration. Uses optimistic locking to handle concurrent requests.

Authorization

access-token
AuthorizationBearer <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": {}}
POST/sfp/api/review/environments/release

Marks an environment as idle, making it available for other processes to acquire

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/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": {}}
GET/sfp/api/review/environments/list

Retrieves a list of review environment assignments with optional filters

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier?string

Filter by repository identifier

assignmentType?string

Filter by assignment type

Value in

  • "pr"
  • "issue"
  • "user"
  • "custom"
assignmentId?string

Filter by assignment ID

poolTag?string

Filter by pool tag

instanceName?string

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).

status?string

Filter by assignment status

Value in

  • "active"
  • "expired"
  • "released"
  • "unassigned"
assignedBy?string

Filter by who assigned the environment

includeExpired?boolean

Include expired assignments in the results. By default, expired assignments are excluded unless explicitly requested

Defaultfalse

Response Body

application/json

curl -X GET "https://example.com/sfp/api/review/environments/list"
Empty