> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/d/darktrace.md).

# Darktrace

Darktrace is an AI-driven cybersecurity platform that detects threats by learning normal behavior on the network. OctoXLabs reads the devices Darktrace sees and adds them to the device inventory.

## Use cases

* **List devices seen by Darktrace.** Show every device reported by Darktrace.

```
Adapters = darktrace
```

* **Find devices on the network that are not in your CMDB.** Replace `servicenow` with the adapter of your CMDB.

```
Adapters = darktrace AND NOT Adapters = servicenow
```

## Before you begin

### Network

| Source              | Destination                    | Port | Protocol |
| ------------------- | ------------------------------ | ---- | -------- |
| OctoXLabs connector | Darktrace host (URL parameter) | 443  | HTTPS    |

The connector always builds an `https://` URL and does not set a port, so the default HTTPS port is used. It does not verify the TLS certificate. Put a host name in the URL parameter without a scheme.

### Required permissions

| Scope or role                   | Permission | Needed for                   |
| ------------------------------- | ---------- | ---------------------------- |
| Account with API access enabled | API access | Calling the devices endpoint |

## Create credentials in Darktrace

{% stepper %}
{% step %}

### Create an API account

Log in to the Darktrace web app with an admin account. From the left menu, select **Admin** > **Permissions Admin**, then click **Account Create** to create an account for the integration.
{% endstep %}

{% step %}

### Enable API access

Activate the new account with the Flags icon on the right. A green icon confirms that API access is enabled.
{% endstep %}

{% step %}

### Get the tokens

From the left menu, select **Admin** > **System Config**. In the **Settings** dialog, select **API Token**. The public token is shown on the right. To view the private token, click **Remove**.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter       | Required | Type               | Default               | Description                                               |
| --------------- | -------- | ------------------ | --------------------- | --------------------------------------------------------- |
| Url             | No       | String             | darktrace.example.com | Host name of Darktrace, without a scheme.                 |
| Public api key  | Yes      | String             | None                  | Public API token.                                         |
| Private api key | Yes      | String (sensitive) | None                  | Private API token, used to sign requests.                 |
| Is secure       | No       | Boolean            | true                  | Present in the form, but the connector always uses HTTPS. |
| Timeout         | No       | Integer            | 30                    | Seconds to wait for API responses.                        |

## Troubleshooting

| Error message                                                  | Cause                                                                           | Fix                                                                     |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| Status Code: `, followed by URL, Method and the response body` | The API answered with an error status. This is the shared REST connector error. | Check the token pair, the account API access flag and the system clock. |

## Change history

{% hint style="info" %}
Available starting from version 5.5.0.
{% endhint %}
