Review

Assign a review environment from pool

post

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.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
assignmentTypestring · enumRequired

Type of assignment for the review environment

Example: prPossible values:
assignmentIdstringRequired

Unique identifier for the assignment based on type (e.g., "123" for PR number, "456" for issue)

Example: 123Pattern: ^[a-zA-Z0-9@._-]+$
repositoryIdentifierstringRequired

Repository identifier in format owner/repo

Example: flxbl-io/sf-core
poolTagstringOptional

Tag of the pool to fetch the environment from. If not provided, will be resolved based on branch and domain patterns.

Example: core_dev
branchstringOptional

Git branch name for automatic pool resolution

Example: feature/ABC-123
domainsstring[]Optional

Domain names for automatic pool resolution (supports multiple domains)

Example: ["sales","service"]
domainstringOptional

Specific domain for this assignment when supporting multiple environments per PR

Example: sales
expirationHoursnumber · min: 1 · max: 720Optional

Number of hours before the environment expires. If not provided, uses pool default.

Example: 48
isImmortalbooleanOptional

If true, the environment will never expire

Default: falseExample: false
metadataobjectOptional

Additional metadata for the assignment

Example: {"prTitle":"Feature: Add dark mode","labels":["enhancement","ui"],"description":"Testing environment for dark mode feature"}
overridebooleanOptional

Force reassignment even if an environment is already assigned to this assignment

Default: falseExample: false
Responses
default

Review environment successfully assigned

application/json
ResponseanyExample: {"status":"environment_assigned","message":"Review environment successfully assigned from pool core_dev","timestamp":"2025-01-01T12:00:00Z","assignment":{"assignmentType":"pr","assignmentId":"123","repositoryIdentifier":"flxbl-io/sf-core","poolTag":"core_dev","sandboxName":"dev123456","poolAssignmentId":"550e8400-e29b-41d4-a716-446655440000","status":"active","assignedBy":"[email protected]","assignedAt":"2025-01-01T12:00:00Z","expiresAt":"2025-01-03T12:00:00Z","isImmortal":false,"metadata":{"prNumber":123,"prTitle":"Feature: Add dark mode","labels":["enhancement","ui"],"description":"Testing environment for dark mode feature"},"environmentDetails":{"instanceUrl":"https://test-sandbox.sandbox.my.salesforce.com","loginUrl":"https://test.salesforce.com","sfdxAuthUrl":"force://PlatformCLI::[email protected]"},"version":1}}
post
/sfp/api/review/environments/assign
default

Review environment successfully assigned

Get review environment details

get

Retrieves the details of a specific review environment assignment

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
assignmentTypestring · enumRequired

Type of assignment

Possible values:
assignmentIdstringRequired

Assignment identifier

Query parameters
repositoryIdentifierstringRequired

Repository identifier in format owner/repo

Example: flxbl-io/sf-core
domainstringOptional

Specific domain for multi-domain assignments

Example: sales
Responses
default

Review environment details retrieved

application/json
ResponseanyExample: {"assignmentType":"pr","assignmentId":"123","repositoryIdentifier":"flxbl-io/sf-core","poolTag":"core_dev","sandboxName":"dev123456","poolAssignmentId":"550e8400-e29b-41d4-a716-446655440000","status":"active","assignedBy":"[email protected]","assignedAt":"2025-01-01T12:00:00Z","expiresAt":"2025-01-03T12:00:00Z","isImmortal":false,"metadata":{"prNumber":123,"prTitle":"Feature: Add dark mode","labels":["enhancement","ui"],"description":"Testing environment for dark mode feature"},"environmentDetails":{"instanceUrl":"https://test-sandbox.sandbox.my.salesforce.com","loginUrl":"https://test.salesforce.com","sfdxAuthUrl":"force://PlatformCLI::[email protected]"},"version":1}
get
/sfp/api/review/environments/{assignmentType}/{assignmentId}
default

Review environment details retrieved

Extend review environment expiration

post

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

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
assignmentTypestring · enumRequired

Type of assignment for the review environment

Example: prPossible values:
assignmentIdstringRequired

Unique identifier for the assignment

Example: 123
repositoryIdentifierstringRequired

Repository identifier in format owner/repo

Example: flxbl-io/sf-core
extensionHoursnumber · min: 1 · max: 168Optional

Number of hours to extend the expiration by. If not provided, uses pool default.

Example: 24
isImmortalbooleanOptional

If true, makes the environment immortal (never expires). If false, removes immortal status.

Example: false
domainstringOptional

Specific domain to extend. If not provided, extends the default domain.

Example: sales
Responses
default

Expiration extended successfully

application/json
ResponseanyExample: {"value":{"status":"environment_extended","message":"Review environment expiration extended by 24 hours","timestamp":"2025-01-01T12:00:00Z","assignment":{"assignmentType":"pr","assignmentId":"123","repositoryIdentifier":"flxbl-io/sf-core","sandboxName":"dev123456","previousExpiresAt":"2025-01-03T12:00:00Z","newExpiresAt":"2025-01-04T12:00:00Z","extensionHours":24,"isImmortal":false,"version":3}}}
post
/sfp/api/review/environments/extend
default

Expiration extended successfully

No content

Unassign review environment

post

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

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
assignmentTypestring · enumRequired

Type of assignment for the review environment

Example: prPossible values:
assignmentIdstringRequired

Unique identifier for the assignment

Example: 123
repositoryIdentifierstringRequired

Repository identifier in format owner/repo

Example: flxbl-io/sf-core
returnToPoolbooleanOptional

If true, returns the environment to the pool as available. If false, marks it as expired.

Default: trueExample: true
domainstringOptional

Specific domain to unassign. If not provided, unassigns all domains.

