Puntos de conexión de la API de REST para eventos
Usa la API REST para interactuar con eventos de GitHub.
Acerca de los eventos de GitHub
Los eventos de GitHub potencian los distintos flujos de actividad en el sitio.
Puedes usar la API REST para devolver tipos diferentes de eventos que se desencadenan como consecuencia de la actividad en GitHub. Para más información sobre los eventos específicos que puedes recibir, consulta Tipos de evento de GitHub. Los puntos de conexión para las incidencias del repositorio también están disponibles. Para más información, consulta Puntos de conexión de la API de REST para eventos de incidencias.
Los eventos se optimizan para el sondeo con el encabezado "ETag". Si no se han desencadenado eventos nuevos, verás la respuesta "304 Sin Modificar", y tu límite de tasa actual permanecerá intacto. También hay un encabezado de "X-Poll-Interval" que especifica la frecuencia (en segundos) en la que se te permite hacer sondeos. Este tiempo podría incrementarse durante los periodos de carga fuerte en el servidor. Por favor obedece al encabezado.
$ curl -I http(s)://HOSTNAME/api/v3/users/tater/events
> HTTP/2 200
> X-Poll-Interval: 60
> ETag: "a18c3bded88eb5dbb5c849a489412bf3"
# The quotes around the ETag value are important
$ curl -I http(s)://HOSTNAME/api/v3/users/tater/events \
$    -H 'If-None-Match: "a18c3bded88eb5dbb5c849a489412bf3"'
> HTTP/2 304
> X-Poll-Interval: 60
La escala de tiempo incluirá hasta 300 eventos. Solo se incluirán los eventos creados en los últimos 30 días. Los eventos de más de 30 días de antigüedad no se incluirán (aún si la cantidad total de eventos en la línea de tiempo es de 300).
List public events
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.
Tokens de acceso específicos para "List public events"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado no requiere ningún permiso.
Parámetros para "List public events"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
| pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
Códigos de estado de respuesta HTTP para "List public events"
| status code | Descripción | 
|---|---|
| 200 | OK | 
| 304 | Not modified | 
| 403 | Forbidden | 
| 503 | Service unavailable | 
Ejemplos de código para "List public events"
Ejemplo de solicitud
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/eventsResponse
Status: 200[
  {
    "id": "22249084947",
    "type": "WatchEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://HOSTNAME/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://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://HOSTNAME/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://HOSTNAME/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300"
        }
      ]
    },
    "public": true,
    "created_at": "2022-06-07T07:50:26Z"
  }
]List public events for a network of repositories
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.
Tokens de acceso específicos para "List public events for a network of repositories"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado no requiere ningún permiso.
Parámetros para "List public events for a network of repositories"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| ownerstring RequeridoThe account owner of the repository. The name is not case sensitive. | 
| repostring RequeridoThe name of the repository without the  | 
| Nombre, Tipo, Descripción | 
|---|
| per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
| pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
Códigos de estado de respuesta HTTP para "List public events for a network of repositories"
| status code | Descripción | 
|---|---|
| 200 | OK | 
| 301 | Moved permanently | 
| 304 | Not modified | 
| 403 | Forbidden | 
| 404 | Resource not found | 
Ejemplos de código para "List public events for a network of repositories"
Ejemplo de solicitud
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/networks/OWNER/REPO/eventsResponse
Status: 200[
  {
    "id": "22249084964",
    "type": "PushEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://HOSTNAME/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://HOSTNAME/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://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://HOSTNAME/repos/octocat/Hello-World"
    },
    "payload": {
      "action": "started"
    },
    "public": true,
    "created_at": "2022-06-08T23:29:25Z"
  }
]List public organization events
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.
Tokens de acceso específicos para "List public organization events"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado no requiere ningún permiso.
Parámetros para "List public organization events"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| orgstring RequeridoThe organization name. The name is not case sensitive. | 
| Nombre, Tipo, Descripción | 
|---|
| per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
| pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
Códigos de estado de respuesta HTTP para "List public organization events"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "List public organization events"
Ejemplo de solicitud
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/orgs/ORG/eventsResponse
Status: 200[
  {
    "id": "22237752260",
    "type": "WatchEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octo-org/octo-repo",
      "url": "https://HOSTNAME/repos/octo-org/octo-repo"
    },
    "payload": {
      "action": "started"
    },
    "public": true,
    "created_at": "2022-06-08T23:29:25Z",
    "org": {
      "id": 9919,
      "login": "octo-org",
      "gravatar_id": "",
      "url": "https://HOSTNAME/orgs/octo-org",
      "avatar_url": "https://avatars.githubusercontent.com/u/9919?"
    }
  },
  {
    "id": "22249084964",
    "type": "PushEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octo-org/octo-repo",
      "url": "https://HOSTNAME/repos/octo-org/octo-repo"
    },
    "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://HOSTNAME/repos/octo-org/octo-repo/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300"
        }
      ]
    },
    "public": true,
    "created_at": "2022-06-09T12:47:28Z",
    "org": {
      "id": 9919,
      "login": "octo-org",
      "gravatar_id": "",
      "url": "https://HOSTNAME/orgs/octo-org",
      "avatar_url": "https://avatars.githubusercontent.com/u/9919?"
    }
  }
]List repository events
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.
Tokens de acceso específicos para "List repository events"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Metadata" repository permissions (read)
Este punto de conexión se puede usar sin autenticación o los permisos mencionados anteriormente si solo se solicitan recursos públicos.
Parámetros para "List repository events"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| ownerstring RequeridoThe account owner of the repository. The name is not case sensitive. | 
| repostring RequeridoThe name of the repository without the  | 
| Nombre, Tipo, Descripción | 
|---|
| per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
| pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
Códigos de estado de respuesta HTTP para "List repository events"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "List repository events"
Ejemplo de solicitud
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/eventsResponse
Status: 200[
  {
    "id": "22249084964",
    "type": "PushEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://HOSTNAME/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://HOSTNAME/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://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://HOSTNAME/repos/octocat/Hello-World"
    },
    "payload": {
      "action": "started"
    },
    "public": true,
    "created_at": "2022-06-08T23:29:25Z"
  }
]List events for the authenticated user
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.
Tokens de acceso específicos para "List events for the authenticated user"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado no requiere ningún permiso.
Parámetros para "List events for the authenticated user"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| usernamestring RequeridoThe handle for the GitHub user account. | 
| Nombre, Tipo, Descripción | 
|---|
| per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
| pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
Códigos de estado de respuesta HTTP para "List events for the authenticated user"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "List events for the authenticated user"
Ejemplo de solicitud
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/users/USERNAME/eventsResponse
Status: 200[
  {
    "id": "22249084947",
    "type": "WatchEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://HOSTNAME/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://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://HOSTNAME/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://HOSTNAME/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300"
        }
      ]
    },
    "public": false,
    "created_at": "2022-06-07T07:50:26Z"
  }
]List organization events for the authenticated user
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.
Tokens de acceso específicos para "List organization events for the authenticated user"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Events" organization permissions (read)
Parámetros para "List organization events for the authenticated user"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| usernamestring RequeridoThe handle for the GitHub user account. | 
| orgstring RequeridoThe organization name. The name is not case sensitive. | 
| Nombre, Tipo, Descripción | 
|---|
| per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
| pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
Códigos de estado de respuesta HTTP para "List organization events for the authenticated user"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "List organization events for the authenticated user"
Ejemplo de solicitud
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/users/USERNAME/events/orgs/ORGResponse
Status: 200[
  {
    "id": "22249084964",
    "type": "PushEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octo-org/octo-repo",
      "url": "https://HOSTNAME/repos/octo-org/octo-repo"
    },
    "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://HOSTNAME/repos/octo-org/octo-repo/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300"
        }
      ]
    },
    "public": false,
    "created_at": "2022-06-09T12:47:28Z",
    "org": {
      "id": 9919,
      "login": "octo-org",
      "gravatar_id": "",
      "url": "https://HOSTNAME/orgs/octo-org",
      "avatar_url": "https://avatars.githubusercontent.com/u/9919?"
    }
  },
  {
    "id": "22196946742",
    "type": "CreateEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octo-org/octo-repo",
      "url": "https://HOSTNAME/repos/octo-org/octo-repo"
    },
    "payload": {
      "ref": null,
      "ref_type": "repository",
      "master_branch": "master",
      "description": null,
      "pusher_type": "user"
    },
    "public": false,
    "created_at": "2022-06-07T07:50:26Z",
    "org": {
      "id": 9919,
      "login": "octo-org",
      "gravatar_id": "",
      "url": "https://HOSTNAME/orgs/octo-org",
      "avatar_url": "https://avatars.githubusercontent.com/u/9919?"
    }
  }
]List public events for a 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.
Tokens de acceso específicos para "List public events for a user"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado no requiere ningún permiso.
Parámetros para "List public events for a user"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| usernamestring RequeridoThe handle for the GitHub user account. | 
| Nombre, Tipo, Descripción | 
|---|
| per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
| pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
Códigos de estado de respuesta HTTP para "List public events for a user"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "List public events for a user"
Ejemplo de solicitud
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/users/USERNAME/events/publicResponse
Status: 200[
  {
    "id": "22249084947",
    "type": "WatchEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://HOSTNAME/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://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://HOSTNAME/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://HOSTNAME/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300"
        }
      ]
    },
    "public": true,
    "created_at": "2022-06-08T23:29:25Z"
  }
]List events received by the authenticated user
These are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events.
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.
Tokens de acceso específicos para "List events received by the authenticated user"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado no requiere ningún permiso.
Parámetros para "List events received by the authenticated user"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| usernamestring RequeridoThe handle for the GitHub user account. | 
| Nombre, Tipo, Descripción | 
|---|
| per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
| pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
Códigos de estado de respuesta HTTP para "List events received by the authenticated user"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "List events received by the authenticated user"
Ejemplo de solicitud
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/users/USERNAME/received_eventsResponse
Status: 200[
  {
    "id": "22249084964",
    "type": "PushEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://HOSTNAME/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://HOSTNAME/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300"
        }
      ]
    },
    "public": true,
    "created_at": "2022-06-09T12:47:28Z"
  },
  {
    "id": "22196946742",
    "type": "CreateEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://HOSTNAME/repos/octocat/Hello-World"
    },
    "payload": {
      "ref": null,
      "ref_type": "repository",
      "master_branch": "master",
      "description": null,
      "pusher_type": "user"
    },
    "public": false,
    "created_at": "2022-06-07T07:50:26Z"
  }
]List public events received by a 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.
Tokens de acceso específicos para "List public events received by a user"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado no requiere ningún permiso.
Parámetros para "List public events received by a user"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| usernamestring RequeridoThe handle for the GitHub user account. | 
| Nombre, Tipo, Descripción | 
|---|
| per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
| pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
Códigos de estado de respuesta HTTP para "List public events received by a user"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "List public events received by a user"
Ejemplo de solicitud
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/users/USERNAME/received_events/publicResponse
Status: 200[
  {
    "id": "22249084964",
    "type": "PushEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://HOSTNAME/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://HOSTNAME/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300"
        }
      ]
    },
    "public": true,
    "created_at": "2022-06-09T12:47:28Z"
  },
  {
    "id": "22196946742",
    "type": "CreateEvent",
    "actor": {
      "id": 583231,
      "login": "octocat",
      "display_login": "octocat",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4"
    },
    "repo": {
      "id": 1296269,
      "name": "octocat/Hello-World",
      "url": "https://HOSTNAME/repos/octocat/Hello-World"
    },
    "payload": {
      "ref": null,
      "ref_type": "repository",
      "master_branch": "master",
      "description": null,
      "pusher_type": "user"
    },
    "public": false,
    "created_at": "2022-06-07T07:50:26Z"
  }
]