Create or update an indicator triage state

Note: This endpoint is in beta and may be subject to changes. Please check the documentation regularly for updates.

POST https://api.ap1.datadoghq.com/api/v2/security/siem/ioc-explorer/triagehttps://api.ap2.datadoghq.com/api/v2/security/siem/ioc-explorer/triagehttps://api.datadoghq.eu/api/v2/security/siem/ioc-explorer/triagehttps://api.ddog-gov.com/api/v2/security/siem/ioc-explorer/triagehttps://api.us2.ddog-gov.com/api/v2/security/siem/ioc-explorer/triagehttps://api.uk1.datadoghq.com/api/v2/security/siem/ioc-explorer/triagehttps://api.datadoghq.com/api/v2/security/siem/ioc-explorer/triagehttps://api.us3.datadoghq.com/api/v2/security/siem/ioc-explorer/triagehttps://api.us5.datadoghq.com/api/v2/security/siem/ioc-explorer/triage

Overview

Set the triage state of an indicator of compromise (IoC). This creates or updates the triage state for the indicator in your organization.

OAuth apps require the security_monitoring_signals_write authorization scope to access this endpoint.

Request

Body Data (required)

The triage state to set for the indicator.

Expand All

Field

Type

Description

data [required]

object

Data object for the triage write request.

attributes [required]

object

Attributes for setting an indicator's triage state.

indicator [required]

string

The indicator value to triage (for example, an IP address or domain).

triage_state [required]

enum

Current triage state of the indicator. Allowed enum values: not_reviewed,reviewed

type [required]

string

Triage state resource type.

default: ioc_triage_state

{
  "data": {
    "attributes": {
      "indicator": "192.0.2.1",
      "triage_state": "reviewed"
    },
    "type": "ioc_triage_state"
  }
}

Response

Created

Response for the create indicator triage state endpoint.

Expand All

Field

Type

Description

data

object

Data object of the triage write response.

attributes

object

Attributes of a created or updated triage state.

created_at

date-time

Timestamp when the triage record was created.

indicator

string

The indicator value that was triaged.

triage_state

enum

Current triage state of the indicator. Allowed enum values: not_reviewed,reviewed

triaged_at

date-time

Timestamp when the triage state was set.

triaged_by

string

UUID of the user who set the triage state.

id

string

Unique identifier for the triage state record.

type

string

Triage state resource type.

default: ioc_triage_state

