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

# MyQ

MyQ is a print management platform. OctoXLabs reads printers and users from the MyQ REST API. It can also run a MyQ report to add extra device details.

## Use cases

* List the printers that MyQ reports.

```
Adapters = my-q
```

* List the MyQ users.

```
Adapters = my-q AND Email ~ example.com
```

## Before you begin

### Network

| Source              | Destination | Port                | Protocol                           |
| ------------------- | ----------- | ------------------- | ---------------------------------- |
| OctoXLabs connector | MyQ server  | The configured port | HTTPS (HTTP when Is Secure is off) |

### Required permissions

| Scope or role           | Permission | Needed for                     |
| ----------------------- | ---------- | ------------------------------ |
| Manage Users (scope)    | Read       | Users                          |
| Manage Printers (scope) | Read       | Printers                       |
| Reports (scope)         | Read       | Only when Report Execute is on |

The connector requests the scopes `users printers`, and `users printers reports` when Report Execute is on.

## Create credentials in MyQ

{% stepper %}
{% step %}

### Open the settings

In the MyQ X Web Interface, open the Settings tab.
{% endstep %}

{% step %}

### Open REST API applications

Go to External Systems (or Connections) and, under REST API applications, select Add.
{% endstep %}

{% step %}

### Name the client

Enter a Title for your client and select the Scope: assign Manage Users and Manage Printers.
{% endstep %}

{% step %}

### Copy the credentials

Copy the Client ID and Secret.
{% endstep %}

{% step %}

### Save

Select OK.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter                         | Required    | Type    | Default | Description                                                                        |
| --------------------------------- | ----------- | ------- | ------- | ---------------------------------------------------------------------------------- |
| IP Address or Hostname (`ip`)     | Yes         | String  |         | IP address or host name of the MyQ server.                                         |
| Port (`port`)                     | Yes         | String  |         | MyQ port.                                                                          |
| Client ID (`client_id`)           | Yes         | String  |         | Client ID of the REST API application.                                             |
| Client Secret (`client_secret`)   | Yes         | String  |         | Secret of the REST API application.                                                |
| Report Execute (`report_execute`) | No          | Boolean | False   | Run a custom report for detailed device information.                               |
| Report ID (`report_id`)           | Conditional | Integer |         | ID of the report. Required when Report Execute is on. It is in the MyQ report URL. |
| Hostname Field (`hostname_field`) | No          | String  | Printer | Column of the report that holds the printer host name.                             |
| Thread Count (`thread_count`)     | No          | Integer | 32      | Parallel threads for API requests (min 1, max 32).                                 |
| Sleep Time (`sleep_time`)         | No          | Integer |         | Delay in seconds between thread batches. Increase it on rate limit errors.         |
| Is Secure (`is_secure`)           | No          | Boolean | True    | Use HTTPS.                                                                         |
| Timeout (`timeout`)               | No          | Integer | 30      | Seconds to wait for API responses.                                                 |

## Troubleshooting

| Error message                                         | Cause                                                                                        | Fix                                                       |
| ----------------------------------------------------- | -------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| The test passes only if the printer list is not empty | The printers call returned no printers.                                                      | Check the scope and that MyQ has printers in online mode. |
| Report execution failed - no execution ID returned    | The report did not start. Logged as a warning and the discovery goes on without report data. | Check the Report ID and the Reports scope.                |

## Change history

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