Hello, I am using REST APIs to retrieve a series of Jira tickets.
I am using a URI structure like this
http://host:port/context/rest/api-name/api-version/resource-name
and I would like to filter my results by request-channel-type, as I do in the web interface through a jql query "request-channel-type=portal".
I have tried the following but it doesn't work (it seems that no filter is applied):
https://host:port/rest/api/2/search?jql=request-channel-type=portal
Does anyone have any suggestion?
Thanks,
Michele
ps. I have found how to get the channel type for a single ticket (https://community.atlassian.com/t5/Answers-Developer-Questions/How-can-I-retrieve-request-channel-type-via-Jira-API/qaq-p/546294), but this is not what I need
Hi Michele,
I see that you are trying to get back a list of issues from Jira Service Management using the REST API, but you are not getting back the expected results here.
I believe you are calling the correct REST endpoint here to get these issues returned. I tested this in my own system with the call of :
curl -u admin:password \
-H "Content-Type: application/json" \
"http://localhost:8160/rest/api/2/search?jql=request-channel-type=portal"
And in turn I got back the issues that match this query in a json format.
If you're not getting back any results when you make this query, then I could see a few different possibilities here that could explain why:
I'm included to believe the most likely cause here is that your REST call is not properly authenticated here. Jira does permit anonymous (unauthenticated) access to the search function, however depending on the permissions of your account will determine what issues Jira will return to you in a search. Plus this particular field is limited to Jira Service Management projects, so you would need to be using an authenticated user account that has access to view those issues.
What kind of authentication method are you using for making these REST calls? We have a few different methods depending on your use case:
I would check that aspect here first and see if that helps.
Let me know.
Andy
I am trying to filter the "request-channel-type = api" but even the issues that I create via api, have the mentioned field as jira.
Do you need to explicitly set the request-channel-type when creating an issue via api, or why I am not getting the correct results?
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.