Forums

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

dot notation for search API

Julian Governale
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 16, 2022

Currently using the search API to pull data from jira cloud but im trying to make it a bit cleaner for the consumer of the data.

For example, i just want to return the project name so i used the below format to try to get the nested object

https://{{host}}/rest/api/3/search?jql=Project=Project&maxResults=100&fields=project.name


but this will not return anything.  Ive also tried fields.project.name but i get the same results..  If i specify just project, i get the information i need but with all the other fields nested under project.

Ive search the documentation but was only able to find dot notation for expands so im not sure its doable with fields but wanted to check on the community to see if anyone has any suggestions or insights? 

1 answer

0 votes
Pramodh M
Community Champion
February 16, 2022

@Julian Governale 

Here's how I would search for issues via API

Search with JQL in UI and make sure the search is working and returning issues

For field search, you would need to search with

fieldName = value

You will get the URL something like jql=**** when you search for issues

Copy that and use it in API Issue search

This will work 

Julian Governale
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 17, 2022

Thanks for the response. I do have the search working as intended, but my goal was to use the fields option in the API to only get specific field values, like project.name and reporter.displayName but when i use dot notation, it doesnt pull the fields in general.  I suspect its not supported at this time and i may need to post process the response.

Example below that doesn't work.  - project and reporter are not returned due to dot notation


 https://site.atlassian.net/rest/api/3/search?jql=Project=Project&maxResults=100&fields=summary,status,reporter.displayName,project.name,updated,statuscategorychangedate

Like # people like this
Andrea Picaro
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!
December 11, 2023

Hi @Julian Governale did you eventually found a solution for that?

Julian Governale
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 12, 2023

Hi @Andrea Picaro unfortunately no never found a solution in Postman.  We ended up writing Python scripts to return all the fields and then parse them in the script. 

Suggest an answer

Log in or Sign up to answer