version
create
Create version
Creates a project version.
This operation can be accessed anonymously.
Permissions required: Administer Jira global permission or Administer Projects project permission for the project the version is added to.
POST /rest/api/3/version
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
Example:
jr version createcreate-related-work
Create related work
Creates a related work for the given version. You can only create a generic link type of related works via this API. relatedWorkId will be auto-generated UUID, that does not need to be provided.
This operation can be accessed anonymously.
Permissions required: Resolve issues: and Edit issues Managing project permissions for the project that contains the version.
POST /rest/api/3/version/{id}/relatedwork
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes |
Example:
jr version create-related-work --id <id>delete
Delete version
Deletes a project version.
Deprecated, use Delete and replace version that supports swapping version values in custom fields, in addition to the swapping for fixVersion and affectedVersion provided in this resource.
Alternative versions can be provided to update issues that use the deleted version in fixVersion or affectedVersion. If alternatives are not provided, occurrences of fixVersion and affectedVersion that contain the deleted version are cleared.
This operation can be accessed anonymously.
Permissions required: Administer Jira global permission or Administer Projects project permission for the project that contains the version.
DELETE /rest/api/3/version/{id}
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the version. |
--moveAffectedIssuesTo | string | No | The ID of the version to update affectedVersion to when the field contains the deleted version. The replacement version must be in the same project as the version being deleted and cannot be the version being deleted. |
--moveFixIssuesTo | string | No | The ID of the version to update fixVersion to when the field contains the deleted version. The replacement version must be in the same project as the version being deleted and cannot be the version being deleted. |
Example:
jr version delete --id <id>delete-and-replace
Delete and replace version
Deletes a project version.
Alternative versions can be provided to update issues that use the deleted version in fixVersion, affectedVersion, or any version picker custom fields. If alternatives are not provided, occurrences of fixVersion, affectedVersion, and any version picker custom field, that contain the deleted version, are cleared. Any replacement version must be in the same project as the version being deleted and cannot be the version being deleted.
This operation can be accessed anonymously.
Permissions required: Administer Jira global permission or Administer Projects project permission for the project that contains the version.
POST /rest/api/3/version/{id}/removeAndSwap
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the version. |
Example:
jr version delete-and-replace --id <id>delete-related-work
Delete related work
Deletes the given related work for the given version.
This operation can be accessed anonymously.
Permissions required: Resolve issues: and Edit issues Managing project permissions for the project that contains the version.
DELETE /rest/api/3/version/{versionId}/relatedwork/{relatedWorkId}
| Flag | Type | Required | Description |
|---|---|---|---|
--relatedWorkId | string | Yes | The ID of the related work to delete. |
--versionId | string | Yes | The ID of the version that the target related work belongs to. |
Example:
jr version delete-related-work --relatedWorkId <relatedWorkId> --versionId <versionId>get
Get version
Returns a project version.
This operation can be accessed anonymously.
Permissions required: Browse projects project permission for the project containing the version.
GET /rest/api/3/version/{id}
| Flag | Type | Required | Description |
|---|---|---|---|
--expand | string | No | Use expand to include additional information about version in the response. This parameter accepts a comma-separated list. Expand options include: |
operationsReturns the list of operations available for this version.issuesstatusReturns the count of issues in this version for each of the status categories to do, in progress, done, and unmapped. The unmapped property represents the number of issues with a status other than to do, in progress, and done.driverReturns the Atlassian account ID of the version driver.approversReturns a list containing the Atlassian account IDs of approvers for this version. | |--id| string | Yes | The ID of the version. |
Example:
jr version get --id <id>get-related-issues
Get version's related issues count
Returns the following counts for a version:
- Number of issues where the
fixVersionis set to the version. - Number of issues where the
affectedVersionis set to the version. - Number of issues where a version custom field is set to the version.
This operation can be accessed anonymously.
Permissions required: Browse projects project permission for the project that contains the version.
GET /rest/api/3/version/{id}/relatedIssueCounts
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the version. |
Example:
jr version get-related-issues --id <id>get-related-work
Get related work
Returns related work items for the given version id.
This operation can be accessed anonymously.
Permissions required: Browse projects project permission for the project containing the version.
GET /rest/api/3/version/{id}/relatedwork
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the version. |
Example:
jr version get-related-work --id <id>get-unresolved-issues
Get version's unresolved issues count
Returns counts of the issues and unresolved issues for the project version.
This operation can be accessed anonymously.
Permissions required: Browse projects project permission for the project that contains the version.
GET /rest/api/3/version/{id}/unresolvedIssueCount
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the version. |
Example:
jr version get-unresolved-issues --id <id>merge
Merge versions
Merges two project versions. The merge is completed by deleting the version specified in id and replacing any occurrences of its ID in fixVersion with the version ID specified in moveIssuesTo.
Consider using Delete and replace version instead. This resource supports swapping version values in fixVersion, affectedVersion, and custom fields.
This operation can be accessed anonymously.
Permissions required: Administer Jira global permission or Administer Projects project permission for the project that contains the version.
PUT /rest/api/3/version/{id}/mergeto/{moveIssuesTo}
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the version to delete. |
--moveIssuesTo | string | Yes | The ID of the version to merge into. |
Example:
jr version merge --id <id> --moveIssuesTo <moveIssuesTo>move
Move version
Modifies the version's sequence within the project, which affects the display order of the versions in Jira.
This operation can be accessed anonymously.
Permissions required: Browse projects project permission for the project that contains the version.
POST /rest/api/3/version/{id}/move
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the version to be moved. |
Example:
jr version move --id <id>update
Update version
Updates a project version.
This operation can be accessed anonymously.
Permissions required: Administer Jira global permission or Administer Projects project permission for the project that contains the version.
PUT /rest/api/3/version/{id}
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the version. |
Example:
jr version update --id <id>update-related-work
Update related work
Updates the given related work. You can only update generic link related works via Rest APIs. Any archived version related works can't be edited.
This operation can be accessed anonymously.
Permissions required: Resolve issues: and Edit issues Managing project permissions for the project that contains the version.
PUT /rest/api/3/version/{id}/relatedwork
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the version to update the related work on. For the related work id, pass it to the input JSON. |
Example:
jr version update-related-work --id <id>