> 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/p/prey.md).

# Prey

Prey tracks and protects laptops and mobile devices. OctoXLabs reads the devices in your Prey account to add them to the inventory.

## Use cases

* List devices that Prey reports.

```
Adapters = prey
```

* Find devices not seen for 30 days.

```
Adapters = prey AND NOT LastSeen last now-30d/d
```

## Before you begin

### Network

| Source              | Destination           | Port               | Protocol                         |
| ------------------- | --------------------- | ------------------ | -------------------------------- |
| OctoXLabs connector | `api.preyproject.com` | 443 (configurable) | HTTPS (HTTP if Is Secure is off) |

### Required permissions

The API key needs permission to read devices. You choose permissions when you create the key. The exact permission name is not in the sources. Not verified.

## Create credentials in Prey

{% stepper %}
{% step %}

### Open the Developer API tab

Log in to the Prey Control Panel, go to **Settings** and open the **Developer API** tab.
{% endstep %}

{% step %}

### Generate a key

Use the key generator. You can set permissions and an expiration date.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter | Required | Type    | Default             | Description                                 |
| --------- | -------- | ------- | ------------------- | ------------------------------------------- |
| IP        | No       | String  | api.preyproject.com | IP address or host name of the Prey server. |
| Port      | No       | Integer | 443                 | Port number.                                |
| API Key   | Yes      | String  |                     | API key (sent as the `apikey` header).      |
| Is Secure | No       | Boolean | True                | Use HTTPS.                                  |
| Timeout   | No       | Integer | 30                  | Seconds to wait for API responses.          |

## Troubleshooting

| Error message | Cause | Fix |
| ------------- | ----- | --- |

## Change history

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