Atlassian: Update worklog
Atlassian issueWorklogs.updateWorklog: arguments, response, policy and SDK examples.
← Issue worklogs operations · Get started
Operation atlassian.updateworklog
Provider route: PUT /{cloudId}/rest/api/3/issue/{issueIdOrKey}/worklog/{id}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/atlassian with npm, or alter-sdk-atlassian with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { AtlassianIntegration } from "@alter-ai/atlassian";
async function execute(input: Parameters<AtlassianIntegration["issueWorklogs"]["updateWorklog"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new AtlassianIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.issueWorklogs.updateWorklog(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_atlassian import AtlassianIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = AtlassianIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.issue_worklogs.update_worklog(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.cloudId | string | Required within parent | Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
path.issueIdOrKey | string | Required within parent | |
path.id | string | Required within parent | |
query | object | Optional | Additional keys: not allowed |
query.notifyUsers | boolean | Optional | Default: true |
query.adjustEstimate | string | Optional | Default: auto One of: new, leave, manual, auto |
query.newEstimate | string | Optional | |
query.expand | string | Optional | Default: |
query.overrideEditableFlag | boolean | Optional | Default: false |
body | Model | Required within parent | Expand Add worklog — request body — body |
Referenced models: Add worklog — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Add worklog — response body |
Referenced models: Add worklog — response body
Schemas
Section titled “Schemas”5 more schemas are linked from the tables above, on the schema pages.
Add worklog — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Details of a worklog. Additional keys: allowed |
author | JSON | Optional | |
author (anyOf 1) | Model | Alternative | Expand Add comment — response body — author account Id, account Type, active, avatar Urls, display Name, email Address, key, name, self, time Zone Details of the user who created the worklog. Read only: true |
author (anyOf 2) | null | Alternative | |
comment | JSON | Optional | |
comment (anyOf 1) | JSON | Alternative | A comment about the worklog in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/). Optional when creating or updating a worklog. |
comment (anyOf 2) | null | Alternative | |
created | JSON | Optional | |
created (anyOf 1) | JSON | Alternative | |
created (anyOf 1) (anyOf 1) | string | Alternative | The datetime on which the worklog was created. Read only: true |
created (anyOf 1) (anyOf 2) | integer | Alternative | |
created (anyOf 2) | null | Alternative | |
id | JSON | Optional | |
id (anyOf 1) | string | Alternative | The ID of the worklog record. Read only: true |
id (anyOf 2) | null | Alternative | |
issueId | JSON | Optional | |
issueId (anyOf 1) | string | Alternative | The ID of the issue this worklog is for. Read only: true |
issueId (anyOf 2) | null | Alternative | |
properties | JSON | Optional | |
properties (anyOf 1) | array | Alternative | Details of properties for the worklog. Optional when creating or updating a worklog. |
properties (anyOf 1)[] | Model | Each item | Expand Get user property — response body |
properties (anyOf 2) | null | Alternative | |
self | JSON | Optional | |
self (anyOf 1) | string | Alternative | The URL of the worklog item. Format: uri Read only: true |
self (anyOf 2) | null | Alternative | |
started | JSON | Optional | |
started (anyOf 1) | JSON | Alternative | |
started (anyOf 1) (anyOf 1) | string | Alternative | The datetime on which the worklog effort was started. Required when creating a worklog. Optional when updating a worklog. |
started (anyOf 1) (anyOf 2) | integer | Alternative | |
started (anyOf 2) | null | Alternative | |
timeSpent | JSON | Optional | |
timeSpent (anyOf 1) | string | Alternative | The time spent working on the issue as days (\#d), hours (\#h), or minutes (\#m or \#). Required when creating a worklog if `timeSpentSeconds` isn't provided. Optional when updating a worklog. Cannot be provided if `timeSpentSecond` is provided. |
timeSpent (anyOf 2) | null | Alternative | |
timeSpentSeconds | JSON | Optional | |
timeSpentSeconds (anyOf 1) | JSON | Alternative | |
timeSpentSeconds (anyOf 1) (anyOf 1) | integer | Alternative | The time in seconds spent working on the issue. Required when creating a worklog if `timeSpent` isn't provided. Optional when updating a worklog. Cannot be provided if `timeSpent` is provided. Format: int64 |
timeSpentSeconds (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
timeSpentSeconds (anyOf 2) | null | Alternative | |
updateAuthor | JSON | Optional | |
updateAuthor (anyOf 1) | Model | Alternative | Expand Add comment — response body — author account Id, account Type, active, avatar Urls, display Name, email Address, key, name, self, time Zone Details of the user who last updated the worklog. Read only: true |
updateAuthor (anyOf 2) | null | Alternative | |
updated | JSON | Optional | |
updated (anyOf 1) | JSON | Alternative | |
updated (anyOf 1) (anyOf 1) | string | Alternative | The datetime on which the worklog was last updated. Read only: true |
updated (anyOf 1) (anyOf 2) | integer | Alternative | |
updated (anyOf 2) | null | Alternative | |
visibility | JSON | Optional | |
visibility (anyOf 1) | Model | Alternative | Expand Add comment — response body — visibility The group or role to which this item is visible Details about any restrictions in the visibility of the worklog. Optional when creating or updating a worklog. |
visibility (anyOf 2) | null | Alternative |
Referenced models: Get user property — response body, Add comment — response body — author account Id, account Type, active, avatar Urls, display Name, email Address, key, name, self, time Zone, Add comment — response body — visibility The group or role to which this item is visible
Add worklog — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Details of a worklog. Additional keys: allowed |
author | Model | Optional | Expand Add comment — request body — body author Details of the user who created the worklog. Read only: true |
comment | JSON | Optional | A comment about the worklog in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/). Optional when creating or updating a worklog. |
created | string | Optional | The datetime on which the worklog was created. Format: date-time Read only: true |
id | string | Optional | The ID of the worklog record. Read only: true |
issueId | string | Optional | The ID of the issue this worklog is for. Read only: true |
properties | array | Optional | Details of properties for the worklog. Optional when creating or updating a worklog. |
properties[] | Model | Each item | Expand Edit issue — request body — body properties item |
self | string | Optional | The URL of the worklog item. Format: uri Read only: true |
started | string | Optional | The datetime on which the worklog effort was started. Required when creating a worklog. Optional when updating a worklog. Format: date-time |
timeSpent | string | Optional | The time spent working on the issue as days (\#d), hours (\#h), or minutes (\#m or \#). Required when creating a worklog if `timeSpentSeconds` isn't provided. Optional when updating a worklog. Cannot be provided if `timeSpentSecond` is provided. |
timeSpentSeconds | integer | Optional | The time in seconds spent working on the issue. Required when creating a worklog if `timeSpent` isn't provided. Optional when updating a worklog. Cannot be provided if `timeSpent` is provided. Format: int64 |
updateAuthor | Model | Optional | Expand Add comment — request body — body author Details of the user who last updated the worklog. Read only: true |
updated | string | Optional | The datetime on which the worklog was last updated. Format: date-time Read only: true |
visibility | Model | Optional | Expand Add comment — request body — body visibility Details about any restrictions in the visibility of the worklog. Optional when creating or updating a worklog. |
Referenced models: Edit issue — request body — body properties item, Add comment — request body — body author, Add comment — request body — body visibility
Get user property — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An entity property, for more information see [Entity properties](https://developer.atlassian.com/cloud/jira/platform/jira-entity-properties/). |
key | JSON | Optional | |
key (anyOf 1) | string | Alternative | The key of the property. Required on create and update. |
key (anyOf 2) | null | Alternative | |
value | JSON | Optional | |
value (anyOf 1) | JSON | Alternative | The value of the property. Required on create and update. |
value (anyOf 2) | null | Alternative |
Add comment — response body — visibility The group or role to which this item is visible
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The group or role to which this item is visible. Additional keys: allowed |
identifier | JSON | Optional | |
identifier (anyOf 1) | JSON | Alternative | |
identifier (anyOf 1) (anyOf 1) | string | Alternative | The ID of the group or the name of the role that visibility of this item is restricted to. |
identifier (anyOf 1) (anyOf 2) | null | Alternative | |
identifier (anyOf 2) | null | Alternative | |
type | JSON | Optional | |
type (anyOf 1) | string | Alternative | Whether visibility of this item is restricted to a group or role. Known values: group, role |
type (anyOf 2) | null | Alternative | |
value | JSON | Optional | |
value (anyOf 1) | string | Alternative | The name of the group or role that visibility of this item is restricted to. Please note that the name of a group is mutable, to reliably identify a group use `identifier`. |
value (anyOf 2) | null | Alternative |
Edit issue — request body — body properties item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An entity property, for more information see [Entity properties](https://developer.atlassian.com/cloud/jira/platform/jira-entity-properties/). Additional keys: not allowed |
key | string | Optional | The key of the property. Required on create and update. |
value | JSON | Optional | The value of the property. Required on create and update. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: atlassian.updateworklog. Catalog operation: updateworklog. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["write:jira-work"]