Update Milestone (Resource / Job Specific): /workflow/component/{component_uuid}/{component_record_id}/milestone
PATCH
https://dev-api.exsited.com/api/v3/workflow/component/{component_uuid}/{component_record_id}/milestone
Try It Out
Purpose
This API is used to update an existing milestone associated with a specific workflow state for a resource or job record. It allows modification of milestone metadata such as display name and description, reassignment of assignees, and updates to milestone alerts including alert timing, notification content, and recipients.
Use Case
- Modify milestone details after initial creation.
- Add or remove assignees (labours, employees, operators, or account contacts).
- Update alert configurations such as trigger timing and notification content.
- Maintain milestone accuracy when workflow responsibilities or schedules change.
Path Parameters
| Attribute | Type | Description |
|---|---|---|
| component_uuid | UUID | Unique identifier of the custom component associated with the workflow |
| component_record_id | String | Record ID of the resource or job within the component |
Query Parameters
This endpoint does not support query parameters
Request Body
JSON
{
"workflow_data": [
{
"data": [
{
"state_name": "WORKFLOW_STATE_NAME",
"milestones": [
{
"uuid": "MILESTONE_UUID",
"display_name": "MILESTONE_DISPLAY_NAME",
"description": "MILESTONE_DESCRIPTION",
"assignees": [
{
"type": "ASSIGNEE_TYPE",
"employee_code": "EMPLOYEE_CODE"
},
{
"uuid": "EXISTING_ASSIGNEE_UUID"
}
],
"alerts": [
{
"uuid": "ALERT_UUID",
"name": "ALERT_NAME",
"description": "ALERT_DESCRIPTION",
"time_interval": {
"trigger": "TRIGGER_TYPE",
"trigger_value": "TRIGGER_VALUE",
"trigger_unit": "TRIGGER_UNIT"
},
"notification_option": "NOTIFICATION_OPTION",
"email_html": "EMAIL_HTML_CONTENT",
"selected_labours": [
{
"uuid": "EXISTING_LABOUR_RECIPIENT_UUID"
}
],
"selected_employees": [
{
"uuid": "EXISTING_EMPLOYEE_RECIPIENT_UUID"
}
]
}
]
}
]
}
]
}
]
}
| Attribute | Type | Description |
|---|---|---|
| workflow_data | Array | Container for workflow state and milestone update information |
| workflow_data.data | Array | List of workflow states being updated |
| state_name | String | Name of the workflow state containing the milestone |
| milestones | Array | List of milestones to update within the workflow state |
| milestones.uuid | UUID | Unique identifier of the milestone being updated |
| milestones.display_name | String | Updated display name of the milestone |
| milestones.description | String | Updated description of the milestone |
| milestones.assignees | Array | List of assignees to retain or add for the milestone |
| assignees.type | String | Type of assignee (LABOUR, EMPLOYEE, OPERATOR, ACCOUNT) |
| assignees.employee_code | String | Employee code used when adding a new employee assignee |
| assignees.labour_code | String | Labour code used when adding a new labour assignee |
| assignees.uuid | UUID | UUID of an existing assignee to retain |
| milestones.alerts | Array | List of alerts associated with the milestone |
| alerts.uuid | UUID | UUID of an existing alert to update |
| alerts.name | String | Name of the alert |
| alerts.description | String | Description of the alert |
| alerts.time_interval | Object | Configuration defining when the alert is triggered |
| time_interval.trigger | String | Trigger timing relative to the milestone (before or after) |
| time_interval.trigger_value | Integer | Numeric value for alert timing |
| time_interval.trigger_unit | String | Unit of time for the trigger (minute, hour, day) |
| alerts.notification_option | String | Notification delivery method |
| alerts.email_html | String | HTML content for email notifications |
| alerts.selected_labours | Array | Labour recipients for the alert |
| alerts.selected_employees | Array | Employee recipients for the alert |
Response
Upon successful execution, the API returns the updated milestone details grouped by workflow, including updated milestone metadata, assignee mappings, and alert configurations. The response reflects the final persisted state after applying additions, removals, and updates to assignees and alert recipients.
Response Body
JSON
{
"all_milestones": [
{
"workflow_uuid": "WORKFLOW_UUID",
"milestones": [
{
"uuid": "MILESTONE_UUID",
"name": "MILESTONE_NAME",
"display_name": "MILESTONE_DISPLAY_NAME",
"description": "MILESTONE_DESCRIPTION",
"status": "MILESTONE_STATUS",
"start_date": "START_DATE",
"end_date": "END_DATE",
"state_name": "WORKFLOW_STATE_NAME",
"assignees": {
"selected_labours": [
{
"uuid": "LABOUR_ASSIGNEE_UUID",
"labour_code": "LABOUR_CODE"
}
],
"selected_employees": [
{
"uuid": "EMPLOYEE_ASSIGNEE_UUID",
"employee_code": "EMPLOYEE_CODE"
}
]
},
"alerts": [
{
"uuid": "ALERT_UUID",
"name": "ALERT_NAME",
"trigger": "TRIGGER_TYPE",
"trigger_value": "TRIGGER_VALUE",
"trigger_unit": "TRIGGER_UNIT",
"alert_content": "EMAIL_HTML_CONTENT",
"status": "ALERT_STATUS"
}
]
}
]
}
]
}
| Attribute | Type | Description |
|---|---|---|
| all_milestones | Array | List of workflows containing updated milestones |
| workflow_uuid | UUID | Unique identifier of the workflow |
| milestones | Array | List of milestones updated under the workflow |
| milestones.uuid | UUID | Unique identifier of the milestone |
| milestones.name | String | System-generated name of the milestone |
| milestones.display_name | String | Updated display name of the milestone |
| milestones.description | String | Updated description of the milestone |
| milestones.status | String | Current status of the milestone |
| milestones.start_date | DateTime | Start date of the milestone |
| milestones.end_date | DateTime | End date of the milestone |
| milestones.state_name | String | Workflow state associated with the milestone |
| assignees | Object | Grouped assignee details for the milestone |
| alerts | Array | List of updated alerts linked to the milestone |
| alerts.uuid | UUID | Unique identifier of the alert |
| alerts.trigger | String | Trigger timing configuration |
| alerts.trigger_value | Integer | Time value for alert triggering |
| alerts.trigger_unit | String | Unit of time used for alert triggering |
| alerts.alert_content | String | Notification or email content |
| alerts.status | String | Current status of the alert |