Just learning to use the Jira REST API and I have most things figured out, but even though there are a ton of resources about the JQL functions, operators, and more, there's no examples that I have found on how to write said query inside of the JSON you submit to run the query.
I'm using CFML, but even if you're not familiar with it, most programmers will recognize what I'm trying to do. and, no, I am not sure I have the right URL or "expand" or "issues" stuff right. This is my first attempt at this area.
Hi Randy,
I do not have any experience with CFML.
Here is the REST API documentation: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-post
You will see an example JSON on that page.
Try using v3 instead of v2 if you are on Jira Cloud: /rest/api/3/search.
Altough this will not change much for this specific API endpoint.
You don't need to wrap the JQL around curly braces. Just put double quotes around them. Because you already have double quotes in the JQL you will need to escape those with a backslash.
Try this:
"jql": "created > 2023/07/31 AND labels=\"BugTracker\" AND summary ~ \"Randy Is Testing\""
I'm not sure where the "issues" part comes from in your example?
The "issues" part comes from me misunderstanding what was needed. :-)
This also works (below) for both api 2 and 3. Thank you for the link to that reference!
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.
Thank you for your response!
I stumbled upon the answer just as yours was coming in - this worked for me:
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.