{
  "data": {
    "attributes": {
      "created_at": "2019-09-19T10:00:00.000Z",
      "indicator": "string",
      "triage_state": "not_reviewed",
      "triaged_at": "2019-09-19T10:00:00.000Z",
      "triaged_by": "string"
    },
    "id": "string",
    "type": "string"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Authorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example

                          ## default
# 

# Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.uk1.datadoghq.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/security/siem/ioc-explorer/triage" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "indicator": "192.0.2.1", "triage_state": "reviewed" }, "type": "ioc_triage_state" } } EOF
// Create or update an indicator triage state returns "Created" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.IoCTriageWriteRequest{
		Data: datadogV2.IoCTriageWriteRequestData{
			Attributes: datadogV2.IoCTriageWriteRequestAttributes{
				Indicator:   "192.0.2.1",
				TriageState: datadogV2.IOCTRIAGESTATE_REVIEWED,
			},
			Type: "ioc_triage_state",
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	configuration.SetUnstableOperationEnabled("v2.CreateIoCTriageState", true)
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewSecurityMonitoringApi(apiClient)
	resp, r, err := api.CreateIoCTriageState(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SecurityMonitoringApi.CreateIoCTriageState`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SecurityMonitoringApi.CreateIoCTriageState`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
// Create or update an indicator triage state returns "Created" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SecurityMonitoringApi;
import com.datadog.api.client.v2.model.IoCTriageState;
import com.datadog.api.client.v2.model.IoCTriageWriteRequest;
import com.datadog.api.client.v2.model.IoCTriageWriteRequestAttributes;
import com.datadog.api.client.v2.model.IoCTriageWriteRequestData;
import com.datadog.api.client.v2.model.IoCTriageWriteResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    defaultClient.setUnstableOperationEnabled("v2.createIoCTriageState", true);
    SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

    IoCTriageWriteRequest body =
        new IoCTriageWriteRequest()
            .data(
                new IoCTriageWriteRequestData()
                    .attributes(
                        new IoCTriageWriteRequestAttributes()
                            .indicator("192.0.2.1")
                            .triageState(IoCTriageState.REVIEWED))
                    .type("ioc_triage_state"));

    try {
      IoCTriageWriteResponse result = apiInstance.createIoCTriageState(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SecurityMonitoringApi#createIoCTriageState");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Instructions

First install the library and its dependencies and then save the example to Example.java and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
"""
Create or update an indicator triage state returns "Created" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi
from datadog_api_client.v2.model.io_c_triage_state import IoCTriageState
from datadog_api_client.v2.model.io_c_triage_write_request import IoCTriageWriteRequest
from datadog_api_client.v2.model.io_c_triage_write_request_attributes import IoCTriageWriteRequestAttributes
from datadog_api_client.v2.model.io_c_triage_write_request_data import IoCTriageWriteRequestData

body = IoCTriageWriteRequest(
    data=IoCTriageWriteRequestData(
        attributes=IoCTriageWriteRequestAttributes(
            indicator="192.0.2.1",
            triage_state=IoCTriageState.REVIEWED,
        ),
        type="ioc_triage_state",
    ),
)

configuration = Configuration()
configuration.unstable_operations["create_io_c_triage_state"] = True
with ApiClient(configuration) as api_client:
    api_instance = SecurityMonitoringApi(api_client)
    response = api_instance.create_io_c_triage_state(body=body)

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
# Create or update an indicator triage state returns "Created" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.unstable_operations["v2.create_io_c_triage_state".to_sym] = true
end
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new

body = DatadogAPIClient::V2::IoCTriageWriteRequest.new({
  data: DatadogAPIClient::V2::IoCTriageWriteRequestData.new({
    attributes: DatadogAPIClient::V2::IoCTriageWriteRequestAttributes.new({
      indicator: "192.0.2.1",
      triage_state: DatadogAPIClient::V2::IoCTriageState::REVIEWED,
    }),
    type: "ioc_triage_state",
  }),
})
p api_instance.create_io_c_triage_state(body)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
// Create or update an indicator triage state returns "Created" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI;
use datadog_api_client::datadogV2::model::IoCTriageState;
use datadog_api_client::datadogV2::model::IoCTriageWriteRequest;
use datadog_api_client::datadogV2::model::IoCTriageWriteRequestAttributes;
use datadog_api_client::datadogV2::model::IoCTriageWriteRequestData;

#[tokio::main]
async fn main() {
    let body = IoCTriageWriteRequest::new(IoCTriageWriteRequestData::new(
        IoCTriageWriteRequestAttributes::new("192.0.2.1".to_string(), IoCTriageState::REVIEWED),
        "ioc_triage_state".to_string(),
    ));
    let mut configuration = datadog::Configuration::new();
    configuration.set_unstable_operation_enabled("v2.CreateIoCTriageState", true);
    let api = SecurityMonitoringAPI::with_config(configuration);
    let resp = api.create_io_c_triage_state(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
/**
 * Create or update an indicator triage state returns "Created" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.createIoCTriageState"] = true;
const apiInstance = new v2.SecurityMonitoringApi(configuration);

const params: v2.SecurityMonitoringApiCreateIoCTriageStateRequest = {
  body: {
    data: {
      attributes: {
        indicator: "192.0.2.1",
        triageState: "reviewed",
      },
      type: "ioc_triage_state",
    },
  },
};

apiInstance
  .createIoCTriageState(params)
  .then((data: v2.IoCTriageWriteResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Instructions

First install the library and its dependencies and then save the example to example.ts and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"