Today we’re announcing two new API features: Event Timeline access, and OAuth Authorizations. We’ve also tweaked the way mime types work in preparation for the finalization of API v3.


Event Timelines

You can now access the events that power the various activity streams on GitHub. You may notice some timelines that don’t actually exist on the site too. Some highlights include:

# get events for a repository
$ curl

# get events for a public network
$ curl

# get events that a user has received
# this shows events from public repos that a user is watching.
$ curl

Check out the full Event timeline docs, as well as description of the payloads for every Event type. These payloads are what custom webhooks will receive, too.

OAuth Authorizations

One complaint we hear about API v3 is the lack of token support. People want to be able to setup scripts without the hassle of authorizing the app through the OAuth workflow. For this, we’ve added the OAuth Authorizations API. If you want to create a quick token with the repo scope:

$ curl -i -u "user:pass" 
  -d '{"scopes":["repo"]}'

You can also add/remove scopes from authorizations, or delete them.

The OAuth docs have the specifics.

Mime Types

All resource mime types were simplified. Instead of sending a type like this to get HTML rendered comments:


You can now just use this:


We also plan to make a few breaking changes in the next month before we move the API out of its beta state. If you’re using API v3, start specifying the ‘beta’ version so that you can have a graceful transition period at your own pace.

# for all API requests
Accept: application/vnd.github.v3+json

# when you want HTML comments:
Accept: application/vnd.github.v3.html+json


$ curl -H "Accept: application/vnd.github.beta.html+json"

Read more about the new mime types.

@mtodd wishes everyone a Happy Halloween!

![@mtodd wishes everyone a Happy Halloween](