getProjectVersionsPaginated
Get project versions paginated
Details
- Method:
GET - Path:
/rest/api/3/project/{projectIdOrKey}/version - Operation ID:
getProjectVersionsPaginated
Parameters
{
"projectIdOrKey": {
"description": "The project ID or project key (case sensitive).",
"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"
},
"orderBy": {
"description": "[Order](#ordering) the results by a field:\n\n * `description` Sorts by version description.\n * `name` Sorts by version name.\n * `releaseDate` Sorts by release date, starting with the oldest date. Versions with no release date are listed last.\n * `sequence` Sorts by the order of appearance in the user interface.\n * `startDate` Sorts by start date, starting with the oldest date. Versions with no start date are listed last.",
"required": false,
"location": "query",
"type": "string",
"enum": [
"description",
"-description",
"+description",
"name",
"-name",
"+name",
"releaseDate",
"-releaseDate",
"+releaseDate",
"sequence",
"-sequence",
"+sequence",
"startDate",
"-startDate",
"+startDate"
]
},
"query": {
"description": "Filter the results using a literal string. Versions with matching `name` or `description` are returned (case insensitive).",
"required": false,
"location": "query",
"type": "string"
},
"status": {
"description": "A list of status values used to filter the results by version status. This parameter accepts a comma-separated list. The status values are `released`, `unreleased`, and `archived`.",
"required": false,
"location": "query",
"type": "string"
},
"expand": {
"description": "Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include:\n\n * `issuesstatus` Returns the number of issues in each status category for each version.\n * `operations` Returns actions that can be performed on the specified version.\n * `driver` Returns the Atlassian account ID of the version driver.\n * `approvers` Returns a list containing the approvers for this version.",
"required": false,
"location": "query",
"type": "string"
}
}Response Schema
{
"additionalProperties": false,
"description": "A page of items.",
"properties": {
"isLast": {
"description": "Whether this is the last page.",
"readOnly": true,
"type": "boolean"
},
"maxResults": {
"description": "The maximum number of items that could be returned.",
"format": "int32",
"readOnly": true,
"type": "integer"
},
"nextPage": {
"description": "If there is another page of results, the URL of the next page.",
"format": "uri",
"readOnly": true,
"type": "string"
},
"self": {
"description": "The URL of the page.",
"format": "uri",
"readOnly": true,
"type": "string"
},
"startAt": {
"description": "The index of the first item returned.",
"format": "int64",
"readOnly": true,
"type": "integer"
},
"total": {
"description": "The number of items returned.",
"format": "int64",
"readOnly": true,
"type": "integer"
},
"values": {
"description": "The list of items.",
"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"
}
},
"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('getProjectVersionsPaginated', {
# Add required parameters here
})