REST API
If you want to use the REST API to log work on behalf of a user, you can use the plugin REST API:
curl --location 'localhost:8080/rest/logwork-as-another-user/2.0/logwork' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic XXXXXXX' \
--data '{"user":"test","adjustEstimate":"auto", "comment": "REST API test", "issueId": "SCRUM-10", "timeSpent": "1h"}'
This API is authenticated and you should use POST as the method for the request.
The data to be sent is a JSON object with the following parameters:
| Parameter | Type | Description |
|---|---|---|
| user | String | User name for which to log work |
| timeSpent | String | Time to log |
| startDate | String | Date for the log |
| adjustEstimate | String | auto | leave | setto | reduceby |
| adjustEstimateValue | String | Value to use in conjunction with adjustEstimate |
| comment | String | Comment for the log |
| commentRoleVisibilityLevel | String | Role to view this log |
| issueId | String | ID for the issue |