> 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/s/snipe-it.md).

# Snipe IT

Snipe-IT is an open-source IT asset management platform for tracking hardware, licenses, accessories and consumables. OctoXLabs reads the hardware assets, and optionally the users, and adds them to the device and user inventory.

## Use cases

* **Find assets tracked in Snipe-IT that no security agent reports.** Compare the asset register with your endpoint tools. How devices are matched depends on your device merge settings.

```
Adapters = snipe-it AND NOT Adapters = active-directory
```

* **Find asset owners that are not in the directory.** Turn on **Fetch Users**, then list Snipe-IT users that have no directory account.

```
Adapters = snipe-it AND NOT Adapters = active-directory
```

Run this query in the user inventory for the second use case.

## Before you begin

### Network

| Source              | Destination                  | Port                 | Protocol                         |
| ------------------- | ---------------------------- | -------------------- | -------------------------------- |
| OctoXLabs connector | Snipe-IT host (IP parameter) | 443 (Port parameter) | HTTPS (HTTP if Is Secure is off) |

The connector does not verify the TLS certificate of the Snipe-IT host.

### Required permissions

| Scope or role     | Permission    | Needed for                          |
| ----------------- | ------------- | ----------------------------------- |
| User permission   | Read users    | Users (only when Fetch Users is on) |
| Device permission | Read hardware | Devices                             |

The baseline says at least User Read is needed to read users and at least Device Read to fetch devices (hardware).

## Create credentials in Snipe-IT

{% stepper %}
{% step %}

### Open the API key page

Sign in to the Snipe-IT web interface with the account OctoXLabs will use. Open the account dropdown in the top-right corner and click **Manage API Keys**.
{% endstep %}

{% step %}

### Create a token

Create a new personal API token and give it a name.
{% endstep %}

{% step %}

### Copy the token

Save the token securely. Paste it into the **API Token** parameter in OctoXLabs.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter              | Required | Type    | Default | Description                                                            |
| ---------------------- | -------- | ------- | ------- | ---------------------------------------------------------------------- |
| IP                     | Yes      | String  | None    | IP address or hostname of the Snipe-IT host.                           |
| Port                   | No       | Integer | 443     | Port of the Snipe-IT host.                                             |
| API Token              | Yes      | String  | None    | API token of the account used to connect. Stored as sensitive.         |
| Fetch Users            | No       | Boolean | False   | Also collect users.                                                    |
| Fetch Archived Devices | No       | Boolean | False   | Also collect archived hardware. These devices are flagged as archived. |
| Is Secure              | No       | Boolean | True    | Use HTTPS.                                                             |
| Timeout                | No       | Integer | 30      | Seconds to wait for an API response.                                   |

## Troubleshooting

| Error message                                                        | Cause                                            | Fix                                                                              |
| -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------- |
| Request failed after {n} retries for url {url}                       | The API answered 429 on every attempt.           | Run discovery again later.                                                       |
| Failed to fetch endpoint list: {status}                              | A list call returned a status other than 200.    | Check the token, its permissions, and the IP and port.                           |
| Invalid JSON response while fetching endpoint list (status={status}) | The host did not return JSON.                    | Check that the IP, port and Is Secure point to Snipe-IT and not to a proxy page. |
| Failed to fetch connection test data: {status}                       | The connection test got a status other than 200. | Check the token and network access.                                              |

## Change history

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