# Plugin

Plugins are special software modules which modify the behavior of various API calls.

## Plugin object structure

```json
{
  "id": 1,
  "type": "tracker_register",
  "ui_module": "Registration.appPlugins.BundledSim",
  "module": "com.navixy.plugin.tracker.register.bundled_sim",
  "filter": {
    "exclusion": true,
    "values": ["navixymobile", "mobile_unknown.*"]
  },
  "parameters": {<parameter1>}
}
```

* `id` - int. An ID of plugin.
* `type` - string. Plugin type.
* `ui_module` - string. Plugin UI module name.
* `module` - string. Plugin module name.
* `filter` - object. A model filter which describes to which device models this plugin is applicable.
  * `exclusion` - boolean. If `true`, "models" lists models NOT supported by this plugin, if `false`, "models"\
    contains all supported models.
  * `values` - string array. List of the regexes for models which are (not) supported by this plugin.
* `parameters` - plugin-specific parameters as JSON object. This field omitted if it's `null` (and it is `null` most of the time).

#### object example

```json
{
  "id": 4,
  "type": "tracker_report",
  "module": "com.navixy.plugin.tracker.report.trip",
  "ui_module": "Trip",
  "filter": {
    "exclusion": true,
    "values": []
  }
}
```

## API actions

API path: `/plugin`.

### list

Get all plugins available to the user. List of available plugins may vary from user to user depending on platform settings and purchased features. Only these plugins can be used to register trackers, generate reports, etc.

#### Parameters

Only API key `hash`.

#### Examples

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

```sh
curl -X POST 'https://api.eu.navixy.com/v2/plugin/list' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b"}'
```

{% endtab %}

{% tab title="HTTP GET" %}

```http
https://api.eu.navixy.com/v2/plugin/list?hash=a6aa75587e5c59c32d347da438505fc3
```

{% endtab %}
{% endtabs %}

#### Response

```json
{
  "success": true,
  "list": [
    {
      "id": 4,
      "type": "tracker_report",
      "module": "com.navixy.plugin.tracker.report.trip",
      "ui_module": "Trip",
      "filter": {
        "exclusion": true,
        "values": []
      }
    }
  ]
}
```

* `list` - array of objects. List of available plugins.

#### Errors

* [General](https://navixy.com/docs/navixy-api/user-api/errors#error-codes) types only.

#### Standalone-specific:

If no plugins enabled for user and his dealer then available plugins enabled by default\
(config options **plugin.tracker.register.defaultIds** and **plugin.tracker.report.defaultIds**).


---

# 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://navixy.com/docs/navixy-api/user-api/backend-api/resources/commons/plugin/index.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.
