SetDefault
[POST] .../v1/workschedule/setdefault
Sets a work schedule as the default account schedule. Make one existing schedule the active account default used when no more specific user or group assignment applies. The method validates id, checks work schedule edit permission 691, clears the previous default schedule flag, activates the selected schedule as the new default and returns row_affected with changed ids. The request body is required and id must point to an existing non-deleted schedule. Missing body, invalid id, denied permission, missing schedule and storage errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | Int64 | Required | ID of the schedule that becomes the default. |
Request Example
{
"id": 14
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"row_affected": 1,
"ids": [
14
]
}
}