# Dependencies

When a driver is loaded into Engine, it becomes a *dependency*. Dependencies are available as the blueprint from which modules are created. The `/dependencies` endpoint provide methods to discover, load and update these. For more on the role the drivers play, see:

{% content-ref url="/pages/-LZYWPvkHMhwM04lvR4r" %}
[Drivers](/key-concepts/drivers.md)
{% endcontent-ref %}

## Model <a href="#model" id="model"></a>

| Attribute | Type | Description |
| --------- | ---- | ----------- |

| id | `string` | The dependency's unique ID. |
| -- | -------- | --------------------------- |

| name | `string` | Human readable name for the dependency. |
| ---- | -------- | --------------------------------------- |

| class\_name | `string` | The Ruby class name of the driver. |
| ----------- | -------- | ---------------------------------- |

| module\_name | `string` | The kind of module this instantiates (e.g. `Display`). |
| ------------ | -------- | ------------------------------------------------------ |

| role | `string` | One of `ssh`, `device`, `service`, or `logic`. |
| ---- | -------- | ---------------------------------------------- |

| description | `string` | Additional information that describes the dependency. |
| ----------- | -------- | ----------------------------------------------------- |

| default | <p><code>string</code> or</p><p><code>integer</code></p> | A URL or port number that is typical for modules using this. |
| ------- | -------------------------------------------------------- | ------------------------------------------------------------ |

| ignore\_connected | `boolean` | Default state of connectivity monitoring for instances. |
| ----------------- | --------- | ------------------------------------------------------- |

| settings | `object` | A JSON object containing configuration shared by all instances. |
| -------- | -------- | --------------------------------------------------------------- |

| created\_at | `integer` | Timestamp of creation. |
| ----------- | --------- | ---------------------- |

## Search

<mark style="color:blue;">`GET`</mark> `https://example.com/api/control/dependencies`

List or search for loaded dependencies.

#### Query Parameters

| Name   | Type    | Description                         |
| ------ | ------- | ----------------------------------- |
| q      | string  | A search filter to apply.           |
| limit  | integer | (default 20) Max results to return. |
| offset | integer | The offset within the result set.   |
| role   | string  | Filter to a specific role.          |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "total": 1,
  "results": [
    {
      "name": "Pexip Management API",
      "description": "Pexip VMR management",
      "role": "service",
      "default": null,
      "class_name": "::Pexip::Management",
      "module_name": "Meeting",
      "ignore_connected": false,
      "settings": {},
      "created_at": 1562041127
    }
  ]
}
```

{% endtab %}
{% endtabs %}

Queries default to searching for any of the entered terms (words). A small query language provides the ability to structure complex queries.

| Operator    | Action                                            |                       |
| ----------- | ------------------------------------------------- | --------------------- |
| `+`         | Matches both terms.                               |                       |
| \`          | \`                                                | Matches either terms. |
| `-`         | Negates a single token.                           |                       |
| `"`         | Wraps tokens to form a phrase.                    |                       |
| `(` and `)` | Provide precedence.                               |                       |
| `~N`        | Specifies edit distance (fuzziness) after a word. |                       |
| `~N`        | Specifies slop amount (deviation) after a phrase. |                       |

## Management

## Create

<mark style="color:green;">`POST`</mark> `https://example.com/api/control/dependencies`

Defines a new dependency. The driver this references must be available on the engine nodes running this instance of Engine. Available drivers can be listed by using the discovery endpoint.

#### Request Body

| Name              | Type    | Description |
| ----------------- | ------- | ----------- |
| name              | string  |             |
| class\_name       | string  |             |
| module\_name      | string  |             |
| role              | string  |             |
| description       | string  |             |
| default           | string  |             |
| ignore\_connected | boolean |             |
| settings          | object  |             |

{% tabs %}
{% tab title="200 Created." %}

```javascript
{
  "name": "Pexip Management API",
  "description": "Pexip VMR management",
  "role": "service",
  "default": null,
  "class_name": "::Pexip::Management",
  "module_name": "Meeting",
  "ignore_connected": false,
  "settings": {},
  "created_at": 1562041127
}
```

{% endtab %}

{% tab title="406 Validation exception." %}

```
```

{% endtab %}
{% endtabs %}

## Retrieve

<mark style="color:blue;">`GET`</mark> `https://example.com/api/control/dependencies/{id}`

Gets dependency information

#### Path Parameters

| Name | Type   | Description                       |
| ---- | ------ | --------------------------------- |
| id   | string | ID of the dependency to retrieve. |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "name": "Pexip Management API",
  "description": "Pexip VMR management",
  "role": "service",
  "default": null,
  "class_name": "::Pexip::Management",
  "module_name": "Meeting",
  "ignore_connected": false,
  "settings": {},
  "created_at": 1562041127
}
```

{% endtab %}
{% endtabs %}

## Update

<mark style="color:orange;">`PUT`</mark> `https://example.com/api/control/dependencies/{id}`

Updates dependency metadata.

#### Path Parameters

| Name | Type   | Description                      |
| ---- | ------ | -------------------------------- |
| id   | string | ID of the dependency to update.i |

#### Request Body

| Name              | Type    | Description |
| ----------------- | ------- | ----------- |
| name              | string  |             |
| class\_name       | string  |             |
| module\_name      | string  |             |
| role              | string  |             |
| description       | string  |             |
| default           | string  |             |
| ignore\_connected | boolean |             |
| settings          | object  |             |

{% tabs %}
{% tab title="200 Updated." %}

```javascript
{
  "name": "Pexip Management API",
  "description": "Pexip VMR management",
  "role": "service",
  "default": null,
  "class_name": "::Pexip::Management",
  "module_name": "Meeting",
  "ignore_connected": false,
  "settings": {},
  "created_at": 1562041127
}
```

{% endtab %}

{% tab title="406 Validation error." %}

```
```

{% endtab %}
{% endtabs %}

## Delete

<mark style="color:red;">`DELETE`</mark> `https://example.com/api/control/dependencies/{id}`

Unloads a driver.

#### Path Parameters

| Name | Type   | Description                     |
| ---- | ------ | ------------------------------- |
| id   | string | ID of the dependency to remove. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Interaction

## Reload

<mark style="color:green;">`POST`</mark> `https://example.com/api/control/dependencies/{id}/reload`

Live reloads the latest version of the driver code and updates all modules using this.

#### Path Parameters

| Name | Type   | Description                     |
| ---- | ------ | ------------------------------- |
| id   | string | ID of the dependency to reload. |

{% tabs %}
{% tab title="200 Reload successful." %}

```
```

{% endtab %}

{% tab title="500 An error was detected in the updated driver and the reload is blocked. If this occurs, the previously operating driver will continue to run uninterrupted." %}

```
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://engine.place.technology/api/control/dependencies.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
