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

# phpIPAM

phpIPAM is an open source IP address management tool. OctoXLabs reads its devices through the REST API, adds the MAC address of each device and matches the IP to the most specific subnet to add subnet and VLAN data.

## Use cases

* List devices that phpIPAM reports.

```
Adapters = phpipam
```

## Before you begin

### Network

| Source              | Destination    | Port               | Protocol                         |
| ------------------- | -------------- | ------------------ | -------------------------------- |
| OctoXLabs connector | phpIPAM server | 443 (configurable) | HTTPS (HTTP if Is Secure is off) |

### Required permissions

| Scope or role                    | Permission | Needed for                                                |
| -------------------------------- | ---------- | --------------------------------------------------------- |
| API application permission: Read | Read       | Devices, device addresses, subnets (Administration > API) |

## Create credentials in phpIPAM

{% stepper %}
{% step %}

### Create an API application

In phpIPAM go to **Administration > API** and create an application. Note its name, because it appears in every API URL (for `/api/myapp/devices/` the App Name is `myapp`).
{% endstep %}

{% step %}

### Set permissions

Give the application at least **Read** permission.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter     | Required | Type    | Default | Description                                                    |
| ------------- | -------- | ------- | ------- | -------------------------------------------------------------- |
| IP / Hostname | Yes      | String  |         | IP address or host name of the phpIPAM server.                 |
| Port          | No       | Integer | 443     | Port number.                                                   |
| Username      | Yes      | String  |         | phpIPAM account.                                               |
| Password      | Yes      | String  |         | Password of the account.                                       |
| App Name      | Yes      | String  |         | Name of the API application in phpIPAM.                        |
| Is Secure     | No       | Boolean | True    | Use HTTPS.                                                     |
| Thread Count  | No       | Integer | 32      | Parallel threads. Min 1, max 32.                               |
| Sleep Time    | No       | Integer | 0       | Seconds between thread batches. Raise it on rate limit errors. |
| Timeout       | No       | Integer | 30      | Seconds to wait for API responses.                             |

## Troubleshooting

| Error message                                               | Cause                              | Fix                                                            |
| ----------------------------------------------------------- | ---------------------------------- | -------------------------------------------------------------- |
| Failed to fetch subnets, devices will carry no subnet data: | The subnet call failed.            | Check read permission on subnets. Devices are still collected. |
| Max retries exceeded for                                    | phpIPAM kept answering 401 or 429. | Check credentials and rate limits.                             |

## Change history

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