### Set-JiraUser Usage Examples Source: https://atlassianps.org/docs/JiraPS/commands/Set-JiraUser Examples demonstrating how to update user email addresses and custom properties. ```PowerShell Set-JiraUser -User user1 -EmailAddress user1_new@example.com ``` ```PowerShell Set-JiraUser -User user2 -Properties @{EmailAddress='user2_new@example.com';DisplayName='User 2'} ``` -------------------------------- ### Move-JiraVersion Usage Examples Source: https://atlassianps.org/docs/JiraPS/commands/Move-JiraVersion Examples demonstrating how to reorder versions using IDs, objects, or position keywords. ```PowerShell Move-JiraVersion -Version 10 -After 9 ``` ```PowerShell Move-JiraVersion -Version $myVersionObject -After $otherVersionObject ``` ```PowerShell Move-JiraVersion -Version $myVersionObject -Position Earliest ``` -------------------------------- ### Get-JiraIssueLinkType Examples Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssueLinkType Usage examples for retrieving all issue link types or a specific link type by ID. ```PowerShell Get-JiraIssueLinkType ``` ```PowerShell Get-JiraIssueLinkType -LinkType 1 ``` -------------------------------- ### Add-JiraIssueAttachment Usage Examples Source: https://atlassianps.org/docs/JiraPS/commands/Add-JiraIssueAttachment Examples demonstrating direct attachment and pipeline-based attachment to Jira issues. ```PowerShell Add-JiraIssueAttachment -FilePath "Test comment" -Issue "TEST-001" ``` ```PowerShell Get-JiraIssue "TEST-002" | Add-JiraIssueAttachment -FilePath "Test comment from PowerShell" ``` -------------------------------- ### Add-JiraGroupMember Usage Examples Source: https://atlassianps.org/docs/JiraPS/commands/Add-JiraGroupMember Examples showing direct usage and pipeline integration for adding users to JIRA groups. ```PowerShell Add-JiraGroupMember -Group testUsers -User jsmith ``` ```PowerShell Get-JiraGroup 'Project Admins' | Add-JiraGroupMember -User jsmith ``` -------------------------------- ### Remove-JiraIssueLink Examples Source: https://atlassianps.org/docs/JiraPS/commands/Remove-JiraIssueLink Examples demonstrating how to remove issue links by ID or via pipeline input. ```PowerShell Remove-JiraIssueLink 1234,2345 ``` ```PowerShell Get-JiraIssue -Query "project = Project1 AND label = lingering" | Remove-JiraIssueLink ``` -------------------------------- ### Retrieve Filter Permissions Examples Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraFilterPermission Examples showing how to retrieve permissions for a filter using direct parameters or pipeline input. ```PowerShell Get-JiraFilterPermission -Filter (Get-JiraFilter 12345) #------- Get-JiraFilterPermission -Id 12345 ``` ```PowerShell 12345 | Get-JiraFilterPermission #------- Get-JiraFilter 12345 | Add-JiraFilterPermission ``` -------------------------------- ### Get Jira Versions from Multiple Projects by Name Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraVersion Fetches specific versions ('v1.0', 'v2.0') from multiple projects ('FOO', 'BAR'). This example demonstrates piping project objects to the Get-JiraVersion cmdlet. ```PowerShell Get-JiraProject "FOO", "BAR" | Get-JiraVersion -Name "v1.0", "v2.0" ``` -------------------------------- ### Remove-JiraFilterPermission Usage Examples Source: https://atlassianps.org/docs/JiraPS/commands/Remove-JiraFilterPermission Examples demonstrating how to remove specific permissions by ID or remove all permissions from a filter. ```PowerShell Remove-JiraFilterPermission -FilterId 11822 -PermissionId 1111, 2222 ``` ```PowerShell Get-JiraFilter 11822 | Get-JiraFilterPermission | Remove-JiraFilterPermission ``` -------------------------------- ### Search with Paging and Project Filtering Source: https://atlassianps.org/docs/JiraPS/commands/Find-JiraFilter Examples of using pagination parameters and filtering by project. ```PowerShell Find-JiraFilter -AccountId 'c62dde3418235be1c8424950' -First 3 -Skip 3 ``` ```PowerShell Find-JiraFilter -Project 'TEST' -First 8 ``` -------------------------------- ### Get Projects via GET Request Source: https://atlassianps.org/docs/JiraPS/commands/Invoke-JiraMethod Retrieves all projects from the Jira server using a GET request. ```PowerShell Invoke-JiraMethod -URI "$(Get-JiraConfigServer)/rest/api/latest/project" ``` -------------------------------- ### Get-JiraServerInformation Usage Example Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraServerInformation Retrieves information about the JIRA server. ```PowerShell Get-JiraServerInformation ``` -------------------------------- ### Get-JiraProject Usage Examples Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraProject Common usage patterns for retrieving project information by key, ID, or listing all projects. ```PowerShell Get-JiraProject -Project TEST -Credential $cred ``` ```PowerShell Get-JiraProject 2 -Credential $cred ``` ```PowerShell Get-JiraProject ``` -------------------------------- ### Get Projects with Credentials Source: https://atlassianps.org/docs/JiraPS/commands/Invoke-JiraMethod Retrieves all projects from the Jira server by prompting for credentials. ```PowerShell Invoke-JiraMethod -URI "$(Get-JiraConfigServer)/rest/api/latest/project" -Credential (Get-Credential) ``` -------------------------------- ### Get Jira Issues by JQL Query Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssue Retrieves Jira issues that match a specified JQL query. This example queries for issues in the 'TEST' project created within the last 5 days. ```powershell Get-JiraIssue -Query 'project = "TEST" AND created >= -5d' ``` -------------------------------- ### Remove-JiraSession Usage Examples Source: https://atlassianps.org/docs/JiraPS/commands/Remove-JiraSession Examples demonstrating how to close a JIRA session using either the default session or a specific session variable. ```PowerShell New-JiraSession -Credential (Get-Credential jiraUsername) Get-JiraIssue TEST-01 Remove-JiraSession ``` ```PowerShell $s = New-JiraSession -Credential (Get-Credential jiraUsername) Remove-JiraSession $s ``` -------------------------------- ### Retrieve JIRA issue comments Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssueComment Examples demonstrating how to fetch comments using an issue key or the pipeline. ```PowerShell Get-JiraIssueComment -Key TEST-001 ``` ```PowerShell Get-JiraIssue TEST-002 | Get-JiraIssueComment ``` -------------------------------- ### Get-JiraFilter Usage Examples Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraFilter Common usage patterns for retrieving filter information from JIRA. ```PowerShell Get-JiraFilter -Id 12345 ``` ```PowerShell $filterObject | Get-JiraFilter ``` ```PowerShell Get-JiraFilter -Favorite ``` -------------------------------- ### Invoke-JiraIssueTransition Examples Source: https://atlassianps.org/docs/JiraPS/commands/Invoke-JiraIssueTransition Various ways to invoke issue transitions, including adding comments, assigning users, and updating custom fields. ```PowerShell Invoke-JiraIssueTransition -Issue TEST-01 -Transition 11 ``` ```PowerShell Invoke-JiraIssueTransition -Issue TEST-01 -Transition 11 -Comment 'Transition comment' ``` ```PowerShell Invoke-JiraIssueTransition -Issue TEST-01 -Transition 11 -Assignee 'joe.bloggs' ``` ```PowerShell $transitionFields = @{'customfield_12345' = 'example'} Invoke-JiraIssueTransition -Issue TEST-01 -Transition 11 -Fields $transitionFields ``` ```PowerShell $transition = Get-JiraIssue -Issue TEST-01 | Select-Object -ExpandProperty Transition | ? {$_.ResultStatus.Name -eq 'In Progress'} Invoke-JiraIssueTransition -Issue TEST-01 -Transition $transition ``` -------------------------------- ### Retrieve Jira Remote Links Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraRemoteLink Examples showing how to fetch all remote links or a specific link from a Jira issue. ```PowerShell Get-JiraRemoteLink -Issue TEST-001 -Credential $cred ``` ```PowerShell Get-JiraRemoteLink -Issue TEST-001 -LinkId 100000 -Credential $cred ``` -------------------------------- ### Download Jira issue attachments Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssueAttachmentFile Examples demonstrating how to download attachments from Jira issues using direct commands or pipeline input. ```PowerShell Get-JiraIssueAttachmentFile (Get-JiraIssueAttachment -Issue TEST-001) ``` ```PowerShell Get-JiraIssue TEST-002 | Get-JiraIssueAttachment | Get-JiraIssueAttachmentFile ``` ```PowerShell Get-JiraIssue TEST-002 | Get-JiraIssueAttachment -FileName "*.png" | Get-JiraIssueAttachmentFile -Path "c:\temp ``` -------------------------------- ### Get Jira Component Syntax by Project Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraComponent The syntax for Get-JiraComponent when retrieving components by project. Requires the Project parameter. ```powershell Get-JiraComponent [-Project] [-Credential ] [] ``` -------------------------------- ### Get watchers using pipeline Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssueWatcher Illustrates using the pipeline to get watchers for an issue. This is useful when you've already retrieved an issue object. ```PowerShell Get-JiraIssue TEST-002 | Get-JiraIssueWatcher ``` -------------------------------- ### Retrieve Group Members Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraGroupMember Examples showing how to retrieve members of a JIRA group directly or via the pipeline. ```PowerShell Get-JiraGroupMember testGroup ``` ```PowerShell Get-JiraGroup 'Developers' | Get-JiraGroupMember ``` -------------------------------- ### Modify JIRA Version Properties Source: https://atlassianps.org/docs/JiraPS/commands/Set-JiraVersion Examples demonstrating how to update the name or description of an existing JIRA version. ```PowerShell Get-JiraVersion -Project $Project -Name "Old-Name" | Set-JiraVersion -Name 'New-Name' ``` ```PowerShell Get-JiraVersion -ID 162401 | Set-JiraVersion -Description 'Descriptive String' ``` -------------------------------- ### Format Output to JIRA Table and Add to Issue Source: https://atlassianps.org/docs/JiraPS/commands/Format-Jira This example demonstrates piping the output of Get-Process to Format-Jira to create a JIRA markdown table, and then piping that table to Add-JiraIssueComment to add it as a comment to a specific JIRA issue. ```powershell Get-Process | Format-Jira | Add-JiraIssueComment -Issue TEST-001 ``` -------------------------------- ### Get Jira Priority Syntax (All) Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraPriority This is the default syntax for Get-JiraPriority, used to retrieve all priorities. ```PowerShell Get-JiraPriority [-Credential ] [] ``` -------------------------------- ### Format Specific Properties to JIRA Table Source: https://atlassianps.org/docs/JiraPS/commands/Format-Jira This example retrieves all Google Chrome processes and then uses Format-Jira to create a JIRA table containing only the Name, Id, and VM properties of each process. This is useful for focusing on specific data points. ```powershell Get-Process chrome | Format-Jira Name,Id,VM ``` -------------------------------- ### Remove-JiraIssueWatcher Examples Source: https://atlassianps.org/docs/JiraPS/commands/Remove-JiraIssueWatcher Various ways to use the Remove-JiraIssueWatcher cmdlet, including direct calls and pipeline usage. ```PowerShell Remove-JiraIssueWatcher -Watcher "fred" -Issue "TEST-001" ``` ```PowerShell Get-JiraIssue "TEST-002" | Remove-JiraIssueWatcher "fred" ``` ```PowerShell Get-JiraIssue -Query 'project = "TEST" AND created >= -5d' | Remove-JiraIssueWatcher "fred" ``` -------------------------------- ### Create a Link Between Jira Issues Source: https://atlassianps.org/docs/JiraPS/commands/Add-JiraIssueLink Example of creating a 'Composition' link between 'TEST-01' and 'TEST-10' using the Add-JiraIssueLink cmdlet. This requires defining the issue link structure. ```powershell $_issueLink = [PSCustomObject]@{ outwardIssue = [PSCustomObject]@{key = "TEST-10"} type = [PSCustomObject]@{name = "Composition"} } Add-JiraIssueLink -Issue TEST-01 -IssueLink $_issueLink ``` -------------------------------- ### Search for JIRA Filters by Name Source: https://atlassianps.org/docs/JiraPS/commands/Find-JiraFilter Examples of searching for filters using partial or exact name matching. ```PowerShell Find-JiraFilter -Name 'ABC' ``` ```PowerShell Find-JiraFilter -Name """George Jetsons Filter""" ``` -------------------------------- ### Save Response with Custom Headers Source: https://atlassianps.org/docs/JiraPS/commands/Invoke-JiraMethod Executes a GET request with custom headers and saves the output to a file. ```PowerShell $parameter = @{ URI = "$(Get-JiraConfigServer)/rest/api/latest/project" Method = "GET" Headers = @{"Accept" = "text/plain"} OutFile = "c:\temp\jira_projects.json" Credential = $cred } Invoke-JiraMethod @parameter ``` -------------------------------- ### Get Jira Component Syntax by ID Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraComponent The default syntax for Get-JiraComponent when retrieving by ID. Requires the ComponentId parameter. ```powershell Get-JiraComponent [-ComponentId] [-Credential ] [] ``` -------------------------------- ### Add Labels to Multiple JIRA Issues Source: https://atlassianps.org/docs/JiraPS/commands/Set-JiraIssueLabel This example demonstrates how to add a label to multiple JIRA issues that match a specific JQL query. It pipes the results of `Get-JiraIssue` to `Set-JiraIssueLabel` using the `-Add` parameter. ```powershell Get-JiraIssue -Query 'created >= -7d AND reporter in (joeSmith)' | Set-JiraIssueLabel -Add 'enhancement' ``` -------------------------------- ### Create Jira Issue with Custom Fields Source: https://atlassianps.org/docs/JiraPS/about/custom-fields.html An example demonstrating the structure for creating a new Jira issue, including standard fields and various custom fields like labels, fix versions, dropdown items, and due dates. ```powershell $fields = @{ project = "TV" issuetype = "bug" summary = "Important Issue" description = "This Issue is *very* important\n\n really!?" Assignee = "admin" Reporter = "admin" Priority = 1 Fields = @{ labels = @("important", "notreally") fixVersion = @( @{ name = "Release 1.1"} ) customfield_10001 = @{ name = "item from a dropdown" } duedate = "2020-01-01" } } ``` -------------------------------- ### Remove a Jira Version by ID Source: https://atlassianps.org/docs/JiraPS/commands/Remove-JiraVersion This example shows how to remove a JIRA version directly by its unique ID. ```PowerShell Remove-JiraVersion -Version '66596' ``` -------------------------------- ### Get Specific Issue Type by Name Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssueType This command retrieves information for a specific issue type by its name. For example, to get details about the 'Bug' issue type, use the -IssueType parameter. ```PowerShell Get-JiraIssueType -IssueType "Bug" ``` -------------------------------- ### Get Multiple Issue Types by Name or ID Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssueType This command retrieves information for multiple issue types by specifying their names or IDs. You can mix names and IDs in the same command. For example, to get 'Bug', 'Task', and issue type with ID '4'. ```PowerShell Get-JiraIssueType -IssueType "Bug","Task","4" ``` -------------------------------- ### Remove Favorite Jira Filters with Confirmation Source: https://atlassianps.org/docs/JiraPS/commands/Remove-JiraFilter This example demonstrates how to remove all favorite filters, prompting for confirmation before each deletion. This is useful for preventing accidental permanent deletion. ```PowerShell Get-JiraFilter -Favorite | Remove-JiraFilter -Confirm ``` -------------------------------- ### Get All Issue Types Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssueType Use this command to retrieve all available issue types from the JIRA server. No specific parameters are required for this operation. ```PowerShell Get-JiraIssueType ``` -------------------------------- ### Get All Jira Fields Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraField Retrieves information about all JIRA fields visible to the current user. Requires a JIRA session or credentials. ```PowerShell Get-JiraField ``` -------------------------------- ### Get Jira Component by Project Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraComponent Retrieve all components associated with a given Jira project. This can be done by piping a project object or by specifying project keys. ```powershell Get-JiraProject "Project1" | Get-JiraComponent ``` ```powershell Get-JiraComponent ABC,DEF ``` -------------------------------- ### Get Available Jira Issue Transitions Source: https://atlassianps.org/docs/JiraPS/about/updating-issues.html Retrieve the list of possible transitions for a given Jira issue by accessing its `Transition` property. ```PowerShell (Get-JiraIssue TEST-1).Transition ``` -------------------------------- ### Create a Version with Release Date Source: https://atlassianps.org/docs/JiraPS/commands/New-JiraVersion Create a version in a project using a retrieved project object and a specific release date. ```PowerShell $project = Get-JiraProject -Project "RD" New-JiraVersion -Name '1.0.0.0' -Project $project -ReleaseDate "2000-12-31" ``` -------------------------------- ### Comment on Multiple Issues Based on JQL Query Source: https://atlassianps.org/docs/JiraPS/commands/Add-JiraIssueComment This example shows how to comment on multiple JIRA issues that match a specific JQL query. It is recommended to validate the JQL query first to ensure it returns the intended issues. ```powershell Get-JiraIssue -Query 'project = "TEST" AND created >= -5d' | Add-JiraIssueComment "This issue has been cancelled per Vice President's orders." ``` -------------------------------- ### Remove a Jira Version by Name Source: https://atlassianps.org/docs/JiraPS/commands/Remove-JiraVersion This example demonstrates how to remove a specific version from a JIRA project by first retrieving the version using Get-JiraVersion and then piping it to Remove-JiraVersion. ```PowerShell Get-JiraVersion -Name '1.0.0.0' -Project $Project | Remove-JiraVersion ``` -------------------------------- ### Get Jira Versions by Project Key Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraVersion Retrieves all JIRA versions visible to the current user for a specified project. Ensure a JiraPS session is defined or anonymous access is permitted. ```PowerShell Get-JiraVersion -Project $ProjectKey ``` -------------------------------- ### Get Jira Issue by Key Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssue Fetches a specific Jira issue using its unique key. The default output format displays key, summary, status, and creation date. ```powershell Get-JiraIssue -Key TEST-001 ``` -------------------------------- ### Create and Retrieve Jira Session Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraSession Demonstrates creating a new session with credentials followed by retrieving the session reference. ```PowerShell New-JiraSession -Credential (Get-Credential jiraUsername) Get-JiraSession ``` -------------------------------- ### Remove-JiraUser Example Source: https://atlassianps.org/docs/JiraPS/commands/Remove-JiraUser Removes a specific JIRA user by username. ```PowerShell Remove-JiraUser -UserName testUser ``` -------------------------------- ### Get-JiraConfigServer Syntax Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraConfigServer Displays the syntax for the Get-JiraConfigServer cmdlet. ```PowerShell Get-JiraConfigServer [[-ConfigFile] ] [] ``` -------------------------------- ### GET Get-JiraServerInformation Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraServerInformation Retrieves information about the JIRA server such as version and time. ```APIDOC ## GET Get-JiraServerInformation ### Description This function returns information about the JIRA server, such as version, time, etc. ### Method GET ### Endpoint Get-JiraServerInformation ### Parameters #### Path Parameters - **Credential** (PSCredential) - Optional - Credentials to use to connect to JIRA. If not specified, this function will use anonymous access. ### Request Example Get-JiraServerInformation ### Response #### Success Response (200) - **Output** (JiraPS.ServerInfo) - Returns an object containing JIRA server information. ``` -------------------------------- ### GET Get-JiraPriority Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraPriority Retrieves information about available priorities from the JIRA server. ```APIDOC ## GET Get-JiraPriority ### Description Retrieves all available Priorities on the JIRA server and returns them as JiraPS.Priority objects. Can be filtered by specific IDs. ### Method GET ### Parameters #### Path Parameters - **Id** (Int32[]) - Optional - ID of the priority to get. #### Query Parameters - **Credential** (PSCredential) - Optional - Credentials to use to connect to JIRA. If not specified, anonymous access is used. ### Request Example Get-JiraPriority -ID 1 ### Response #### Success Response (200) - **JiraPS.Priority** (Object) - Returns the priority object(s) matching the request. ``` -------------------------------- ### Invoke-JiraIssueTransition Syntax Source: https://atlassianps.org/docs/JiraPS/commands/Invoke-JiraIssueTransition The basic syntax for the Invoke-JiraIssueTransition cmdlet. ```PowerShell Invoke-JiraIssueTransition [-Issue] [-Transition] [[-Fields] ] [[-Assignee] ] [[-Comment] ] [[-Credential] ] [-Passthru] [] ``` -------------------------------- ### Update Filter Name Source: https://atlassianps.org/docs/JiraPS/commands/Set-JiraFilter Example of changing the name of a specific filter. ```PowerShell Set-JiraFilter -InputObject (Get-JiraFilter "12345") -Name "NewName" ``` -------------------------------- ### GET Get-JiraIssueType Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssueType Retrieves information about available issue types from the JIRA server. ```APIDOC ## GET Get-JiraIssueType ### Description This function retrieves all available IssueTypes on the JIRA server and returns them as JiraPS.IssueType objects. It can be filtered to return a specific subset of issue types. ### Method GET ### Parameters #### Query Parameters - **IssueType** (String[]) - Optional - The Issue Type name or ID to search. - **Credential** (PSCredential) - Optional - Credentials to use to connect to JIRA. ### Request Example Get-JiraIssueType -IssueType "Bug" ### Response #### Success Response (200) - **Output** (JiraPS.IssueType) - Returns the requested issue type information. ``` -------------------------------- ### Get Jira Issue Watcher Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssueWatcher Retrieves the watchers for a given Jira issue. ```APIDOC ## GET /rest/api/2/issue/{issueIdOrKey}/watchers ### Description Retrieves the watchers for a given Jira issue. ### Method GET ### Endpoint /rest/api/2/issue/{issueIdOrKey}/watchers ### Parameters #### Path Parameters - **issueIdOrKey** (string) - Required - The issue ID or key. #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **users** (array) - A list of user objects representing the watchers. - **displayName** (string) - The display name of the user. - **active** (boolean) - Whether the user is active. - **emailAddress** (string) - The email address of the user. - **avatarUrls** (object) - URLs for the user's avatars. - **24x24** (string) - URL for a 24x24 avatar. - **48x48** (string) - URL for a 48x48 avatar. - **self** (string) - The URL of the user resource. #### Response Example ```json { "users": [ { "displayName": "John Doe", "active": true, "emailAddress": "john.doe@example.com", "avatarUrls": { "24x24": "http://www.example.com/avatar/24x24", "48x48": "http://www.example.com/avatar/48x48" }, "self": "http://www.example.com/rest/api/2/user?accountId=12345" } ] } ``` ``` -------------------------------- ### Get Jira Group Members Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraGroup Retrieves the members of a specific Jira group. ```APIDOC ## GET /rest/api/2/group/member ### Description Retrieves the members of a specified group from Jira. ### Method GET ### Endpoint /rest/api/2/group/member ### Parameters #### Query Parameters - **groupname** (string) - Required - The name of the group whose members are to be retrieved. - **startAt** (integer) - Optional - The index of the first user to return (0-based). - **maxResults** (integer) - Optional - The maximum number of users to return. ### Request Example ```json { "groupname": "testGroup" } ``` ### Response #### Success Response (200) - **size** (integer) - The number of users returned. - **items** (array) - A list of user objects. - **name** (string) - The username. - **displayName** (string) - The display name of the user. - **active** (boolean) - Whether the user is active. #### Response Example ```json { "size": 1, "items": [ { "name": "user1", "displayName": "User One", "active": true } ] } ``` ``` -------------------------------- ### Get Jira Group Information Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraGroup Retrieves information about a specific Jira group. ```APIDOC ## GET /rest/api/2/group ### Description Retrieves information about a specified group from Jira. To get the members of a group, use the `Get-JiraGroupMember` cmdlet. ### Method GET ### Endpoint /rest/api/2/group ### Parameters #### Query Parameters - **groupname** (string) - Required - The name of the group to search for. - **expand** (string) - Optional - A comma-separated list of fields to expand (e.g., 'users'). ### Request Example ```json { "groupname": "testGroup" } ``` ### Response #### Success Response (200) - **name** (string) - The name of the group. - **users** (object) - A list of users in the group (if expanded). #### Response Example ```json { "name": "testGroup", "users": { "size": 1, "items": [ { "name": "user1", "displayName": "User One", "active": true } ] } } ``` ``` -------------------------------- ### Remove-JiraIssueAttachment Examples Source: https://atlassianps.org/docs/JiraPS/commands/Remove-JiraIssueAttachment Common usage patterns for removing attachments from JIRA issues. ```PowerShell Remove-JiraIssueAttachment -AttachmentId 10039 ``` ```PowerShell Get-JiraIssueAttachment -Issue FOO-1234 | Remove-JiraIssueAttachment ``` ```PowerShell Remove-JiraIssueAttachment -Issue FOO-1234 -FileName '*.png' -force ``` -------------------------------- ### Authentication and Context Parameters Source: https://atlassianps.org/docs/JiraPS/commands/Invoke-JiraMethod Parameters for authentication and cmdlet context. ```APIDOC ## -Credential ### Description Credentials to use for the authentication with the REST Api. If none are provided, `Get-JiraSession` will be used for authentication. If no sessions is available, the request will be executed anonymously. ### Parameter Details - **Type**: PSCredential - **Required**: False - **Accept pipeline input**: False ## -Cmdlet ### Description Context which will be used for throwing errors. ### Parameter Details - **Type**: PSCmdlet - **Required**: False - **Accept pipeline input**: False ``` -------------------------------- ### GET Get-JiraIssueEditMetadata Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssueEditMetadata Retrieves the fields and metadata required to update a specific JIRA issue. ```APIDOC ## GET Get-JiraIssueEditMetadata ### Description Returns metadata required to update an issue in JIRA, including fields that can be defined during the update process. This is useful for identifying mandatory custom fields. ### Method GET ### Parameters #### Path Parameters - **Issue** (String) - Required - Issue id or key of the reference issue. #### Query Parameters - **Credential** (PSCredential) - Optional - Credentials to use to connect to JIRA. If not specified, anonymous access is used. ### Request Example Get-JiraIssueEditMetadata -Issue "TEST-001" ### Response #### Success Response (200) - **[JiraPS.Field]** - Returns a collection of field objects containing metadata for the specified issue. ``` -------------------------------- ### Search for Multiple Filters via Pipeline or List Source: https://atlassianps.org/docs/JiraPS/commands/Find-JiraFilter Demonstrates searching for multiple filter names using the pipeline or a list of strings. ```PowerShell 'My','Your' | Find-JiraFilter ``` ```PowerShell Find-JiraFilter -Name 'My','Your' ``` -------------------------------- ### GET Get-JiraField Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraField Retrieves information about all JIRA fields or a specific field by name or ID. ```APIDOC ## GET Get-JiraField ### Description This function provides information about JIRA fields. It is useful for identifying a field's ID by its name or vice versa, which is typically required when creating or editing issues. ### Method GET ### Parameters #### Path Parameters - **Field** (String[]) - Required (in _Search set) - The Field name or ID to search. #### Query Parameters - **Credential** (PSCredential) - Optional - Credentials to use to connect to JIRA. If not specified, the function uses anonymous access. ### Request Example Get-JiraField -Field "Key" ### Response #### Success Response (200) - **[JiraPS.Field]** - Returns an object containing information about the requested JIRA field(s). ``` -------------------------------- ### Get-JiraProject Syntax Definitions Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraProject Syntax patterns for retrieving Jira projects, either by specific identifier or listing all available projects. ```PowerShell Get-JiraProject [-Credential ] [] ``` ```PowerShell Get-JiraProject [-Project] [-Credential ] [] ``` -------------------------------- ### New-JiraVersion Syntax Definitions Source: https://atlassianps.org/docs/JiraPS/commands/New-JiraVersion Syntax definitions for creating a new JIRA version using either an object or explicit parameters. ```PowerShell New-JiraVersion [-InputObject] [-Credential ] [-WhatIf] [-Confirm] [] ``` ```PowerShell New-JiraVersion [-Name] [-Project] [-Description ] [-Archived ] [-Released ] [-ReleaseDate ] [-StartDate ] [-Credential ] [-WhatIf] [-Confirm] [] ``` -------------------------------- ### Add-JiraIssueWatcher Syntax Source: https://atlassianps.org/docs/JiraPS/commands/Add-JiraIssueWatcher The basic syntax for the Add-JiraIssueWatcher cmdlet. ```PowerShell Add-JiraIssueWatcher [-Watcher] [-Issue] [[-Credential] ] [-WhatIf] [-Confirm] [] ``` -------------------------------- ### Create a New JIRA Version Source: https://atlassianps.org/docs/JiraPS/commands/New-JiraVersion Basic usage to create a new version in a specified project. ```PowerShell New-JiraVersion -Name '1.0.0.0' -Project "RD" ``` -------------------------------- ### Save Response to File Source: https://atlassianps.org/docs/JiraPS/commands/Invoke-JiraMethod Executes a GET request and saves the JSON response to a local file. ```PowerShell $parameter = @{ URI = "$(Get-JiraConfigServer)/rest/api/latest/project" Method = "GET" OutFile = "c:\temp\jira_projects.json" Credential = $cred } Invoke-JiraMethod @parameter ``` -------------------------------- ### GET /issue Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssue Retrieves information about one or more issues in Jira based on various search criteria. ```APIDOC ## GET /issue ### Description Retrieves the data of an issue in JIRA. This function can be used to directly query JIRA for a specific issue key or internal issue ID, or to query JIRA for issues matching specific criteria using JQL. ### Method GET ### Parameters #### Query Parameters - **Key** (String[]) - Required (ByIssueKey) - Key of the issue to search for. - **InputObject** (Object[]) - Required (ByInputObject) - Object of an issue to search for. - **Query** (String) - Required (ByJQL) - JQL query for which to search for. - **Filter** (Object) - Required (ByFilter) - Object of an existing JIRA filter from which the results will be returned. - **Fields** (String[]) - Optional - Fields to select from the issue. Defaults to "*all". ### Request Example Get-JiraIssue -Key "TEST-001" ### Response #### Success Response (200) - **Issue Data** (Object) - Returns the requested Jira issue object(s). ``` -------------------------------- ### Parameter Definitions Source: https://atlassianps.org/docs/JiraPS/commands/New-JiraGroup Configuration details for the cmdlet parameters. ```PowerShell Type: String[] Parameter Sets: (All) Aliases: Name Required: True Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```PowerShell Type: PSCredential Parameter Sets: (All) Aliases: Required: False Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```PowerShell Type: SwitchParameter Parameter Sets: (All) Aliases: wi Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```PowerShell Type: SwitchParameter Parameter Sets: (All) Aliases: cf Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -------------------------------- ### GET Get-JiraIssueLink Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssueLink Retrieves information about a specific issue link from Jira based on the provided ID. ```APIDOC ## GET Get-JiraIssueLink ### Description Returns information regarding a specified issueLink from Jira. ### Parameters #### Path Parameters - **Id** (Int32[]) - Required - The IssueLink ID to search. Accepts input from pipeline. #### Optional Parameters - **Credential** (PSCredential) - Optional - Credentials to use to connect to JIRA. If not specified, anonymous access is used. ### Request Example Get-JiraIssueLink 10000 ### Response - **Output** (JiraPS.IssueLink) - Returns the IssueLink object. ``` -------------------------------- ### Get Jira Priority Syntax (Search) Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraPriority This syntax for Get-JiraPriority is used to search for priorities by their ID. ```PowerShell Get-JiraPriority [-Id] [-Credential ] [] ``` -------------------------------- ### GET Get-JiraVersion Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraVersion Retrieves information about JIRA project versions based on provided identifiers or project context. ```APIDOC ## GET Get-JiraVersion ### Description Retrieves information about JIRA project versions. Supports searching by specific version ID, project key, or by passing existing project/version objects. ### Method GET ### Parameters #### Path/Query Parameters - **Id** (Int32[]) - Required (byId set) - The Version ID. - **InputVersion** (Object) - Required (byInputVersion set) - A Version object to search for. - **Project** (String[]) - Required (byProject set) - Project key of a project to search. - **InputProject** (Object) - Required (byInputProject set) - A Project Object to search. - **Name** (String[]) - Optional - Jira Version Name. - **Sort** (String) - Optional - Define the order (sequence, name, startDate, releaseDate). - **PageSize** (UInt32) - Optional - Maximum number of results to fetch per call. - **IncludeTotalCount** (SwitchParameter) - Optional - Causes an extra output of the total count. - **Skip** (UInt64) - Optional - Controls how many items will be skipped. - **First** (UInt64) - Optional - Indicates how many items to return. - **Credential** (PSCredential) - Optional - Credentials to use to connect to JIRA. ``` -------------------------------- ### Define JIRA Server URL Source: https://atlassianps.org/docs/JiraPS/commands/Set-JiraConfigServer Use this cmdlet to set the base URL for your JIRA instance. Ensure the URL includes the correct scheme and port if not standard. ```PowerShell Set-JiraConfigServer -Server 'https://jira.example.com:8080' ``` -------------------------------- ### Duplicate a Version to Another Project Source: https://atlassianps.org/docs/JiraPS/commands/New-JiraVersion Retrieve an existing version and pipe it to create a duplicate in a different project. ```PowerShell $version = Get-JiraVersion -Name "1.0.0.0" -Project "RD" $version = $version.Project.Key "TEST" $version | New-JiraVersion ``` -------------------------------- ### Configure Jira Server Connection Source: https://atlassianps.org/docs/JiraPS Set the Jira server address for the module. Use Get-JiraConfigServer to inspect the current configuration. ```powershell # Tell the module what is the server's address Set-JiraConfigServer -Server "https://jira.server.com" ``` -------------------------------- ### Get-JiraServerInformation Syntax Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraServerInformation Displays the command syntax for retrieving JIRA server information. ```PowerShell Get-JiraServerInformation [[-Credential] ] [] ``` -------------------------------- ### Add-JiraIssueWorklog Syntax Source: https://atlassianps.org/docs/JiraPS/commands/Add-JiraIssueWorklog The basic syntax for the Add-JiraIssueWorklog cmdlet. ```PowerShell Add-JiraIssueWorklog [-Comment] [-Issue] [-TimeSpent] [-DateStarted] [[-VisibleRole] ] [[-Credential] ] [-WhatIf] [-Confirm] [] ``` -------------------------------- ### File Handling Parameters Source: https://atlassianps.org/docs/JiraPS/commands/Invoke-JiraMethod Parameters for handling file uploads and output. ```APIDOC ## -InFile ### Description Path to a file that will be uploaded with a multipart/form-data request. This parameter does not validate the input. ### Parameter Details - **Type**: String - **Required**: False - **Accept pipeline input**: False ## -OutFile ### Description Path to the file where the response should be stored. This parameter does not validate the input. ### Parameter Details - **Type**: String - **Required**: False - **Accept pipeline input**: False ``` -------------------------------- ### Set-JiraVersion Syntax Source: https://atlassianps.org/docs/JiraPS/commands/Set-JiraVersion The full parameter syntax for the Set-JiraVersion cmdlet. ```PowerShell Set-JiraVersion [-Version] [[-Name] ] [[-Description] ] [[-Archived] ] [[-Released] ] [[-ReleaseDate] ] [[-StartDate] ] [[-Project] ] [[-Credential] ] [-WhatIf] [-Confirm] [] ``` -------------------------------- ### Bulk Update Favorite Status Source: https://atlassianps.org/docs/JiraPS/commands/Set-JiraFilter Example of removing favorite status from multiple filters based on name criteria. ```PowerShell Get-JiraFilter -Favorite | Where name -notlike "My*" | Set-JiraFilter -Favorite $false ``` -------------------------------- ### Update Filter Properties via Hashtable Source: https://atlassianps.org/docs/JiraPS/commands/Set-JiraFilter Example of updating multiple filter properties using a splatted hashtable. ```PowerShell $filterData = @{ InputObject = Get-JiraFilter "12345" Description = "A new description" JQL = "project = TV AND type = Bug" Favorite = $true } Set-JiraFilter @filterData ``` -------------------------------- ### Create Jira Issue using Splatting Source: https://atlassianps.org/docs/JiraPS/commands/New-JiraIssue Illustrates creating a JIRA issue using splatting for parameters, which can improve readability for complex commands. Custom fields are also supported. ```PowerShell $parameters = @{ Project = "TEST" IssueType = "Bug" Priority = 1 Summary = 'Test issue from PowerShell' Description = 'This is a test issue created from the JiraPS module in PowerShell.' Fields = @{ "Custom Field Name 1" = @{"foo" = "bar"} customfield_10001 = @('baz') } } New-JiraIssue @parameters ``` -------------------------------- ### Create Multiple Jira Issues from CSV Source: https://atlassianps.org/docs/JiraPS/commands/New-JiraIssue Prepares multiple JIRA issues by defining them in a CSV file and then piping the imported data to the New-JiraIssue cmdlet for bulk creation. ```PowerShell "project,summary,assignee,IssueType,Priority,Description" > "./data.csv" "CS,Some Title 1,admin,Minor,1,Some Description 1" >> "./data.csv" "CS,Some Title 2,admin,Minor,1,Some Description 2" >> "./data.csv" import-csv "./data.csv" | New-JiraIssue ``` -------------------------------- ### GET /issueLinkType Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssueLinkType Retrieves available issue link types from the Jira server, with an optional filter for a specific link type. ```APIDOC ## GET /issueLinkType ### Description Retrieves available issue link types from a JIRA server. It can also return specific information about a single issue link type. ### Method GET ### Parameters #### Query Parameters - **LinkType** (Object) - Optional - The Issue Type name or ID to search. - **Credential** (PSCredential) - Optional - Credentials to use to connect to JIRA. ### Request Example Get-JiraIssueLinkType -LinkType 1 ### Response #### Success Response (200) - **Output** (JiraPS.IssueLinkType) - Returns information about the requested issue link type or a list of all available types. ``` -------------------------------- ### Get All Jira Priorities Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraPriority Retrieves all available priorities from the JIRA server. This function can be used with anonymous access or by providing credentials. ```PowerShell Get-JiraPriority ``` -------------------------------- ### Create a JIRA Session Source: https://atlassianps.org/docs/JiraPS/commands/New-JiraSession Establishes a persistent session using provided credentials, allowing subsequent commands to execute without re-authentication. ```PowerShell New-JiraSession -Credential (Get-Credential jiraUsername) Get-JiraIssue TEST-01 ``` -------------------------------- ### Add-JiraIssueLink Cmdlet Syntax Source: https://atlassianps.org/docs/JiraPS/commands/Add-JiraIssueLink Defines the syntax for the Add-JiraIssueLink cmdlet, including required and optional parameters. ```powershell Add-JiraIssueLink [-Issue] [-IssueLink] [[-Comment] ] [[-Credential] ] [-WhatIf] [-Confirm] [] ``` -------------------------------- ### Get Jira Issues by Filter Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssue Retrieves all issues that match the criteria defined in a saved Jira filter. The filter is identified by its ID. ```powershell Get-JiraFilter -Id 12345 | Get-JiraIssue ``` -------------------------------- ### Get-JiraProject Parameter Metadata Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraProject Configuration details for the -Project and -Credential parameters. ```PowerShell Type: String[] Parameter Sets: _Search Aliases: Required: True Position: 1 Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` ```PowerShell Type: PSCredential Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -------------------------------- ### Move-JiraVersion Syntax Definitions Source: https://atlassianps.org/docs/JiraPS/commands/Move-JiraVersion Syntax definitions for the Move-JiraVersion cmdlet using either the After or Position parameter sets. ```PowerShell Move-JiraVersion [-Version] [-After] [[-Credential] ] [-WhatIf] [-Confirm] [] ``` ```PowerShell Move-JiraVersion [-Version] [-Position] [[-Credential] ] [-WhatIf] [-Confirm] [] ``` -------------------------------- ### Get All Attachments for a Jira Issue Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraIssueAttachment Use this to retrieve all attachments associated with a specific JIRA issue. Provide the issue key directly. ```PowerShell Get-JiraIssueAttachment -Issue TEST-001 ``` -------------------------------- ### Create a Jira filter using splatting Source: https://atlassianps.org/docs/JiraPS/commands/New-JiraFilter Uses a hash table to define filter parameters and splatting to pass them to the cmdlet. ```PowerShell $splatNewFilter = @{ Name = "My Bugs" Description = "collections of bugs assigned to me" JQL = "type = Bug and assignee = currentuser()" Favorite = $true } New-JiraFilter @splatNewFilter ``` -------------------------------- ### Get-JiraConfigServer Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraConfigServer Retrieves the configured JIRA server URL. ```APIDOC ## Get-JiraConfigServer ### Description Obtains the configured URL for the JIRA server that JiraPS should manipulate. ### Method PowerShell Cmdlet ### Parameters #### Path Parameters - **ConfigFile** (String) - Optional - The path to the configuration file. ### Request Example Get-JiraConfigServer ### Response #### Success Response (200) - **URL** (String) - The configured JIRA server URL. ``` -------------------------------- ### Create a Persistent Jira Session Source: https://atlassianps.org/docs/JiraPS/about/authentication Establish a session that persists for subsequent commands by using New-JiraSession. ```PowerShell $cred = Get-Credential 'powershell' New-JiraSession -Credential $cred ``` -------------------------------- ### Get Jira Component by ID Source: https://atlassianps.org/docs/JiraPS/commands/Get-JiraComponent Use this to retrieve a specific Jira component by its unique ID. Ensure the component ID is an integer. ```powershell Get-JiraComponent -ComponentId 10000 ``` ```powershell Get-JiraComponent 20000 -Credential $cred ``` -------------------------------- ### Add Comment Using Pipeline from Get-JiraIssue Source: https://atlassianps.org/docs/JiraPS/commands/Add-JiraIssueComment Illustrates how to pipe the output of Get-JiraIssue directly to Add-JiraIssueComment, allowing comments to be added to issues retrieved dynamically. ```powershell Get-JiraIssue "TEST-002" | Add-JiraIssueComment "Test comment from PowerShell" ```