repo
scope. For public repositories,public_repo
scope.security_events
write permission to use this endpoint."deletable": true
ref
tool
category
Analysis specified is not deletable.
DELETE
operation provides you withnext_analysis_url
and confirm_delete_url
.next_analysis_url
URL if you want to avoid accidentally deleting the final analysisconfirm_delete_url
URL if you are content to remove all analyses for a tool.next_analysis_url
and confirm_delete_url
null
.confirm_delete_url
and, if found, use this in the next iteration.confirm_delete_url
value. Alternatively, you could use the next_analysis_url
value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.curl --location --request DELETE 'https://api.github.com/repos///code-scanning/analyses/'
{
"confirm_delete_url": "http://example.com",
"next_analysis_url": "http://example.com"
}
GET /repos/{owner}/{repo}/code-scanning/analyses
operation.true
, you'll get a 400 response with the message: Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.