Forums

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

Jira API Migration to /rest/api/3/search/jql

Devon Manelski
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!
September 15, 2025

I just completed my PM tool using the Jira API and the API I was using was decommissioned.  I am trying to convert my /rest/api/2/search?jql=filter= call to a  /rest/api/3/search/jql but I am getting a fail on the payload.  

Payload
{"jql": "project = "W_Health","startAt": 0,"maxResults": 100,"fields": ["summary","status","assignee","priority","created"]}

Response
{"errorMessages":["There was an error parsing JSON. Check that your request body is valid."]}

Any ideas on what is wrong with the payload?

For Additional Information
Set oHttp = CreateObject("WinHttp.WinHttpRequest.5.1")
oHttp.Open "POST", sURL, False
oHttp.SetRequestHeader "Authorization", sAuthHeader
oHttp.SetRequestHeader "Content-Type", "application/json"
oHttp.Send sPayload


sResponse = oHttp.ResponseText

3 answers

2 votes
Sunny Ape
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2025

In addition to what @Bill Sheboy has correctly said, if you get JSON errors, use an online JSON linting / validation tool first to see if your JSON is actually valid.

Alternatively, use an API test tool like Postman that immediately highlights where and when your JSON is invalid.

Devon Manelski
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!
September 16, 2025

thanks, can you recommend an online JSON linting / validation tool to try?

 

Sunny Ape
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2025

Yes.

  1. In your web browser, go to Google.com
  2. In the search field, type "Online JSON validation tools"
  3. Push the enter key on your keyboard

You will be presented with a list of recommended online JSON validation tools to try.

Devon Manelski
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!
September 16, 2025

hehe

2 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2025

Hi @Devon Manelski -- Welcome to the Atlassian Community!

For the payload you show, there is an extra quotation mark in the JQL before the project name.

 

Kind regards,
Bill

0 votes
Devon Manelski
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!
September 16, 2025

So I almost have it working, but when I try startAt and MaxResults the payload fails.  Any ideas?  (The JSON is valid)

Payload
{"jql":"project = \"Health\"","startAt":0,"maxResults":100}

Response
{"errorMessages":["Invalid request payload. Refer to the REST API documentation and try again."]}

Sunny Ape
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2025

Any ideas?

Yes.

I think it would be a good idea to actually read the documentation for both of the new Search for issues using JQL enhanced search endpoints, Devon. Then you will see that the new endpoints do not use the startAt parameter (This is because they do pagination differently to the endpoints they have replaced).

Maybe where the error message says "Refer to the REST API documentation" that's meant to be a suggestion, eh?

Suggest an answer

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

Atlassian Community Events