Add a Malop Label

Endpoint URL: https://<your server>/rest/detection/add-label
Endpoint URI: detection/add-label

Action: POST

Add a new Malop label to the list of labels available for use to add to Malops.

This request is supported for versions 20.1.43 and later.

Note

Ensure that you have logged into the Cybereason platform. For details, see Log in with the API.

Request Headers

Add a Content-Type:application/json header.

Note

If you are using cURL, add the authorization cookie details or the path to the file containing the cookie details as part of every request.


Request Body

Input: JSON

{"labelText":"<label to add>"}

Request Parameters

URL/URI parameters: none

Request Body Parameters: Add a string value for the labelText parameter containing the label text.


Response Status Codes

This request can return the following status codes:

  • 200: Success OK or an error message saying why


Response Success Schema

The response contains the following fields:

Field

Type

Description

id

Integer

The unique string the Cybereason platform assigns to the label.

labelText

String

The text used for the label.

totalCount

Integer

The total number of Malops to which the label is applied.

selectionCount

Integer

The number of Malops IDs added to the request as selected. The response always returns all labels for all Malops but this number reflects the Malops specifically entered.


Response Failure Schema

None


Important Response Fields

Important information is found in these fields:

  • id parameter: The unique identifier the Cybereason platform uses for this label.

  • labelText parameter: The string you added for the label.


Example: Add a Malop label

Request

curl --request POST \
        --url https://12.34.56.78/rest/detection/add-label \
        --header 'Content-Type:application/json' \
        --data '{"labelText":"Triaged"}'

Response

[
    {
        "id":1,
        "labelText":"New malop",
        "totalCount":17,
        "selectionCount":0
    },
    {
        "id":2,
        "labelText":"Triaged",
        "totalCount":80,
        "selectionCount":0
    }
]