Skip to main content

POST /cspm/vm/update

This endpoint updates the attributes for one or more checks.

Request

Format

{
  "status": "open",
  "status_remarks": "string",
  "expires_at": "2024-01-08",
  "severity": "informational",
  "severity_remarks": "string",
  "ids": [
    "string"
  ]
}

Parameters

Parameter

Type

Optional

Description

status

String

Yes*

Change the status of the selected checks.

Possible values: open, remediated, risk_accepted, false_positive, needs_review.

status_remarks

String

Yes

Add a remark related to the status change.

The maximum length of this field is 2000 characters.

Note

You can only include this parameter if the status parameter is included in the request.

expires_at

String

Yes

Set an expiration date for the new status. Once the expiration date has passed, the status of the checks will change to needs_review.

The parameter accepts yyyy-mm-dd date formats.

Note

This parameter can only be used if the the status parameter is included in the request and given the risk_accepted value.

severity

String

Yes*

Change the severity of the selected checks.

Possible values: informational, low, medium, high, critical.

severity_remarks

String

Yes

Add a remark related to the severity change.

The maximum length of this field is 2000 characters.

Note

You can only include this parameter if the severity parameter is included in the request.

ids

Array of Strings

No

The IDs of the checks you want to modify.

You can add up to 100 IDs per request.

The IDs need to be in RFC 4122 format and must correspond to a check from the Cloud Security database.

*One or both of the status and the severity parameters must be included in the request.

Examples

Update the status of Check records 001ca9fe-7f34-4a43-9d9c-7d543badd802, 00dff8ea-3bd9-447b-ba57-2da616357238, and 01e1706e-969f-42f9-9d27-4a5971251972 to remediated:

{
    "status": "remediated",
    "status_remarks": "Updated status via POST endpoint",
    "ids": [
        "001ca9fe-7f34-4a43-9d9c-7d543badd802",
        "00dff8ea-3bd9-447b-ba57-2da616357238",
        "01e1706e-969f-42f9-9d27-4a5971251972"
    ]
}

Update the status of Check records 001ca9fe-7f34-4a43-9d9c-7d543badd802, 00dff8ea-3bd9-447b-ba57-2da616357238, and 01e1706e-969f-42f9-9d27-4a5971251972 to risk_accepted and set the status to expire on 2025-12-10:

{
    "status": "risk_accepted",
    "status_remarks": "Updated status via POST endpoint",
    "expires_at": "2025-12-10",
    "ids": [
        "001ca9fe-7f34-4a43-9d9c-7d543badd802",
        "00dff8ea-3bd9-447b-ba57-2da616357238",
        "01e1706e-969f-42f9-9d27-4a5971251972"
    ]
}

Update the severity of Check records 001ca9fe-7f34-4a43-9d9c-7d543badd802, 00dff8ea-3bd9-447b-ba57-2da616357238, and 01e1706e-969f-42f9-9d27-4a5971251972 to high:

{
    "severity": "high",
    "severity_remarks": "Updated severity via POST endpoint",
    "ids": [
        "001ca9fe-7f34-4a43-9d9c-7d543badd802",
        "00dff8ea-3bd9-447b-ba57-2da616357238",
        "01e1706e-969f-42f9-9d27-4a5971251972"
    ]
}

Update the status of Check records 001ca9fe-7f34-4a43-9d9c-7d543badd802, 00dff8ea-3bd9-447b-ba57-2da616357238, and 01e1706e-969f-42f9-9d27-4a5971251972 to risk_accepted, set the status to expire on 2025-12-10 and change their severity to high:

{
    "status": "risk_accepted",
    "status_remarks": "Updated status via POST endpoint",
    "expires_at": "2022-12-10",
    "severity": "high",
    "severity_remarks": "Updated severity via POST endpoint",
    "ids": [
        "001ca9fe-7f34-4a43-9d9c-7d543badd802",
        "00dff8ea-3bd9-447b-ba57-2da616357238",
        "01e1706e-969f-42f9-9d27-4a5971251972"
    ]
}

Response

Format

{
  "statusCode": 0,
  "message": "string"
}

Attributes

Attribute

Type

Description

statusCode

Integer

Indicates the status of your request.

message

String

Provides a description of the status.

Possible values:

  • 200 - OK

    The request was successful.

  • 400 - Bad Request

    The formatting or the values provided in the request are invalid.

  • 504 - Gateway Timeout.

    Request failed. Please try again later.

Examples

The request is successful:

{
    "status_code": 200,
    "message": {
        "status": "risk_accepted",
        "status_remarks": "Status updated via POST endpoint",
        "expires_at": "2022-12-10",
        "severity": "high",
        "severity_remarks": "Severity updated via POST endpoint",
        "ids": [
            "001ca9fe-7f34-4a43-9d9c-7d543badd802",
            "00dff8ea-3bd9-447b-ba57-2da616357238",
            "01e1706e-969f-42f9-9d27-4a5971251972"
        ]
    }
}

No valid check IDs are present in the request:

{
    "status_code": 400,
    "message": {
        Error: Please provide one or more check ids
    }
}

The number of Ids included in the ids parameter exceeds the request limit:

{
    "status_code": 400,
    "message": {
        Error: Check ids should not exceed the prescribed request limit. Limit:100/request
    }
}

The check ID used is invalid:

{
    "status_code": 400,
    "message": {
        Error: The following check ids were not found: 001ca9fe-7f34-4a43-9d9c-7d543badd801
    }
}

The request does not contain the status parameter, nor the severity one:

{
    "status_code": 400,
    "message": {
        Error: Please provide a status change, severity change or both.
    }
}

An invalid value was provided for the status parameter:

{
    "status_code": 400,
    "message": {
        Error: 'invlid_status_example' is not a valid status. Valid statuses:open, remediated, risk_accepted, false_positive, needs_review.
    }
}

The value provided to the status_remarks parameter exceeds the length limit:

{
    "status_code": 400,
    "message": {
        Error: status_remarks must not exceed 2000 characters
    }
}

The value provided to the expires_at parameter is invalid:

{
    "status_code": 400,
    "message": {
        Error: The date format is not valid. Required format:'yyyy-mm-d-d'
    }
}

You cannot use the expires_at parameter unless the status parameter is included in the request and given the risk_accepted value.

{
    "status_code": 400,
    "message": {
        Error: Only the 'risk_accepted' status can be set to expire.
    }
}