Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Filter customer with JIRA Service Desk Cloud APi

Andre Dixon
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 31, 2018

I have been going through the documentation located in the link below. It mentions that I should be able to filter the results by specific field but nothing work.

https://developer.atlassian.com/cloud/jira/service-desk/rest/#api-servicedesk-serviceDeskId-customer-get

 

When I try to filter email address as an example, I still get the results showing all the customers. see an example a query below.

 

https://teamtalentnet.atlassian.net/rest/servicedeskapi/servicedesk/1/customer?emailAddress=test%40test.com

 

1 answer

0 votes
Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 3, 2018

Hi Andre,

 

I saw that your Liana, your colleague opened a ticket in our support regarding the same issue.

I added you as a participant of the ticket, so you will be able to see it now.

I will add the response here as well:

You should query using the query parameter on the endpoint. When using it, the API automatically searches on the fields displayName, name and email.

Here's a working example:

curl --request GET \
  --url 'https://instance.atlassian.net/rest/servicedeskapi/servicedesk/1/customer?query=username' \
  --user 'email@address.com:<api token>' \
  --header 'Accept: application/json' \
  --header 'X-ExperimentalApi: opt-in' \

Please, give a try and let us know how it goes.

 

Regards,

Angélica

Suggest an answer

Log in or Sign up to answer