github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/website/pages/api-docs/plugins.mdx (about)

     1  ---
     2  layout: api
     3  page_title: Plugins - HTTP API
     4  sidebar_title: Plugins
     5  description: The `/plugin` endpoints are used to query for and interact with dynamic plugins.
     6  ---
     7  
     8  # Plugins HTTP API
     9  
    10  The `/plugin` endpoints are used to query for and interact with
    11  dynamic plugins. Currently only Container Storage Interface (CSI)
    12  plugins are dynamic.
    13  
    14  ## List Plugins
    15  
    16  This endpoint lists all dynamic plugins.
    17  
    18  | Method | Path          | Produces           |
    19  | ------ | ------------- | ------------------ |
    20  | `GET`  | `/v1/plugins` | `application/json` |
    21  
    22  The table below shows this endpoint's support for
    23  [blocking queries](/api-docs#blocking-queries) and
    24  [required ACLs](/api-docs#acls).
    25  
    26  | Blocking Queries | ACL Required                |
    27  | ---------------- | --------------------------- |
    28  | `YES`            | `namespace:csi-list-plugin` |
    29  
    30  ### Parameters
    31  
    32  - `type` `(string: "")`- Specifies the type of plugin to
    33    query. Currently only supports `csi`. This is specified as a query
    34    string parameter. Returns an empty list if omitted.
    35  
    36  ### Sample Request
    37  
    38  ```shell-sessioncurl \
    39      https://localhost:4646/v1/plugins?type=csi
    40  ```
    41  
    42  ### Sample Response
    43  
    44  ```json
    45  [
    46    {
    47      "ID": "example",
    48      "Provider": "aws.ebs",
    49      "ControllerRequired": true,
    50      "ControllersHealthy": 2,
    51      "ControllersExpected": 3,
    52      "NodesHealthy": 14,
    53      "NodesExpected": 16,
    54      "CreateIndex": 52,
    55      "ModifyIndex": 93
    56    }
    57  ]
    58  ```
    59  
    60  ## Read Plugin
    61  
    62  Get details of a single plugin, including information about the
    63  plugin's job and client fingerprint data.
    64  
    65  | Method | Path                        | Produces           |
    66  | ------ | --------------------------- | ------------------ |
    67  | `GET`  | `/v1/plugin/csi/:plugin_id` | `application/json` |
    68  
    69  The table below shows this endpoint's support for
    70  [blocking queries](/api-docs#blocking-queries) and
    71  [required ACLs](/api-docs#acls).
    72  
    73  | Blocking Queries | ACL Required                |
    74  | ---------------- | --------------------------- |
    75  | `YES`            | `namespace:csi-read-plugin` |
    76  
    77  ### Sample Request
    78  
    79  ```shell-sessioncurl \
    80      https://localhost:4646/v1/plugin/csi/example_plugin_id
    81  ```
    82  
    83  ### Sample Response
    84  
    85  ```json
    86  [
    87    {
    88      "ID": "example_plugin_id",
    89      "Topologies": [
    90        {"key": "val"},
    91        {"key": "val2"}
    92      ],
    93      "Provider": "aws.ebs",
    94      "Version": "1.0.1",
    95      "ControllersRequired": true,
    96      "ControllersHealthy": 1,
    97      "Controllers": {
    98        "example_node_id": {
    99          "PluginID": "example_plugin_id",
   100          "Provider": "aws.ebs",
   101          "ProviderVersion": "1.0.1",
   102          "AllocID": "alloc-id",
   103          "Healthy": true,
   104          "HealthDescription": "healthy",
   105          "UpdateTime": "2020-01-31T00:00:00.000Z",
   106          "RequiresControllerPlugin": true,
   107          "RequiresTopologies": true,
   108          "ControllerInfo": {
   109            "SupportsReadOnlyAttach": true,
   110            "SupportsAttachDetach": true,
   111            "SupportsListVolumes": true,
   112            "SupportsListVolumesAttachedNodes": false
   113          }
   114      },
   115      "NodesHealthy": 1,
   116      "Nodes": {
   117        "example_node_id": {
   118          "PluginID": "example_plugin_id",
   119          "Provider": "aws.ebs",
   120          "ProviderVersion": "1.0.1",
   121          "AllocID": "alloc-id",
   122          "Healthy": true,
   123          "HealthDescription": "healthy",
   124          "UpdateTime": "2020-01-30T00:00:00.000Z",
   125          "RequiresControllerPlugin": true,
   126          "RequiresTopologies": true,
   127          "NodeInfo": {
   128            "ID": "example_node_id",
   129            "MaxVolumes": 51,
   130            "AccessibleTopology": {
   131              "key": "val2"
   132            },
   133            "RequiresNodeStageVolume": true
   134          }
   135        }
   136      }
   137    }
   138  ]
   139  ```