Browse code

Merge pull request #25548 from thaJeztah/plugin-api-docs

Add API documentation for experimental plugin features

Sebastiaan van Stijn authored on 2016/08/12 04:52:04
Showing 2 changed files
... ...
@@ -3382,7 +3382,446 @@ Instruct the driver to remove the network (`id`).
3382 3382
 -   **404** - no such network
3383 3383
 -   **500** - server error
3384 3384
 
3385
-## 3.6 Nodes
3385
+## 3.6 Plugins (experimental)
3386
+
3387
+### List plugins
3388
+
3389
+`GET /plugins`
3390
+
3391
+Returns information about installed plugins.
3392
+
3393
+**Example request**:
3394
+
3395
+    GET /plugins HTTP/1.1
3396
+
3397
+**Example response**:
3398
+
3399
+```
3400
+HTTP/1.1 200 OK
3401
+Content-Type: application/json
3402
+
3403
+[
3404
+  {
3405
+    "Id": "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078",
3406
+    "Name": "tiborvass/no-remove",
3407
+    "Tag": "latest",
3408
+    "Active": true,
3409
+    "Config": {
3410
+      "Mounts": [
3411
+        {
3412
+          "Name": "",
3413
+          "Description": "",
3414
+          "Settable": null,
3415
+          "Source": "/data",
3416
+          "Destination": "/data",
3417
+          "Type": "bind",
3418
+          "Options": [
3419
+            "shared",
3420
+            "rbind"
3421
+          ]
3422
+        },
3423
+        {
3424
+          "Name": "",
3425
+          "Description": "",
3426
+          "Settable": null,
3427
+          "Source": null,
3428
+          "Destination": "/foobar",
3429
+          "Type": "tmpfs",
3430
+          "Options": null
3431
+        }
3432
+      ],
3433
+      "Env": [
3434
+        "DEBUG=1"
3435
+      ],
3436
+      "Args": null,
3437
+      "Devices": null
3438
+    },
3439
+    "Manifest": {
3440
+      "ManifestVersion": "v0",
3441
+      "Description": "A test plugin for Docker",
3442
+      "Documentation": "https://docs.docker.com/engine/extend/plugins/",
3443
+      "Interface": {
3444
+        "Types": [
3445
+          "docker.volumedriver/1.0"
3446
+        ],
3447
+        "Socket": "plugins.sock"
3448
+      },
3449
+      "Entrypoint": [
3450
+        "plugin-no-remove",
3451
+        "/data"
3452
+      ],
3453
+      "Workdir": "",
3454
+      "User": {
3455
+      },
3456
+      "Network": {
3457
+        "Type": "host"
3458
+      },
3459
+      "Capabilities": null,
3460
+      "Mounts": [
3461
+        {
3462
+          "Name": "",
3463
+          "Description": "",
3464
+          "Settable": null,
3465
+          "Source": "/data",
3466
+          "Destination": "/data",
3467
+          "Type": "bind",
3468
+          "Options": [
3469
+            "shared",
3470
+            "rbind"
3471
+          ]
3472
+        },
3473
+        {
3474
+          "Name": "",
3475
+          "Description": "",
3476
+          "Settable": null,
3477
+          "Source": null,
3478
+          "Destination": "/foobar",
3479
+          "Type": "tmpfs",
3480
+          "Options": null
3481
+        }
3482
+      ],
3483
+      "Devices": [
3484
+        {
3485
+          "Name": "device",
3486
+          "Description": "a host device to mount",
3487
+          "Settable": null,
3488
+          "Path": "/dev/cpu_dma_latency"
3489
+        }
3490
+      ],
3491
+      "Env": [
3492
+        {
3493
+          "Name": "DEBUG",
3494
+          "Description": "If set, prints debug messages",
3495
+          "Settable": null,
3496
+          "Value": "1"
3497
+        }
3498
+      ],
3499
+      "Args": {
3500
+        "Name": "args",
3501
+        "Description": "command line arguments",
3502
+        "Settable": null,
3503
+        "Value": [
3504
+
3505
+        ]
3506
+      }
3507
+    }
3508
+  }
3509
+]
3510
+```
3511
+
3512
+**Status codes**:
3513
+
3514
+-   **200** - no error
3515
+-   **500** - server error
3516
+
3517
+### Install a plugin
3518
+
3519
+`POST /plugins/pull?name=<plugin name>`
3520
+
3521
+Pulls and installs a plugin. After the plugin is installed, it can be enabled
3522
+using the [`POST /plugins/(plugin name)/enable` endpoint](#enable-a-plugin).
3523
+
3524
+**Example request**:
3525
+
3526
+```
3527
+POST /plugins/pull?name=tiborvass/no-remove:latest HTTP/1.1
3528
+```
3529
+
3530
+The `:latest` tag is optional, and is used as default if omitted. When using
3531
+this endpoint to pull a plugin from the registry, the `X-Registry-Auth` header
3532
+can be used to include a base64-encoded AuthConfig object. Refer to the [create
3533
+an image](#create-an-image) section for more details.
3534
+
3535
+**Example response**:
3536
+
3537
+```
3538
+HTTP/1.1 200 OK
3539
+Content-Type: application/json
3540
+Content-Length: 175
3541
+
3542
+[
3543
+  {
3544
+    "Name": "network",
3545
+    "Description": "",
3546
+    "Value": [
3547
+      "host"
3548
+    ]
3549
+  },
3550
+  {
3551
+    "Name": "mount",
3552
+    "Description": "",
3553
+    "Value": [
3554
+      "/data"
3555
+    ]
3556
+  },
3557
+  {
3558
+    "Name": "device",
3559
+    "Description": "",
3560
+    "Value": [
3561
+      "/dev/cpu_dma_latency"
3562
+    ]
3563
+  }
3564
+]
3565
+```
3566
+
3567
+**Query parameters**:
3568
+
3569
+- **name** -  Name of the plugin to pull. The name may include a tag or digest.
3570
+    This parameter is required.
3571
+
3572
+**Status codes**:
3573
+
3574
+-   **200** - no error
3575
+-   **500** - error parsing reference / not a valid repository/tag: repository
3576
+      name must have at least one component
3577
+-   **500** - plugin already exists
3578
+
3579
+### Inspect a plugin
3580
+
3581
+`GET /plugins/(plugin name)`
3582
+
3583
+Returns detailed information about an installed plugin.
3584
+
3585
+**Example request**:
3586
+
3587
+```
3588
+GET /plugins/tiborvass/no-remove:latest HTTP/1.1
3589
+```
3590
+
3591
+The `:latest` tag is optional, and is used as default if omitted.
3592
+
3593
+
3594
+**Example response**:
3595
+
3596
+```
3597
+HTTP/1.1 200 OK
3598
+Content-Type: application/json
3599
+
3600
+{
3601
+  "Id": "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078",
3602
+  "Name": "tiborvass/no-remove",
3603
+  "Tag": "latest",
3604
+  "Active": false,
3605
+  "Config": {
3606
+    "Mounts": [
3607
+      {
3608
+        "Name": "",
3609
+        "Description": "",
3610
+        "Settable": null,
3611
+        "Source": "/data",
3612
+        "Destination": "/data",
3613
+        "Type": "bind",
3614
+        "Options": [
3615
+          "shared",
3616
+          "rbind"
3617
+        ]
3618
+      },
3619
+      {
3620
+        "Name": "",
3621
+        "Description": "",
3622
+        "Settable": null,
3623
+        "Source": null,
3624
+        "Destination": "/foobar",
3625
+        "Type": "tmpfs",
3626
+        "Options": null
3627
+      }
3628
+    ],
3629
+    "Env": [
3630
+      "DEBUG=1"
3631
+    ],
3632
+    "Args": null,
3633
+    "Devices": null
3634
+  },
3635
+  "Manifest": {
3636
+    "ManifestVersion": "v0",
3637
+    "Description": "A test plugin for Docker",
3638
+    "Documentation": "https://docs.docker.com/engine/extend/plugins/",
3639
+    "Interface": {
3640
+      "Types": [
3641
+        "docker.volumedriver/1.0"
3642
+      ],
3643
+      "Socket": "plugins.sock"
3644
+    },
3645
+    "Entrypoint": [
3646
+      "plugin-no-remove",
3647
+      "/data"
3648
+    ],
3649
+    "Workdir": "",
3650
+    "User": {
3651
+    },
3652
+    "Network": {
3653
+      "Type": "host"
3654
+    },
3655
+    "Capabilities": null,
3656
+    "Mounts": [
3657
+      {
3658
+        "Name": "",
3659
+        "Description": "",
3660
+        "Settable": null,
3661
+        "Source": "/data",
3662
+        "Destination": "/data",
3663
+        "Type": "bind",
3664
+        "Options": [
3665
+          "shared",
3666
+          "rbind"
3667
+        ]
3668
+      },
3669
+      {
3670
+        "Name": "",
3671
+        "Description": "",
3672
+        "Settable": null,
3673
+        "Source": null,
3674
+        "Destination": "/foobar",
3675
+        "Type": "tmpfs",
3676
+        "Options": null
3677
+      }
3678
+    ],
3679
+    "Devices": [
3680
+      {
3681
+        "Name": "device",
3682
+        "Description": "a host device to mount",
3683
+        "Settable": null,
3684
+        "Path": "/dev/cpu_dma_latency"
3685
+      }
3686
+    ],
3687
+    "Env": [
3688
+      {
3689
+        "Name": "DEBUG",
3690
+        "Description": "If set, prints debug messages",
3691
+        "Settable": null,
3692
+        "Value": "1"
3693
+      }
3694
+    ],
3695
+    "Args": {
3696
+      "Name": "args",
3697
+      "Description": "command line arguments",
3698
+      "Settable": null,
3699
+      "Value": [
3700
+
3701
+      ]
3702
+    }
3703
+  }
3704
+}
3705
+```
3706
+
3707
+**Status codes**:
3708
+
3709
+-   **200** - no error
3710
+-   **404** - plugin not installed
3711
+
3712
+### Enable a plugin
3713
+
3714
+`POST /plugins/(plugin name)/enable`
3715
+
3716
+Enables a plugin
3717
+
3718
+**Example request**:
3719
+
3720
+```
3721
+POST /plugins/tiborvass/no-remove:latest/enable HTTP/1.1
3722
+```
3723
+
3724
+The `:latest` tag is optional, and is used as default if omitted.
3725
+
3726
+
3727
+**Example response**:
3728
+
3729
+```
3730
+HTTP/1.1 200 OK
3731
+Content-Length: 0
3732
+Content-Type: text/plain; charset=utf-8
3733
+```
3734
+
3735
+**Status codes**:
3736
+
3737
+-   **200** - no error
3738
+-   **500** - plugin is already enabled
3739
+
3740
+### Disable a plugin
3741
+
3742
+`POST /plugins/(plugin name)/disable`
3743
+
3744
+Disables a plugin
3745
+
3746
+**Example request**:
3747
+
3748
+```
3749
+POST /plugins/tiborvass/no-remove:latest/disable HTTP/1.1
3750
+```
3751
+
3752
+The `:latest` tag is optional, and is used as default if omitted.
3753
+
3754
+
3755
+**Example response**:
3756
+
3757
+```
3758
+HTTP/1.1 200 OK
3759
+Content-Length: 0
3760
+Content-Type: text/plain; charset=utf-8
3761
+```
3762
+
3763
+**Status codes**:
3764
+
3765
+-   **200** - no error
3766
+-   **500** - plugin is already disabled
3767
+
3768
+### Remove a plugin
3769
+
3770
+`DELETE /plugins/(plugin name)`
3771
+
3772
+Removes a plugin
3773
+
3774
+**Example request**:
3775
+
3776
+```
3777
+DELETE /plugins/tiborvass/no-remove:latest HTTP/1.1
3778
+```
3779
+
3780
+The `:latest` tag is optional, and is used as default if omitted.
3781
+
3782
+**Example response**:
3783
+
3784
+```
3785
+HTTP/1.1 200 OK
3786
+Content-Length: 0
3787
+Content-Type: text/plain; charset=utf-8
3788
+```
3789
+
3790
+**Status codes**:
3791
+
3792
+-   **200** - no error
3793
+-   **404** - plugin not installed
3794
+-   **500** - plugin is active
3795
+
3796
+<!-- TODO Document "docker plugin push" endpoint once we have "plugin build"
3797
+
3798
+### Push a plugin
3799
+
3800
+`POST /plugins/tiborvass/(plugin name)/push HTTP/1.1`
3801
+
3802
+Pushes a plugin to the registry.
3803
+
3804
+**Example request**:
3805
+
3806
+```
3807
+POST /plugins/tiborvass/no-remove:latest HTTP/1.1
3808
+```
3809
+
3810
+The `:latest` tag is optional, and is used as default if omitted. When using
3811
+this endpoint to push a plugin to the registry, the `X-Registry-Auth` header
3812
+can be used to include a base64-encoded AuthConfig object. Refer to the [create
3813
+an image](#create-an-image) section for more details.
3814
+
3815
+**Example response**:
3816
+
3817
+**Status codes**:
3818
+
3819
+-   **200** - no error
3820
+-   **404** - plugin not installed
3821
+
3822
+-->
3823
+
3824
+## 3.7 Nodes
3386 3825
 
3387 3826
 **Note**: Node operations require the engine to be part of a swarm.
3388 3827
 
... ...
@@ -3643,7 +4082,7 @@ JSON Parameters:
3643 3643
 -   **404** – no such node
3644 3644
 -   **500** – server error
3645 3645
 
3646
-## 3.7 Swarm
3646
+## 3.8 Swarm
3647 3647
 
3648 3648
 ### Initialize a new swarm
3649 3649
 
... ...
@@ -3862,7 +4301,7 @@ JSON Parameters:
3862 3862
     - **Worker** - Token to use for joining as a worker.
3863 3863
     - **Manager** - Token to use for joining as a manager.
3864 3864
 
3865
-## 3.8 Services
3865
+## 3.9 Services
3866 3866
 
3867 3867
 **Note**: Service operations require to first be part of a swarm.
3868 3868
 
... ...
@@ -4347,7 +4786,7 @@ Update the service `id`.
4347 4347
 -   **404** – no such service
4348 4348
 -   **500** – server error
4349 4349
 
4350
-## 3.9 Tasks
4350
+## 3.10 Tasks
4351 4351
 
4352 4352
 **Note**: Task operations require the engine to be part of a swarm.
4353 4353
 
... ...
@@ -3390,7 +3390,463 @@ Instruct the driver to remove the network (`id`).
3390 3390
 -   **404** - no such network
3391 3391
 -   **500** - server error
3392 3392
 
3393
-## 3.6 Nodes
3393
+## 3.6 Plugins
3394
+
3395
+### List plugins
3396
+
3397
+`GET /plugins`
3398
+
3399
+Returns information about installed plugins.
3400
+
3401
+**Example request**:
3402
+
3403
+    GET /plugins HTTP/1.1
3404
+
3405
+**Example response**:
3406
+
3407
+```
3408
+HTTP/1.1 200 OK
3409
+Content-Type: application/json
3410
+
3411
+[
3412
+  {
3413
+    "Id": "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078",
3414
+    "Name": "tiborvass/no-remove",
3415
+    "Tag": "latest",
3416
+    "Active": true,
3417
+    "Config": {
3418
+      "Mounts": [
3419
+        {
3420
+          "Name": "",
3421
+          "Description": "",
3422
+          "Settable": null,
3423
+          "Source": "/data",
3424
+          "Destination": "/data",
3425
+          "Type": "bind",
3426
+          "Options": [
3427
+            "shared",
3428
+            "rbind"
3429
+          ]
3430
+        },
3431
+        {
3432
+          "Name": "",
3433
+          "Description": "",
3434
+          "Settable": null,
3435
+          "Source": null,
3436
+          "Destination": "/foobar",
3437
+          "Type": "tmpfs",
3438
+          "Options": null
3439
+        }
3440
+      ],
3441
+      "Env": [
3442
+        "DEBUG=1"
3443
+      ],
3444
+      "Args": null,
3445
+      "Devices": null
3446
+    },
3447
+    "Manifest": {
3448
+      "ManifestVersion": "v0",
3449
+      "Description": "A test plugin for Docker",
3450
+      "Documentation": "https://docs.docker.com/engine/extend/plugins/",
3451
+      "Interface": {
3452
+        "Types": [
3453
+          "docker.volumedriver/1.0"
3454
+        ],
3455
+        "Socket": "plugins.sock"
3456
+      },
3457
+      "Entrypoint": [
3458
+        "plugin-no-remove",
3459
+        "/data"
3460
+      ],
3461
+      "Workdir": "",
3462
+      "User": {
3463
+      },
3464
+      "Network": {
3465
+        "Type": "host"
3466
+      },
3467
+      "Capabilities": null,
3468
+      "Mounts": [
3469
+        {
3470
+          "Name": "",
3471
+          "Description": "",
3472
+          "Settable": null,
3473
+          "Source": "/data",
3474
+          "Destination": "/data",
3475
+          "Type": "bind",
3476
+          "Options": [
3477
+            "shared",
3478
+            "rbind"
3479
+          ]
3480
+        },
3481
+        {
3482
+          "Name": "",
3483
+          "Description": "",
3484
+          "Settable": null,
3485
+          "Source": null,
3486
+          "Destination": "/foobar",
3487
+          "Type": "tmpfs",
3488
+          "Options": null
3489
+        }
3490
+      ],
3491
+      "Devices": [
3492
+        {
3493
+          "Name": "device",
3494
+          "Description": "a host device to mount",
3495
+          "Settable": null,
3496
+          "Path": "/dev/cpu_dma_latency"
3497
+        }
3498
+      ],
3499
+      "Env": [
3500
+        {
3501
+          "Name": "DEBUG",
3502
+          "Description": "If set, prints debug messages",
3503
+          "Settable": null,
3504
+          "Value": "1"
3505
+        }
3506
+      ],
3507
+      "Args": {
3508
+        "Name": "args",
3509
+        "Description": "command line arguments",
3510
+        "Settable": null,
3511
+        "Value": [
3512
+
3513
+        ]
3514
+      }
3515
+    }
3516
+  }
3517
+]
3518
+```
3519
+
3520
+**Status codes**:
3521
+
3522
+-   **200** - no error
3523
+-   **500** - server error
3524
+
3525
+### Install a plugin
3526
+
3527
+`POST /plugins/pull?name=<plugin name>`
3528
+
3529
+Pulls and installs a plugin. After the plugin is installed, it can be enabled
3530
+using the [`POST /plugins/(plugin name)/enable` endpoint](#enable-a-plugin).
3531
+
3532
+**Example request**:
3533
+
3534
+```
3535
+POST /plugins/pull?name=tiborvass/no-remove:latest HTTP/1.1
3536
+```
3537
+
3538
+The `:latest` tag is optional, and is used as default if omitted. When using
3539
+this endpoint to pull a plugin from the registry, the `X-Registry-Auth` header
3540
+can be used to include a base64-encoded AuthConfig object. Refer to the [create
3541
+an image](#create-an-image) section for more details.
3542
+
3543
+**Example response**:
3544
+
3545
+```
3546
+HTTP/1.1 200 OK
3547
+Content-Type: application/json
3548
+Content-Length: 175
3549
+
3550
+[
3551
+  {
3552
+    "Name": "network",
3553
+    "Description": "",
3554
+    "Value": [
3555
+      "host"
3556
+    ]
3557
+  },
3558
+  {
3559
+    "Name": "mount",
3560
+    "Description": "",
3561
+    "Value": [
3562
+      "/data"
3563
+    ]
3564
+  },
3565
+  {
3566
+    "Name": "device",
3567
+    "Description": "",
3568
+    "Value": [
3569
+      "/dev/cpu_dma_latency"
3570
+    ]
3571
+  }
3572
+]
3573
+```
3574
+
3575
+**Query parameters**:
3576
+
3577
+- **name** -  Name of the plugin to pull. The name may include a tag or digest.
3578
+    This parameter is required.
3579
+
3580
+**Status codes**:
3581
+
3582
+-   **200** - no error
3583
+-   **500** - error parsing reference / not a valid repository/tag: repository
3584
+      name must have at least one component
3585
+-   **500** - plugin already exists
3586
+
3587
+### Inspect a plugin
3588
+
3589
+`GET /plugins/(plugin name)`
3590
+
3591
+Returns detailed information about an installed plugin.
3592
+
3593
+**Example request**:
3594
+
3595
+```
3596
+GET /plugins/tiborvass/no-remove:latest HTTP/1.1
3597
+```
3598
+
3599
+The `:latest` tag is optional, and is used as default if omitted.
3600
+
3601
+
3602
+**Example response**:
3603
+
3604
+```
3605
+HTTP/1.1 200 OK
3606
+Content-Type: application/json
3607
+
3608
+{
3609
+  "Id": "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078",
3610
+  "Name": "tiborvass/no-remove",
3611
+  "Tag": "latest",
3612
+  "Active": false,
3613
+  "Config": {
3614
+    "Mounts": [
3615
+      {
3616
+        "Name": "",
3617
+        "Description": "",
3618
+        "Settable": null,
3619
+        "Source": "/data",
3620
+        "Destination": "/data",
3621
+        "Type": "bind",
3622
+        "Options": [
3623
+          "shared",
3624
+          "rbind"
3625
+        ]
3626
+      },
3627
+      {
3628
+        "Name": "",
3629
+        "Description": "",
3630
+        "Settable": null,
3631
+        "Source": null,
3632
+        "Destination": "/foobar",
3633
+        "Type": "tmpfs",
3634
+        "Options": null
3635
+      }
3636
+    ],
3637
+    "Env": [
3638
+      "DEBUG=1"
3639
+    ],
3640
+    "Args": null,
3641
+    "Devices": null
3642
+  },
3643
+  "Manifest": {
3644
+    "ManifestVersion": "v0",
3645
+    "Description": "A test plugin for Docker",
3646
+    "Documentation": "https://docs.docker.com/engine/extend/plugins/",
3647
+    "Interface": {
3648
+      "Types": [
3649
+        "docker.volumedriver/1.0"
3650
+      ],
3651
+      "Socket": "plugins.sock"
3652
+    },
3653
+    "Entrypoint": [
3654
+      "plugin-no-remove",
3655
+      "/data"
3656
+    ],
3657
+    "Workdir": "",
3658
+    "User": {
3659
+    },
3660
+    "Network": {
3661
+      "Type": "host"
3662
+    },
3663
+    "Capabilities": null,
3664
+    "Mounts": [
3665
+      {
3666
+        "Name": "",
3667
+        "Description": "",
3668
+        "Settable": null,
3669
+        "Source": "/data",
3670
+        "Destination": "/data",
3671
+        "Type": "bind",
3672
+        "Options": [
3673
+          "shared",
3674
+          "rbind"
3675
+        ]
3676
+      },
3677
+      {
3678
+        "Name": "",
3679
+        "Description": "",
3680
+        "Settable": null,
3681
+        "Source": null,
3682
+        "Destination": "/foobar",
3683
+        "Type": "tmpfs",
3684
+        "Options": null
3685
+      }
3686
+    ],
3687
+    "Devices": [
3688
+      {
3689
+        "Name": "device",
3690
+        "Description": "a host device to mount",
3691
+        "Settable": null,
3692
+        "Path": "/dev/cpu_dma_latency"
3693
+      }
3694
+    ],
3695
+    "Env": [
3696
+      {
3697
+        "Name": "DEBUG",
3698
+        "Description": "If set, prints debug messages",
3699
+        "Settable": null,
3700
+        "Value": "1"
3701
+      }
3702
+    ],
3703
+    "Args": {
3704
+      "Name": "args",
3705
+      "Description": "command line arguments",
3706
+      "Settable": null,
3707
+      "Value": [
3708
+
3709
+      ]
3710
+    }
3711
+  }
3712
+}
3713
+```
3714
+
3715
+**Status codes**:
3716
+
3717
+-   **200** - no error
3718
+-   **404** - plugin not installed
3719
+
3720
+<!-- TODO Document "docker plugin set" endpoint once implemented
3721
+### Configure a plugin
3722
+
3723
+`POST /plugins/(plugin name)/set`
3724
+
3725
+**Status codes**:
3726
+
3727
+-   **500** - not implemented
3728
+
3729
+-->
3730
+
3731
+### Enable a plugin
3732
+
3733
+`POST /plugins/(plugin name)/enable`
3734
+
3735
+Enables a plugin
3736
+
3737
+**Example request**:
3738
+
3739
+```
3740
+POST /plugins/tiborvass/no-remove:latest/enable HTTP/1.1
3741
+```
3742
+
3743
+The `:latest` tag is optional, and is used as default if omitted.
3744
+
3745
+
3746
+**Example response**:
3747
+
3748
+```
3749
+HTTP/1.1 200 OK
3750
+Content-Length: 0
3751
+Content-Type: text/plain; charset=utf-8
3752
+```
3753
+
3754
+**Status codes**:
3755
+
3756
+-   **200** - no error
3757
+-   **500** - plugin is already enabled
3758
+
3759
+### Disable a plugin
3760
+
3761
+`POST /plugins/(plugin name)/disable`
3762
+
3763
+Disables a plugin
3764
+
3765
+**Example request**:
3766
+
3767
+```
3768
+POST /plugins/tiborvass/no-remove:latest/disable HTTP/1.1
3769
+```
3770
+
3771
+The `:latest` tag is optional, and is used as default if omitted.
3772
+
3773
+
3774
+**Example response**:
3775
+
3776
+```
3777
+HTTP/1.1 200 OK
3778
+Content-Length: 0
3779
+Content-Type: text/plain; charset=utf-8
3780
+```
3781
+
3782
+**Status codes**:
3783
+
3784
+-   **200** - no error
3785
+-   **500** - plugin is already disabled
3786
+
3787
+### Remove a plugin
3788
+
3789
+`DELETE /plugins/(plugin name)`
3790
+
3791
+Removes a plugin
3792
+
3793
+**Example request**:
3794
+
3795
+```
3796
+DELETE /plugins/tiborvass/no-remove:latest HTTP/1.1
3797
+```
3798
+
3799
+The `:latest` tag is optional, and is used as default if omitted.
3800
+
3801
+**Example response**:
3802
+
3803
+```
3804
+HTTP/1.1 200 OK
3805
+Content-Length: 0
3806
+Content-Type: text/plain; charset=utf-8
3807
+```
3808
+
3809
+**Query parameters**:
3810
+
3811
+- **force** - Boolean value, set to `1` / `True` / `true` to force removing the
3812
+    plugin. Forcing removal disables the plugin before removing, but may result
3813
+    in issues if the plugin is in use by a container.
3814
+
3815
+**Status codes**:
3816
+
3817
+-   **200** - no error
3818
+-   **404** - plugin not installed
3819
+-   **500** - plugin is active
3820
+
3821
+<!-- TODO Document "docker plugin push" endpoint once we have "plugin build"
3822
+
3823
+### Push a plugin
3824
+
3825
+`POST /plugins/tiborvass/(plugin name)/push HTTP/1.1`
3826
+
3827
+Pushes a plugin to the registry.
3828
+
3829
+**Example request**:
3830
+
3831
+```
3832
+POST /plugins/tiborvass/no-remove:latest HTTP/1.1
3833
+```
3834
+
3835
+The `:latest` tag is optional, and is used as default if omitted. When using
3836
+this endpoint to push a plugin to the registry, the `X-Registry-Auth` header
3837
+can be used to include a base64-encoded AuthConfig object. Refer to the [create
3838
+an image](#create-an-image) section for more details.
3839
+
3840
+**Example response**:
3841
+
3842
+**Status codes**:
3843
+
3844
+-   **200** - no error
3845
+-   **404** - plugin not installed
3846
+
3847
+-->
3848
+
3849
+## 3.7 Nodes
3394 3850
 
3395 3851
 **Note**: Node operations require the engine to be part of a swarm.
3396 3852
 
... ...
@@ -3651,7 +4107,7 @@ JSON Parameters:
3651 3651
 -   **404** – no such node
3652 3652
 -   **500** – server error
3653 3653
 
3654
-## 3.7 Swarm
3654
+## 3.8 Swarm
3655 3655
 
3656 3656
 ### Initialize a new swarm
3657 3657
 
... ...
@@ -3870,7 +4326,7 @@ JSON Parameters:
3870 3870
     - **Worker** - Token to use for joining as a worker.
3871 3871
     - **Manager** - Token to use for joining as a manager.
3872 3872
 
3873
-## 3.8 Services
3873
+## 3.9 Services
3874 3874
 
3875 3875
 **Note**: Service operations require to first be part of a swarm.
3876 3876
 
... ...
@@ -4355,7 +4811,7 @@ Update the service `id`.
4355 4355
 -   **404** – no such service
4356 4356
 -   **500** – server error
4357 4357
 
4358
-## 3.9 Tasks
4358
+## 3.10 Tasks
4359 4359
 
4360 4360
 **Note**: Task operations require the engine to be part of a swarm.
4361 4361