APIReferenceGoals
Counts Open Source Contributions only. Weekly goals run Sunday to Saturday, monthly goals by calendar month (UTC, like GitHub's graph); one-off goals need `endsOn`.
Counts Open Source Contributions only. Weekly goals run Sunday to Saturday, monthly goals by calendar month (UTC, like GitHub's graph); one-off goals need endsOn.
apiKeyAuthorizationBearer <token>Personal API key (osg_…)
application/jsonmetric*string"contributions""active_days""commits""issues_opened""prs_opened""prs_merged""reviews""discussions"target*integer1 <= value <= 10000recurrence*string"none""weekly""monthly"startsOn?stringDefaults to the current period
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$dateendsOn?stringOne-off goals only (required for them)
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$daterepoScope?string"all""all""subscribed""repo"repo?stringowner/name, with repoScope: repo
isPublic?booleanfalseDefault Response
application/jsonid*stringmetric*string"contributions""active_days""commits""issues_opened""prs_opened""prs_merged""reviews""discussions"target*integer-9007199254740991 <= value <= 9007199254740991recurrence*string"none""weekly""monthly"startsOn*stringendsOn*string|nullrepoScope*string"all""subscribed""repo"repo*|nullisPublic*booleanstatus*string"active""archived"createdAt*stringdate-timeperiods*array<>Oldest first; the last is the current period
curl -X POST 'https://example.com/api/v1/me/goals' \ -H 'Content-Type: application/json' \ -d '{ "metric": "contributions", "target": 1, "recurrence": "none"}'{ "id": "string", "metric": "contributions", "target": -9007199254740991, "recurrence": "none", "startsOn": "string", "endsOn": "string", "repoScope": "all", "repo": { "fullName": "string", "url": "string" }, "isPublic": true, "status": "active", "createdAt": "2019-08-24T14:15:22Z", "periods": [ { "start": "string", "end": "string", "progress": -9007199254740991, "achievedAt": "2019-08-24T14:15:22Z" } ]}