Skip to content

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

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)

Example:

bash
jr version create

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

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--idstringYes

Example:

bash
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}

FlagTypeRequiredDescription
--idstringYesThe ID of the version.
--moveAffectedIssuesTostringNoThe 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.
--moveFixIssuesTostringNoThe 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:

bash
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

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--idstringYesThe ID of the version.

Example:

bash
jr version delete-and-replace --id <id>

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}

FlagTypeRequiredDescription
--relatedWorkIdstringYesThe ID of the related work to delete.
--versionIdstringYesThe ID of the version that the target related work belongs to.

Example:

bash
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}

FlagTypeRequiredDescription
--expandstringNoUse expand to include additional information about version in the response. This parameter accepts a comma-separated list. Expand options include:
  • operations Returns the list of operations available for this version.
  • 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 represents the number of issues with a status other than to do, in progress, and done.
  • driver Returns the Atlassian account ID of the version driver.
  • approvers Returns a list containing the Atlassian account IDs of approvers for this version. | | --id | string | Yes | The ID of the version. |

Example:

bash
jr version get --id <id>

Get version's related issues count

Returns the following counts for a version:

  • Number of issues where the fixVersion is set to the version.
  • Number of issues where the affectedVersion is 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

FlagTypeRequiredDescription
--idstringYesThe ID of the version.

Example:

bash
jr version get-related-issues --id <id>

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

FlagTypeRequiredDescription
--idstringYesThe ID of the version.

Example:

bash
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

FlagTypeRequiredDescription
--idstringYesThe ID of the version.

Example:

bash
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}

FlagTypeRequiredDescription
--idstringYesThe ID of the version to delete.
--moveIssuesTostringYesThe ID of the version to merge into.

Example:

bash
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

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--idstringYesThe ID of the version to be moved.

Example:

bash
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}

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--idstringYesThe ID of the version.

Example:

bash
jr version update --id <id>

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

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--idstringYesThe ID of the version to update the related work on. For the related work id, pass it to the input JSON.

Example:

bash
jr version update-related-work --id <id>