github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/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-session
    39  $ curl \
    40      https://localhost:4646/v1/plugins?type=csi
    41  ```
    42  
    43  ### Sample Response
    44  
    45  ```json
    46  [
    47    {
    48      "ID": "example",
    49      "Provider": "aws.ebs",
    50      "ControllerRequired": true,
    51      "ControllersHealthy": 2,
    52      "ControllersExpected": 3,
    53      "NodesHealthy": 14,
    54      "NodesExpected": 16,
    55      "CreateIndex": 52,
    56      "ModifyIndex": 93
    57    }
    58  ]
    59  ```
    60  
    61  ## Read Plugin
    62  
    63  Get details of a single plugin, including information about the
    64  plugin's job and client fingerprint data.
    65  
    66  | Method | Path                        | Produces           |
    67  | ------ | --------------------------- | ------------------ |
    68  | `GET`  | `/v1/plugin/csi/:plugin_id` | `application/json` |
    69  
    70  The table below shows this endpoint's support for
    71  [blocking queries](/api-docs#blocking-queries) and
    72  [required ACLs](/api-docs#acls).
    73  
    74  | Blocking Queries | ACL Required                |
    75  | ---------------- | --------------------------- |
    76  | `YES`            | `namespace:csi-read-plugin` |
    77  
    78  ### Sample Request
    79  
    80  ```shell-session
    81  $ curl \
    82      https://localhost:4646/v1/plugin/csi/example_plugin_id
    83  ```
    84  
    85  ### Sample Response
    86  
    87  ```json
    88  [
    89    {
    90      "ID": "example_plugin_id",
    91      "Provider": "aws.ebs",
    92      "Version": "1.0.1",
    93      "ControllersRequired": true,
    94      "ControllersHealthy": 1,
    95      "Controllers": {
    96        "example_node_id": {
    97          "PluginID": "example_plugin_id",
    98          "Provider": "aws.ebs",
    99          "ProviderVersion": "1.0.1",
   100          "AllocID": "alloc-id",
   101          "Healthy": true,
   102          "HealthDescription": "healthy",
   103          "UpdateTime": "2020-01-31T00:00:00.000Z",
   104          "RequiresControllerPlugin": true,
   105          "RequiresTopologies": true,
   106          "ControllerInfo": {
   107            "SupportsReadOnlyAttach": true,
   108            "SupportsAttachDetach": true,
   109            "SupportsListVolumes": true,
   110            "SupportsListVolumesAttachedNodes": false
   111          }
   112        }
   113      },
   114      "NodesHealthy": 1,
   115      "Nodes": {
   116        "example_node_id": {
   117          "PluginID": "example_plugin_id",
   118          "Provider": "aws.ebs",
   119          "ProviderVersion": "1.0.1",
   120          "AllocID": "alloc-id",
   121          "Healthy": true,
   122          "HealthDescription": "healthy",
   123          "UpdateTime": "2020-01-30T00:00:00.000Z",
   124          "RequiresControllerPlugin": true,
   125          "RequiresTopologies": true,
   126          "NodeInfo": {
   127            "ID": "example_node_id",
   128            "MaxVolumes": 51,
   129            "AccessibleTopology": {
   130              "key": "val2"
   131            },
   132            "RequiresNodeStageVolume": true
   133          }
   134        }
   135      }
   136    }
   137  ]
   138  ```