git.security.set-code-scanning-alertDismiss a code scanning alert with a reason, or reopen it
Request syntax
PATCH /git/api/repositories/{repoId}/security/code-scanning-alerts/{alertId}
{
"state": "enum",
"reason": "string"
}Path parameters
repoIdRequiredstring
Constraints: uuid
alertIdRequiredstring
Constraints: uuid
Request body
stateRequiredenum
`dismissed` closes the alert, `open` reopens it
One of:
open,dismissedreasonOptionalstring
Why it is dismissed
Constraints: max 2000 chars
Response
200 with the alert in its new state, with dismissedReason.
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Fields of data
idAlwaysstring
The alertorgIdAlwaysstring
The organizationrepoIdAlwaysstring
The repositorytoolAlwaysstring
The tool that reported it, e.g. SemgrepfingerprintAlwaysstring
Identifies the same finding across uploadsstateAlwaysone of open, fixed, dismissed
fixed once an analysis of the default branch no longer reports itruleIdAlwaysstring
The tool's rule idruleDescriptionAlwaysstring, may be null
The rule's description; null when the tool gives noneseverityAlwaysone of critical, high, medium, low, note
The severitymessageAlwaysstring
What the tool says about this findingpathAlwaysstring
The file, from the repository rootstartLineAlwaysnumber, may be null
First line of the finding; null when not givenendLineAlwaysnumber, may be null
Last line of the finding; null when not givenhelpUriAlwaysstring, may be null
A link to the rule's documentation; null when nonefirstSeenCommitOidAlwaysstring
The commit it was first reported onlastSeenCommitOidAlwaysstring
The commit it was last reported onlastSeenRefAlwaysstring
The ref of the analysis that last saw it: the default branch or a pull request headdismissedReasonAlwaysstring, may be null
Why it was dismissed; null unless dismisseddismissedByIamUserIdAlwaysstring, may be null
Who dismissed it; null unless dismissedfixedAtAlwaysstring, may be null
When it was found fixed (ISO 8601); null until thencreatedAtAlwaysstring
When it was first reported (ISO 8601)updatedAtAlwaysstring
When the alert last changed (ISO 8601)
Checked against the handlers: every route test validates their answers against this schema.
Errors
- 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
- 401No credentials, or an access key that is unknown, revoked or expired.
- 403The caller's policies do not allow git:UpdateSecurityAlert on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
- 404The resource does not exist in your organization.
Examples
The required parameters only, with example values. Replace id and the other placeholders with your own.
dcloud git security set-code-scanning-alert repoId alertId --state opencurl -X PATCH "https://console.platform-development.deutschecloud.app/git/api/repositories/repoId/security/code-scanning-alerts/alertId" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"state":"open"}'Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_git_security_set-code-scanning-alert.