Perform a Plug-in Action

post

/rest/{versionId}/admin/plugins/{pluginId}/action

Use this (POST) method to install, uninstall, replace, or recover a plugin. One action per plug-in is allowed at the same time. For the recover action, the first failed host is recovered if there are more than one failed hosts. The REST client needs to use the Get Plug-in Information task to check on the status.

Request

Supported Media Types
Path Parameters
Body ()
Root Schema : pluginAction
Type: object
Show Source
Back to Top

Response

Supported Media Types

202 Response

Accepted

400 Response

The user input is invalid.

401 Response

The session ID is invalid.

403 Response

There is no permission to access the resources.

404 Response

The object (resource URI, device, and so on) of your input request cannot be found.

500 Response

Internal server error
Back to Top

Examples

Example of Accessing the API with cURL

The following example shows how to perform a plug-in action by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

curl -X POST -b sessionid.txt \
    -d@request.xml \
    --header "Accept: application/xml" \
    --header "Content-Type: application/xml" \
    "https://example.com:8443/rest/v1.3/admin/plugins/ID7/action"

The following shows an example of the contents of the request.xml file sent as the request body.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<pluginAction>
  <type>install</type>
</pluginAction>

Example of Accessing the API with Python

The following example shows how to perform a plug-in action by submitting a POST request on the REST resource using Python. This example assumes the cookie variable contains a valid authentication cookie. For an example of authenticating with Python, see Authenticate.

import requests
from lxml import etree
url = "https://example.com:8443/rest/v1.3/admin/plugins/ID7/action"
headers = { "Accept":"application/xml", "Content-Type":"application/xml", "Cookie":cookie }
data = etree.tostring(etree.parse("request.xml"))
resp = requests.post(url, headers=headers, data=data)

Example of the Response Headers

The following shows an example of the response headers.

HTTP/1.1 202 Accepted
Date: Wed, 08 May 2019 12:46:14 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
vary: Origin
Content-Length: 0

Example of the Response Body

This endpoint does not return a response body.

Back to Top