Hello,
how can I use searchTerm filter in Jira Servicedesk?
This is the link of Jira API
https://docs.atlassian.com/jira-servicedesk/REST/3.6.2/#servicedeskapi/request-getMyCustomerRequests
Hi Jack,
The document you reference here is a Service Desk REST API guide. One way to make this kind of REST GET call, is to use a utility like curl. There are cited examples of how you can use this utility and pass it authentication, headers, etc, along with sometime a json payload in order to obtain the results of that request. More examples of doing this are in https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/
In this specific case, calling that REST endpoint has other parameters like searchTerm that get passed into the URL itself. So if you wanted to search your own requests for the term 'migrate' the URL you would call in your REST would look something like this
http://jira.example.com/rest/servicedeskapi/request?searchTerm=migrate
You would still need to handling authentication and the other headers, so if you were using curl do to this, your command might look more like this:
curl \ -D- \ -u fred:fred \ -X GET \ -H "Content-Type: application/json" \ http://jira.example.com/rest/servicedeskapi/request?searchTerm=migrate
Thanks for support!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do you perform for issueKey? For instance my issueKey='Host1234ID', how do you add that to the searchTerm query parameter ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The endpoint that the previous user mentioned was GET /rest/servicedeskapi/request however that specific endpoint doesn't let you search by issuekey. The searchTerm parameter in that endpoint specifically says it is only looking at the Summary field.
searchTerm
string Filters results to customer requests where the issue summary matches the
searchTerm
. You can use wildcards in thesearchTerm
.
So I don't expect that the searchTerm parameter here to be able to use issuekey when searching because the issuekey is not part of the request/issue summary.
If you already know what the Issuekey is, then you can instead try using the GET /rest/servicedeskapi/request/{issueIdOrKey} endpoint. But if you are specifically looking for a way to search for requests in the Jira Service Desk REST API by issue key, I don't think it's possible. Licensed Jira users might be able to use JQL search as described in GET /rest/api/3/search. JQL can let you make that kind of search. But unlicensed users that are only in Jira Service Desk's customer role won't be able to make a call like this. Their account simply lacks the privileges to make this kind of search.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Andy Heinzer I am referring to this https://support.atlassian.com/jira-core-cloud/docs/advanced-search-reference-jql-fields/. So you mean, to use try and use this functionality, a user must be a licenced jira user, not the customer one. Also I need to fetch servicedesk request by priority, do you know how to implement using the searchTerm ?
priority="High"
How do you filter the request using searchTerm ?
blah/rest/servicedeskapi/request?searchTerm=
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That link you are referring to is the JQL search reference. That is not the same as the 'searchTerm' parameter which is used by Jira Service Desk REST API.
Yes, in order to use JQL searching anywhere in Jira (REST API or web interface), users have to be licensed Jira users. It is not possible for users that are only in the customer role (unlicensed users) to use JQL searching at all.
The searchTerm parameter is only used by the Jira Service Desk REST API. However from reviewing that document, priority does not appear to be something it can returned there. The customer portal in Jira Service Desk does not show this value either. Since that priority information is on the issue side, not the request side, this is something that I believe is only going to be something you can retrieve using the Jira Core REST API (licensed Jira users only).
You could call the endpoint GET /rest/api/2/search and pass the JQL of something like
project=XYZ and Priority=High
in order to return issues in that project with that priority.
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.