GitHub v3 REST API

List public 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.

get
http://HOSTNAME/api/v3/events

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Response

application/json

Response

Event

idstringrequired
typestring | nullrequired
actorobjectrequired

Actor

Show Child Parameters
repoobjectrequired
Show Child Parameters
orgobject

Actor

Show Child Parameters
payloadobjectrequired
Show Child Parameters
publicbooleanrequired
created_atstring | null(date-time)required
get/events
 
application/json

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.

get
http://HOSTNAME/api/v3/feeds

Response

200 application/json

Response

Feed

Feed

timeline_urlstringrequired

Example:https://github.com/timeline

user_urlstringrequired

Example:https://github.com/{user}

current_user_public_urlstring

Example:https://github.com/octocat

current_user_urlstring

Example:https://github.com/octocat.private?token=abc123

current_user_actor_urlstring

Example:https://github.com/octocat.private.actor?token=abc123

current_user_organization_urlstring

Example:https://github.com/octocat-org

current_user_organization_urlsarray[string](uri)

Example:["https://github.com/organizations/github/octocat.private.atom?token=abc123"]

_linksobjectrequired
Show Child Parameters
get/feeds
 
200 application/json

List public events for a network of repositories

get
http://HOSTNAME/api/v3/networks/{owner}/{repo}/events

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

ownerstringrequired
repostringrequired

Response

application/json

Response

Event

idstringrequired
typestring | nullrequired
actorobjectrequired

Actor

Show Child Parameters
repoobjectrequired
Show Child Parameters
orgobject

Actor

Show Child Parameters
payloadobjectrequired
Show Child Parameters
publicbooleanrequired
created_atstring | null(date-time)required
get/networks/{owner}/{repo}/events
 
application/json

List notifications for the authenticated user

List all notifications for the current user, sorted by most recently updated.

get
http://HOSTNAME/api/v3/notifications

Query Parameters

allboolean

If true, show notifications marked as read.

Default:false

participatingboolean

If true, only shows notifications in which the user is directly participating or mentioned.

Default:false

sincestring(date-time)

Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

beforestring(date-time)

Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Response

application/json

Response

Thread

idstringrequired
repositoryobjectrequired

Minimal Repository

Show Child Parameters
subjectobjectrequired
Show Child Parameters
reasonstringrequired
unreadbooleanrequired
updated_atstringrequired
last_read_atstring | nullrequired
urlstringrequired
subscription_urlstringrequired

Example:https://api.github.com/notifications/threads/2/subscription

get/notifications
 
application/json

Mark notifications as read

Marks all notifications as “read” removes it from the default view on GitHub Enterprise Server. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub Enterprise Server will run an asynchronous process to mark notifications as “read.” To check whether any “unread” notifications remain, you can use the List notifications for the authenticated user endpoint and pass the query parameter all=false.

put
http://HOSTNAME/api/v3/notifications

Body

application/json
last_read_atstring(date-time)

Describes the last point that notifications were checked.

readboolean

Whether the notification has been read.

Response

application/json

Response

messagestring
put/notifications

Body

{}
 
application/json