Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can I retrieve request-channel-type via Jira API?

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

1 answer

0 votes
Andy Heinzer Atlassian Team Apr 30, 2021

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:

  1. Jira Service Management (previously known as Jira Service Desk) is not installed here.
  2. JSM is installed, but has no issues that have been created via the customer portal yet
  3. JSM is installed and has customer portal created issues, but the user making the REST API call is not authenticated or lacks access to view those issues.

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

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you