Work Items
sfp server API reference for Work Items: 8 endpoints.
/sfp/api/work-items/requests/callbackCalled by the workflow callback flow to update the IssueOps request status. Maps callback events to request statuses:
started→in_progresscompleted→completed(orclosedif work item was closed)failed→failedrejected→completedcancelled→closed
Uses findOrCreate reconciliation — if the request was not tracked at creation time, it will be backfilled.
Authorization
access-token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "https://example.com/sfp/api/work-items/requests/callback" \ -H "Content-Type: application/json" \ -d '{ "event": "completed", "platform": "github", "workItemKey": "42", "projectIdentifier": "flxbl-io/sf-core" }'/sfp/api/work-items/requestsList and filter IssueOps requests. projectIdentifier is optional —
when omitted, the response spans every project the caller can access (tenant-wide view).
Key Use Cases
- Tenant-wide in-flight queue:
?status=open,in_progress - In-flight requests for a project:
?projectIdentifier=x&status=open,in_progress - Requests for a release candidate:
?releaseCandidate=core:RC-JAN25-01 - Failed release requests:
?taskType=execute-release&status=failed
The status parameter supports comma-separated values for filtering multiple statuses at once.
Authorization
access-token In: header
Query Parameters
Project identifier to scope results. When omitted, returns requests across every project the caller can access.
Filter by status. Comma-separated for multiple: open,in_progress
Filter by platform
Value in
- "jira"
- "github"
- "azure-devops"
Filter by task type (e.g., execute-release, request-sandbox-create)
Filter by release candidate (e.g., core:RC-JAN25-01). Returns all requests targeting this RC.
Filter by target repository identifier
Filter by actor email
Only requests created after this ISO 8601 timestamp
Maximum number of results
50Offset for pagination
0Response Body
curl -X GET "https://example.com/sfp/api/work-items/requests"/sfp/api/work-items/requests/{id}Get a single IssueOps request by its UUID.
Authorization
access-token In: header
Path Parameters
Response Body
curl -X GET "https://example.com/sfp/api/work-items/requests/string"/sfp/api/work-items/with-payloadCreates a work item (GitHub Issue or Azure DevOps Work Item) with an embedded task payload for IssueOps automation.
How It Works
- Provider Detection: The provider is determined by the project's
configuration.workItems.providersetting - Authentication: The signed-in user's provider OAuth token is used from the
authTokenfield (required) - Payload Embedding: The task payload is embedded in the work item body for later extraction by automation
Prerequisites
1. Project Configuration
The project must have workItems.provider configured:
# Set via CLIsfp server project update -r flxbl-io/sf-core \ -p configuration.workItems \ -v '{"provider": "azure-devops"}'# Or via APIPATCH /projects/flxbl-io%2Fsf-core{ "property": "configuration.workItems", "value": { "provider": "azure-devops" }}2. Authentication - Signed-In User Provider Token Required
The authToken field is mandatory. Work items are created using the signed-in user's provider OAuth token to ensure proper attribution and audit trail.
Why a user token is required:
- Work items show the actual user as the creator
- Clear audit trail of who initiated each request
- Proper attribution for compliance and tracking
Token Requirements:
- GitHub: OAuth provider token from login
- Azure DevOps: OAuth provider token from login, sent to Azure DevOps as
Authorization: Bearer <token>
Note: Server-stored credentials (GitHub App or Azure DevOps service principal) are not used for user-submitted work item creation to ensure proper user attribution.
Valid Task Types
| Task Type | Description |
|---|---|
request-elevated-privileges | Request temporary elevated access |
request-freeze-users | Freeze users in an environment |
request-unfreeze-users | Unfreeze users in an environment |
request-sandbox-create | Create a new sandbox |
request-sandbox-refresh | Refresh sandbox from source |
request-sandbox-delete | Delete a sandbox |
install-packages | Install managed/unlocked packages |
install-artifacts | Install build artifacts |
install-changeset | Install or validate a changeset artifact |
create-patch-branch | Create a patch branch |
run-apex-tests | Execute Apex tests |
Flow Triggering
When triggerFlow: true is set, the endpoint will:
- Create the work item as usual
- Trigger the associated Hatchet workflow with the payload
- Pass the created work item as the callback destination for flow notifications
- Return both work item details and flow trigger results
This enables end-to-end IssueOps automation where creating a work item immediately kicks off the associated workflow.
Payload Embedding
The payload is embedded in the work item body in a format that can be extracted by automation:
- GitHub: Embedded as HTML comment
<!-- {"id": "...", ...} --> - Azure DevOps: Embedded in collapsible section (Azure strips HTML comments)
Authorization
access-token In: header
Request Body
application/json
Work item creation parameters
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/sfp/api/work-items/with-payload" \ -H "Content-Type: application/json" \ -d '{ "projectIdentifier": "flxbl-io/sf-core", "title": "[Request] Create Developer Sandbox", "body": "Requesting a new developer sandbox for sprint work.", "payload": { "id": "request-sandbox-create", "env": "dev", "duration": "14", "sourceSandbox": "production" }, "labels": [ "sandbox", "automation" ], "authToken": "azure-devops-oauth-provider-token" }'{ "id": "12345", "key": "42", "url": "https://github.com/flxbl-io/sf-core/issues/42", "platform": "github", "createdAt": "2025-01-20T12:00:00.000Z", "flowExecution": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "taskType": "request-a-release-to-release-envs", "status": "running", "triggeredAt": "2025-01-20T12:00:01.000Z" }}/sfp/api/work-items/{platform}/{id}Update a work item on the specified platform.
Supported Platforms
| Platform | Requirements |
|---|---|
github | Requires projectIdentifier (owner/repo format) |
azure-devops | Uses configured integration credentials |
jira | Not yet implemented |
Available Updates
- title: Update the work item title
- body: Update the description/body
- state: Change the state (e.g., "open", "closed" for GitHub)
- labels: Set labels/tags
- assignees: Set assignees
Authorization
access-token In: header
Path Parameters
Platform where the work item exists
Value in
- "jira"
- "github"
- "azure-devops"
Work item ID or key
Response Body
curl -X PATCH "https://example.com/sfp/api/work-items/jira/string"/sfp/api/work-items/{platform}/{id}/closeClose a work item on the specified platform.
Supported Platforms
| Platform | Close Behavior |
|---|---|
github | Sets issue state to "closed". Optional comment. |
azure-devops | Sets state to "Closed" with optional reason. |
jira | Not yet implemented |
Options
- comment: Add a comment when closing
- reason: Close reason (Azure DevOps only: "Completed", "Resolved", "Removed", etc.)
Authorization
access-token In: header
Path Parameters
Platform where the work item exists
Value in
- "jira"
- "github"
- "azure-devops"
Work item ID or key
Response Body
curl -X POST "https://example.com/sfp/api/work-items/jira/string/close"/sfp/api/work-items/{id}Fetch a work item by its ID. The platform is automatically determined from the project's configuration.workItems.provider setting.
ID Formats by Platform
| Platform | ID Format | Example |
|---|---|---|
jira | Project key + number | DP-6, PROJ-123 |
github | Issue number | 42, 123 |
azure-devops | Work item ID | 456, 789 |
Prerequisites
The project must have workItems.provider configured:
sfp server project update -r owner/repo \ -p configuration.workItems \ -v '{"provider": "jira"}'Authorization
access-token In: header
Path Parameters
Work item ID or key
Query Parameters
Project identifier (e.g., owner/repo)
Response Body
application/json
application/json
curl -X GET "https://example.com/sfp/api/work-items/DP-6?projectIdentifier=flxbl-io%2Fsf-core"{ "id": "10042", "key": "DP-6", "title": "Implement user authentication", "description": "Add OAuth 2.0 authentication flow", "type": "story", "status": "In Progress", "priority": "High", "assignee": { "id": "user123", "name": "John Doe", "email": "john@example.com", "avatarUrl": "https://example.com/avatar.png" }, "reporter": { "id": "user456", "name": "Jane Smith", "email": "jane@example.com" }, "labels": [ "backend", "security" ], "createdAt": "2025-01-10T08:00:00.000Z", "updatedAt": "2025-01-11T14:30:00.000Z", "platform": "jira", "url": "https://flxbl-demo.atlassian.net/browse/DP-6", "parent": { "id": "10040", "key": "DP-1", "title": "Authentication Epic" }, "customFields": { "projectKey": "DP", "projectName": "Demo Project", "issueTypeId": "10001", "statusId": "3" }}/sfp/api/work-itemsList work items with optional filters. The platform is automatically determined from the project's configuration.workItems.provider setting.
Prerequisites
The project must have workItems.provider configured. Optionally configure boards to filter by specific boards/projects:
# Configure provider and boards (Jira project keys)sfp server project update -r owner/repo \ -p configuration.workItems \ -v '{"provider": "jira", "boards": ["DP", "PROJ"]}'# Configure provider and boards (Azure DevOps area paths)sfp server project update -r owner/repo \ -p configuration.workItems \ -v '{"provider": "azure-devops", "boards": ["MyProject\\Team1"]}'Filter Examples
# List work items (uses boards from project config)GET /work-items?projectIdentifier=owner/repo# Filter by statusGET /work-items?projectIdentifier=owner/repo&status=In Progress# Filter by assigneeGET /work-items?projectIdentifier=owner/repo&assignee=john.doe# Filter by type with limitGET /work-items?projectIdentifier=owner/repo&type=bug&maxResults=10Authorization
access-token In: header
Query Parameters
Project identifier (e.g., owner/repo)
Filter by work item status (e.g., "To Do", "In Progress", "Done")
Filter by assignee username or email
Filter by work item type (e.g., "bug", "story", "task", "epic")
Maximum number of results to return (1-100, default: 50)
Response Body
application/json
curl -X GET "https://example.com/sfp/api/work-items?projectIdentifier=flxbl-io%2Fsf-core"[ { "id": "10042", "key": "DP-6", "title": "Implement user authentication", "type": "story", "status": "In Progress", "priority": "High", "platform": "jira", "url": "https://example.atlassian.net/browse/DP-6" }, { "id": "10043", "key": "DP-7", "title": "Add password reset functionality", "type": "story", "status": "To Do", "priority": "Medium", "platform": "jira", "url": "https://example.atlassian.net/browse/DP-7" }]