Hello,
I am trying to search the Jira Service Management API for all issues with the word "Email" in the summary. Following the documentation has not given me the result I am looking for.
The searchTerm parameter doesn't appear to be working as expected. It states "Filters customer requests where the request summary matches the searchTerm. Wildcards can be used in the searchTerm parameter." However, when I put "searchTerm=Email" in the api call, it returns 3 issues, none of which have email in the summary.
Please can someone help here.
Thanks
Hi @Toby Hunter
Set the term as searchTerm="Email"
Or use the cloud platform api to search issues
/rest/api/latest/search/jq?jql=project = <project ket of jsm project> and summary ~ "Email"
Hey Marc,
That doesn't work either. I don't know if I am doing the wrong thing but it just doesn't like it.
https://api.atlassian.com/ex/jira/{id}/rest/servicedeskapi/request?searchTerm="Email"
That's my call which returns no issues yet a simple search in JSM shows several issues.
It is worth pointing out that I had the cloud platform API search set up originally but ran in to an issue when I added scopes to the token. If I use a token with no scopes, it works fine. If I use a token with the correct scopes as listed on the documentation, it returns an authentication failed 200 message.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Toby Hunter
If you use a scoped token, these scopes are needed:
All options under the granular option are needed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Marc,
Those are the scopes the token has but it still fails every time.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Toby Hunter
When using which call, via the JSM API or Platform API.
What are the calls you are making?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Marc,
So here are the two search calls I have and their listed problems.
Platform API: Call correctly returns the issues but when a scoped token is used with the scopes listed on the documentation, the call returns a 200 but with an authentication_failed header.
https://{domain}.atlassian.net/rest/api/3/search/jql?jql=project = "{p}" AND summary ~ "\"Email\"" ORDER BY id ASC&fields=summary
JSM API: Call works with a scoped token or not but does not return the issues it should. Either returns no issues or issues without email in the summary.
https://api.atlassian.com/ex/jira/{project}/rest/servicedeskapi/request?searchTerm="Email"
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Toby Hunter
What is the result if you do this JQL in Jira itself.
Is the scoped token based on your account or a service account?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Marc,
The JQL works fine and returns the expected issues.
The scoped token has been tried from both my account and a service account to my knowledge, but I'll check that.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just checked and yes we have tried it with a service account.
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.