Skip to content

Approval Workflows

Approval workflows require releases to be reviewed and approved before distribution. Workflows can be configured per tenant or product, require single or multiple approvers, and support expiration and auto-approval rules. All approval decisions are recorded in audit logs.

  • API credentials with workflow management permissions
  • Understanding of your organization’s release approval requirements
  • List of approvers and their roles

Approval workflows are optional and configurable. When enabled:

  • Releases require approval before being distributed to clients
  • Approvers review release metadata, artifacts, and verification status
  • Approved releases become available to clients
  • Rejected releases remain in the catalog but are not distributed
  • All approval actions are recorded in audit logs

Workflows can be configured at:

  • Global level — Applies to all releases
  • Tenant level — Applies to all releases for a tenant
  • Product level — Applies to all releases for a product
  • Channel level — Applies to releases on a specific channel

Step 1: Check Current Workflow Configuration

Section titled “Step 1: Check Current Workflow Configuration”

Query existing workflow configuration:

Terminal window
curl "${BP_BASE_URL}/v1/workflows/approval" \
-H "Authorization: Bearer $BP_API_TOKEN"

Response:

{
"workflow_id": "wf_abc123",
"scope": "tenant",
"scope_id": "tenant_abc123",
"enabled": true,
"required_approvals": 1,
"approvers": [
"admin@example.com"
],
"auto_approve_channels": ["internal"],
"approval_expiration_hours": null
}

Create a workflow for a tenant:

Terminal window
curl -X POST "${BP_BASE_URL}/v1/tenants/tenant_abc123/workflows/approval" \
-H "Authorization: Bearer $BP_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"required_approvals": 1,
"approvers": [
"admin@example.com",
"security@example.com"
],
"auto_approve_channels": ["internal"],
"approval_expiration_hours": null
}'

Response:

{
"workflow_id": "wf_abc123",
"scope": "tenant",
"scope_id": "tenant_abc123",
"enabled": true,
"required_approvals": 1,
"approvers": [
"admin@example.com",
"security@example.com"
],
"auto_approve_channels": ["internal"],
"approval_expiration_hours": null,
"created_at": "2024-01-15T10:30:00Z"
}

Require multiple approvals for critical releases:

Terminal window
curl -X PUT "${BP_BASE_URL}/v1/workflows/wf_abc123" \
-H "Authorization: Bearer $BP_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"required_approvals": 2,
"approvers": [
"admin@example.com",
"security@example.com",
"product-manager@example.com"
]
}'

When multiple approvals are required, each approver must independently approve the release. The release is distributed only after the required number of approvals is reached.

Set approvals to expire after a period:

Terminal window
curl -X PUT "${BP_BASE_URL}/v1/workflows/wf_abc123" \
-H "Authorization: Bearer $BP_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"approval_expiration_hours": 168
}'

Approvals expire after 168 hours (7 days). Expired approvals require re-approval before distribution.

Auto-approve releases on specific channels:

Terminal window
curl -X PUT "${BP_BASE_URL}/v1/workflows/wf_abc123" \
-H "Authorization: Bearer $BP_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"auto_approve_channels": ["internal", "beta"]
}'

Releases on internal or beta channels are automatically approved and distributed without manual review.

When a release requires approval, approvers review and approve:

Terminal window
curl -X POST "${BP_BASE_URL}/v1/releases/rel_abc123/approve" \
-H "Authorization: Bearer $BP_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"approved_by": "admin@example.com",
"approval_notes": "Reviewed release notes and verified artifacts. Approved for production."
}'

Response:

{
"release_id": "rel_abc123",
"status": "approved",
"approved_at": "2024-01-15T10:30:00Z",
"approved_by": "admin@example.com",
"approval_count": 1,
"required_approvals": 1
}

If a release does not meet requirements, reject it:

Terminal window
curl -X POST "${BP_BASE_URL}/v1/releases/rel_abc123/reject" \
-H "Authorization: Bearer $BP_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"rejected_by": "security@example.com",
"rejection_reason": "Security scan detected vulnerabilities. Requires remediation before approval."
}'

Response:

{
"release_id": "rel_abc123",
"status": "rejected",
"rejected_at": "2024-01-15T10:30:00Z",
"rejected_by": "security@example.com",
"rejection_reason": "Security scan detected vulnerabilities. Requires remediation before approval."
}

Rejected releases remain in the catalog but are not distributed to clients. They can be updated and resubmitted for approval.

Query a release’s approval status:

Terminal window
curl "${BP_BASE_URL}/v1/releases/rel_abc123/approval-status" \
-H "Authorization: Bearer $BP_API_TOKEN"

Response:

{
"release_id": "rel_abc123",
"status": "pending_approval",
"required_approvals": 2,
"current_approvals": 1,
"approval_history": [
{
"action": "approved",
"actor": "admin@example.com",
"timestamp": "2024-01-15T10:30:00Z",
"notes": "Reviewed release notes and verified artifacts."
}
],
"pending_approvers": [
"security@example.com"
]
}

View complete approval history for a release:

Terminal window
curl "${BP_BASE_URL}/v1/releases/rel_abc123/approval-history" \
-H "Authorization: Bearer $BP_API_TOKEN"

Response:

{
"release_id": "rel_abc123",
"history": [
{
"action": "submitted",
"actor": "release-bot",
"timestamp": "2024-01-15T09:00:00Z"
},
{
"action": "approved",
"actor": "admin@example.com",
"timestamp": "2024-01-15T10:30:00Z",
"notes": "Reviewed release notes and verified artifacts."
},
{
"action": "approved",
"actor": "security@example.com",
"timestamp": "2024-01-15T11:00:00Z",
"notes": "Security scan passed."
},
{
"action": "distributed",
"actor": "system",
"timestamp": "2024-01-15T11:00:00Z"
}
]
}

Workflows are evaluated in precedence order:

  1. Channel-level — Highest precedence
  2. Product-level — Applies to all channels for a product
  3. Tenant-level — Applies to all products for a tenant
  4. Global-level — Default for all releases

When multiple workflows apply, the highest precedence workflow is used.

Simple workflow requiring one approval:

{
"enabled": true,
"required_approvals": 1,
"approvers": ["admin@example.com"]
}

Require security team approval for production releases:

{
"enabled": true,
"required_approvals": 2,
"approvers": [
"admin@example.com",
"security@example.com"
],
"auto_approve_channels": ["internal", "beta"]
}

Approvals expire after 7 days:

{
"enabled": true,
"required_approvals": 1,
"approvers": ["admin@example.com"],
"approval_expiration_hours": 168
}

Review before approval: Always review release metadata, artifacts, and verification status before approving.

Document decisions: Include approval notes explaining why a release was approved or rejected.

Separate approvers: Use different approvers for different aspects (security, product, operations).

Monitor pending approvals: Track releases awaiting approval to avoid delays.

Audit trail: Approval history provides an audit trail for compliance and troubleshooting.