Review
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.
Type of assignment for the review environment
prPossible values: Unique identifier for the assignment based on type (e.g., "123" for PR number, "456" for issue)
123Pattern: ^[a-zA-Z0-9@._-]+$Repository identifier in format owner/repo
flxbl-io/sf-coreTag of the pool to fetch the environment from. If not provided, will be resolved based on branch and domain patterns.
core_devGit branch name for automatic pool resolution
feature/ABC-123Domain names for automatic pool resolution (supports multiple domains)
["sales","service"]Specific domain for this assignment when supporting multiple environments per PR
salesNumber of hours before the environment expires. If not provided, uses pool default.
48If true, the environment will never expire
falseExample: falseAdditional metadata for the assignment
{"prTitle":"Feature: Add dark mode","labels":["enhancement","ui"],"description":"Testing environment for dark mode feature"}Force reassignment even if an environment is already assigned to this assignment
falseExample: falseReview environment successfully assigned
{"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 HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 374
{
"assignmentType": "pr",
"assignmentId": "123",
"repositoryIdentifier": "flxbl-io/sf-core",
"poolTag": "core_dev",
"branch": "feature/ABC-123",
"domains": [
"sales",
"service"
],
"domain": "sales",
"expirationHours": 48,
"isImmortal": false,
"metadata": {
"prTitle": "Feature: Add dark mode",
"labels": [
"enhancement",
"ui"
],
"description": "Testing environment for dark mode feature"
},
"override": false
}Review environment successfully assigned
{
"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
}
}Retrieves the details of a specific review environment assignment
Type of assignment
Assignment identifier
Repository identifier in format owner/repo
flxbl-io/sf-coreSpecific domain for multi-domain assignments
salesReview environment details retrieved
{"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}?repositoryIdentifier=flxbl-io%2Fsf-core HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Review environment details retrieved
{
"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
}Extends the expiration time of a review environment assignment. Can also be used to make an environment immortal or remove immortal status.
Type of assignment for the review environment
prPossible values: Unique identifier for the assignment
123Repository identifier in format owner/repo
flxbl-io/sf-coreNumber of hours to extend the expiration by. If not provided, uses pool default.
24If true, makes the environment immortal (never expires). If false, removes immortal status.
falseSpecific domain to extend. If not provided, extends the default domain.
salesExpiration extended successfully
{"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 HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 142
{
"assignmentType": "pr",
"assignmentId": "123",
"repositoryIdentifier": "flxbl-io/sf-core",
"extensionHours": 24,
"isImmortal": false,
"domain": "sales"
}Expiration extended successfully
No content
Releases a review environment assignment and optionally returns it to the pool
Type of assignment for the review environment
prPossible values: Unique identifier for the assignment
123Repository identifier in format owner/repo
flxbl-io/sf-coreIf true, returns the environment to the pool as available. If false, marks it as expired.
trueExample: trueSpecific domain to unassign. If not provided, unassigns all domains.
salesEnvironment unassigned successfully
{"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 HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 123
{
"assignmentType": "pr",
"assignmentId": "123",
"repositoryIdentifier": "flxbl-io/sf-core",
"returnToPool": true,
"domain": "sales"
}Environment unassigned successfully
{
"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"
}
}Moves a review environment from one assignment to another (e.g., from PR to issue)
Repository identifier in format owner/repo
flxbl-io/sf-coreCurrent assignment type
prPossible values: Current assignment identifier
123New assignment type
issuePossible values: New assignment identifier
456Additional metadata for the new assignment
{"reason":"PR merged, moving to issue for tracking","transitionedBy":"automation"}Environment transitioned successfully
{"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 HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 238
{
"repositoryIdentifier": "flxbl-io/sf-core",
"fromAssignmentType": "pr",
"fromAssignmentId": "123",
"toAssignmentType": "issue",
"toAssignmentId": "456",
"metadata": {
"reason": "PR merged, moving to issue for tracking",
"transitionedBy": "automation"
}
}Environment transitioned successfully
{
"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
}
}Marks an assigned environment as in-use for a specified duration. Uses optimistic locking to handle concurrent requests.
Type of assignment
prPossible values: Unique identifier for the assignment
123Repository identifier in format owner/repo
flxbl-io/sf-coreDuration in minutes for which the environment is needed
30Identifier of the process or user acquiring the environment
ci-pipeline-123 or [email protected]Specific domain to acquire (for multi-domain assignments)
salesEnvironment successfully acquired
Review environment assignment not found
Environment is currently in use or was acquired by another process
POST /sfp/api/review/environments/acquire HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 164
{
"assignmentType": "pr",
"assignmentId": "123",
"repositoryIdentifier": "flxbl-io/sf-core",
"duration": 30,
"usedBy": "ci-pipeline-123 or [email protected]",
"domain": "sales"
}{
"status": "environment_acquired",
"message": "Environment successfully acquired for 30 minutes",
"timestamp": "2025-11-01T21:30:09.279Z",
"assignment": null
}Marks an environment as idle, making it available for other processes to acquire
Type of assignment
prPossible values: Unique identifier for the assignment
123Repository identifier in format owner/repo
flxbl-io/sf-coreSpecific domain to release (for multi-domain assignments)
salesEnvironment successfully released
Review environment assignment not found
Environment state was modified by another process
POST /sfp/api/review/environments/release HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 103
{
"assignmentType": "pr",
"assignmentId": "123",
"repositoryIdentifier": "flxbl-io/sf-core",
"domain": "sales"
}{
"status": "environment_released",
"message": "Environment successfully released",
"timestamp": "2025-11-01T21:30:09.279Z",
"assignment": null
}Retrieves a list of review environment assignments with optional filters
Filter by repository identifier
flxbl-io/sf-coreFilter by assignment type
Filter by assignment ID
123Filter by pool tag
core_devFilter by assignment status
Include expired assignments in the results. By default, expired assignments are excluded unless explicitly requested
falseExample: falseList of review environment assignments
{"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 HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
List of review environment assignments
{
"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"
}Last updated