Dismiss a security finding
POST
/repos/{owner}/{repo}/security/findings/{index}/dismiss
const url = 'https://gitea.example.com/api/v1/repos/example/example/security/findings/1/dismiss';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"dismiss_reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://gitea.example.com/api/v1/repos/example/example/security/findings/1/dismiss \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "dismiss_reason": "example" }'Gitea Enterprise only. This endpoint is not part of the community edition.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”owner
required
string
Name of the owner
repo
required
string
Name of the repository
index
required
integer
Index of the finding
Request Body
Section titled “Request Body”Reason for dismissing the finding
Media typeapplication/json
DismissFindingOptions is the body of the dismiss endpoint.
object
dismiss_reason
Reason for dismissing the finding, one of the enum values the dismiss picker offers, or free text kept from an instance that stored one before the reasons became an enum
string
Examplegenerated
{ "dismiss_reason": "example"}Responses
Section titled “Responses”APIEmpty is an empty response
APIError is error format response
Headers
Section titled “Headers”message
string
url
string
APINotFound is a not found empty response