Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Limits in Invoke-RestMethod Jira's API?

Michal Picheta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 21, 2024

Hi,

are there any limits for POST method in creating/getting results for sub-task? I am using Powershell 7.2.

I have read that in Powershell I cannot directly increase buffer size.

I am trying to use Invoke-RestMethod to create simple sub-task in Jira's task:

 

                $issue = @{
                    fields = @{
                        project = @{
                            key = $jiraProjectKey
                        }
                        parent = @{
                            key = $jiraParentIssueKey
                        }
                        summary = "test"
                        description = "test"
                        issuetype = @{
                            name = $jiraIssueType
                        }
                    }
                }
                $body = $issue | ConvertTo-Json -Depth 10
                # Make the API call using Invoke-RestMethod
                $response = Invoke-RestMethod -Uri $jiraUrl -Headers $headers -Method POST -Body $body
                $result = $response | ConvertTo-Json -Depth 10
                Write-Output "Incident Created: $($result)"
            }
As a reponce I am getting:
Stream size is more than 1 MB, upload canceled.

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events