Forums

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

How can I query a bitbucket rest API using the date created?

Govind Haridas
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!
August 6, 2019

I want to get the data regarding all the pull requests made after a particular date. I have the api for that. I'm able to fetch data by giving state and limit. But I need to fetch only the pull requests made on or after a particular date.

This is the way i tried to get for the date '2019-08-03' : 

https://XXX-XXX.com/stash/rest/api/1.0/projects/XXXX/repos/XXX/pull-requests?state=open&limit=100&created_on>=2019-08-03T14:00:00-07:00

 

1 answer

1 vote
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 6, 2019

Hi @Govind Haridas

Sorry I'm confused because you labeled your question with bitbucket-cloud whereas the API you referred to looks more like Bitbucket Server's.

I'm not sure if filtering by creation date is possible with Bitbucket Server. It can be done with Bitbucket Cloud though. Please clarify which product you're using.

Cheers,
Daniil

Govind Haridas
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!
August 6, 2019

Hi @Daniil Penkin ,

I'm using BitBucket server only. I need to filter the pull requests made on or after a particular date from the rest api.

Like Daniil Penkin likes this
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 7, 2019

Hello @Govind Haridas,

I double checked with Bitbucket Server team: unfortunately, pull requests REST API doesn't support filtering PRs by creation date.

The only date-related parameter is order, but it works with last update date, not creation date.

Cheers,
Daniil

felis paul February 8, 2022

Hi Daniil,

 

Can you tell me the parameter name through which I can get pull requests created after a certain date in Bitbucket Cloud? Requesting you to please reply to this query on urgent basis as we are stuck in our work.

 

Regards,

Felis Paul

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 8, 2022
Like felis paul likes this
felis paul February 8, 2022

Thanks a lot Daniil for your quick response. Really appreciate it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events