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
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.