getIssueWorklog
Get issue worklogs
Details
- Method:
GET - Path:
/rest/api/3/issue/{issueIdOrKey}/worklog - Operation ID:
getIssueWorklog
Parameters
{
"issueIdOrKey": {
"description": "The ID or key of the issue.",
"required": true,
"location": "path",
"type": "string"
},
"startAt": {
"description": "The index of the first item to return in a page of results (page offset).",
"required": false,
"location": "query",
"type": "integer",
"format": "int64"
},
"maxResults": {
"description": "The maximum number of items to return per page.",
"required": false,
"location": "query",
"type": "integer",
"format": "int32"
},
"startedAfter": {
"description": "The worklog start date and time, as a UNIX timestamp in milliseconds, after which worklogs are returned.",
"required": false,
"location": "query",
"type": "integer",
"format": "int64"
},
"startedBefore": {
"description": "The worklog start date and time, as a UNIX timestamp in milliseconds, before which worklogs are returned.",
"required": false,
"location": "query",
"type": "integer",
"format": "int64"
},
"expand": {
"description": "Use [expand](#expansion) to include additional information about worklogs in the response. This parameter accepts`properties`, which returns worklog properties.",
"required": false,
"location": "query",
"type": "string"
}
}Response Schema
{
"additionalProperties": true,
"description": "Paginated list of worklog details",
"properties": {
"maxResults": {
"description": "The maximum number of results that could be on the page.",
"format": "int32",
"readOnly": true,
"type": "integer"
},
"startAt": {
"description": "The index of the first item returned on the page.",
"format": "int32",
"readOnly": true,
"type": "integer"
},
"total": {
"description": "The number of results on the page.",
"format": "int32",
"readOnly": true,
"type": "integer"
},
"worklogs": {
"description": "List of worklogs.",
"items": {
"additionalProperties": true,
"description": "Details of a worklog.",
"properties": {
"author": {
"allOf": [
{
"$ref": "#/components/schemas/UserDetails"
}
],
"description": "Details of the user who created the worklog.",
"readOnly": true
},
"comment": {
"description": "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": {
"description": "The datetime on which the worklog was created.",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"id": {
"description": "The ID of the worklog record.",
"readOnly": true,
"type": "string"
},
"issueId": {
"description": "The ID of the issue this worklog is for.",
"readOnly": true,
"type": "string"
},
"properties": {
"description": "Details of properties for the worklog. Optional when creating or updating a worklog.",
"items": {
"additionalProperties": false,
"description": "An entity property, for more information see [Entity properties](https://developer.atlassian.com/cloud/jira/platform/jira-entity-properties/).",
"properties": {
"key": {
"description": "The key of the property. Required on create and update.",
"type": "string"
},
"value": {
"description": "The value of the property. Required on create and update."
}
},
"type": "object"
},
"type": "array"
},
"self": {
"description": "The URL of the worklog item.",
"format": "uri",
"readOnly": true,
"type": "string"
},
"started": {
"description": "The datetime on which the worklog effort was started. Required when creating a worklog. Optional when updating a worklog.",
"format": "date-time",
"type": "string"
},
"timeSpent": {
"description": "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.",
"type": "string"
},
"timeSpentSeconds": {
"description": "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",
"type": "integer"
},
"updateAuthor": {
"allOf": [
{
"$ref": "#/components/schemas/UserDetails"
}
],
"description": "Details of the user who last updated the worklog.",
"readOnly": true
},
"updated": {
"description": "The datetime on which the worklog was last updated.",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"visibility": {
"allOf": [
{
"$ref": "#/components/schemas/Visibility"
}
],
"description": "Details about any restrictions in the visibility of the worklog. Optional when creating or updating a worklog."
}
},
"type": "object",
"xml": {
"name": "worklog"
}
},
"readOnly": true,
"type": "array"
}
},
"type": "object"
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('jira')
# Call this tool
result = await agent.call_tool('getIssueWorklog', {
# Add required parameters here
})