Review / Assignment Rules

sfp server API reference for Review / Assignment Rules: 6 endpoints.

POST/sfp/api/review/pools/assign

Creates a new rule for automatically assigning a pool or dedicated environment to review environments based on branch and domain patterns. Set targetType to "pool" to assign from a pool, or "environment" to assign a dedicated environment.

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/pools/assign" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "flxbl-io/sf-core",    "branchPattern": "feature/*",    "priority": 10  }'
{  "id": "rpa_1234567890",  "repositoryIdentifier": "flxbl-io/sf-core",  "targetType": "pool",  "poolTag": "feature_dev",  "poolType": "SANDBOX",  "environmentName": "my-review-env",  "branchPattern": "feature/*",  "domainPattern": "sales",  "domainPatterns": [    "sales",    "service"  ],  "priority": 10,  "description": "Feature branches use the development pool",  "isActive": true,  "createdAt": "2025-01-01T12:00:00Z",  "updatedAt": "2025-01-02T12:00:00Z",  "createdBy": "admin@example.com",  "updatedBy": "admin@example.com",  "version": 1}
GET/sfp/api/review/pools/assign

Search and filter assignment rules by various criteria including target type (pool or environment)

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

repositoryIdentifier?string

Filter by repository

poolTag?string

Filter by pool tag

targetType?string

Filter by target type (pool or environment)

Value in

  • "pool"
  • "environment"
isActive?boolean

Filter by active status

branchPatternSearch?string

Search in branch patterns

domainPatternSearch?string

Search in domain patterns

Response Body

application/json

curl -X GET "https://example.com/sfp/api/review/pools/assign"
[  {    "id": "rpa_1234567890",    "repositoryIdentifier": "flxbl-io/sf-core",    "targetType": "pool",    "poolTag": "feature_dev",    "poolType": "SANDBOX",    "environmentName": "my-review-env",    "branchPattern": "feature/*",    "domainPattern": "sales",    "domainPatterns": [      "sales",      "service"    ],    "priority": 10,    "description": "Feature branches use the development pool",    "isActive": true,    "createdAt": "2025-01-01T12:00:00Z",    "updatedAt": "2025-01-02T12:00:00Z",    "createdBy": "admin@example.com",    "updatedBy": "admin@example.com",    "version": 1  }]
POST/sfp/api/review/pools/assign/test

Test which pool or environment would be assigned for a given repository, branch, and domain combination

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/pools/assign/test" \  -H "Content-Type: application/json" \  -d '{    "repositoryIdentifier": "flxbl-io/sf-core",    "branch": "feature/ABC-123"  }'
{  "matched": true,  "targetType": "pool",  "poolTag": "feature_dev",  "environmentName": "my-review-env",  "assignment": {    "id": "rpa_1234567890",    "repositoryIdentifier": "flxbl-io/sf-core",    "targetType": "pool",    "poolTag": "feature_dev",    "poolType": "SANDBOX",    "environmentName": "my-review-env",    "branchPattern": "feature/*",    "domainPattern": "sales",    "domainPatterns": [      "sales",      "service"    ],    "priority": 10,    "description": "Feature branches use the development pool",    "isActive": true,    "createdAt": "2025-01-01T12:00:00Z",    "updatedAt": "2025-01-02T12:00:00Z",    "createdBy": "admin@example.com",    "updatedBy": "admin@example.com",    "version": 1  },  "matches": [    {      "assignment": {        "id": "rpa_1234567890",        "repositoryIdentifier": "flxbl-io/sf-core",        "targetType": "pool",        "poolTag": "feature_dev",        "poolType": "SANDBOX",        "environmentName": "my-review-env",        "branchPattern": "feature/*",        "domainPattern": "sales",        "domainPatterns": [          "sales",          "service"        ],        "priority": 10,        "description": "Feature branches use the development pool",        "isActive": true,        "createdAt": "2025-01-01T12:00:00Z",        "updatedAt": "2025-01-02T12:00:00Z",        "createdBy": "admin@example.com",        "updatedBy": "admin@example.com",        "version": 1      },      "branchScore": 0,      "domainScore": 0,      "totalScore": 0    }  ],  "testParams": {}}
GET/sfp/api/review/pools/assign/{id}

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Assignment rule ID

Response Body

application/json

curl -X GET "https://example.com/sfp/api/review/pools/assign/string"
{  "id": "rpa_1234567890",  "repositoryIdentifier": "flxbl-io/sf-core",  "targetType": "pool",  "poolTag": "feature_dev",  "poolType": "SANDBOX",  "environmentName": "my-review-env",  "branchPattern": "feature/*",  "domainPattern": "sales",  "domainPatterns": [    "sales",    "service"  ],  "priority": 10,  "description": "Feature branches use the development pool",  "isActive": true,  "createdAt": "2025-01-01T12:00:00Z",  "updatedAt": "2025-01-02T12:00:00Z",  "createdBy": "admin@example.com",  "updatedBy": "admin@example.com",  "version": 1}
PUT/sfp/api/review/pools/assign/{id}

Update patterns, priority, target, or status of an existing assignment rule

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Assignment rule ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/sfp/api/review/pools/assign/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "rpa_1234567890",  "repositoryIdentifier": "flxbl-io/sf-core",  "targetType": "pool",  "poolTag": "feature_dev",  "poolType": "SANDBOX",  "environmentName": "my-review-env",  "branchPattern": "feature/*",  "domainPattern": "sales",  "domainPatterns": [    "sales",    "service"  ],  "priority": 10,  "description": "Feature branches use the development pool",  "isActive": true,  "createdAt": "2025-01-01T12:00:00Z",  "updatedAt": "2025-01-02T12:00:00Z",  "createdBy": "admin@example.com",  "updatedBy": "admin@example.com",  "version": 1}
DELETE/sfp/api/review/pools/assign/{id}

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Assignment rule ID

Response Body

curl -X DELETE "https://example.com/sfp/api/review/pools/assign/string"
Empty