Hi,
am in process of trying to extend my use and use API. After much back and forward I find Jira Cloud tenant on version 1001.0.0‑SNAPSHOT: /rest/api/3/search removed but /search/jql returns 400.
Server Version:(anonymized)
"baseUrl": "https://me.atlassian.net",
"displayUrl": "https://me.atlassian.net",
"displayUrlServicedeskHelpCenter": "https://me.atlassian.net",
"displayUrlCSMHelpSeeker": "https://me.atlassian.net",
"displayUrlConfluence": "https://me.atlassian.net",
"version": "1001.0.0-SNAPSHOT",
"versionNumbers": [1001, 0, 0],
"deploymentType": "Cloud",
"buildNumber": 100290,
"buildDate": "2026-01-05T23:04:48.000+1300",
"serverTime": "2026-01-06T08:50:53.035+1300",
"scmInfo": "24daf3b4da6f45fef3376e2f3be2673a06f096c0",
"serverTitle": "Jira",
"defaultLocale": {
"locale": "en_US"
},
"serverTimeZone": "Etc/UTC"I reverted to VS Code REST Client for testing.
I have tested the connection so I believe the API Token is correct:
Connected to Jira successfully
{"self":"https://me.atlassian.net/rest/api/3/user?accountId=5e7d64ab7276650c2d63933b","accountId":"5e7d64ab7276650c2d63933b","accountType":"atlassian","emailAddress":"me@gmail.com","avatarUrls":{"48x48":"https://secure.gravatar.com/avatar/52b3de527ee336e37112266712f049ce?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FNC-3.png","24x24":"https://secure.gravatar.com/avatar/52b3de527ee336e37112266712f049ce?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FNC-3.png","16x16":"https://secure.gravatar.com/avatar/52b3de527ee336e37112266712f049ce?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FNC-3.png","32x32":"https://secure.gravatar.com/avatar/52b3de527ee336e37112266712f049ce?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FNC-3.png"},"displayName":"my name","active":true,"timeZone":"Pacific/Auckland","locale":"en_US","groups":{"size":9,"
items":[]},"applicationRoles":{"size":2,"items":[]},"expand":"groups,applicationRoles"}
my POST payload is :
Hello @nick cook
I recommend that you first search this forum on similar questions before asking them, as that specific error for that endpoint has been discussed many times before. Also, try using a public AI tool like Google Gemini or ChatGPT first, to try and find the answer.
"Invalid request payload. Refer to the REST API documentation and try again."
The error message gives you the answer. If you refer the documentation for the Search for Issues using JQL (POST) endpoint, you'll see a list of the request body parameters it supports as well as an example of a correctly formed request body. If you compare that with your request body, you will see you have made multiple mistakes in both the JSON body structure and the request parameters you have used.
There are no such request parameters called queries, query or startAt
I suggest that you start your learning journey with an API test tool like Postman, so that you can make basic requests and make sure they work first, then compare what works with what you put in your code.
Have fun!
Hi sunny, have spent 2 days interacting with AI which led to this post. The key point being that
"version": "1001.0.0-SNAPSHOT"
The conclusion made that I am on an 'in between' dev version (key word: SNAPSHOT)
as indicated, I have tested the API token using VS CODE REST extension, GET connection successful, POST fails. Always!
The configuration adjustments required are at a system level. As not a 'paid subscription' cannot raise a ticket.
Again, hence this post. And yes have read some of the historic posts, but no revelations.
from API docs-
startAt is the index of the first item returned in the pagequeries and query are the final versions for wrapping the body from MANY different formats (chatgpt told me). If you have a simple body json for api v3 for issues in a project then please shares clearly I'm desperate!
Thanks for taking time to respond.
cheers,
nick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have a simple body json for api v3 for issues in a project then please shares clearly
I have already provided that information for you... there is a complete, fully functional JSON formatted request body example provided in the endpoint's documentation:
from API docs -
startAtis the index of the first item returned in the page
I have no idea what 'API docs' you are reading, but they are not the ones I have provided you a link to. There absolutely, positively is no reference whatsoever to a parameter called startAt in that endpoint's documentation:
A parameter called startAt parameter was used for pagination with the two OLD JQL search endpoints that are now deprecated. The two new JQL search endpoints use a totally different pagination method and CANNOT use a startAt parameter... it is an INVALID parameter to use with those endpoints.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
have spent 2 days interacting with AI which led to this post.
Really? I just asked ChatGPT the following question:
"Using the Jira Cloud REST API and the 'Search for Issues using JQL advanced search (POST)' endpoint, please provide a working JSON request body to search for all the issues in a project called 'A7TD' with the results ordered by their creation date, in descending order"
and it instantly gave me the 100% perfectly correct answer:
JSON Request Body
{
"jql": "project = A7TD ORDER BY created DESC",
"maxResults": 100
}So, did you follow my advice and install Postman on your computer to do all you API request testing independently of VS Code? Once you have Postman installed, then you can then install the entire, fully tested Jira Cloud REST API Postman Collection by simply clicking that link in the top corner of the documentation page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunny,
I guess that is the beauty/risk with regenerative AI, same question, different answers. Admittedly, I probably got drawn way down a rabbit hole and lost sight of truth vs hallucinations over the days. So good to recentre (but not at expense of your valuable time, so thanks for your input to date. Feel free to throw your hands in the air, swear at screen, exclaim 'READ the f**%%%n documentation!'. I get it. In new contexts, reading ain't equal understanding. So don't let my problems become your problems and ruin your day).
I understand your preference is Postman, I am using:
Have also used the Thunder Client.
All should work equally.
To recap, (Using REST Client)
GET https://mydomain.atlassian.net/rest/api/3/myself
Authorization: Basic <encoded64 email & token>
Content-Type: application/json
Is successful and returns my atlassian account info. Conclusion API token is good.Moving onto the POST. I stripped out the gratuitous elements to the body string (to create the allusion of paying attention :-)).
POST https://mydomain.atlassian.net/rest/api/3/search/jql
Authorization: Basic <encoded64 email & token>
Content-Type: application/json
{
"jql": "project = A7TD ORDER BY created DESC"
"maxResults": 100
}
What I get is:
{
"errorMessages": [
"There was an error parsing JSON. Check that your request body is valid."
]
}
And then I paid attention to detail and added a bloody comma at end of jql line. Low and behold it returned data! I should be happy but just want to punch myself in the head.
Thanks for your time and answers. Taking me back to bare basics sorted it.
Cheers,
Nick
PS. was testing as writing, hence verbosity!
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.