Good Day all,
I have two curl commands I am using in my scripts. One references a static filter directly and the other inserts dynamic JQL during run time.
1. Accessing Static Filter
curl -s -X GET -H "Content-Type: application/json" http://jira.*.com:8080/rest/api/2/search?jql=filter=55102^&fields=id,key,issuetype,customfield_10613,customfield_10200,customfield_10030^&maxResults=500
2. Dynamic JQL search
curl -D- -u *:* -X POST -d "<LotsOfJQL>" -H "Content-Type: application/json" http://jira.*.com:8080/rest/api/2/search"
Both of these above commands work! And with the first command i am getting over 200 results so I know the maxResults=500 is working. However, when I try adding ^&maxResults=500 to the end of my 2nd script, I don't get any errors but the maxResults is still 50 and isn't changed.
How can I format my syntax properly with my Dynamic search so maxResults will be recognized?
I appreciate your time and responses. Thank you.
Hi @Matt Kimball ,
could it be, that you should add ?maxResults=500 instead of &maxResults=500? Because in the second case it is the first parameter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Matt Kimball Please look at this page to the section Searching for issues using POST, there is a nice example.
You should be able to see in response, whether the param maxResults was changed or not.
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 assistance Hana! I found the answer in there. Here is what I'm using now that works.
curl -D- -u *:* -X POST -d "{\"jql\": \"'Remedy CRQ ' = '1169017'\",\"maxResults\":500,\"fields\":[\"key\"]}" -H "Content-Type: application/json" http://jira.*.com:8080/rest/api/2/search?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried this command :
curl -o jira.out -u "user:token" -s -X GET -H "Content-Type: application/json" https://url/rest/api/2/search?jql=filter=<filter>
and it produces output, but in the far does not look like what I would have expected, which is similar to running the filter in my browser and export as CSV (selected fields).
Am I missing something?
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.