v50

latestOpenAPI 3.0.3MITraw.githubusercontent.com2024-03-2585861610.1 MB
dependabot

List Dependabot alerts for a repository

OAuth app tokens and personal access tokens (classic) need the security_events scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the public_repo scope instead.

get/repos/{owner}/{repo}/dependabot/alerts

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

Query parameters

statestring

A comma-separated list of states. If specified, only alerts with these states will be returned.

Can be: auto_dismissed, dismissed, fixed, open

severitystring

A comma-separated list of severities. If specified, only alerts with these severities will be returned.

Can be: low, medium, high, critical

ecosystemstring

A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned.

Can be: composer, go, maven, npm, nuget, pip, pub, rubygems, rust

packagestring

A comma-separated list of package names. If specified, only alerts for these packages will be returned.

manifeststring

A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned.

scope'development' | 'runtime'

The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned.

sort'created' | 'updated'

The property by which to sort the results. created means when the alert was created. updated means when the alert's state last changed.

direction'asc' | 'desc'

The direction to sort the results by.

pageinteger

Deprecated. Page number of the results to fetch. Use cursor-based pagination with before or after instead.

per_pageinteger

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

beforestring

A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API."

afterstring

A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API."

firstinteger

Deprecated. The number of results per page (max 100), starting from the first matching result. This parameter must not be used in combination with last. Instead, use per_page in combination with after to fetch the first page of results.

lastinteger

Deprecated. The number of results per page (max 100), starting from the last matching result. This parameter must not be used in combination with first. Instead, use per_page in combination with before to fetch the last page of results.

Response

Response

numberinteger required

The security alert number.

state'auto_dismissed' | 'dismissed' | 'fixed' | 'open' required

The state of the Dependabot alert.

urlstring uri required

The REST API URL of the alert resource.

html_urlstring uri required

The GitHub URL of the alert resource.

created_atstring date-time required

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

updated_atstring date-time required

The time that the alert was last updated in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

dismissed_atstring date-time nullable required

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

dismissed_reason'fix_started' | 'inaccurate' | 'no_bandwidth' | 'not_used' | 'tolerable_risk' nullable required

The reason that the alert was dismissed.

dismissed_commentstring nullable required

An optional comment associated with the alert's dismissal.

fixed_atstring date-time nullable required

The time that the alert was no longer detected and was considered fixed in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

auto_dismissed_atstring date-time nullable

The time that the alert was auto-dismissed in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

Example response

[
  {
    "dismissed_by": {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/octocat",
      "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}",
      "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
      "organizations_url": "https://api.github.com/users/octocat/orgs",
      "repos_url": "https://api.github.com/users/octocat/repos",
      "events_url": "https://api.github.com/users/octocat/events{/privacy}",
      "received_events_url": "https://api.github.com/users/octocat/received_events",
      "type": "User",
      "starred_at": "\"2020-07-09T00:17:55Z\""
    }
  }
]