GitHub v3 REST API

code-scanning-analysis

object
refstringrequired

The full Git reference, formatted as refs/heads/<branch name>,
refs/pull/<number>/merge, or refs/pull/<number>/head.

commit_shastringrequired

The SHA of the commit to which the analysis you are uploading relates.

Match pattern:^[0-9a-fA-F]+$

>= 40 characters<= 40 characters

analysis_keystringrequired

Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name.

environmentstringrequired

Identifies the variable values associated with the environment in which this analysis was performed.

categorystring

Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code.

errorstringrequired

Example:error reading field xyz

created_atstring(date-time)requiredread-only

The time that the analysis was created in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

results_countintegerrequired

The total number of results in the analysis.

rules_countintegerrequired

The total number of rules used in the analysis.

idintegerrequired

Unique identifier for this analysis.

urlstring(uri)requiredread-only

The REST API URL of the analysis resource.

sarif_idstringrequired

An identifier for the upload.

Example:6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53

toolobjectrequired
Show Child Parameters
deletablebooleanrequired
warningstringrequired

Warning generated when processing the analysis

Example:123 results were ignored

tool_namestring
Example

code-scanning-analysis-sarif-file

string

A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using gzip and then translate the contents of the file into a Base64 encoding string. For more information, see “SARIF support for code scanning.”

code-scanning-sarifs-receipt

object
idstring

An identifier for the upload.

Example:6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53

urlstring(uri)read-only

The REST API URL for checking the status of the upload.

Example

Collaborator

object

Collaborator

loginstringrequired

Example:octocat

idintegerrequired

Example:1

emailstring
namestring
node_idstringrequired

Example:MDQ6VXNlcjE=

avatar_urlstring(uri)required

Example:https://github.com/images/error/octocat_happy.gif

gravatar_idstringrequired

Example:41d064eb2195891e12d0413f63227ea7

urlstring(uri)required

Example:https://api.github.com/users/octocat

html_urlstring(uri)required

Example:https://github.com/octocat

followers_urlstring(uri)required

Example:https://api.github.com/users/octocat/followers

following_urlstringrequired

Example:https://api.github.com/users/octocat/following{/other_user}

gists_urlstringrequired

Example:https://api.github.com/users/octocat/gists{/gist_id}

starred_urlstringrequired

Example:https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_urlstring(uri)required

Example:https://api.github.com/users/octocat/subscriptions

organizations_urlstring(uri)required

Example:https://api.github.com/users/octocat/orgs

repos_urlstring(uri)required

Example:https://api.github.com/users/octocat/repos

events_urlstringrequired

Example:https://api.github.com/users/octocat/events{/privacy}

received_events_urlstring(uri)required

Example:https://api.github.com/users/octocat/received_events

typestringrequired

Example:User

site_adminbooleanrequired
permissionsobject
Show Child Parameters
Example

Repository Invitation

object

Repository invitations let you manage who you collaborate with.

idintegerrequired

Unique identifier of the repository invitation.

Example:42

repositoryobjectrequired

Minimal Repository

Show Child Parameters
inviteeobjectrequired

Simple User

Show Child Parameters
inviterobjectrequired

Simple User

Show Child Parameters
permissionsstringrequired

The permission associated with the invitation.

Allowed values:readwriteadmintriagemaintain

Example:read

created_atstring(date-time)required

Example:2016-06-13T14:52:50-05:00

expiredboolean

Whether or not the invitation has expired

urlstringrequired

URL for the repository invitation

Example:https://api.github.com/user/repository-invitations/1

html_urlstringrequired

Example:https://github.com/octocat/Hello-World/invitations

node_idstringrequired
Example