events Resources


You can use events to track events that occur on public repositories or private repositories that you have access to. Currently, Bitbucket does not support displaying events from private repositories. This endpoint does not require authentication and is a read-only resource. An individual events resource contain the following fields:

フィールド 説明
count The total number of events associated with the account.
An events array specifying a list of individual event structures containing the following fields:
node If the event is a commit, this field contains the changset node. Otherwise, this field contains null.
説明 If the event is a commit, this field contains the commit from the raw commit.Otherwise, this field contains null.
repository Contains a repository structure if the event was on a specific repository. Otherwise, this field contains null.
created_on The time the event occurred. If the event was a commit, this is the time from the raw commit.
user Contains the user profile structure.
utc_created_on Universal time clock time of the event.
event The event type.

The following table lists the possible values of the event field. When listing events, you can filter for these values also:

Event ID 説明
pushed User pushed a changeset.
commit User committed to the repository.
fork User  forked the repository.
mq User created a patch queue for the repository. This is only valid with Mercurial repositories.
作成 User created a repository.
delete User deleted a repository.
report_issue A new issue was created on the issue tracker.
issue_update User updated an issue.
issue_comment User updated an issue comment.
wiki_updated User updated a wiki page.
wiki_created User added a wiki page.
file_uploaded User uploaded a file – for example an icon.
strip User stripped a repository.
report_issue User reported an issue.
start_follow_repo User started following a repository.
stop_follow_repo User stopped following a repository.
start_follow_issue User started following an issue.
stop_follow_issue User stopped following an issue.
start_follow_user User started following an issue.
stop_follow_user User stopped following a user.
pullrequest_created User created a pull request.
pullrequest_updated User updated a pull request.
pullrequest_fulfilled User accepted a pull request.
pullrequest_rejected User rejected a pull request.
pullrequest_superseded User marked a pull request as superseded.
pullrequest_comment_created User created a comment on a pull request.
pullrequest_comment_updated User updated a comment on a pull request.
pullrequest_comment_deleted User deleted a comment on a pull request.
cset_comment_updated User updated a change set comment.
cset_comment_deleted User deleted a change set comment.
cset_comment_created User created a change set comment.
pullrequest_like User approved a pull request.
pullrequest_unlike User removed approval from a pull request.
cset_like User approved a change set.
cset_unlike User removed approval from a change set.
team_access_gained_admin The user was granted administrative rights on a team account.
team_access_gained_collab A user was granted collaboration rights on a team account.
team_lost_access A user lost access to a team account.
team_access_changed_admin The user changed the administrative access on a team.
team_access_changed_collab The user changed the collaborator acces on a team.

GET a list of events

Gets a list of a repository's events associated with the specified repo_slug. By default, this call returns the top 25 events. You can specify the following parameters to this call:

パラメーター 必須かどうか 説明
accountname はい The team or individual account owning the repo.
repo_slug はい The repo identifier.
開始 いいえ An integer specifying the offset to start with. By default, this call starts with 0.
制限 いいえ An integer specifying the number of events to return. You can specify a value between 0 and 50. If you specify 0, the system returns the count but the events array is empty.
タイプ いいえ The event type to return. If you specify a type parameter, the count contains the total number of events of that type associated with the account.

For example, this https:// call returns:

    "count": 35,
    "events": [
            "node": "abdeaf1b2b4a",
            "description": "making some changes\n",
            "repository": {
                "scm": "git",
                "has_wiki": true,
                "last_updated": "2012-07-25 21:48:36",
                "creator": null,
                "created_on": "2012-06-21 18:36:31",
                "owner": "buserbb",
                "logo": "",
                "email_mailinglist": "",
                "is_mq": false,
                "size": 2857,
                "read_only": false,
                "fork_of": null,
                "mq_of": null,
                "followers_count": 1,
                "state": "available",
                "utc_created_on": "2012-06-21 16:36:31+00:00",
                "website": "",
                "description": "",
                "has_issues": true,
                "is_fork": false,
                "slug": "testpermchange",
                "is_private": false,
                "name": "testpermchange",
                "language": "",
                "utc_last_updated": "2012-07-25 19:48:36+00:00",
                "email_writers": true,
                "no_public_forks": false,
                "resource_uri": "/1.0/repositories/buserbb/testpermchange"
            "created_on": "2012-07-24 00:26:49",
            "user": null,
            "utc_created_on": "2012-07-23 22:26:49+00:00",
            "event": "commit"
最終更新日: 2015 年 12 月 21 日





Powered by Confluence and Scroll Viewport.