Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 0 additions & 187 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45082,125 +45082,6 @@ components:
meta:
$ref: "#/components/schemas/MonthlyCostAttributionMeta"
type: object
MuteDataType:
default: mute
description: Mute resource type.
enum:
- mute
example: mute
type: string
x-enum-varnames:
- MUTE
MuteFindingsMuteAttributes:
description: Mute properties to apply to the findings.
properties:
description:
description: Additional information about the reason why the findings are muted or unmuted. This field has a limit of 280 characters.
example: "To be resolved later."
type: string
expire_at:
description: >-
The expiration date of the mute action (Unix ms). It must be set to a value greater than the current timestamp. If this field is not provided, the findings remain muted indefinitely.
example: 1778721573794
format: int64
type: integer
is_muted:
description: Whether the findings should be muted or unmuted.
example: true
type: boolean
reason:
$ref: "#/components/schemas/MuteFindingsReason"
description: The reason why the findings are muted or unmuted.
required:
- is_muted
- reason
type: object
MuteFindingsReason:
description: The reason why the findings are muted or unmuted.
enum:
- PENDING_FIX
- FALSE_POSITIVE
- OTHER
- NO_FIX
- DUPLICATE
- RISK_ACCEPTED
- NO_PENDING_FIX
- HUMAN_ERROR
- NO_LONGER_ACCEPTED_RISK
example: PENDING_FIX
type: string
x-enum-varnames:
- PENDING_FIX
- FALSE_POSITIVE
- OTHER
- NO_FIX
- DUPLICATE
- RISK_ACCEPTED
- NO_PENDING_FIX
- HUMAN_ERROR
- NO_LONGER_ACCEPTED_RISK
MuteFindingsRequest:
description: Request to mute or unmute security findings.
properties:
data:
$ref: "#/components/schemas/MuteFindingsRequestData"
required:
- data
type: object
MuteFindingsRequestData:
description: Data of the mute request.
properties:
attributes:
$ref: "#/components/schemas/MuteFindingsRequestDataAttributes"
id:
description: Unique identifier of the mute request.
example: "93bfeb70-af47-424d-908a-948d3f08e37f"
type: string
relationships:
$ref: "#/components/schemas/MuteFindingsRequestDataRelationships"
type:
$ref: "#/components/schemas/MuteDataType"
required:
- attributes
- relationships
- type
type: object
MuteFindingsRequestDataAttributes:
description: Attributes of the mute request.
properties:
mute:
$ref: "#/components/schemas/MuteFindingsMuteAttributes"
required:
- mute
type: object
MuteFindingsRequestDataRelationships:
description: Relationships of the mute request.
properties:
findings:
$ref: "#/components/schemas/Findings"
description: Security findings to mute or unmute.
required:
- findings
type: object
MuteFindingsResponse:
description: Response for the mute or unmute request.
properties:
data:
$ref: "#/components/schemas/MuteFindingsResponseData"
type: object
MuteFindingsResponseData:
description: Data of the mute response.
properties:
id:
description: Unique identifier of the mute request.
example: "93bfeb70-af47-424d-908a-948d3f08e37f"
type: string
type:
$ref: "#/components/schemas/MuteDataType"
required:
- type
- id
type: object
NotebookCreateData:
description: Notebook creation data
properties:
Expand Down Expand Up @@ -119356,74 +119237,6 @@ paths:
permissions:
- security_monitoring_findings_write
- appsec_vm_write
/api/v2/security/findings/mute:
patch:
description: >-
Mute or unmute security findings.

