UpdateEffortRecord - Update actual work hours
Updates an existing effort record for a specified work item.
|
Applicable editions |
Central edition, Region edition |
Endpoint and authorization information
-
Obtain the endpoint: Replace the {domain} placeholder in the API request syntax.
-
Obtain the organizationId: This is required only for the Central edition. Go to the Basic Information page in the Organization Management backend to obtain the organization ID.
|
Product |
Resource |
Required permission |
|
Project Collaboration |
Actual Work Hours |
Read/Write |
Request syntax
Central edition
PUT https://{domain}/oapi/v1/projex/organizations/{organizationId}/workitems/{workitemId}/effortRecords/{id}
Region edition
PUT https://{domain}/oapi/v1/projex/workitems/{workitemId}/effortRecords/{id}
Request header
|
Parameter |
Type |
Required |
Description |
Example value |
|
x-yunxiao-token |
string |
Yes |
The personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example value |
|
organizationId |
string |
path |
|
The organization ID. |
|
|
workitemId |
string |
path |
Yes |
The unique identifier of the work item. |
|
|
id |
string |
path |
Yes |
The unique identifier of the work hour record. |
|
| - |
object |
body |
No |
||
|
actualTime |
number |
body |
Yes |
The actual work hours. |
1.5 |
|
description |
string |
body |
No |
The work description. |
Description content |
|
gmtEnd |
string |
body |
Yes |
Start and end dates for the work. |
|
|
gmtStart |
string |
body |
Yes |
The start date of the work. |
|
|
operatorId |
string |
body |
No |
The user ID of the operator. Defaults to the current operator if unspecified. |
The user ID of the operator. Defaults to the current operator if unspecified. |
|
workType |
string |
body |
No |
The work type. |
Backend development |
Request examples
Central edition
curl -X 'PUT' \
'https://{domain}/oapi/v1/projex/organizations/{organizationId}/workitems/{workitemId}/effortRecords/{id}' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"actualTime": 1.5,
"description": "Description content",
"gmtEnd": "",
"gmtStart": "",
"operatorId": "The user ID of the operator. Defaults to the current operator if unspecified.",
"workType": "Backend development"
}'
Region edition
curl -X 'PUT' \
'https://{domain}/oapi/v1/projex/workitems/{workitemId}/effortRecords/{id}' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"actualTime": 1.5,
"description": "Description content",
"gmtEnd": "",
"gmtStart": "",
"operatorId": "The user ID of the operator. Defaults to the current operator if unspecified.",
"workType": "Backend development"
}'
Response parameters
None
Error codes
For error codes, see the Error Code Center.