The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

REST API to search for a keyword in commit comment/message.

Kushagra Behere
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!
October 7, 2022

I need a REST API which can be used to search for a keyword (say 'mark') in commit's message.

For e.g. something like this:

/api/commits?q='mark'

 

Is there any REST API available for this? If no REST API is available, then any other solution?

 

I have also seen that in REST API which lists commit's comments, there is filtering and sorting parameter 'q'. Can this 'q' be used to solve the above problem?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 11, 2022

Hi @Kushagra Behere and welcome to the community!

I'm afraid that the commits API endpoint does not support filtering with the 'q' parameter at the moment.

As a workaround, you could retrieve all commits via the API and then use another tool that filters JSON data, like jq, in order to filter the results.

We have a feature request for adding filtering and sorting to the commits endpoint:

I would suggest voting for it and leaving a comment there to further express your interest.

Kind regards,
Theodora

DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events