Open Context Protocol is live! 🚀 Read the launch post
getWorklogsForIds

getWorklogsForIds

Get worklogs

Details

  • Method: POST
  • Path: /rest/api/3/worklog/list
  • Operation ID: getWorklogsForIds

Parameters

{
  "expand": {
    "description": "Use [expand](#expansion) to include additional information about worklogs in the response. This parameter accepts `properties` that returns the properties of each worklog.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "ids": {
    "description": "A list of worklog IDs.",
    "required": true,
    "location": "body",
    "type": "array"
  }
}

Response Schema

{
  "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"
    }
  },
  "type": "array"
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('jira')

# Call this tool
result = await agent.call_tool('getWorklogsForIds', {
    # Add required parameters here
})