Release Calculator

sfp server API reference for Release Calculator: 7 endpoints.

POST/sfp/api/release-candidates/calculator/analyze

Calculate the impact of toggling work items on packages and linked releases

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/release-candidates/calculator/analyze" \  -H "Content-Type: application/json" \  -d '{    "releaseCandidateId": "string"  }'
{  "candidateId": "string",  "releaseName": "string",  "original": {    "packages": [      {        "package": "core-crm",        "path": "src/core-crm",        "versionNumber": "1.0.0.NEXT",        "type": "Unlocked",        "default": true,        "dependencies": [          {            "package": "core-framework",            "versionNumber": "1.0.0.1"          }        ],        "domains": [          "sales",          "frameworks"        ]      }    ],    "workItems": [      {        "id": "string",        "type": "jira",        "packageCount": 0,        "commitCount": 0      }    ],    "totalCommits": 0  },  "calculated": {    "packages": [      {        "package": "core-crm",        "path": "src/core-crm",        "versionNumber": "1.0.0.NEXT",        "type": "Unlocked",        "default": true,        "dependencies": [          {            "package": "core-framework",            "versionNumber": "1.0.0.1"          }        ],        "domains": [          "sales",          "frameworks"        ]      }    ],    "workItems": [      {        "id": "string",        "type": "jira",        "packageCount": 0,        "commitCount": 0      }    ],    "excludedPackages": [      {        "packageName": "string",        "version": "string",        "reason": "no-remaining-commits",        "excludedWorkItems": [          "string"        ],        "excludedCommits": 0      }    ],    "totalCommits": 0  },  "impact": {    "packagesRemoved": 0,    "workItemsRemoved": 0,    "commitsRemoved": 0,    "linkedReleasesAffected": [      {        "release": {},        "impactType": "full",        "affectedPackages": [          "string"        ],        "severity": "low",        "warning": "string"      }    ]  },  "warnings": [    {      "type": "shared-commit",      "severity": "info",      "message": "string",      "affectedPackages": [        "string"      ],      "affectedReleases": [        "string"      ],      "suggestion": "string"    }  ],  "suggestions": [    "string"  ]}
POST/sfp/api/release-candidates/calculator/optimize

Find optimal package configuration for given work items and constraints

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/release-candidates/calculator/optimize" \  -H "Content-Type: application/json" \  -d '{    "releaseCandidateId": "string",    "targetWorkItems": [      "string"    ]  }'
{  "includedPackages": [    "string"  ],  "excludedPackages": [    "string"  ],  "includedWorkItems": [    "string"  ],  "excludedWorkItems": [    "string"  ],  "totalCommits": 0,  "metrics": {    "packageCount": 0,    "workItemCount": 0,    "commitCount": 0,    "sharedCommitRatio": 0,    "exclusionSafety": 0  },  "suggestions": [    {      "type": "exclude-package",      "target": "string",      "reason": "string",      "impact": {},      "confidence": "high"    }  ]}
GET/sfp/api/release-candidates/calculator/strategies/{candidateId}

Find safe exclusion strategies for reducing release size

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

candidateId*string

Release candidate ID

Query Parameters

targetReduction?number

Target reduction percentage (0-1, default: 0.2)

Response Body

application/json

curl -X GET "https://example.com/sfp/api/release-candidates/calculator/strategies/string"
[  {    "name": "string",    "description": "string",    "excludablePackages": [      "string"    ],    "requiredExclusions": [      "string"    ],    "safetyScore": 0,    "savings": {      "packages": 0,      "commits": 0,      "percentage": 0    }  }]
GET/sfp/api/release-candidates/calculator/dependencies/{candidateId}

Get dependency graph data for visualization

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

candidateId*string

Release candidate ID

Response Body

application/json

curl -X GET "https://example.com/sfp/api/release-candidates/calculator/dependencies/string"
{  "nodes": {},  "edges": [    {      "from": "string",      "to": "string",      "type": "contains"    }  ],  "statistics": {    "totalWorkItems": 0,    "totalCommits": 0,    "totalPackages": 0,    "sharedCommitRatio": 0  }}
POST/sfp/api/release-candidates/calculator/minimal-package-set

Find the minimal set of packages needed for specific work items

Authorization

access-token
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X POST "https://example.com/sfp/api/release-candidates/calculator/minimal-package-set"
{  "packages": [    "string"  ],  "additionalWorkItems": [    "string"  ],  "rationale": {    "property1": "string",    "property2": "string"  }}
POST/sfp/api/release-candidates/calculator/batch-analyze

Analyze multiple work item combinations in a single request

Authorization

access-token
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X POST "https://example.com/sfp/api/release-candidates/calculator/batch-analyze"
[  {    "candidateId": "string",    "releaseName": "string",    "original": {      "packages": [        {          "package": "core-crm",          "path": "src/core-crm",          "versionNumber": "1.0.0.NEXT",          "type": "Unlocked",          "default": true,          "dependencies": [            {              "package": "core-framework",              "versionNumber": "1.0.0.1"            }          ],          "domains": [            "sales",            "frameworks"          ]        }      ],      "workItems": [        {          "id": "string",          "type": "jira",          "packageCount": 0,          "commitCount": 0        }      ],      "totalCommits": 0    },    "calculated": {      "packages": [        {          "package": "core-crm",          "path": "src/core-crm",          "versionNumber": "1.0.0.NEXT",          "type": "Unlocked",          "default": true,          "dependencies": [            {              "package": "core-framework",              "versionNumber": "1.0.0.1"            }          ],          "domains": [            "sales",            "frameworks"          ]        }      ],      "workItems": [        {          "id": "string",          "type": "jira",          "packageCount": 0,          "commitCount": 0        }      ],      "excludedPackages": [        {          "packageName": "string",          "version": "string",          "reason": "no-remaining-commits",          "excludedWorkItems": [            "string"          ],          "excludedCommits": 0        }      ],      "totalCommits": 0    },    "impact": {      "packagesRemoved": 0,      "workItemsRemoved": 0,      "commitsRemoved": 0,      "linkedReleasesAffected": [        {          "release": {},          "impactType": "full",          "affectedPackages": [            "string"          ],          "severity": "low",          "warning": "string"        }      ]    },    "warnings": [      {        "type": "shared-commit",        "severity": "info",        "message": "string",        "affectedPackages": [          "string"        ],        "affectedReleases": [          "string"        ],        "suggestion": "string"      }    ],    "suggestions": [      "string"    ]  }]
GET/sfp/api/release-candidates/calculator/presets

Get common preset scenarios for quick analysis

Authorization

access-token
AuthorizationBearer <token>

In: header

Response Body

curl -X GET "https://example.com/sfp/api/release-candidates/calculator/presets"
Empty