# Upgrade a plugin


[API catalog](/reference/api/) · [Docker Engine overview](/reference/api/engine/version/v1.57/) · [Product manual](https://docs.docker.com/engine/) · [OpenAPI specification](/reference/api/engine/version/v1.57.yaml)

API version: 1.57





`POST /plugins/{name}/upgrade`



## Connection and access

[API connection and authentication guidance](/reference/api/engine/version/v1.57/#connection)

`X-Registry-Auth` delegates registry credentials and does not authenticate the daemon caller.


Server: `/v1.57`

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
null
```

## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request POST \
  --unix-socket "${DOCKER_SOCKET:-/var/run/docker.sock}" \
  --header 'Content-Type: application/json' \
  --data-raw '[
  {
    "Description": "",
    "Name": "network",
    "Value": [
      "host"
    ]
  },
  {
    "Description": "",
    "Name": "mount",
    "Value": [
      "/data"
    ]
  },
  {
    "Description": "",
    "Name": "device",
    "Value": [
      "/dev/cpu_dma_latency"
    ]
  }
]' \
  'http://localhost/v1.57/plugins/<NAME>/upgrade?remote=%3CREMOTE%3E'
```



## Parameters

### name

Location: path. Required: yes.

The name of the plugin. The `:latest` tag is optional, and is the
default if omitted.


```json
{
  "description": "The name of the plugin. The `:latest` tag is optional, and is the\ndefault if omitted.\n",
  "in": "path",
  "name": "name",
  "pointer": "/paths/~1plugins~1{name}~1upgrade/post/parameters/0",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

### remote

Location: query. Required: yes.

Remote reference to upgrade to.

The `:latest` tag is optional, and is used as the default if omitted.


```json
{
  "description": "Remote reference to upgrade to.\n\nThe `:latest` tag is optional, and is used as the default if omitted.\n",
  "in": "query",
  "name": "remote",
  "pointer": "/paths/~1plugins~1{name}~1upgrade/post/parameters/1",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

### X-Registry-Auth

Location: header. Required: no.

A base64url-encoded auth configuration to use when pulling a plugin
from a registry.

Refer to the [authentication section](/reference/api/engine/version/v1.57/#authentication) for
details.


```json
{
  "description": "A base64url-encoded auth configuration to use when pulling a plugin\nfrom a registry.\n\nRefer to the [authentication section](#section/Authentication) for\ndetails.\n",
  "in": "header",
  "name": "X-Registry-Auth",
  "pointer": "/paths/~1plugins~1{name}~1upgrade/post/parameters/2",
  "schema": {
    "type": "string"
  }
}
```

## Request and responses

### Request  application/json




Schema:

```json
{
  "example": [
    {
      "Description": "",
      "Name": "network",
      "Value": [
        "host"
      ]
    },
    {
      "Description": "",
      "Name": "mount",
      "Value": [
        "/data"
      ]
    },
    {
      "Description": "",
      "Name": "device",
      "Value": [
        "/dev/cpu_dma_latency"
      ]
    }
  ],
  "items": {
    "$ref": "#/components/schemas/PluginPrivilege"
  },
  "type": "array"
}
```









Schema example:
```json
[
  {
    "Description": "",
    "Name": "network",
    "Value": [
      "host"
    ]
  },
  {
    "Description": "",
    "Name": "mount",
    "Value": [
      "/data"
    ]
  },
  {
    "Description": "",
    "Name": "device",
    "Value": [
      "/dev/cpu_dma_latency"
    ]
  }
]
```


### Request  text/plain




Schema:

```json
{
  "example": [
    {
      "Description": "",
      "Name": "network",
      "Value": [
        "host"
      ]
    },
    {
      "Description": "",
      "Name": "mount",
      "Value": [
        "/data"
      ]
    },
    {
      "Description": "",
      "Name": "device",
      "Value": [
        "/dev/cpu_dma_latency"
      ]
    }
  ],
  "items": {
    "$ref": "#/components/schemas/PluginPrivilege"
  },
  "type": "array"
}
```









Schema example:
```json
[
  {
    "Description": "",
    "Name": "network",
    "Value": [
      "host"
    ]
  },
  {
    "Description": "",
    "Name": "mount",
    "Value": [
      "/data"
    ]
  },
  {
    "Description": "",
    "Name": "device",
    "Value": [
      "/dev/cpu_dma_latency"
    ]
  }
]
```


### Response 204 

no error

No response content is declared.











### Response 404 application/json

plugin not installed


Schema:

```json
{
  "$ref": "#/components/schemas/ErrorResponse"
}
```









Schema example:
```json
{
  "message": "Something went wrong."
}
```


### Response 500 application/json

server error


Schema:

```json
{
  "$ref": "#/components/schemas/ErrorResponse"
}
```









Schema example:
```json
{
  "message": "Something went wrong."
}
```


## Complete operation contract

```json
{
  "operationId": "PluginUpgrade",
  "parameters": [
    {
      "description": "The name of the plugin. The `:latest` tag is optional, and is the\ndefault if omitted.\n",
      "in": "path",
      "name": "name",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Remote reference to upgrade to.\n\nThe `:latest` tag is optional, and is used as the default if omitted.\n",
      "in": "query",
      "name": "remote",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "A base64url-encoded auth configuration to use when pulling a plugin\nfrom a registry.\n\nRefer to the [authentication section](#section/Authentication) for\ndetails.\n",
      "in": "header",
      "name": "X-Registry-Auth",
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "example": [
            {
              "Description": "",
              "Name": "network",
              "Value": [
                "host"
              ]
            },
            {
              "Description": "",
              "Name": "mount",
              "Value": [
                "/data"
              ]
            },
            {
              "Description": "",
              "Name": "device",
              "Value": [
                "/dev/cpu_dma_latency"
              ]
            }
          ],
          "items": {
            "$ref": "#/components/schemas/PluginPrivilege"
          },
          "type": "array"
        }
      },
      "text/plain": {
        "schema": {
          "example": [
            {
              "Description": "",
              "Name": "network",
              "Value": [
                "host"
              ]
            },
            {
              "Description": "",
              "Name": "mount",
              "Value": [
                "/data"
              ]
            },
            {
              "Description": "",
              "Name": "device",
              "Value": [
                "/dev/cpu_dma_latency"
              ]
            }
          ],
          "items": {
            "$ref": "#/components/schemas/PluginPrivilege"
          },
          "type": "array"
        }
      }
    },
    "x-codegen-request-body-name": "body"
  },
  "responses": {
    "204": {
      "description": "no error"
    },
    "404": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "plugin not installed"
    },
    "500": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "server error"
    }
  },
  "summary": "Upgrade a plugin",
  "tags": [
    "Plugin"
  ]
}
```

## Referenced schemas

- [#/components/schemas/ErrorResponse](/reference/api/engine/version/v1.57/schemas/ErrorResponse/)

- [#/components/schemas/PluginPrivilege](/reference/api/engine/version/v1.57/schemas/PluginPrivilege/)




