Activity APIs provide access to notifications, subscriptions, and timelines.

List public events

get /events

We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.

per_page

int

The number of results per page (max 100).

Default
30

page

int

Page number of the results to fetch.

Default
1

Response

ExamplesSchema

Response

[
  {
    "id": "22249084947",
    "type": "WatchEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://api.github.com/repos/octocat/Hello-World"
    },
    "payload": {
      "action": "started"
    },
    "public": true,
    "created_at": "2022-06-09T12:47:28Z"
  },
  {
    "id": "22249084964",
    "type": "PushEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://api.github.com/repos/octocat/Hello-World"
    },
    "payload": {
      "push_id": 10115855396,
      "size": 1,
      "distinct_size": 1,
      "ref": "refs/heads/master",
      "head": "7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300",
      "before": "883efe034920928c47fe18598c01249d1a9fdabd",
      "commits": [
        {
          "sha": "7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300",
          "author": {
            "email": "octocat@github.com",
            "name": "Monalisa Octocat"
          },
          "message": "commit",
          "distinct": true,
          "url": "https://api.github.com/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300"
        }
      ]
    },
    "public": true,
    "created_at": "2022-06-07T07:50:26Z"
  }
]

Get feeds

get /feeds

GitHub Enterprise Server provides several timeline resources in Atom format. The Feeds API lists all the feeds available to the authenticated user:

  • Timeline: The GitHub Enterprise Server global public timeline
  • User: The public timeline for any user, using URI template
  • Current user public: The public timeline for the authenticated user
  • Current user: The private timeline for the authenticated user
  • Current user actor: The private timeline for activity created by the authenticated user
  • Current user organizations: The private timeline for the organizations the authenticated user is a member of.
  • Security advisories: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub Enterprise Server.

Note: Private feeds are only returned when authenticating via Basic Auth since current feed URIs use the older, non revocable auth tokens.

Response

ExamplesSchema

Response

{
  "timeline_url": "https://github.com/timeline",
  "user_url": "https://github.com/{user}",
  "current_user_public_url": "https://github.com/octocat",
  "current_user_url": "https://github.com/octocat.private?token=abc123",
  "current_user_actor_url": "https://github.com/octocat.private.actor?token=abc123",
  "current_user_organization_url": "",
  "current_user_organization_urls": [
    "https://github.com/organizations/github/octocat.private.atom?token=abc123"
  ],
  "security_advisories_url": "https://github.com/security-advisories",
  "_links": {
    "timeline": {
      "href": "https://github.com/timeline",
      "type": "application/atom+xml"
    },
    "user": {
      "href": "https://github.com/{user}",
      "type": "application/atom+xml"
    },
    "current_user_public": {
      "href": "https://github.com/octocat",
      "type": "application/atom+xml"
    },
    "current_user": {
      "href": "https://github.com/octocat.private?token=abc123",
      "type": "application/atom+xml"
    },
    "current_user_actor": {
      "href": "https://github.com/octocat.private.actor?token=abc123",
      "type": "application/atom+xml"
    },
    "current_user_organization": {
      "href": "",
      "type": ""
    },
    "current_user_organizations": [
      {
        "href": "https://github.com/organizations/github/octocat.private.atom?token=abc123",
        "type": "application/atom+xml"
      }
    ]
  }
}

List public events for a network of repositories

get /networks/{owner}/{repo}/events

per_page

int

The number of results per page (max 100).

Default
30

page

int

Page number of the results to fetch.

Default
1

Response

ExamplesSchema

Response

[
  {
    "id": "22249084964",
    "type": "PushEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://api.github.com/repos/octocat/Hello-World"
    },
    "payload": {
      "push_id": 10115855396,
      "size": 1,
      "distinct_size": 1,
      "ref": "refs/heads/master",
      "head": "7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300",
      "before": "883efe034920928c47fe18598c01249d1a9fdabd",
      "commits": [
        {
          "sha": "7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300",
          "author": {
            "email": "octocat@github.com",
            "name": "Monalisa Octocat"
          },
          "message": "commit",
          "distinct": true,
          "url": "https://api.github.com/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300"
        }
      ]
    },
    "public": true,
    "created_at": "2022-06-09T12:47:28Z"
  },
  {
    "id": "22237752260",
    "type": "WatchEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://api.github.com/users/rrubenich",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://api.github.com/repos/octocat/Hello-World"
    },
    "payload": {
      "action": "started"
    },
    "public": true,
    "created_at": "2022-06-08T23:29:25Z"
  }
]