Example: sales
Responses
default

Environment unassigned successfully

application/json
ResponseanyExample: {"status":"environment_unassigned","message":"Review environment successfully unassigned and returned to pool","timestamp":"2025-01-01T12:00:00Z","details":{"assignmentType":"pr","assignmentId":"123","repositoryIdentifier":"flxbl-io/sf-core","poolTag":"core_dev","sandboxName":"dev123456","returnedToPool":true,"finalStatus":"released"}}
post
/sfp/api/review/environments/unassign
default

Environment unassigned successfully

Transition environment between assignments

post

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

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
repositoryIdentifierstringRequired

Repository identifier in format owner/repo

Example: flxbl-io/sf-core
fromAssignmentTypestring · enumRequired

Current assignment type

Example: prPossible values:
fromAssignmentIdstringRequired

Current assignment identifier

Example: 123
toAssignmentTypestring · enumRequired

New assignment type

Example: issuePossible values:
toAssignmentIdstringRequired

New assignment identifier

Example: 456
metadataobjectOptional

Additional metadata for the new assignment

Example: {"reason":"PR merged, moving to issue for tracking","transitionedBy":"automation"}
Responses
default

Environment transitioned successfully

application/json
ResponseanyExample: {"status":"environment_transitioned","message":"Review environment successfully transitioned from pr-123 to issue-456","timestamp":"2025-01-01T12:00:00Z","assignment":{"assignmentType":"issue","assignmentId":"456","repositoryIdentifier":"flxbl-io/sf-core","poolTag":"core_dev","sandboxName":"dev123456","poolAssignmentId":"550e8400-e29b-41d4-a716-446655440000","status":"active","assignedBy":"[email protected]","assignedAt":"2025-01-01T12:00:00Z","expiresAt":"2025-01-03T12:00:00Z","isImmortal":false,"metadata":{"issueNumber":456,"previousAssignment":{"type":"pr","id":"123"},"reason":"PR merged, moving to issue for tracking","transitionedBy":"automation"},"environmentDetails":{"instanceUrl":"https://test-sandbox.sandbox.my.salesforce.com","loginUrl":"https://test.salesforce.com","sfdxAuthUrl":"force://PlatformCLI::[email protected]"},"version":2}}
post
/sfp/api/review/environments/transition
default

Environment transitioned successfully

Acquire environment for use

post

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

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
assignmentTypestring · enumRequired

Type of assignment

Example: prPossible values:
assignmentIdstringRequired

Unique identifier for the assignment

Example: 123
repositoryIdentifierstringRequired

Repository identifier in format owner/repo

Example: flxbl-io/sf-core
durationnumber · min: 1 · max: 480Required

Duration in minutes for which the environment is needed

Example: 30
usedBystringRequired

Identifier of the process or user acquiring the environment

Example: ci-pipeline-123 or [email protected]
domainstringOptional

Specific domain to acquire (for multi-domain assignments)

Example: sales
Responses
post
/sfp/api/review/environments/acquire

Release environment from use

post

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

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
assignmentTypestring · enumRequired

Type of assignment

Example: prPossible values:
assignmentIdstringRequired

Unique identifier for the assignment

Example: 123
repositoryIdentifierstringRequired

Repository identifier in format owner/repo

Example: flxbl-io/sf-core
domainstringOptional

Specific domain to release (for multi-domain assignments)

Example: sales
Responses
post
/sfp/api/review/environments/release

List review environment assignments

get

Retrieves a list of review environment assignments with optional filters

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
repositoryIdentifierstringOptional

Filter by repository identifier

Example: flxbl-io/sf-core
assignmentTypestring · enumOptional

Filter by assignment type

Possible values:
assignmentIdstringOptional

Filter by assignment ID

Example: 123
poolTagstringOptional

Filter by pool tag

Example: core_dev
statusstring · enumOptional

Filter by assignment status

Possible values:
assignedBystringOptional

Filter by who assigned the environment

Example: [email protected]
includeExpiredbooleanOptional

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

Default: falseExample: false
Responses
default

List of review environment assignments

application/json
ResponseanyExample: {"assignments":[{"assignmentType":"pr","assignmentId":"123","repositoryIdentifier":"flxbl-io/sf-core","poolTag":"core_dev","sandboxName":"dev123456","poolAssignmentId":"550e8400-e29b-41d4-a716-446655440000","status":"active","assignedBy":"[email protected]","assignedAt":"2025-01-01T12:00:00Z","expiresAt":"2025-01-03T12:00:00Z","isImmortal":false,"metadata":{"prNumber":123,"prTitle":"Feature: Add dark mode"},"environmentDetails":{"instanceUrl":"https://test-sandbox.sandbox.my.salesforce.com","loginUrl":"https://test.salesforce.com","sfdxAuthUrl":"force://PlatformCLI::..."},"version":1},{"assignmentType":"user","assignmentId":"[email protected]","repositoryIdentifier":"flxbl-io/sf-core","poolTag":"training_pool","sandboxName":"train789","poolAssignmentId":"660e8400-e29b-41d4-a716-446655440001","status":"active","assignedBy":"[email protected]","assignedAt":"2025-01-01T14:00:00Z","expiresAt":null,"isImmortal":true,"metadata":{"userEmail":"[email protected]","purpose":"Personal development environment"},"environmentDetails":{"instanceUrl":"https://train-sandbox.sandbox.my.salesforce.com","loginUrl":"https://test.salesforce.com","sfdxAuthUrl":"force://PlatformCLI::..."},"version":1}],"totalCount":2,"timestamp":"2025-01-01T15:00:00Z"}
get
/sfp/api/review/environments/list
default

List of review environment assignments

Last updated