GitHub v3 REST API

List public events for a network of repositories

get
{protocol}://{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
{protocol}://{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
{protocol}://{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

Get a thread

get
{protocol}://{hostname}/api/v3/notifications/threads/{thread_id}

Path Parameters

thread_idintegerrequired

thread_id parameter

Response

application/json

Response

Thread

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/threads/{thread_id}
 
application/json

Mark a thread as read

patch
{protocol}://{hostname}/api/v3/notifications/threads/{thread_id}

Path Parameters

thread_idintegerrequired

thread_id parameter

Response

Reset Content

patch/notifications/threads/{thread_id}