Release Calculator

Analyze impact of including/excluding work items

post

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

Authorizations
Body
releaseCandidateIdstringRequired

Release candidate ID

excludedWorkItemsstring[]Optional

Work items to exclude

includedWorkItemsstring[]Optional

Work items to include

modestring · enumOptional

Calculator mode

Default: excludePossible values:
Responses
200

Analysis results

application/json
post
POST /sfp/api/release-candidates/calculator/analyze HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 104

{
  "releaseCandidateId": "text",
  "excludedWorkItems": [
    "text"
  ],
  "includedWorkItems": [
    "text"
  ],
  "mode": "exclude"
}
{
  "candidateId": "text",
  "releaseName": "text",
  "original": {
    "packages": [
      {
        "name": "text",
        "version": "text",
        "commitCount": 1,
        "workItemCount": 1,
        "hasSharedCommits": true
      }
    ],
    "workItems": [
      {
        "id": "text",
        "type": "jira",
        "packageCount": 1,
        "commitCount": 1
      }
    ],
    "totalCommits": 1
  },
  "calculated": {
    "packages": [
      {
        "name": "text",
        "version": "text",
        "commitCount": 1,
        "workItemCount": 1,
        "hasSharedCommits": true
      }
    ],
    "workItems": [
      {
        "id": "text",
        "type": "jira",
        "packageCount": 1,
        "commitCount": 1
      }
    ],
    "excludedPackages": [
      {
        "packageName": "text",
        "version": "text",
        "reason": "no-remaining-commits",
        "excludedWorkItems": [
          "text"
        ],
        "excludedCommits": 1
      }
    ],
    "totalCommits": 1
  },
  "impact": {
    "packagesRemoved": 1,
    "workItemsRemoved": 1,
    "commitsRemoved": 1,
    "linkedReleasesAffected": [
      {
        "release": {},
        "impactType": "full",
        "affectedPackages": [
          "text"
        ],
        "severity": "low",
        "warning": "text"
      }
    ]
  },
  "warnings": [
    {
      "type": "shared-commit",
      "severity": "info",
      "message": "text",
      "affectedPackages": [
        "text"
      ],
      "affectedReleases": [
        "text"
      ],
      "suggestion": "text"
    }
  ],
  "suggestions": [
    "text"
  ]
}

Optimize release for specific work items

post

Find optimal package configuration for given work items and constraints

Authorizations
Body
releaseCandidateIdstringRequired

Release candidate ID

targetWorkItemsstring[]Required

Target work items to include

constraintsall ofOptional

Optimization constraints

Responses
200

Optimization results

application/json
post
POST /sfp/api/release-candidates/calculator/optimize HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 277

{
  "releaseCandidateId": "text",
  "targetWorkItems": [
    "text"
  ],
  "constraints": {
    "mustIncludePackages": [
      "text"
    ],
    "mustExcludePackages": [
      "text"
    ],
    "mustIncludeWorkItems": [
      "text"
    ],
    "mustExcludeWorkItems": [
      "text"
    ],
    "maxPackages": 1,
    "preferExcludePackages": [
      "text"
    ],
    "optimizationGoal": "balanced"
  }
}
{
  "includedPackages": [
    "text"
  ],
  "excludedPackages": [
    "text"
  ],
  "includedWorkItems": [
    "text"
  ],
  "excludedWorkItems": [
    "text"
  ],
  "totalCommits": 1,
  "metrics": {
    "packageCount": 1,
    "workItemCount": 1,
    "commitCount": 1,
    "sharedCommitRatio": 1,
    "exclusionSafety": 1
  },
  "suggestions": [
    {
      "type": "exclude-package",
      "target": "text",
      "reason": "text",
      "impact": {},
      "confidence": "high"
    }
  ]
}

Get exclusion strategies

get

Find safe exclusion strategies for reducing release size

Authorizations
Path parameters
candidateIdstringRequired

Release candidate ID

Query parameters
targetReductionnumberOptional

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

Responses
200

List of exclusion strategies

application/json
get
GET /sfp/api/release-candidates/calculator/strategies/{candidateId} HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
[
  {
    "name": "text",
    "description": "text",
    "excludablePackages": [
      "text"
    ],
    "requiredExclusions": [
      "text"
    ],
    "safetyScore": 1,
    "savings": {
      "packages": 1,
      "commits": 1,
      "percentage": 1
    }
  }
]

Get dependency visualization data

get

Get dependency graph data for visualization

Authorizations
Path parameters
candidateIdstringRequired

Release candidate ID

Responses
200

Dependency visualization data

application/json
get
GET /sfp/api/release-candidates/calculator/dependencies/{candidateId} HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
{
  "nodes": {},
  "edges": [
    {
      "from": "text",
      "to": "text",
      "type": "contains"
    }
  ],
  "statistics": {
    "totalWorkItems": 1,
    "totalCommits": 1,
    "totalPackages": 1,
    "sharedCommitRatio": 1
  }
}

Calculate minimal package set

post

Find the minimal set of packages needed for specific work items

Authorizations
Responses
200

Minimal package set

application/json
post
POST /sfp/api/release-candidates/calculator/minimal-package-set HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
{
  "packages": [
    "text"
  ],
  "additionalWorkItems": [
    "text"
  ],
  "rationale": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}

Batch analyze multiple scenarios

post

Analyze multiple work item combinations in a single request

Authorizations
Responses
200

Batch analysis results

application/json
post
POST /sfp/api/release-candidates/calculator/batch-analyze HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200

Batch analysis results

[
  {
    "candidateId": "text",
    "releaseName": "text",
    "original": {
      "packages": [
        {
          "name": "text",
          "version": "text",
          "commitCount": 1,
          "workItemCount": 1,
          "hasSharedCommits": true
        }
      ],
      "workItems": [
        {
          "id": "text",
          "type": "jira",
          "packageCount": 1,
          "commitCount": 1
        }
      ],
      "totalCommits": 1
    },
    "calculated": {
      "packages": [
        {
          "name": "text",
          "version": "text",
          "commitCount": 1,
          "workItemCount": 1,
          "hasSharedCommits": true
        }
      ],
      "workItems": [
        {
          "id": "text",
          "type": "jira",
          "packageCount": 1,
          "commitCount": 1
        }
      ],
      "excludedPackages": [
        {
          "packageName": "text",
          "version": "text",
          "reason": "no-remaining-commits",
          "excludedWorkItems": [
            "text"
          ],
          "excludedCommits": 1
        }
      ],
      "totalCommits": 1
    },
    "impact": {
      "packagesRemoved": 1,
      "workItemsRemoved": 1,
      "commitsRemoved": 1,
      "linkedReleasesAffected": [
        {
          "release": {},
          "impactType": "full",
          "affectedPackages": [
            "text"
          ],
          "severity": "low",
          "warning": "text"
        }
      ]
    },
    "warnings": [
      {
        "type": "shared-commit",
        "severity": "info",
        "message": "text",
        "affectedPackages": [
          "text"
        ],
        "affectedReleases": [
          "text"
        ],
        "suggestion": "text"
      }
    ],
    "suggestions": [
      "text"
    ]
  }
]

Get preset exclusion scenarios

get

Get common preset scenarios for quick analysis

Authorizations
Responses
200

List of preset scenarios

get
GET /sfp/api/release-candidates/calculator/presets HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200

List of preset scenarios

No content

Was this helpful?