ReferenceHTTP APIGit Hub work

Read whose name the session's commits carry

GET
/v1/sessions/{id}/github/attribution

How the session started (trigger: web, Slack, a personal key, an agent key or the operator) and what its commits carry. co_author: the person who started it linked a GitHub account, and commits end with Co-authored-by naming them. unlinked: a person started it but has no GitHub account linked. app_only: nobody started it (an agent key or the operator); commits carry only the App and the Agent-Session trailer. Read at the time asked: linking or unlinking later changes the answer, not commits already made.

Scope: sessions:read (API key or cookie session).

Authorization

headerAuthorizationBearer <token>

For servers and scripts: an API key sent as an HTTP bearer token, Bearer <key>. It holds exactly the scopes it was issued with; a key issued before scopes existed holds none. It never needs the CSRF header, and it cannot manage agents, members, teams or API keys. Issue one in the web console under Settings → API keys; each operation names the scope it needs.

Scope: sessions:read

Path Parameters

id*string

The session's id.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

The attribution.

application/json
  1. response
trigger*string
Value in"web""slack""personal_key""agent_key""operator_key"
attribution*string
Value in"co_author""unlinked""app_only"
login*|null
Example Request
curl -X GET 'https://example.com/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/github/attribution'
Example Response
{  "trigger": "web",  "attribution": "co_author",  "login": "octocat"}