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

getProjectVersions

Get project versions

Details

  • Method: GET
  • Path: /rest/api/3/project/{projectIdOrKey}/versions
  • Operation ID: getProjectVersions

Parameters

{
  "projectIdOrKey": {
    "description": "The project ID or project key (case sensitive).",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "expand": {
    "description": "Use [expand](#expansion) to include additional information in the response. This parameter accepts `operations`, which returns actions that can be performed on the version.",
    "required": false,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "items": {
    "additionalProperties": false,
    "description": "Details about a project version.",
    "properties": {
      "approvers": {
        "description": "If the expand option `approvers` is used, returns a list containing the approvers for this version.",
        "items": {
          "additionalProperties": true,
          "description": "Contains details about a version approver.",
          "properties": {
            "accountId": {
              "description": "The Atlassian account ID of the approver.",
              "readOnly": true,
              "type": "string"
            },
            "declineReason": {
              "description": "A description of why the user is declining the approval.",
              "readOnly": true,
              "type": "string"
            },
            "description": {
              "description": "A description of what the user is approving within the specified version.",
              "readOnly": true,
              "type": "string"
            },
            "status": {
              "description": "The status of the approval, which can be *PENDING*, *APPROVED*, or *DECLINED*",
              "readOnly": true,
              "type": "string"
            }
          },
          "type": "object"
        },
        "readOnly": true,
        "type": "array"
      },
      "archived": {
        "description": "Indicates that the version is archived. Optional when creating or updating a version.",
        "type": "boolean"
      },
      "description": {
        "description": "The description of the version. Optional when creating or updating a version. The maximum size is 16,384 bytes.",
        "type": "string"
      },
      "driver": {
        "description": "If the expand option `driver` is used, returns the Atlassian account ID of the driver.",
        "readOnly": true,
        "type": "string"
      },
      "expand": {
        "description": "Use [expand](em>#expansion) to include additional information about version in the response. This parameter accepts a comma-separated list. Expand options include:\n\n *  `operations` Returns the list of operations available for this version.\n *  `issuesstatus` Returns the count of issues in this version for each of the status categories *to do*, *in progress*, *done*, and *unmapped*. The *unmapped* property contains a count of issues with a status other than *to do*, *in progress*, and *done*.\n *  `driver` Returns the Atlassian account ID of the version driver.\n *  `approvers` Returns a list containing approvers for this version.\n\nOptional for create and update.",
        "type": "string",
        "xml": {
          "attribute": true
        }
      },
      "id": {
        "description": "The ID of the version.",
        "readOnly": true,
        "type": "string"
      },
      "issuesStatusForFixVersion": {
        "allOf": [
          {
            "$ref": "#/components/schemas/VersionIssuesStatus"
          }
        ],
        "description": "If the expand option `issuesstatus` is used, returns the count of issues in this version for each of the status categories *to do*, *in progress*, *done*, and *unmapped*. The *unmapped* property contains a count of issues with a status other than *to do*, *in progress*, and *done*.",
        "readOnly": true
      },
      "moveUnfixedIssuesTo": {
        "description": "The URL of the self link to the version to which all unfixed issues are moved when a version is released. Not applicable when creating a version. Optional when updating a version.",
        "format": "uri",
        "type": "string"
      },
      "name": {
        "description": "The unique name of the version. Required when creating a version. Optional when updating a version. The maximum length is 255 characters.",
        "type": "string"
      },
      "operations": {
        "description": "If the expand option `operations` is used, returns the list of operations available for this version.",
        "items": {
          "additionalProperties": false,
          "description": "Details about the operations available in this version.",
          "properties": {
            "href": {
              "type": "string"
            },
            "iconClass": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "styleClass": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "weight": {
              "format": "int32",
              "type": "integer"
            }
          },
          "type": "object",
          "xml": {
            "name": "link"
          }
        },
        "readOnly": true,
        "type": "array"
      },
      "overdue": {
        "description": "Indicates that the version is overdue.",
        "readOnly": true,
        "type": "boolean"
      },
      "project": {
        "description": "Deprecated. Use `projectId`.",
        "type": "string"
      },
      "projectId": {
        "description": "The ID of the project to which this version is attached. Required when creating a version. Not applicable when updating a version.",
        "format": "int64",
        "type": "integer"
      },
      "releaseDate": {
        "description": "The release date of the version. Expressed in ISO 8601 format (yyyy-mm-dd). Optional when creating or updating a version.",
        "format": "date",
        "type": "string"
      },
      "released": {
        "description": "Indicates that the version is released. If the version is released a request to release again is ignored. Not applicable when creating a version. Optional when updating a version.",
        "type": "boolean"
      },
      "self": {
        "description": "The URL of the version.",
        "format": "uri",
        "readOnly": true,
        "type": "string"
      },
      "startDate": {
        "description": "The start date of the version. Expressed in ISO 8601 format (yyyy-mm-dd). Optional when creating or updating a version.",
        "format": "date",
        "type": "string"
      },
      "userReleaseDate": {
        "description": "The date on which work on this version is expected to finish, expressed in the instance's *Day/Month/Year Format* date format.",
        "readOnly": true,
        "type": "string"
      },
      "userStartDate": {
        "description": "The date on which work on this version is expected to start, expressed in the instance's *Day/Month/Year Format* date format.",
        "readOnly": true,
        "type": "string"
      }
    },
    "type": "object",
    "xml": {
      "name": "version"
    }
  },
  "type": "array"
}

Usage

from ocp_agent import OCPAgent

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

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