List code scanning alerts for an organization
GET
/orgs/{org}/code-scanning/alerts
code-scanning
repo
scope or security_events
scope.public_repo
scope.security_events
read permission to use this endpoint.Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.github.com/orgs//code-scanning/alerts'
Response Response Example
200 - Example 1
[
{
"created_at": "2019-08-24T14:15:22Z",
"dismissed_at": "2019-08-24T14:15:22Z",
"dismissed_by": {
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"email": "string",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"gravatar_id": "41d064eb2195891e12d0413f63227ea7",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"name": "string",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"site_admin": true,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
},
"dismissed_comment": "string",
"dismissed_reason": null,
"fixed_at": "2019-08-24T14:15:22Z",
"html_url": "http://example.com",
"instances_url": "http://example.com",
"most_recent_instance": {
"analysis_key": "string",
"category": "string",
"classifications": [
"source"
],
"commit_sha": "string",
"environment": "string",
"html_url": "string",
"location": {
"end_column": 0,
"end_line": 0,
"path": "string",
"start_column": 0,
"start_line": 0
},
"message": {
"text": "string"
},
"ref": "string",
"state": "open"
},
"number": 0,
"repository": {
"archive_url": "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "https://api.github.com/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "https://api.github.com/repos/octocat/Hello-World/branches{/branch}",
"collaborators_url": "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "https://api.github.com/repos/octocat/Hello-World/comments{/number}",
"commits_url": "https://api.github.com/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "https://api.github.com/repos/octocat/Hello-World/contributors",
"deployments_url": "https://api.github.com/repos/octocat/Hello-World/deployments",
"description": "This your first repo!",
"downloads_url": "https://api.github.com/repos/octocat/Hello-World/downloads",
"events_url": "https://api.github.com/repos/octocat/Hello-World/events",
"fork": true,
"forks_url": "https://api.github.com/repos/octocat/Hello-World/forks",
"full_name": "octocat/Hello-World",
"git_commits_url": "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
"hooks_url": "https://api.github.com/repos/octocat/Hello-World/hooks",
"html_url": "https://github.com/octocat/Hello-World",
"id": 1296269,
"issue_comment_url": "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "https://api.github.com/repos/octocat/Hello-World/issues{/number}",
"keys_url": "https://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "https://api.github.com/repos/octocat/Hello-World/labels{/name}",
"languages_url": "https://api.github.com/repos/octocat/Hello-World/languages",
"merges_url": "https://api.github.com/repos/octocat/Hello-World/merges",
"milestones_url": "https://api.github.com/repos/octocat/Hello-World/milestones{/number}",
"name": "Hello-World",
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"notifications_url": "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
"owner": {
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"email": "string",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"gravatar_id": "41d064eb2195891e12d0413f63227ea7",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"name": "string",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"site_admin": true,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
},
"private": true,
"pulls_url": "https://api.github.com/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "https://api.github.com/repos/octocat/Hello-World/releases{/id}",
"stargazers_url": "https://api.github.com/repos/octocat/Hello-World/stargazers",
"statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "https://api.github.com/repos/octocat/Hello-World/subscribers",
"subscription_url": "https://api.github.com/repos/octocat/Hello-World/subscription",
"tags_url": "https://api.github.com/repos/octocat/Hello-World/tags",
"teams_url": "https://api.github.com/repos/octocat/Hello-World/teams",
"trees_url": "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
"url": "https://api.github.com/repos/octocat/Hello-World"
},
"rule": {
"description": "string",
"full_description": "string",
"help": "string",
"help_uri": "string",
"id": "string",
"name": "string",
"security_severity_level": "low",
"severity": "none",
"tags": [
"string"
]
},
"state": "open",
"tool": {
"guid": "string",
"name": "string",
"version": "string"
},
"updated_at": "2019-08-24T14:15:22Z",
"url": "http://example.com"
}
]
Request
Path Params
org
stringÂ
required
Query Params
tool_name
stringÂ
optional
tool_name
or tool_guid
, but not both.tool_guid
stringÂ
optional
tool_guid
or tool_name
, but not both.before
stringÂ
optional
after
stringÂ
optional
page
integerÂ
optional
per_page
integerÂ
optional
direction
stringÂ
optional
state
stringÂ
optional
sort
stringÂ
optional
severity
stringÂ
optional
Responses
Modified at 2023-08-15 02:59:24