Forums

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

How do I filter curl result to not include custom fields that are null?

luke laney June 12, 2019

Hello all, I have been searching for quite a while about how to properly filter out null fields and custom fields. 

At the moment I am trying to send a simple curl command to return the info on a specified issue, but when the JSON is returned the majority of the custom fields return as null. How would I alter my curl command so as to only return info that is not null?

here is the command I have been messing with:

curl --user username:password https://xxxxxx.com/rest/api/2/issue/xxx-1234

If I append some variation of "?fields=notnull" to the end, it does not work properly and only returns id, self, key, and expand. 

Some solutions I have found say to remove the specific custom field that is null, but in my case so many custom fields are null so the above approach is not viable.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events