You can mute or unmute up to 100 security findings per request. The request body must include `is_muted` and `reason` attributes. The allowed reasons depend on whether the finding is being muted or unmuted:
- To mute a finding: `PENDING_FIX`, `FALSE_POSITIVE`, `OTHER`, `NO_FIX`, `DUPLICATE`, `RISK_ACCEPTED`.
- To unmute a finding: `NO_PENDING_FIX`, `HUMAN_ERROR`, `NO_LONGER_ACCEPTED_RISK`, `OTHER`.
operationId: MuteSecurityFindings
requestBody:
content:
application/json:
examples:
default:
value:
data:
attributes:
mute:
description: "To be resolved later."
expire_at: 1778721573794
is_muted: true
reason: "RISK_ACCEPTED"
relationships:
findings:
data:
- id: "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw=="
type: "findings"
type: "mute"
schema:
$ref: "#/components/schemas/MuteFindingsRequest"
required: true
responses:
"202":
content:
application/json:
schema:
$ref: "#/components/schemas/MuteFindingsResponse"
description: Accepted
"400":
$ref: "#/components/responses/BadRequestResponse"
"401":
$ref: "#/components/responses/UnauthorizedResponse"
"404":
$ref: "#/components/responses/NotFoundResponse"
"422":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: "Unprocessable Entity"
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: Mute or unmute security findings
tags:
- "Security Monitoring"
x-codegen-request-body-name: body
"x-permission":
operator: OR
permissions:
- security_monitoring_findings_write
- appsec_vm_write
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/security/findings/search:
post:
description: |-
Expand Down
1 change: 0 additions & 1 deletion api/datadog/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,6 @@ func NewConfiguration() *Configuration {
"v2.ListVulnerabilities": false,
"v2.ListVulnerableAssets": false,
"v2.MuteFindings": false,
"v2.MuteSecurityFindings": false,
"v2.RunHistoricalJob": false,
"v2.SearchSecurityMonitoringHistsignals": false,
"v2.GetCodeCoverageBranchSummary": false,
Expand Down
101 changes: 0 additions & 101 deletions api/datadogV2/api_security_monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -8561,107 +8561,6 @@ func (a *SecurityMonitoringApi) MuteFindings(ctx _context.Context, body BulkMute
return localVarReturnValue, localVarHTTPResponse, nil
}

// MuteSecurityFindings Mute or unmute security findings.
// Mute or unmute security findings.
// You can mute or unmute up to 100 security findings per request. The request body must include `is_muted` and `reason` attributes. The allowed reasons depend on whether the finding is being muted or unmuted:
// - To mute a finding: `PENDING_FIX`, `FALSE_POSITIVE`, `OTHER`, `NO_FIX`, `DUPLICATE`, `RISK_ACCEPTED`.
// - To unmute a finding: `NO_PENDING_FIX`, `HUMAN_ERROR`, `NO_LONGER_ACCEPTED_RISK`, `OTHER`.
func (a *SecurityMonitoringApi) MuteSecurityFindings(ctx _context.Context, body MuteFindingsRequest) (MuteFindingsResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
localVarPostBody interface{}
localVarReturnValue MuteFindingsResponse
)

operationId := "v2.MuteSecurityFindings"
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
if !isOperationEnabled {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
}
if isOperationEnabled && a.Client.Cfg.Debug {
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
}

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.SecurityMonitoringApi.MuteSecurityFindings")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
}

localVarPath := localBasePath + "/api/v2/security/findings/mute"

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarHeaderParams["Content-Type"] = "application/json"
localVarHeaderParams["Accept"] = "application/json"

// body params
localVarPostBody = &body
if a.Client.Cfg.DelegatedTokenConfig != nil {
err = datadog.UseDelegatedTokenAuth(ctx, &localVarHeaderParams, a.Client.Cfg.DelegatedTokenConfig)
if err != nil {
return localVarReturnValue, nil, err
}
} else {
datadog.SetAuthKeys(
ctx,
&localVarHeaderParams,
[2]string{"apiKeyAuth", "DD-API-KEY"},
[2]string{"appKeyAuth", "DD-APPLICATION-KEY"},
)
}
req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil)
if err != nil {
return localVarReturnValue, nil, err
}

localVarHTTPResponse, err := a.Client.CallAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}

localVarBody, err := datadog.ReadBody(localVarHTTPResponse)
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}

if localVarHTTPResponse.StatusCode >= 300 {
newErr := datadog.GenericOpenAPIError{
ErrorBody: localVarBody,
ErrorMessage: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 {
var v APIErrorResponse
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.ErrorModel = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
if localVarHTTPResponse.StatusCode == 422 {
var v JSONAPIErrorResponse
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.ErrorModel = v
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := datadog.GenericOpenAPIError{
ErrorBody: localVarBody,
ErrorMessage: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

return localVarReturnValue, localVarHTTPResponse, nil
}

// PatchSignalNotificationRule Patch a signal-based notification rule.
// Partially update the notification rule. All fields are optional; if a field is not provided, it is not updated.
func (a *SecurityMonitoringApi) PatchSignalNotificationRule(ctx _context.Context, id string, body PatchNotificationRuleParameters) (NotificationRuleResponse, *_nethttp.Response, error) {
Expand Down
1 change: 0 additions & 1 deletion api/datadogV2/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,6 @@
// - [SecurityMonitoringApi.ListVulnerabilities]
// - [SecurityMonitoringApi.ListVulnerableAssets]
// - [SecurityMonitoringApi.MuteFindings]
// - [SecurityMonitoringApi.MuteSecurityFindings]
// - [SecurityMonitoringApi.PatchSignalNotificationRule]
// - [SecurityMonitoringApi.PatchVulnerabilityNotificationRule]
// - [SecurityMonitoringApi.RunHistoricalJob]
Expand Down
64 changes: 0 additions & 64 deletions api/datadogV2/model_mute_data_type.go

This file was deleted.

Loading
Loading