Bitbucket Documentation

Index

Skip to end of metadata
Go to start of metadata

The bitbucket 'events' REST resource provides information about user events and repository events.

Getting a List of Events for a User

GET /users/USERNAME/events/

Parameters:

  • USERNAME: The user's username.

In addition, you can add the following query string parameters:

  • start: The offset to start with. The default is '0'.
  • limit: The number of events returned. The default is 25.

Example with a query string parameter:

$ curl https://api.bitbucket.org/1.0/users/jespern/events/?limit=5

Getting a List of Events for a Repository

GET /repositories/USERNAME/REPO_SLUG/events/

Parameters:

  • USERNAME: The owner's username.
  • REPO_SLUG: The slug of the repository.

In addition, you can add the following query string parameters:

  • start: The offset to start with. The default is '0'.
  • limit: The number of events returned. The default is 25.
  • type: A filter for the event type to retrieve. e.g. issue_comment

Example with a query string parameter:

$ curl https://api.bitbucket.org/1.0/repositories/sarahmaddox/sarahmaddox/events/?limit=5
RELATED TOPICS

Using the bitbucket REST APIs

Labels
  • None
  1. Mar 30, 2011

    Can I get events from my private repos too? -- even authenticated I only seem to see them from public repos.

    Explicit private repo access as in the second case above 404s.

    1. Mar 30, 2011

      You should explicitly follow any repo you want to see events for. You might not be following those provate repos.

  2. Jul 06, 2011

    I seem to have the same problem: events from private repos don't seem to show on the events list even when I'm authenticated. Fetching them explicitly for a repo works, though. And yes, I do follow the repos in question.

    Not a big deal, just wanted to note it :)

  3. Aug 31, 2011

    Anonymous

    Events for a repository which involve reporting or updating an issue do not seem to carry enough information to identify the associated issue.

    Is there an alternative route to this information available?

  4. Oct 26, 2011

    Events also can take a parameter type, which should be the event type, e.g. issue_comment

    https://api.bitbucket.org/1.0/repositories/atlassian/jetbrains-bitbucket-connector/events?type=issue_comment

  5. Nov 11, 2011

    For an event of type: issue_comment, how can I tell what the issue number is?

    For example https://api.bitbucket.org/1.0/repositories/atlassian/jetbrains-bitbucket-connector/events?type=issue_comment&limit=1

    returns (see below), but where is the actual issue on which the comment was made?

    {

    }

    1. Nov 11, 2011

      As far as I can tell, you have to turn around and scrape the web page.

      1. Nov 11, 2011

        I have filed an enhancement issue for this. https://bitbucket.org/site/master/issue/3262/events-rest-api-issue_comment-include


        I wonder what the turn around is on new issues?

  6. Feb 07, 2012

    Anonymous

    Still no way to get user events so that whatever is shown in Dashboard can be replicated, anyone?