events
Creates, updates, deletes, gets or lists an events resource.
Overview
| Name | events |
| Type | Resource |
| Id | github.activity.events |
Fields
The following fields are returned by SELECT queries:
- list_repo_events
- list_org_events_for_authenticated_user
- list_events_for_authenticated_user
Response
| Name | Datatype | Description |
|---|---|---|
id | string | |
actor | object | Actor (title: Actor) |
created_at | string (date-time) | |
org | object | Actor (title: Actor) |
payload | object | (opaque JSON object) (title: CreateEvent) |
public | boolean | |
repo | object | |
type | string |
Response
| Name | Datatype | Description |
|---|---|---|
id | string | |
actor | object | Actor (title: Actor) |
created_at | string (date-time) | |
org | object | Actor (title: Actor) |
payload | object | (opaque JSON object) (title: CreateEvent) |
public | boolean | |
repo | object | |
type | string |
Response
| Name | Datatype | Description |
|---|---|---|
id | string | |
actor | object | Actor (title: Actor) |
created_at | string (date-time) | |
org | object | Actor (title: Actor) |
payload | object | (opaque JSON object) (title: CreateEvent) |
public | boolean | |
repo | object | |
type | string |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_repo_events | select | owner, repo | per_page, page | > [!NOTE] > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. |
list_org_events_for_authenticated_user | select | username, org | per_page, page | This is the user's organization dashboard. You must be authenticated as the user to view this. > [!NOTE] > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. |
list_events_for_authenticated_user | select | username | per_page, page | If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. Optional: use the fine-grained token with following permission set to view private events: "Events" user permissions (read). > [!NOTE] > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
org | string | The organization name. The name is not case sensitive. |
owner | string | The account owner of the repository. The name is not case sensitive. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
username | string | The handle for the GitHub user account. |
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- list_repo_events
- list_org_events_for_authenticated_user
- list_events_for_authenticated_user
> [!NOTE]
> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
SELECT
id,
actor,
created_at,
org,
payload,
public,
repo,
type
FROM github.activity.events
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
This is the user's organization dashboard. You must be authenticated as the user to view this.
> [!NOTE]
> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
SELECT
id,
actor,
created_at,
org,
payload,
public,
repo,
type
FROM github.activity.events
WHERE username = '{{ username }}' -- required
AND org = '{{ org }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. Optional: use the fine-grained token with following permission set to view private events: "Events" user permissions (read).
> [!NOTE]
> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
SELECT
id,
actor,
created_at,
org,
payload,
public,
repo,
type
FROM github.activity.events
WHERE username = '{{ username }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;